@konce-pt/angular 0.7.6 → 0.7.8
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/CHANGELOG.md +120 -0
- package/fesm2022/konce-pt-angular-charts.mjs +2 -2
- package/fesm2022/konce-pt-angular-charts.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-map.mjs +51 -20
- package/fesm2022/konce-pt-angular-map.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-roadmap.mjs +5 -5
- package/fesm2022/konce-pt-angular-roadmap.mjs.map +1 -1
- package/fesm2022/konce-pt-angular.mjs +1242 -605
- package/fesm2022/konce-pt-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/avatar/llms.txt +5 -0
- package/src/lib/avatar-group/llms.txt +3 -0
- package/src/lib/data-table/llms.txt +84 -4
- package/src/lib/date-range/llms.txt +8 -1
- package/src/lib/datepicker/llms.txt +32 -3
- package/src/lib/icon/llms.txt +4 -1
- package/src/lib/input-number/llms.txt +11 -6
- package/src/lib/knob/llms.txt +5 -2
- package/src/lib/rich-text/llms.txt +3 -0
- package/src/lib/select/llms.txt +5 -0
- package/src/lib/slider/llms.txt +6 -1
- package/types/konce-pt-angular-map.d.ts +2 -1
- package/types/konce-pt-angular-map.d.ts.map +1 -1
- package/types/konce-pt-angular.d.ts +240 -31
- package/types/konce-pt-angular.d.ts.map +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, booleanAttribute, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, model, output, signal, Injectable, inject, ElementRef, effect, InjectionToken, PLATFORM_ID, DestroyRef, makeEnvironmentProviders, contentChild, afterNextRender, forwardRef, numberAttribute, viewChild, Directive, TemplateRef, contentChildren, viewChildren, afterRenderEffect, linkedSignal } from '@angular/core';
|
|
2
|
+
import { input, booleanAttribute, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, model, output, signal, Injectable, inject, ElementRef, effect, InjectionToken, PLATFORM_ID, DestroyRef, makeEnvironmentProviders, contentChild, afterNextRender, untracked, forwardRef, numberAttribute, viewChild, Directive, TemplateRef, contentChildren, viewChildren, afterRenderEffect, linkedSignal } from '@angular/core';
|
|
3
3
|
import { CdkOverlayOrigin, CdkConnectedOverlay, OverlayContainer } from '@angular/cdk/overlay';
|
|
4
4
|
import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
|
|
5
5
|
|
|
@@ -308,8 +308,48 @@ const KPT_ICONS = {
|
|
|
308
308
|
'share': '<path d="M6 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M18 6m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M8.7 10.7l6.6 -3.4" /> <path d="M8.7 13.3l6.6 3.4" />',
|
|
309
309
|
'external-link': '<path d="M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6" /> <path d="M11 13l9 -9" /> <path d="M15 4h5v5" />',
|
|
310
310
|
'crosshair': '<path d="M4 12h4" /> <path d="M16 12h4" /> <path d="M12 4v4" /> <path d="M12 16v4" /> <path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" />',
|
|
311
|
+
'adjustments-horizontal': '<path d="M12 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /> <path d="M4 6l8 0" /> <path d="M16 6l4 0" /> <path d="M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /> <path d="M4 12l2 0" /> <path d="M10 12l10 0" /> <path d="M15 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /> <path d="M4 18l11 0" /> <path d="M19 18l1 0" />',
|
|
311
312
|
};
|
|
312
313
|
|
|
314
|
+
// Allowlist SVG dla treści przechodzącej przez `register()` — sam rejestr trafia bez sanitizera
|
|
315
|
+
// wprost do `innerHTML` (`icon.component.ts`, markery mapy), więc runtime'owe wywołanie `register()`
|
|
316
|
+
// z niezaufaną treścią (CMS/API/upload) byłoby DOM XSS. Wbudowany `KPT_ICONS` (build-time, zaufany)
|
|
317
|
+
// nie przechodzi przez ten filtr. Zestaw tagów/atrybutów pokrywa 100% wbudowanych ikon i pełnego
|
|
318
|
+
// zestawu Tabler (5130) — oba używają wyłącznie `<path d/fill/opacity/stroke>` — więc sanitizacja
|
|
319
|
+
// jest dla nich no-opem.
|
|
320
|
+
const ALLOWED_SVG_TAGS = new Set([
|
|
321
|
+
'path', 'circle', 'rect', 'g', 'line', 'polygon', 'polyline', 'ellipse',
|
|
322
|
+
]);
|
|
323
|
+
const ALLOWED_SVG_ATTRS = new Set([
|
|
324
|
+
'd', 'cx', 'cy', 'r', 'rx', 'ry', 'x', 'y', 'x1', 'y1', 'x2', 'y2', 'width', 'height', 'points',
|
|
325
|
+
'fill', 'stroke', 'stroke-width', 'stroke-linecap', 'stroke-linejoin', 'opacity', 'transform',
|
|
326
|
+
]);
|
|
327
|
+
/**
|
|
328
|
+
* Sanityzuje fragment SVG do allowlisty tagów/atrybutów geometrii — patrz komentarz wyżej.
|
|
329
|
+
*
|
|
330
|
+
* Fragment MUSI być parsowany owinięty w `<svg>` — parser HTML przełącza się w tryb „foreign
|
|
331
|
+
* content" dopiero po napotkaniu tagu `<svg>`, dopiero wtedy składnia samozamykająca (`<path .../>`)
|
|
332
|
+
* jest respektowana. Bez wrappera `<path d="…" />` zostaje w zwykłym trybie HTML, gdzie `path` nie
|
|
333
|
+
* jest elementem pustym — kolejne rodzeństwo trafiłoby jako jego DZIECKO zamiast obok niego.
|
|
334
|
+
*/
|
|
335
|
+
function sanitizeSvgFragment(svg) {
|
|
336
|
+
const tpl = document.createElement('template');
|
|
337
|
+
tpl.innerHTML = `<svg>${svg}</svg>`;
|
|
338
|
+
const root = tpl.content.firstElementChild;
|
|
339
|
+
if (!root)
|
|
340
|
+
return '';
|
|
341
|
+
for (const el of Array.from(root.querySelectorAll('*'))) {
|
|
342
|
+
if (!ALLOWED_SVG_TAGS.has(el.tagName.toLowerCase())) {
|
|
343
|
+
el.remove();
|
|
344
|
+
continue;
|
|
345
|
+
}
|
|
346
|
+
for (const attr of Array.from(el.attributes)) {
|
|
347
|
+
if (!ALLOWED_SVG_ATTRS.has(attr.name.toLowerCase()))
|
|
348
|
+
el.removeAttribute(attr.name);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
return root.innerHTML;
|
|
352
|
+
}
|
|
313
353
|
/**
|
|
314
354
|
* Rejestr ikon dla `kpt-icon`. Zawiera wbudowany zestaw (używany przez komponenty).
|
|
315
355
|
* Aby dodać pełny zestaw Tabler (5130 ikon), użyj `provideKptTablerIcons()`
|
|
@@ -323,10 +363,17 @@ class KptIconRegistry {
|
|
|
323
363
|
/** Rośnie po każdej rejestracji — pozwala `kpt-icon` reagować na późne dodanie ikon. */
|
|
324
364
|
this.version = this._version.asReadonly();
|
|
325
365
|
}
|
|
326
|
-
/**
|
|
366
|
+
/**
|
|
367
|
+
* Rejestruje (lub nadpisuje) ikony: `{ nazwa: 'inner svg' }`.
|
|
368
|
+
*
|
|
369
|
+
* Treść jest sanityzowana do allowlisty geometrii SVG (`path`/`circle`/`rect`/`g`/`line`/
|
|
370
|
+
* `polygon`/`polyline`/`ellipse` i ich atrybutów kształtu/stylu) — mimo to `register()` wolno
|
|
371
|
+
* wołać wyłącznie z treścią kontrolowaną przez developera (build-time), nigdy bezpośrednio
|
|
372
|
+
* z danych runtime/CMS/uploadu bez własnej walidacji domenowej wyżej w stosie.
|
|
373
|
+
*/
|
|
327
374
|
register(icons) {
|
|
328
375
|
for (const [name, svg] of Object.entries(icons)) {
|
|
329
|
-
this.icons.set(name, svg);
|
|
376
|
+
this.icons.set(name, sanitizeSvgFragment(svg));
|
|
330
377
|
}
|
|
331
378
|
this._version.update((v) => v + 1);
|
|
332
379
|
}
|
|
@@ -425,6 +472,11 @@ function KptAvatar_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
425
472
|
/**
|
|
426
473
|
* Awatar — obraz, inicjały (z `name`) lub ikona.
|
|
427
474
|
*
|
|
475
|
+
* `name` trafia do natywnego `title` (podpowiedź spod kursora — inicjały same w sobie
|
|
476
|
+
* nie mówią, kto to jest). Bez `src` awatar dostaje dodatkowo `role="img"` i `aria-label`,
|
|
477
|
+
* a same inicjały są `aria-hidden`, żeby czytnik nie przeczytał „AK" litera po literze.
|
|
478
|
+
* Przy `src` etykietę niesie już `alt` obrazu — nie dublujemy jej.
|
|
479
|
+
*
|
|
428
480
|
* @example
|
|
429
481
|
* <kpt-avatar src="/u/anna.jpg" />
|
|
430
482
|
* <kpt-avatar name="Anna Kowalska" size="lg" />
|
|
@@ -451,12 +503,12 @@ class KptAvatar {
|
|
|
451
503
|
...(ngDevMode ? [{ debugName: "initials" }] : /* istanbul ignore next */ []));
|
|
452
504
|
}
|
|
453
505
|
static { this.ɵfac = function KptAvatar_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptAvatar)(); }; }
|
|
454
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptAvatar, selectors: [["kpt-avatar"]], hostAttrs: [1, "kpt-avatar-host"], inputs: { src: [1, "src"], name: [1, "name"], icon: [1, "icon"], size: [1, "size"], shape: [1, "shape"] }, decls: 4, vars:
|
|
506
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptAvatar, selectors: [["kpt-avatar"]], hostAttrs: [1, "kpt-avatar-host"], inputs: { src: [1, "src"], name: [1, "name"], icon: [1, "icon"], size: [1, "size"], shape: [1, "shape"] }, decls: 4, vars: 6, consts: [[1, "kpt-avatar"], [1, "kpt-avatar__img", 3, "src", "alt"], ["aria-hidden", "true", 1, "kpt-avatar__initials"], [3, "name"]], template: function KptAvatar_Template(rf, ctx) { if (rf & 1) {
|
|
455
507
|
i0.ɵɵelementStart(0, "span", 0);
|
|
456
508
|
i0.ɵɵconditionalCreate(1, KptAvatar_Conditional_1_Template, 1, 2, "img", 1)(2, KptAvatar_Conditional_2_Template, 2, 1, "span", 2)(3, KptAvatar_Conditional_3_Template, 1, 1, "kpt-icon", 3);
|
|
457
509
|
i0.ɵɵelementEnd();
|
|
458
510
|
} if (rf & 2) {
|
|
459
|
-
i0.ɵɵattribute("data-size", ctx.size())("data-shape", ctx.shape());
|
|
511
|
+
i0.ɵɵattribute("data-size", ctx.size())("data-shape", ctx.shape())("title", ctx.name() || null)("role", !ctx.src() && ctx.name() ? "img" : null)("aria-label", !ctx.src() && ctx.name() ? ctx.name() : null);
|
|
460
512
|
i0.ɵɵadvance();
|
|
461
513
|
i0.ɵɵconditional(ctx.src() ? 1 : ctx.name() ? 2 : ctx.icon() ? 3 : -1);
|
|
462
514
|
} }, dependencies: [KptIcon], styles: ["@layer kpt.components{.kpt-avatar-host{display:inline-flex;vertical-align:middle}.kpt-avatar{--%NS%_size: 2.5rem;display:inline-flex;align-items:center;justify-content:center;width:var(--%NS%_size);height:var(--%NS%_size);border-radius:var(--%NS%kpt-radius-full, 9999px);background:var(--%NS%kpt-color-muted);color:var(--%NS%kpt-color-on-muted);font-weight:var(--%NS%kpt-font-weight-semibold, 600);font-size:calc(var(--%NS%_size) * .4);overflow:hidden;-webkit-user-select:none;user-select:none}.kpt-avatar[data-size=sm]{--%NS%_size: 2rem}.kpt-avatar[data-size=md]{--%NS%_size: 2.5rem}.kpt-avatar[data-size=lg]{--%NS%_size: 3rem}.kpt-avatar[data-size=xl]{--%NS%_size: 4rem}.kpt-avatar[data-shape=square]{border-radius:var(--%NS%kpt-radius-md, .5rem)}.kpt-avatar__img{width:100%;height:100%;object-fit:cover}}\n"], encapsulation: 2 }); }
|
|
@@ -464,18 +516,25 @@ class KptAvatar {
|
|
|
464
516
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptAvatar, [{
|
|
465
517
|
type: Component,
|
|
466
518
|
args: [{ selector: 'kpt-avatar', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [KptIcon], template: `
|
|
467
|
-
<span
|
|
519
|
+
<span
|
|
520
|
+
class="kpt-avatar"
|
|
521
|
+
[attr.data-size]="size()"
|
|
522
|
+
[attr.data-shape]="shape()"
|
|
523
|
+
[attr.title]="name() || null"
|
|
524
|
+
[attr.role]="!src() && name() ? 'img' : null"
|
|
525
|
+
[attr.aria-label]="!src() && name() ? name() : null"
|
|
526
|
+
>
|
|
468
527
|
@if (src()) {
|
|
469
528
|
<img class="kpt-avatar__img" [src]="src()" [alt]="name() || ''" />
|
|
470
529
|
} @else if (name()) {
|
|
471
|
-
<span class="kpt-avatar__initials">{{ initials() }}</span>
|
|
530
|
+
<span class="kpt-avatar__initials" aria-hidden="true">{{ initials() }}</span>
|
|
472
531
|
} @else if (icon()) {
|
|
473
532
|
<kpt-icon [name]="icon()!" />
|
|
474
533
|
}
|
|
475
534
|
</span>
|
|
476
535
|
`, host: { class: 'kpt-avatar-host' }, styles: ["@layer kpt.components{.kpt-avatar-host{display:inline-flex;vertical-align:middle}.kpt-avatar{--_size: 2.5rem;display:inline-flex;align-items:center;justify-content:center;width:var(--_size);height:var(--_size);border-radius:var(--kpt-radius-full, 9999px);background:var(--kpt-color-muted);color:var(--kpt-color-on-muted);font-weight:var(--kpt-font-weight-semibold, 600);font-size:calc(var(--_size) * .4);overflow:hidden;-webkit-user-select:none;user-select:none}.kpt-avatar[data-size=sm]{--_size: 2rem}.kpt-avatar[data-size=md]{--_size: 2.5rem}.kpt-avatar[data-size=lg]{--_size: 3rem}.kpt-avatar[data-size=xl]{--_size: 4rem}.kpt-avatar[data-shape=square]{border-radius:var(--kpt-radius-md, .5rem)}.kpt-avatar__img{width:100%;height:100%;object-fit:cover}}\n"] }]
|
|
477
536
|
}], null, { src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }] }); })();
|
|
478
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptAvatar, { className: "KptAvatar", filePath: "lib/avatar/avatar.component.ts", lineNumber:
|
|
537
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptAvatar, { className: "KptAvatar", filePath: "lib/avatar/avatar.component.ts", lineNumber: 46 }); })();
|
|
479
538
|
|
|
480
539
|
const _c0$A = ["*"];
|
|
481
540
|
/**
|
|
@@ -675,6 +734,7 @@ const KPT_MESSAGES_EN = {
|
|
|
675
734
|
dateRange: 'Date range',
|
|
676
735
|
min: 'min',
|
|
677
736
|
max: 'max',
|
|
737
|
+
editCell: 'Edit: {column}',
|
|
678
738
|
},
|
|
679
739
|
confirm: {
|
|
680
740
|
header: 'Confirmation',
|
|
@@ -702,6 +762,11 @@ const KPT_MESSAGES_EN = {
|
|
|
702
762
|
nextYear: 'Next year',
|
|
703
763
|
prevYears: 'Previous years',
|
|
704
764
|
nextYears: 'Next years',
|
|
765
|
+
prevDecades: 'Previous decades',
|
|
766
|
+
nextDecades: 'Next decades',
|
|
767
|
+
chooseMonth: 'Choose month',
|
|
768
|
+
chooseYear: 'Choose year',
|
|
769
|
+
chooseDecade: 'Choose decade',
|
|
705
770
|
calendar: 'Calendar',
|
|
706
771
|
month: 'Month',
|
|
707
772
|
time: 'Time',
|
|
@@ -936,6 +1001,7 @@ const KPT_MESSAGES_PL = {
|
|
|
936
1001
|
dateRange: 'Zakres dat',
|
|
937
1002
|
min: 'min',
|
|
938
1003
|
max: 'max',
|
|
1004
|
+
editCell: 'Edytuj: {column}',
|
|
939
1005
|
},
|
|
940
1006
|
confirm: {
|
|
941
1007
|
header: 'Potwierdzenie',
|
|
@@ -963,6 +1029,11 @@ const KPT_MESSAGES_PL = {
|
|
|
963
1029
|
nextYear: 'Następny rok',
|
|
964
1030
|
prevYears: 'Poprzednie lata',
|
|
965
1031
|
nextYears: 'Następne lata',
|
|
1032
|
+
prevDecades: 'Poprzednie dekady',
|
|
1033
|
+
nextDecades: 'Następne dekady',
|
|
1034
|
+
chooseMonth: 'Wybierz miesiąc',
|
|
1035
|
+
chooseYear: 'Wybierz rok',
|
|
1036
|
+
chooseDecade: 'Wybierz dekadę',
|
|
966
1037
|
calendar: 'Kalendarz',
|
|
967
1038
|
month: 'Miesiąc',
|
|
968
1039
|
time: 'Godzina',
|
|
@@ -2499,7 +2570,11 @@ class KptSelect {
|
|
|
2499
2570
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
2500
2571
|
this.touch = output();
|
|
2501
2572
|
this.i18n = inject(KptI18n);
|
|
2502
|
-
|
|
2573
|
+
/**
|
|
2574
|
+
* Stan panelu (dwukierunkowy). Pozwala otworzyć listę z zewnątrz i — co ważniejsze — wiedzieć,
|
|
2575
|
+
* kiedy user skończył wybierać. `touch` się do tego nie nadaje: leci też z blur triggera.
|
|
2576
|
+
*/
|
|
2577
|
+
this.open = model(false, /* @ts-ignore */
|
|
2503
2578
|
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
2504
2579
|
this.filterText = signal('', /* @ts-ignore */
|
|
2505
2580
|
...(ngDevMode ? [{ debugName: "filterText" }] : /* istanbul ignore next */ []));
|
|
@@ -2535,6 +2610,17 @@ class KptSelect {
|
|
|
2535
2610
|
*/
|
|
2536
2611
|
this.filled = computed(() => this.selectedOptions().length > 0, /* @ts-ignore */
|
|
2537
2612
|
...(ngDevMode ? [{ debugName: "filled" }] : /* istanbul ignore next */ []));
|
|
2613
|
+
// Panel może zostać otwarty także z zewnątrz (`[open]`), nie tylko klikiem w trigger —
|
|
2614
|
+
// filtr i aktywną pozycję resetujemy więc przy każdym otwarciu, nie w `toggleOpen()`.
|
|
2615
|
+
effect(() => {
|
|
2616
|
+
const isOpen = this.open();
|
|
2617
|
+
untracked(() => {
|
|
2618
|
+
if (!isOpen)
|
|
2619
|
+
return;
|
|
2620
|
+
this.filterText.set('');
|
|
2621
|
+
this.activeIndex.set(-1);
|
|
2622
|
+
});
|
|
2623
|
+
});
|
|
2538
2624
|
}
|
|
2539
2625
|
isSelected(opt) {
|
|
2540
2626
|
return this.selectedValues().includes(opt.value);
|
|
@@ -2543,10 +2629,6 @@ class KptSelect {
|
|
|
2543
2629
|
if (this.disabled())
|
|
2544
2630
|
return;
|
|
2545
2631
|
this.open.update((o) => !o);
|
|
2546
|
-
if (this.open()) {
|
|
2547
|
-
this.filterText.set('');
|
|
2548
|
-
this.activeIndex.set(-1);
|
|
2549
|
-
}
|
|
2550
2632
|
}
|
|
2551
2633
|
close() {
|
|
2552
2634
|
if (!this.open())
|
|
@@ -2609,7 +2691,7 @@ class KptSelect {
|
|
|
2609
2691
|
}
|
|
2610
2692
|
}
|
|
2611
2693
|
static { this.ɵfac = function KptSelect_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptSelect)(); }; }
|
|
2612
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptSelect, selectors: [["kpt-select"]], hostAttrs: [1, "kpt-select-host"], inputs: { options: [1, "options"], placeholder: [1, "placeholder"], multiple: [1, "multiple"], filter: [1, "filter"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], value: [1, "value"] }, outputs: { value: "valueChange", touch: "touch" }, features: [i0.ɵɵProvidersFeature([{ provide: KPT_FORM_FIELD_CONTROL, useExisting: forwardRef(() => KptSelect) }])], decls: 8, vars: 14, consts: [["trigger", "cdkOverlayOrigin"], ["cdkOverlayOrigin", "", "role", "combobox", "tabindex", "0", 1, "kpt-select", 3, "click", "keydown", "blur"], [1, "kpt-select__value"], [1, "kpt-select__single"], [1, "kpt-select__placeholder"], ["name", "chevron-down", 1, "kpt-select__chevron"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayWidth"], [1, "kpt-select__chip"], ["type", "button", 1, "kpt-select__chip-remove", 3, "click"], ["name", "x"], [1, "kpt-select__panel", 3, "keydown"], [1, "kpt-select__search"], ["role", "listbox", 1, "kpt-select__list"], ["role", "option", 1, "kpt-select__option", 3, "kpt-select__option--selected", "kpt-select__option--active", "kpt-select__option--disabled"], [1, "kpt-select__empty"], ["name", "search"], ["type", "text", 1, "kpt-select__search-input", 3, "input", "value"], ["role", "option", 1, "kpt-select__option", 3, "click", "mouseenter"], [1, "kpt-select__check", 3, "is-on"], [1, "kpt-select__option-label"], ["name", "check", 1, "kpt-select__option-tick"], [1, "kpt-select__check"], ["name", "check"]], template: function KptSelect_Template(rf, ctx) { if (rf & 1) {
|
|
2694
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptSelect, selectors: [["kpt-select"]], hostAttrs: [1, "kpt-select-host"], inputs: { options: [1, "options"], placeholder: [1, "placeholder"], multiple: [1, "multiple"], filter: [1, "filter"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], value: [1, "value"], open: [1, "open"] }, outputs: { value: "valueChange", touch: "touch", open: "openChange" }, features: [i0.ɵɵProvidersFeature([{ provide: KPT_FORM_FIELD_CONTROL, useExisting: forwardRef(() => KptSelect) }])], decls: 8, vars: 14, consts: [["trigger", "cdkOverlayOrigin"], ["cdkOverlayOrigin", "", "role", "combobox", "tabindex", "0", 1, "kpt-select", 3, "click", "keydown", "blur"], [1, "kpt-select__value"], [1, "kpt-select__single"], [1, "kpt-select__placeholder"], ["name", "chevron-down", 1, "kpt-select__chevron"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayWidth"], [1, "kpt-select__chip"], ["type", "button", 1, "kpt-select__chip-remove", 3, "click"], ["name", "x"], [1, "kpt-select__panel", 3, "keydown"], [1, "kpt-select__search"], ["role", "listbox", 1, "kpt-select__list"], ["role", "option", 1, "kpt-select__option", 3, "kpt-select__option--selected", "kpt-select__option--active", "kpt-select__option--disabled"], [1, "kpt-select__empty"], ["name", "search"], ["type", "text", 1, "kpt-select__search-input", 3, "input", "value"], ["role", "option", 1, "kpt-select__option", 3, "click", "mouseenter"], [1, "kpt-select__check", 3, "is-on"], [1, "kpt-select__option-label"], ["name", "check", 1, "kpt-select__option-tick"], [1, "kpt-select__check"], ["name", "check"]], template: function KptSelect_Template(rf, ctx) { if (rf & 1) {
|
|
2613
2695
|
i0.ɵɵelementStart(0, "div", 1, 0);
|
|
2614
2696
|
i0.ɵɵlistener("click", function KptSelect_Template_div_click_0_listener() { return ctx.toggleOpen(); })("keydown", function KptSelect_Template_div_keydown_0_listener($event) { return ctx.onTriggerKeydown($event); })("blur", function KptSelect_Template_div_blur_0_listener() { return ctx.touch.emit(); });
|
|
2615
2697
|
i0.ɵɵelementStart(2, "div", 2);
|
|
@@ -2632,8 +2714,8 @@ class KptSelect {
|
|
|
2632
2714
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptSelect, [{
|
|
2633
2715
|
type: Component,
|
|
2634
2716
|
args: [{ selector: 'kpt-select', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon], host: { class: 'kpt-select-host' }, providers: [{ provide: KPT_FORM_FIELD_CONTROL, useExisting: forwardRef(() => KptSelect) }], template: "<div\n class=\"kpt-select\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n role=\"combobox\"\n tabindex=\"0\"\n [class.kpt-select--open]=\"open()\"\n [class.kpt-select--disabled]=\"disabled()\"\n [class.kpt-select--invalid]=\"showInvalid()\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-disabled]=\"disabled() || null\"\n (click)=\"toggleOpen()\"\n (keydown)=\"onTriggerKeydown($event)\"\n (blur)=\"touch.emit()\"\n>\n <div class=\"kpt-select__value\">\n @if (multiple() && selectedOptions().length) {\n @for (opt of selectedOptions(); track opt.value) {\n <span class=\"kpt-select__chip\">\n {{ opt.label }}\n <button type=\"button\" class=\"kpt-select__chip-remove\" (click)=\"removeChip(opt, $event)\" [attr.aria-label]=\"i18n.t('select.removeChip')\">\n <kpt-icon name=\"x\" />\n </button>\n </span>\n }\n } @else if (!multiple() && filled()) {\n <span class=\"kpt-select__single\">{{ singleLabel() }}</span>\n } @else {\n <span class=\"kpt-select__placeholder\">{{ placeholder() }}</span>\n }\n </div>\n <kpt-icon class=\"kpt-select__chevron\" name=\"chevron-down\" />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayWidth]=\"trigger.elementRef.nativeElement.offsetWidth\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div class=\"kpt-select__panel\" (keydown)=\"onPanelKeydown($event)\">\n @if (filter()) {\n <div class=\"kpt-select__search\">\n <kpt-icon name=\"search\" />\n <input\n type=\"text\"\n class=\"kpt-select__search-input\"\n [value]=\"filterText()\"\n (input)=\"onFilterInput($event)\"\n [attr.placeholder]=\"i18n.t('select.search')\"\n />\n </div>\n }\n <ul class=\"kpt-select__list\" role=\"listbox\" [attr.aria-multiselectable]=\"multiple()\">\n @for (opt of filteredOptions(); track opt.value; let i = $index) {\n <li\n class=\"kpt-select__option\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(opt)\"\n [class.kpt-select__option--selected]=\"isSelected(opt)\"\n [class.kpt-select__option--active]=\"i === activeIndex()\"\n [class.kpt-select__option--disabled]=\"opt.disabled\"\n (click)=\"pick(opt)\"\n (mouseenter)=\"activeIndex.set(i)\"\n >\n @if (multiple()) {\n <span class=\"kpt-select__check\" [class.is-on]=\"isSelected(opt)\"><kpt-icon name=\"check\" /></span>\n }\n <span class=\"kpt-select__option-label\">{{ opt.label }}</span>\n @if (!multiple() && isSelected(opt)) {\n <kpt-icon class=\"kpt-select__option-tick\" name=\"check\" />\n }\n </li>\n } @empty {\n <li class=\"kpt-select__empty\">{{ i18n.t('select.noResults') }}</li>\n }\n </ul>\n </div>\n</ng-template>\n", styles: ["@layer kpt.components{.kpt-select-host{display:block}.kpt-select{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);min-height:2.5rem;padding:.35rem var(--kpt-space-3, .75rem);box-sizing:border-box;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer;transition:border-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-select:hover:not(.kpt-select--disabled){border-color:var(--kpt-form-field-border-hover)}.kpt-select:focus-visible,.kpt-select.kpt-select--open{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-select.kpt-select--invalid{border-color:var(--kpt-form-field-border-error)}.kpt-select.kpt-select--disabled{cursor:not-allowed;opacity:.6;background:var(--kpt-color-surface-variant)}.kpt-select__value{flex:1;min-width:0;display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}.kpt-select__placeholder{color:var(--kpt-form-field-placeholder)}.kpt-select__single{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kpt-select__chip{display:inline-flex;align-items:center;gap:.25rem;padding:.1rem .25rem .1rem .5rem;border-radius:var(--kpt-radius-sm, .25rem);background:var(--kpt-color-muted);color:var(--kpt-color-on-muted);font-size:var(--kpt-font-size-xs, .75rem)}.kpt-select__chip-remove{display:inline-flex;border:0;background:none;cursor:pointer;color:inherit;padding:0;opacity:.7}.kpt-select__chip-remove:hover{opacity:1}.kpt-select__chevron{color:var(--kpt-color-on-surface-muted);transition:transform var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-select.kpt-select--open .kpt-select__chevron{transform:rotate(180deg)}.kpt-select__panel{background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3);overflow:hidden;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface)}.kpt-select__search{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);padding:var(--kpt-space-2, .5rem) var(--kpt-space-3, .75rem);border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);color:var(--kpt-color-on-surface-muted)}.kpt-select__search-input{flex:1;min-width:0;border:0;background:none;outline:none;color:var(--kpt-color-on-surface);font:inherit}.kpt-select__search-input::placeholder{color:var(--kpt-color-on-surface-muted)}.kpt-select__list{list-style:none;margin:0;padding:.25rem;max-height:15rem;overflow-y:auto}.kpt-select__option{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);padding:.45rem .6rem;border-radius:var(--kpt-radius-sm, .25rem);cursor:pointer}.kpt-select__option--active{background:var(--kpt-color-surface-variant)}.kpt-select__option--selected{color:var(--kpt-color-on-surface);font-weight:var(--kpt-font-weight-medium, 500)}.kpt-select__option--disabled{opacity:.45;cursor:not-allowed}.kpt-select__option-label{flex:1;min-width:0}.kpt-select__option-tick{color:var(--kpt-color-primary)}.kpt-select__check{display:inline-flex;align-items:center;justify-content:center;width:1.05rem;height:1.05rem;flex-shrink:0;border:var(--kpt-border-width-medium, 2px) solid var(--kpt-form-field-border);border-radius:var(--kpt-radius-sm, .25rem);color:var(--kpt-color-on-primary);font-size:.7rem}.kpt-select__check kpt-icon{opacity:0}.kpt-select__check.is-on{background:var(--kpt-color-primary);border-color:var(--kpt-color-primary)}.kpt-select__check.is-on kpt-icon{opacity:1}.kpt-select__empty{list-style:none;padding:.75rem .6rem;color:var(--kpt-color-on-surface-muted);text-align:center}}\n"] }]
|
|
2635
|
-
}],
|
|
2636
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptSelect, { className: "KptSelect", filePath: "lib/select/select.component.ts", lineNumber:
|
|
2717
|
+
}], () => [], { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], touch: [{ type: i0.Output, args: ["touch"] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }] }); })();
|
|
2718
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptSelect, { className: "KptSelect", filePath: "lib/select/select.component.ts", lineNumber: 42 }); })();
|
|
2637
2719
|
|
|
2638
2720
|
/*
|
|
2639
2721
|
* Pomocniki nazw dni/miesięcy wyliczane z `Intl` — sterowane bieżącym locale i18n.
|
|
@@ -2975,7 +3057,7 @@ class KptClock {
|
|
|
2975
3057
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptClock, { className: "KptClock", filePath: "lib/datepicker/clock.component.ts", lineNumber: 94 }); })();
|
|
2976
3058
|
|
|
2977
3059
|
const _forTrack0$8 = ($index, $item) => $item.iso;
|
|
2978
|
-
const _forTrack1$
|
|
3060
|
+
const _forTrack1$2 = ($index, $item) => $item.label;
|
|
2979
3061
|
function KptDatepicker_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
2980
3062
|
i0.ɵɵelementStart(0, "span", 2);
|
|
2981
3063
|
i0.ɵɵtext(1);
|
|
@@ -3004,325 +3086,284 @@ function KptDatepicker_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
|
3004
3086
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
3005
3087
|
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("common.clear"));
|
|
3006
3088
|
} }
|
|
3007
|
-
function
|
|
3008
|
-
const
|
|
3009
|
-
i0.ɵɵelementStart(0, "
|
|
3010
|
-
i0.ɵɵ
|
|
3089
|
+
function KptDatepicker_ng_template_7_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
3090
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
3091
|
+
i0.ɵɵelementStart(0, "div", 12)(1, "button", 14);
|
|
3092
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_1_Conditional_0_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.backToCalendar()); });
|
|
3093
|
+
i0.ɵɵelement(2, "kpt-icon", 15);
|
|
3011
3094
|
i0.ɵɵelementEnd();
|
|
3012
|
-
i0.ɵɵelementStart(
|
|
3013
|
-
i0.ɵɵ
|
|
3014
|
-
i0.ɵɵtext(3);
|
|
3095
|
+
i0.ɵɵelementStart(3, "span", 16);
|
|
3096
|
+
i0.ɵɵtext(4);
|
|
3015
3097
|
i0.ɵɵelementEnd()();
|
|
3016
3098
|
} if (rf & 2) {
|
|
3017
|
-
const ctx_r0 = i0.ɵɵnextContext(
|
|
3018
|
-
i0.ɵɵtwoWayProperty("value", ctx_r0.timeStr);
|
|
3019
|
-
i0.ɵɵproperty("hourFormat", ctx_r0.hourFormat())("minuteStep", ctx_r0.minuteStep());
|
|
3020
|
-
i0.ɵɵadvance(3);
|
|
3021
|
-
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("common.done"));
|
|
3022
|
-
} }
|
|
3023
|
-
function KptDatepicker_ng_template_7_Case_2_Conditional_0_For_9_Template(rf, ctx) { if (rf & 1) {
|
|
3024
|
-
i0.ɵɵelementStart(0, "span", 20);
|
|
3025
|
-
i0.ɵɵtext(1);
|
|
3026
|
-
i0.ɵɵelementEnd();
|
|
3027
|
-
} if (rf & 2) {
|
|
3028
|
-
const wd_r7 = ctx.$implicit;
|
|
3099
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3029
3100
|
i0.ɵɵadvance();
|
|
3030
|
-
i0.ɵɵ
|
|
3101
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.calendar"));
|
|
3102
|
+
i0.ɵɵadvance(3);
|
|
3103
|
+
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("datepicker.time"));
|
|
3031
3104
|
} }
|
|
3032
|
-
function
|
|
3033
|
-
const
|
|
3034
|
-
i0.ɵɵ
|
|
3035
|
-
i0.ɵɵ
|
|
3036
|
-
i0.ɵɵ
|
|
3105
|
+
function KptDatepicker_ng_template_7_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
3106
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
3107
|
+
i0.ɵɵconditionalCreate(0, KptDatepicker_ng_template_7_Conditional_1_Conditional_0_Template, 5, 2, "div", 12);
|
|
3108
|
+
i0.ɵɵelementStart(1, "kpt-clock", 13);
|
|
3109
|
+
i0.ɵɵtwoWayListener("valueChange", function KptDatepicker_ng_template_7_Conditional_1_Template_kpt_clock_valueChange_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.timeStr, $event) || (ctx_r0.timeStr = $event); return i0.ɵɵresetView($event); });
|
|
3037
3110
|
i0.ɵɵelementEnd();
|
|
3038
3111
|
} if (rf & 2) {
|
|
3039
|
-
const
|
|
3040
|
-
i0.ɵɵ
|
|
3041
|
-
i0.ɵɵproperty("disabled", cell_r9.disabled);
|
|
3042
|
-
i0.ɵɵattribute("aria-pressed", cell_r9.selected);
|
|
3112
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
3113
|
+
i0.ɵɵconditional(ctx_r0.selectionMode() === "datetime" ? 0 : -1);
|
|
3043
3114
|
i0.ɵɵadvance();
|
|
3044
|
-
i0.ɵɵ
|
|
3045
|
-
|
|
3046
|
-
function KptDatepicker_ng_template_7_Case_2_Conditional_0_For_12_Template(rf, ctx) { if (rf & 1) {
|
|
3047
|
-
i0.ɵɵrepeaterCreate(0, KptDatepicker_ng_template_7_Case_2_Conditional_0_For_12_For_1_Template, 2, 9, "button", 24, _forTrack0$8);
|
|
3048
|
-
} if (rf & 2) {
|
|
3049
|
-
const week_r10 = ctx.$implicit;
|
|
3050
|
-
i0.ɵɵrepeater(week_r10);
|
|
3115
|
+
i0.ɵɵtwoWayProperty("value", ctx_r0.timeStr);
|
|
3116
|
+
i0.ɵɵproperty("hourFormat", ctx_r0.hourFormat())("minuteStep", ctx_r0.minuteStep());
|
|
3051
3117
|
} }
|
|
3052
|
-
function
|
|
3118
|
+
function KptDatepicker_ng_template_7_Conditional_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
3053
3119
|
const _r6 = i0.ɵɵgetCurrentView();
|
|
3054
|
-
i0.ɵɵelementStart(0, "
|
|
3055
|
-
i0.ɵɵlistener("click", function
|
|
3056
|
-
i0.ɵɵelement(
|
|
3057
|
-
i0.ɵɵelementEnd();
|
|
3058
|
-
i0.ɵɵelementStart(3, "span", 17);
|
|
3059
|
-
i0.ɵɵtext(4);
|
|
3060
|
-
i0.ɵɵelementEnd();
|
|
3061
|
-
i0.ɵɵelementStart(5, "button", 15);
|
|
3062
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_2_Conditional_0_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.nextMonth()); });
|
|
3063
|
-
i0.ɵɵelement(6, "kpt-icon", 18);
|
|
3064
|
-
i0.ɵɵelementEnd()();
|
|
3065
|
-
i0.ɵɵelementStart(7, "div", 19);
|
|
3066
|
-
i0.ɵɵrepeaterCreate(8, KptDatepicker_ng_template_7_Case_2_Conditional_0_For_9_Template, 2, 1, "span", 20, i0.ɵɵrepeaterTrackByIdentity);
|
|
3067
|
-
i0.ɵɵelementEnd();
|
|
3068
|
-
i0.ɵɵelementStart(10, "div", 21);
|
|
3069
|
-
i0.ɵɵrepeaterCreate(11, KptDatepicker_ng_template_7_Case_2_Conditional_0_For_12_Template, 2, 0, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
3120
|
+
i0.ɵɵelementStart(0, "button", 22);
|
|
3121
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.pagePrev()); });
|
|
3122
|
+
i0.ɵɵelement(1, "kpt-icon", 15);
|
|
3070
3123
|
i0.ɵɵelementEnd();
|
|
3071
|
-
i0.ɵɵelementStart(13, "button", 22);
|
|
3072
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_2_Conditional_0_Template_button_click_13_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.openClock()); });
|
|
3073
|
-
i0.ɵɵelement(14, "kpt-icon", 23);
|
|
3074
|
-
i0.ɵɵelementStart(15, "span");
|
|
3075
|
-
i0.ɵɵtext(16);
|
|
3076
|
-
i0.ɵɵelementEnd()();
|
|
3077
3124
|
} if (rf & 2) {
|
|
3078
3125
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3079
|
-
i0.ɵɵ
|
|
3080
|
-
i0.ɵɵattribute("aria-label", ctx_r0.
|
|
3081
|
-
i0.ɵɵadvance(3);
|
|
3082
|
-
i0.ɵɵtextInterpolate(ctx_r0.monthLabel());
|
|
3083
|
-
i0.ɵɵadvance();
|
|
3084
|
-
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.nextMonth"));
|
|
3085
|
-
i0.ɵɵadvance(3);
|
|
3086
|
-
i0.ɵɵrepeater(ctx_r0.weekdays());
|
|
3087
|
-
i0.ɵɵadvance(3);
|
|
3088
|
-
i0.ɵɵrepeater(ctx_r0.weeks());
|
|
3089
|
-
i0.ɵɵadvance(5);
|
|
3090
|
-
i0.ɵɵtextInterpolate(ctx_r0.timeBarLabel());
|
|
3126
|
+
i0.ɵɵproperty("disabled", !ctx_r0.canPageBack());
|
|
3127
|
+
i0.ɵɵattribute("aria-label", ctx_r0.navPrevLabel());
|
|
3091
3128
|
} }
|
|
3092
|
-
function
|
|
3093
|
-
const
|
|
3094
|
-
i0.ɵɵelementStart(0, "
|
|
3095
|
-
i0.ɵɵlistener("click", function
|
|
3096
|
-
i0.ɵɵ
|
|
3129
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_3_Template(rf, ctx) { if (rf & 1) {
|
|
3130
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
3131
|
+
i0.ɵɵelementStart(0, "button", 23);
|
|
3132
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Case_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.goTo("month")); });
|
|
3133
|
+
i0.ɵɵtext(1);
|
|
3097
3134
|
i0.ɵɵelementEnd();
|
|
3098
|
-
i0.ɵɵelementStart(
|
|
3099
|
-
i0.ɵɵ
|
|
3100
|
-
i0.ɵɵ
|
|
3101
|
-
i0.ɵɵelementStart(5, "kpt-clock", 11);
|
|
3102
|
-
i0.ɵɵtwoWayListener("valueChange", function KptDatepicker_ng_template_7_Case_2_Conditional_1_Template_kpt_clock_valueChange_5_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r0 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r0.timeStr, $event) || (ctx_r0.timeStr = $event); return i0.ɵɵresetView($event); });
|
|
3135
|
+
i0.ɵɵelementStart(2, "button", 23);
|
|
3136
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Case_3_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.goTo("year")); });
|
|
3137
|
+
i0.ɵɵtext(3);
|
|
3103
3138
|
i0.ɵɵelementEnd();
|
|
3104
3139
|
} if (rf & 2) {
|
|
3105
3140
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3141
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.chooseMonth"));
|
|
3106
3142
|
i0.ɵɵadvance();
|
|
3107
|
-
i0.ɵɵ
|
|
3108
|
-
i0.ɵɵadvance(3);
|
|
3109
|
-
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("datepicker.time"));
|
|
3143
|
+
i0.ɵɵtextInterpolate(ctx_r0.monthName());
|
|
3110
3144
|
i0.ɵɵadvance();
|
|
3111
|
-
i0.ɵɵ
|
|
3112
|
-
i0.ɵɵ
|
|
3113
|
-
|
|
3114
|
-
function KptDatepicker_ng_template_7_Case_2_Template(rf, ctx) { if (rf & 1) {
|
|
3115
|
-
const _r5 = i0.ɵɵgetCurrentView();
|
|
3116
|
-
i0.ɵɵconditionalCreate(0, KptDatepicker_ng_template_7_Case_2_Conditional_0_Template, 17, 4)(1, KptDatepicker_ng_template_7_Case_2_Conditional_1_Template, 6, 5);
|
|
3117
|
-
i0.ɵɵelementStart(2, "div", 12)(3, "kpt-button", 13);
|
|
3118
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_2_Template_kpt_button_click_3_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.commit()); });
|
|
3119
|
-
i0.ɵɵtext(4);
|
|
3120
|
-
i0.ɵɵelementEnd()();
|
|
3121
|
-
} if (rf & 2) {
|
|
3122
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
3123
|
-
i0.ɵɵconditional(ctx_r0.dtView() === "calendar" ? 0 : 1);
|
|
3124
|
-
i0.ɵɵadvance(4);
|
|
3125
|
-
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("common.done"));
|
|
3145
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.chooseYear"));
|
|
3146
|
+
i0.ɵɵadvance();
|
|
3147
|
+
i0.ɵɵtextInterpolate(ctx_r0.viewYear());
|
|
3126
3148
|
} }
|
|
3127
|
-
function
|
|
3128
|
-
|
|
3129
|
-
i0.ɵɵelementStart(0, "button", 28);
|
|
3130
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_3_For_9_Template_button_click_0_listener() { const cell_r14 = i0.ɵɵrestoreView(_r13).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.selectCell(cell_r14)); });
|
|
3149
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_4_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
3150
|
+
i0.ɵɵelementStart(0, "span", 16);
|
|
3131
3151
|
i0.ɵɵtext(1);
|
|
3132
3152
|
i0.ɵɵelementEnd();
|
|
3133
3153
|
} if (rf & 2) {
|
|
3134
|
-
const
|
|
3135
|
-
i0.ɵɵclassProp("kpt-calendar__cell--selected", cell_r14.selected);
|
|
3136
|
-
i0.ɵɵproperty("disabled", cell_r14.disabled);
|
|
3137
|
-
i0.ɵɵattribute("aria-pressed", cell_r14.selected);
|
|
3154
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
3138
3155
|
i0.ɵɵadvance();
|
|
3139
|
-
i0.ɵɵtextInterpolate(
|
|
3156
|
+
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("datepicker.month"));
|
|
3140
3157
|
} }
|
|
3141
|
-
function
|
|
3142
|
-
const
|
|
3143
|
-
i0.ɵɵelementStart(0, "
|
|
3144
|
-
i0.ɵɵlistener("click", function
|
|
3145
|
-
i0.ɵɵ
|
|
3146
|
-
i0.ɵɵelementEnd();
|
|
3147
|
-
i0.ɵɵelementStart(3, "span", 17);
|
|
3148
|
-
i0.ɵɵtext(4);
|
|
3149
|
-
i0.ɵɵelementEnd();
|
|
3150
|
-
i0.ɵɵelementStart(5, "button", 15);
|
|
3151
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_3_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r12); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.nextYear()); });
|
|
3152
|
-
i0.ɵɵelement(6, "kpt-icon", 18);
|
|
3153
|
-
i0.ɵɵelementEnd()();
|
|
3154
|
-
i0.ɵɵelementStart(7, "div", 26);
|
|
3155
|
-
i0.ɵɵrepeaterCreate(8, KptDatepicker_ng_template_7_Case_3_For_9_Template, 2, 5, "button", 27, _forTrack1$1);
|
|
3158
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
3159
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
3160
|
+
i0.ɵɵelementStart(0, "button", 23);
|
|
3161
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Case_4_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.goTo("year")); });
|
|
3162
|
+
i0.ɵɵtext(1);
|
|
3156
3163
|
i0.ɵɵelementEnd();
|
|
3157
3164
|
} if (rf & 2) {
|
|
3158
|
-
const ctx_r0 = i0.ɵɵnextContext(
|
|
3165
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
3166
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.chooseYear"));
|
|
3159
3167
|
i0.ɵɵadvance();
|
|
3160
|
-
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.prevYear"));
|
|
3161
|
-
i0.ɵɵadvance(3);
|
|
3162
3168
|
i0.ɵɵtextInterpolate(ctx_r0.viewYear());
|
|
3163
|
-
i0.ɵɵadvance();
|
|
3164
|
-
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.nextYear"));
|
|
3165
|
-
i0.ɵɵadvance(3);
|
|
3166
|
-
i0.ɵɵrepeater(ctx_r0.monthCells());
|
|
3167
3169
|
} }
|
|
3168
|
-
function
|
|
3169
|
-
|
|
3170
|
-
i0.ɵɵelementStart(0, "button", 28);
|
|
3171
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_4_For_9_Template_button_click_0_listener() { const cell_r17 = i0.ɵɵrestoreView(_r16).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.selectCell(cell_r17)); });
|
|
3172
|
-
i0.ɵɵtext(1);
|
|
3173
|
-
i0.ɵɵelementEnd();
|
|
3170
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_4_Template(rf, ctx) { if (rf & 1) {
|
|
3171
|
+
i0.ɵɵconditionalCreate(0, KptDatepicker_ng_template_7_Conditional_2_Case_4_Conditional_0_Template, 2, 1, "span", 16)(1, KptDatepicker_ng_template_7_Conditional_2_Case_4_Conditional_1_Template, 2, 2, "button", 19);
|
|
3174
3172
|
} if (rf & 2) {
|
|
3175
|
-
const
|
|
3176
|
-
i0.ɵɵ
|
|
3177
|
-
i0.ɵɵproperty("disabled", cell_r17.disabled);
|
|
3178
|
-
i0.ɵɵattribute("aria-pressed", cell_r17.selected);
|
|
3179
|
-
i0.ɵɵadvance();
|
|
3180
|
-
i0.ɵɵtextInterpolate(cell_r17.label);
|
|
3173
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3174
|
+
i0.ɵɵconditional(ctx_r0.selectionMode() === "month" ? 0 : 1);
|
|
3181
3175
|
} }
|
|
3182
|
-
function
|
|
3183
|
-
const
|
|
3184
|
-
i0.ɵɵelementStart(0, "
|
|
3185
|
-
i0.ɵɵlistener("click", function
|
|
3186
|
-
i0.ɵɵ
|
|
3187
|
-
i0.ɵɵelementEnd();
|
|
3188
|
-
i0.ɵɵelementStart(3, "span", 17);
|
|
3189
|
-
i0.ɵɵtext(4);
|
|
3190
|
-
i0.ɵɵelementEnd();
|
|
3191
|
-
i0.ɵɵelementStart(5, "button", 15);
|
|
3192
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_4_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r15); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.nextYearPage()); });
|
|
3193
|
-
i0.ɵɵelement(6, "kpt-icon", 18);
|
|
3194
|
-
i0.ɵɵelementEnd()();
|
|
3195
|
-
i0.ɵɵelementStart(7, "div", 26);
|
|
3196
|
-
i0.ɵɵrepeaterCreate(8, KptDatepicker_ng_template_7_Case_4_For_9_Template, 2, 5, "button", 27, _forTrack1$1);
|
|
3176
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_5_Template(rf, ctx) { if (rf & 1) {
|
|
3177
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
3178
|
+
i0.ɵɵelementStart(0, "button", 23);
|
|
3179
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Case_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.goTo("decade")); });
|
|
3180
|
+
i0.ɵɵtext(1);
|
|
3197
3181
|
i0.ɵɵelementEnd();
|
|
3198
3182
|
} if (rf & 2) {
|
|
3199
|
-
const ctx_r0 = i0.ɵɵnextContext(
|
|
3183
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3184
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.chooseDecade"));
|
|
3200
3185
|
i0.ɵɵadvance();
|
|
3201
|
-
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.prevYears"));
|
|
3202
|
-
i0.ɵɵadvance(3);
|
|
3203
3186
|
i0.ɵɵtextInterpolate(ctx_r0.yearRangeLabel());
|
|
3204
|
-
i0.ɵɵadvance();
|
|
3205
|
-
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.nextYears"));
|
|
3206
|
-
i0.ɵɵadvance(3);
|
|
3207
|
-
i0.ɵɵrepeater(ctx_r0.yearCells());
|
|
3208
3187
|
} }
|
|
3209
|
-
function
|
|
3210
|
-
|
|
3211
|
-
i0.ɵɵelementStart(0, "button", 30);
|
|
3212
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_5_For_5_Template_button_click_0_listener() { const cell_r19 = i0.ɵɵrestoreView(_r18).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.selectCell(cell_r19)); });
|
|
3188
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_6_Template(rf, ctx) { if (rf & 1) {
|
|
3189
|
+
i0.ɵɵelementStart(0, "span", 16);
|
|
3213
3190
|
i0.ɵɵtext(1);
|
|
3214
3191
|
i0.ɵɵelementEnd();
|
|
3215
3192
|
} if (rf & 2) {
|
|
3216
|
-
const
|
|
3217
|
-
i0.ɵɵclassProp("kpt-calendar__cell--selected", cell_r19.selected);
|
|
3218
|
-
i0.ɵɵattribute("aria-pressed", cell_r19.selected);
|
|
3193
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3219
3194
|
i0.ɵɵadvance();
|
|
3220
|
-
i0.ɵɵtextInterpolate(
|
|
3195
|
+
i0.ɵɵtextInterpolate(ctx_r0.decadeRangeLabel());
|
|
3221
3196
|
} }
|
|
3222
|
-
function
|
|
3223
|
-
i0.ɵɵ
|
|
3224
|
-
i0.ɵɵ
|
|
3225
|
-
i0.ɵɵ
|
|
3226
|
-
i0.ɵɵ
|
|
3227
|
-
i0.ɵɵrepeaterCreate(4, KptDatepicker_ng_template_7_Case_5_For_5_Template, 2, 4, "button", 29, _forTrack1$1);
|
|
3197
|
+
function KptDatepicker_ng_template_7_Conditional_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
3198
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
3199
|
+
i0.ɵɵelementStart(0, "button", 22);
|
|
3200
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Conditional_7_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.pageNext()); });
|
|
3201
|
+
i0.ɵɵelement(1, "kpt-icon", 24);
|
|
3228
3202
|
i0.ɵɵelementEnd();
|
|
3229
3203
|
} if (rf & 2) {
|
|
3230
|
-
const ctx_r0 = i0.ɵɵnextContext(
|
|
3231
|
-
i0.ɵɵ
|
|
3232
|
-
i0.ɵɵ
|
|
3233
|
-
i0.ɵɵadvance(2);
|
|
3234
|
-
i0.ɵɵrepeater(ctx_r0.monthCells());
|
|
3204
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3205
|
+
i0.ɵɵproperty("disabled", !ctx_r0.canPageForward());
|
|
3206
|
+
i0.ɵɵattribute("aria-label", ctx_r0.navNextLabel());
|
|
3235
3207
|
} }
|
|
3236
|
-
function
|
|
3237
|
-
i0.ɵɵelementStart(0, "span",
|
|
3208
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_8_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
3209
|
+
i0.ɵɵelementStart(0, "span", 26);
|
|
3238
3210
|
i0.ɵɵtext(1);
|
|
3239
3211
|
i0.ɵɵelementEnd();
|
|
3240
3212
|
} if (rf & 2) {
|
|
3241
|
-
const
|
|
3213
|
+
const wd_r11 = ctx.$implicit;
|
|
3242
3214
|
i0.ɵɵadvance();
|
|
3243
|
-
i0.ɵɵtextInterpolate(
|
|
3215
|
+
i0.ɵɵtextInterpolate(wd_r11);
|
|
3244
3216
|
} }
|
|
3245
|
-
function
|
|
3246
|
-
const
|
|
3247
|
-
i0.ɵɵelementStart(0, "button",
|
|
3248
|
-
i0.ɵɵlistener("click", function
|
|
3217
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_8_For_5_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
3218
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
3219
|
+
i0.ɵɵelementStart(0, "button", 29);
|
|
3220
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Case_8_For_5_For_1_Template_button_click_0_listener() { const cell_r13 = i0.ɵɵrestoreView(_r12).$implicit; const ctx_r0 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r0.selectDay(cell_r13)); });
|
|
3249
3221
|
i0.ɵɵtext(1);
|
|
3250
3222
|
i0.ɵɵelementEnd();
|
|
3251
3223
|
} if (rf & 2) {
|
|
3252
|
-
const
|
|
3253
|
-
i0.ɵɵclassProp("kpt-calendar__day--muted", !
|
|
3254
|
-
i0.ɵɵproperty("disabled",
|
|
3255
|
-
i0.ɵɵattribute("aria-pressed",
|
|
3224
|
+
const cell_r13 = ctx.$implicit;
|
|
3225
|
+
i0.ɵɵclassProp("kpt-calendar__day--muted", !cell_r13.inMonth)("kpt-calendar__day--today", cell_r13.today)("kpt-calendar__day--selected", cell_r13.selected);
|
|
3226
|
+
i0.ɵɵproperty("disabled", cell_r13.disabled);
|
|
3227
|
+
i0.ɵɵattribute("aria-pressed", cell_r13.selected);
|
|
3256
3228
|
i0.ɵɵadvance();
|
|
3257
|
-
i0.ɵɵtextInterpolate(
|
|
3229
|
+
i0.ɵɵtextInterpolate(cell_r13.day);
|
|
3258
3230
|
} }
|
|
3259
|
-
function
|
|
3260
|
-
i0.ɵɵrepeaterCreate(0,
|
|
3231
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_8_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
3232
|
+
i0.ɵɵrepeaterCreate(0, KptDatepicker_ng_template_7_Conditional_2_Case_8_For_5_For_1_Template, 2, 9, "button", 28, _forTrack0$8);
|
|
3261
3233
|
} if (rf & 2) {
|
|
3262
|
-
const
|
|
3263
|
-
i0.ɵɵrepeater(
|
|
3234
|
+
const week_r14 = ctx.$implicit;
|
|
3235
|
+
i0.ɵɵrepeater(week_r14);
|
|
3264
3236
|
} }
|
|
3265
|
-
function
|
|
3266
|
-
|
|
3267
|
-
i0.ɵɵ
|
|
3268
|
-
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Case_6_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r20); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.prevMonth()); });
|
|
3269
|
-
i0.ɵɵelement(2, "kpt-icon", 16);
|
|
3237
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_8_Template(rf, ctx) { if (rf & 1) {
|
|
3238
|
+
i0.ɵɵelementStart(0, "div", 25);
|
|
3239
|
+
i0.ɵɵrepeaterCreate(1, KptDatepicker_ng_template_7_Conditional_2_Case_8_For_2_Template, 2, 1, "span", 26, i0.ɵɵrepeaterTrackByIdentity);
|
|
3270
3240
|
i0.ɵɵelementEnd();
|
|
3271
|
-
i0.ɵɵelementStart(3, "
|
|
3272
|
-
i0.ɵɵ
|
|
3241
|
+
i0.ɵɵelementStart(3, "div", 27);
|
|
3242
|
+
i0.ɵɵrepeaterCreate(4, KptDatepicker_ng_template_7_Conditional_2_Case_8_For_5_Template, 2, 0, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
3243
|
+
i0.ɵɵelementEnd();
|
|
3244
|
+
} if (rf & 2) {
|
|
3245
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3246
|
+
i0.ɵɵadvance();
|
|
3247
|
+
i0.ɵɵrepeater(ctx_r0.weekdays());
|
|
3248
|
+
i0.ɵɵadvance(3);
|
|
3249
|
+
i0.ɵɵrepeater(ctx_r0.weeks());
|
|
3250
|
+
} }
|
|
3251
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_9_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
3252
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
3253
|
+
i0.ɵɵelementStart(0, "button", 32);
|
|
3254
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Case_9_For_2_Template_button_click_0_listener() { const cell_r16 = i0.ɵɵrestoreView(_r15).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.selectCell(cell_r16)); });
|
|
3255
|
+
i0.ɵɵtext(1);
|
|
3256
|
+
i0.ɵɵelementEnd();
|
|
3257
|
+
} if (rf & 2) {
|
|
3258
|
+
const cell_r16 = ctx.$implicit;
|
|
3259
|
+
i0.ɵɵclassProp("kpt-calendar__cell--selected", cell_r16.selected)("kpt-calendar__cell--current", cell_r16.current);
|
|
3260
|
+
i0.ɵɵproperty("disabled", cell_r16.disabled);
|
|
3261
|
+
i0.ɵɵattribute("aria-pressed", cell_r16.selected);
|
|
3262
|
+
i0.ɵɵadvance();
|
|
3263
|
+
i0.ɵɵtextInterpolate(cell_r16.label);
|
|
3264
|
+
} }
|
|
3265
|
+
function KptDatepicker_ng_template_7_Conditional_2_Case_9_Template(rf, ctx) { if (rf & 1) {
|
|
3266
|
+
i0.ɵɵelementStart(0, "div", 30);
|
|
3267
|
+
i0.ɵɵrepeaterCreate(1, KptDatepicker_ng_template_7_Conditional_2_Case_9_For_2_Template, 2, 7, "button", 31, _forTrack1$2);
|
|
3273
3268
|
i0.ɵɵelementEnd();
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
i0.ɵɵ
|
|
3269
|
+
} if (rf & 2) {
|
|
3270
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3271
|
+
i0.ɵɵclassProp("kpt-calendar__grid--decades", ctx_r0.panelView() === "decade");
|
|
3272
|
+
i0.ɵɵadvance();
|
|
3273
|
+
i0.ɵɵrepeater(ctx_r0.levelCells());
|
|
3274
|
+
} }
|
|
3275
|
+
function KptDatepicker_ng_template_7_Conditional_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
3276
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
3277
|
+
i0.ɵɵelementStart(0, "button", 33);
|
|
3278
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_2_Conditional_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r17); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.openClock()); });
|
|
3279
|
+
i0.ɵɵelement(1, "kpt-icon", 34);
|
|
3280
|
+
i0.ɵɵelementStart(2, "span");
|
|
3281
|
+
i0.ɵɵtext(3);
|
|
3277
3282
|
i0.ɵɵelementEnd()();
|
|
3278
|
-
|
|
3279
|
-
|
|
3283
|
+
} if (rf & 2) {
|
|
3284
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
3285
|
+
i0.ɵɵadvance(3);
|
|
3286
|
+
i0.ɵɵtextInterpolate(ctx_r0.timeBarLabel());
|
|
3287
|
+
} }
|
|
3288
|
+
function KptDatepicker_ng_template_7_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
3289
|
+
i0.ɵɵelementStart(0, "div", 12);
|
|
3290
|
+
i0.ɵɵconditionalCreate(1, KptDatepicker_ng_template_7_Conditional_2_Conditional_1_Template, 2, 2, "button", 17);
|
|
3291
|
+
i0.ɵɵelementStart(2, "span", 18);
|
|
3292
|
+
i0.ɵɵconditionalCreate(3, KptDatepicker_ng_template_7_Conditional_2_Case_3_Template, 4, 4)(4, KptDatepicker_ng_template_7_Conditional_2_Case_4_Template, 2, 1)(5, KptDatepicker_ng_template_7_Conditional_2_Case_5_Template, 2, 2, "button", 19)(6, KptDatepicker_ng_template_7_Conditional_2_Case_6_Template, 2, 1, "span", 16);
|
|
3280
3293
|
i0.ɵɵelementEnd();
|
|
3281
|
-
i0.ɵɵ
|
|
3282
|
-
i0.ɵɵrepeaterCreate(11, KptDatepicker_ng_template_7_Case_6_For_12_Template, 2, 0, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
3294
|
+
i0.ɵɵconditionalCreate(7, KptDatepicker_ng_template_7_Conditional_2_Conditional_7_Template, 2, 2, "button", 17);
|
|
3283
3295
|
i0.ɵɵelementEnd();
|
|
3296
|
+
i0.ɵɵconditionalCreate(8, KptDatepicker_ng_template_7_Conditional_2_Case_8_Template, 6, 0)(9, KptDatepicker_ng_template_7_Conditional_2_Case_9_Template, 3, 2, "div", 20);
|
|
3297
|
+
i0.ɵɵconditionalCreate(10, KptDatepicker_ng_template_7_Conditional_2_Conditional_10_Template, 4, 1, "button", 21);
|
|
3284
3298
|
} if (rf & 2) {
|
|
3299
|
+
let tmp_4_0;
|
|
3300
|
+
let tmp_6_0;
|
|
3285
3301
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
3286
3302
|
i0.ɵɵadvance();
|
|
3287
|
-
i0.ɵɵ
|
|
3288
|
-
i0.ɵɵadvance(
|
|
3289
|
-
i0.ɵɵ
|
|
3303
|
+
i0.ɵɵconditional(ctx_r0.hasNav() ? 1 : -1);
|
|
3304
|
+
i0.ɵɵadvance(2);
|
|
3305
|
+
i0.ɵɵconditional((tmp_4_0 = ctx_r0.panelView()) === "day" ? 3 : tmp_4_0 === "month" ? 4 : tmp_4_0 === "year" ? 5 : tmp_4_0 === "decade" ? 6 : -1);
|
|
3306
|
+
i0.ɵɵadvance(4);
|
|
3307
|
+
i0.ɵɵconditional(ctx_r0.hasNav() ? 7 : -1);
|
|
3290
3308
|
i0.ɵɵadvance();
|
|
3291
|
-
i0.ɵɵ
|
|
3292
|
-
i0.ɵɵadvance(
|
|
3293
|
-
i0.ɵɵ
|
|
3294
|
-
|
|
3295
|
-
|
|
3309
|
+
i0.ɵɵconditional((tmp_6_0 = ctx_r0.panelView()) === "day" ? 8 : 9);
|
|
3310
|
+
i0.ɵɵadvance(2);
|
|
3311
|
+
i0.ɵɵconditional(ctx_r0.selectionMode() === "datetime" ? 10 : -1);
|
|
3312
|
+
} }
|
|
3313
|
+
function KptDatepicker_ng_template_7_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
3314
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
3315
|
+
i0.ɵɵelementStart(0, "div", 11)(1, "kpt-button", 35);
|
|
3316
|
+
i0.ɵɵlistener("click", function KptDatepicker_ng_template_7_Conditional_3_Template_kpt_button_click_1_listener() { i0.ɵɵrestoreView(_r18); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.commit()); });
|
|
3317
|
+
i0.ɵɵtext(2);
|
|
3318
|
+
i0.ɵɵelementEnd()();
|
|
3319
|
+
} if (rf & 2) {
|
|
3320
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
3321
|
+
i0.ɵɵadvance(2);
|
|
3322
|
+
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("common.done"));
|
|
3296
3323
|
} }
|
|
3297
3324
|
function KptDatepicker_ng_template_7_Template(rf, ctx) { if (rf & 1) {
|
|
3298
3325
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
3299
3326
|
i0.ɵɵelementStart(0, "div", 10);
|
|
3300
3327
|
i0.ɵɵlistener("keydown.escape", function KptDatepicker_ng_template_7_Template_div_keydown_escape_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.close()); });
|
|
3301
|
-
i0.ɵɵconditionalCreate(1,
|
|
3328
|
+
i0.ɵɵconditionalCreate(1, KptDatepicker_ng_template_7_Conditional_1_Template, 2, 4)(2, KptDatepicker_ng_template_7_Conditional_2_Template, 11, 5);
|
|
3329
|
+
i0.ɵɵconditionalCreate(3, KptDatepicker_ng_template_7_Conditional_3_Template, 3, 1, "div", 11);
|
|
3302
3330
|
i0.ɵɵelementEnd();
|
|
3303
3331
|
} if (rf & 2) {
|
|
3304
|
-
let tmp_3_0;
|
|
3305
3332
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
3306
|
-
i0.ɵɵclassProp("kpt-calendar--clock", ctx_r0.
|
|
3333
|
+
i0.ɵɵclassProp("kpt-calendar--clock", ctx_r0.showClock());
|
|
3307
3334
|
i0.ɵɵadvance();
|
|
3308
|
-
i0.ɵɵconditional(
|
|
3335
|
+
i0.ɵɵconditional(ctx_r0.showClock() ? 1 : 2);
|
|
3336
|
+
i0.ɵɵadvance(2);
|
|
3337
|
+
i0.ɵɵconditional(ctx_r0.hasFooter() ? 3 : -1);
|
|
3309
3338
|
} }
|
|
3339
|
+
/** Kolejność poziomów panelu, od najdrobniejszego. Indeks = „wysokość" widoku. */
|
|
3340
|
+
const LEVELS = ['day', 'month', 'year', 'decade'];
|
|
3310
3341
|
const pad$1 = (n) => String(n).padStart(2, '0');
|
|
3311
3342
|
const toIso$1 = (d) => `${d.getFullYear()}-${pad$1(d.getMonth() + 1)}-${pad$1(d.getDate())}`;
|
|
3312
3343
|
/**
|
|
3313
3344
|
* Wybór daty/godziny z własnym kalendarzem (CDK Overlay), Signal Forms.
|
|
3314
3345
|
* Granulacja przez `selectionMode`: data, miesiąc+rok, rok, miesiąc, data+godzina, sama godzina.
|
|
3346
|
+
* Panel jest stosem widoków dekady → lata → miesiące → dni: klik w komórkę schodzi poziom niżej,
|
|
3347
|
+
* klik w tytuł wchodzi poziom wyżej. Poziom startowy ustawia `startView` (data urodzenia:
|
|
3348
|
+
* `startView="decade"`); domyślnie startuje na poziomie, na którym tryb zatwierdza wartość.
|
|
3315
3349
|
* Godzina na tarczy zegara (dwa etapy: godziny → minuty), format 12/24h przez `hourFormat`.
|
|
3316
3350
|
* Format wartości zależy od trybu: 'RRRR-MM-DD' / 'RRRR-MM' / 'RRRR' / 'MM'
|
|
3317
3351
|
* / 'RRRR-MM-DDTHH:mm' (datetime) / 'HH:mm' (time). Czas przechowywany zawsze 24h.
|
|
3318
3352
|
* Wymaga stylów overlay CDK: `import '@angular/cdk/overlay-prebuilt.css';`
|
|
3319
3353
|
*
|
|
3320
3354
|
* @example
|
|
3321
|
-
* <kpt-datepicker [formField]="f.birthDate" minDate="1900-01-01" />
|
|
3355
|
+
* <kpt-datepicker [formField]="f.birthDate" startView="decade" minDate="1900-01-01" />
|
|
3322
3356
|
* <kpt-datepicker selectionMode="datetime" [hourFormat]="12" [(value)]="meetingAt" />
|
|
3323
3357
|
* <kpt-datepicker selectionMode="time" [(value)]="alarm" />
|
|
3324
3358
|
*/
|
|
3325
3359
|
class KptDatepicker {
|
|
3360
|
+
effectiveStartView() {
|
|
3361
|
+
const commit = LEVELS.indexOf(this.commitLevel());
|
|
3362
|
+
const top = LEVELS.indexOf(this.topLevel());
|
|
3363
|
+
const wanted = this.startView();
|
|
3364
|
+
const idx = wanted ? LEVELS.indexOf(wanted) : commit;
|
|
3365
|
+
return LEVELS[Math.min(Math.max(idx, commit), top)];
|
|
3366
|
+
}
|
|
3326
3367
|
constructor() {
|
|
3327
3368
|
this.value = model('', /* @ts-ignore */
|
|
3328
3369
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
@@ -3343,6 +3384,13 @@ class KptDatepicker {
|
|
|
3343
3384
|
/** Granulacja wyboru. */
|
|
3344
3385
|
this.selectionMode = input('date', /* @ts-ignore */
|
|
3345
3386
|
...(ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []));
|
|
3387
|
+
/**
|
|
3388
|
+
* Poziom, od którego otwiera się panel. `null` = poziom zatwierdzania danego trybu
|
|
3389
|
+
* (dni dla 'date'). Nie schodzi poniżej tego poziomu — `startView="day"` w trybie 'year'
|
|
3390
|
+
* nie ma sensu i jest podnoszony do 'year'.
|
|
3391
|
+
*/
|
|
3392
|
+
this.startView = input(null, /* @ts-ignore */
|
|
3393
|
+
...(ngDevMode ? [{ debugName: "startView" }] : /* istanbul ignore next */ []));
|
|
3346
3394
|
/** Prezentacja miesiąca w trybie 'month': słownie ('long') lub liczbą ('number'). */
|
|
3347
3395
|
this.monthDisplay = input('long', /* @ts-ignore */
|
|
3348
3396
|
...(ngDevMode ? [{ debugName: "monthDisplay" }] : /* istanbul ignore next */ []));
|
|
@@ -3374,11 +3422,34 @@ class KptDatepicker {
|
|
|
3374
3422
|
...(ngDevMode ? [{ debugName: "weekdays" }] : /* istanbul ignore next */ []));
|
|
3375
3423
|
this.months = computed(() => monthNames(this.i18n.locale()), /* @ts-ignore */
|
|
3376
3424
|
...(ngDevMode ? [{ debugName: "months" }] : /* istanbul ignore next */ []));
|
|
3377
|
-
|
|
3425
|
+
/**
|
|
3426
|
+
* Stan kalendarza (dwukierunkowy). Pozwala otworzyć go z zewnątrz i — co ważniejsze — wiedzieć,
|
|
3427
|
+
* kiedy user skończył wybierać. `touch` się do tego nie nadaje: leci też z blur triggera.
|
|
3428
|
+
*/
|
|
3429
|
+
this.open = model(false, /* @ts-ignore */
|
|
3378
3430
|
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
3379
3431
|
this.today = new Date();
|
|
3380
3432
|
this.view = signal({ y: this.today.getFullYear(), m: this.today.getMonth() }, /* @ts-ignore */
|
|
3381
3433
|
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
3434
|
+
/** Aktualny poziom stosu widoków panelu. */
|
|
3435
|
+
this.panelView = signal('day', /* @ts-ignore */
|
|
3436
|
+
...(ngDevMode ? [{ debugName: "panelView" }] : /* istanbul ignore next */ []));
|
|
3437
|
+
/** Poziom, na którym klik w komórkę zatwierdza wartość zamiast schodzić niżej. */
|
|
3438
|
+
this.commitLevel = computed(() => {
|
|
3439
|
+
switch (this.selectionMode()) {
|
|
3440
|
+
case 'monthYear':
|
|
3441
|
+
case 'month':
|
|
3442
|
+
return 'month';
|
|
3443
|
+
case 'year':
|
|
3444
|
+
return 'year';
|
|
3445
|
+
default:
|
|
3446
|
+
return 'day';
|
|
3447
|
+
}
|
|
3448
|
+
}, /* @ts-ignore */
|
|
3449
|
+
...(ngDevMode ? [{ debugName: "commitLevel" }] : /* istanbul ignore next */ []));
|
|
3450
|
+
/** Tryb 'month' nie ma roku ani dekady — wartością jest samo 'MM'. */
|
|
3451
|
+
this.topLevel = computed(() => this.selectionMode() === 'month' ? 'month' : 'decade', /* @ts-ignore */
|
|
3452
|
+
...(ngDevMode ? [{ debugName: "topLevel" }] : /* istanbul ignore next */ []));
|
|
3382
3453
|
// ── Stan czasu (bufor 'HH:mm', 24h) ──
|
|
3383
3454
|
this.timeStr = signal('', /* @ts-ignore */
|
|
3384
3455
|
...(ngDevMode ? [{ debugName: "timeStr" }] : /* istanbul ignore next */ []));
|
|
@@ -3386,24 +3457,77 @@ class KptDatepicker {
|
|
|
3386
3457
|
...(ngDevMode ? [{ debugName: "dtView" }] : /* istanbul ignore next */ []));
|
|
3387
3458
|
this.pendingDate = signal('', /* @ts-ignore */
|
|
3388
3459
|
...(ngDevMode ? [{ debugName: "pendingDate" }] : /* istanbul ignore next */ []));
|
|
3460
|
+
/** Tarcza zamiast siatek: tryb 'time' zawsze, 'datetime' po wejściu w pasek czasu. */
|
|
3461
|
+
this.showClock = computed(() => this.selectionMode() === 'time' || (this.selectionMode() === 'datetime' && this.dtView() === 'clock'), /* @ts-ignore */
|
|
3462
|
+
...(ngDevMode ? [{ debugName: "showClock" }] : /* istanbul ignore next */ []));
|
|
3463
|
+
this.hasFooter = computed(() => this.selectionMode() === 'time' || this.selectionMode() === 'datetime', /* @ts-ignore */
|
|
3464
|
+
...(ngDevMode ? [{ debugName: "hasFooter" }] : /* istanbul ignore next */ []));
|
|
3389
3465
|
this.positions = [
|
|
3390
3466
|
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },
|
|
3391
3467
|
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },
|
|
3392
3468
|
];
|
|
3393
3469
|
this.viewYear = computed(() => this.view().y, /* @ts-ignore */
|
|
3394
3470
|
...(ngDevMode ? [{ debugName: "viewYear" }] : /* istanbul ignore next */ []));
|
|
3395
|
-
this.
|
|
3471
|
+
this.monthName = computed(() => this.months()[this.view().m], /* @ts-ignore */
|
|
3472
|
+
...(ngDevMode ? [{ debugName: "monthName" }] : /* istanbul ignore next */ []));
|
|
3473
|
+
/** Początek dekady widocznej w siatce lat (1979 → 1970). */
|
|
3474
|
+
this.decadeStart = computed(() => Math.floor(this.view().y / 10) * 10, /* @ts-ignore */
|
|
3475
|
+
...(ngDevMode ? [{ debugName: "decadeStart" }] : /* istanbul ignore next */ []));
|
|
3476
|
+
/** Początek strony dekad: 12 dekad, czyli 120 lat (1979 → 1920, strona 1920–2039). */
|
|
3477
|
+
this.centuryStart = computed(() => Math.floor(this.view().y / 120) * 120, /* @ts-ignore */
|
|
3478
|
+
...(ngDevMode ? [{ debugName: "centuryStart" }] : /* istanbul ignore next */ []));
|
|
3479
|
+
this.yearRangeLabel = computed(() => `${this.decadeStart()} – ${this.decadeStart() + 9}`, /* @ts-ignore */
|
|
3480
|
+
...(ngDevMode ? [{ debugName: "yearRangeLabel" }] : /* istanbul ignore next */ []));
|
|
3481
|
+
this.decadeRangeLabel = computed(() => `${this.centuryStart()} – ${this.centuryStart() + 119}`, /* @ts-ignore */
|
|
3482
|
+
...(ngDevMode ? [{ debugName: "decadeRangeLabel" }] : /* istanbul ignore next */ []));
|
|
3483
|
+
/** Tryb 'month' nie ma po czym nawigować — siatka miesięcy jest kompletna. */
|
|
3484
|
+
this.hasNav = computed(() => this.selectionMode() !== 'month', /* @ts-ignore */
|
|
3485
|
+
...(ngDevMode ? [{ debugName: "hasNav" }] : /* istanbul ignore next */ []));
|
|
3486
|
+
this.navPrevLabel = computed(() => {
|
|
3487
|
+
switch (this.panelView()) {
|
|
3488
|
+
case 'month': return this.i18n.t('datepicker.prevYear');
|
|
3489
|
+
case 'year': return this.i18n.t('datepicker.prevYears');
|
|
3490
|
+
case 'decade': return this.i18n.t('datepicker.prevDecades');
|
|
3491
|
+
default: return this.i18n.t('datepicker.prevMonth');
|
|
3492
|
+
}
|
|
3493
|
+
}, /* @ts-ignore */
|
|
3494
|
+
...(ngDevMode ? [{ debugName: "navPrevLabel" }] : /* istanbul ignore next */ []));
|
|
3495
|
+
this.navNextLabel = computed(() => {
|
|
3496
|
+
switch (this.panelView()) {
|
|
3497
|
+
case 'month': return this.i18n.t('datepicker.nextYear');
|
|
3498
|
+
case 'year': return this.i18n.t('datepicker.nextYears');
|
|
3499
|
+
case 'decade': return this.i18n.t('datepicker.nextDecades');
|
|
3500
|
+
default: return this.i18n.t('datepicker.nextMonth');
|
|
3501
|
+
}
|
|
3502
|
+
}, /* @ts-ignore */
|
|
3503
|
+
...(ngDevMode ? [{ debugName: "navNextLabel" }] : /* istanbul ignore next */ []));
|
|
3504
|
+
/** Strzałka wstecz gasnie, gdy cała poprzednia strona wypada przed `minDate`. */
|
|
3505
|
+
this.canPageBack = computed(() => {
|
|
3506
|
+
const min = this.minDate();
|
|
3507
|
+
if (!min)
|
|
3508
|
+
return true;
|
|
3396
3509
|
const { y, m } = this.view();
|
|
3397
|
-
|
|
3510
|
+
switch (this.panelView()) {
|
|
3511
|
+
case 'month': return `${y - 1}-12` >= min.slice(0, 7);
|
|
3512
|
+
case 'year': return this.decadeStart() - 1 >= +min.slice(0, 4);
|
|
3513
|
+
case 'decade': return this.centuryStart() - 1 >= +min.slice(0, 4);
|
|
3514
|
+
default: return toIso$1(new Date(y, m, 0)) >= min; // ostatni dzień poprzedniego miesiąca
|
|
3515
|
+
}
|
|
3398
3516
|
}, /* @ts-ignore */
|
|
3399
|
-
...(ngDevMode ? [{ debugName: "
|
|
3400
|
-
this.
|
|
3401
|
-
const
|
|
3402
|
-
|
|
3517
|
+
...(ngDevMode ? [{ debugName: "canPageBack" }] : /* istanbul ignore next */ []));
|
|
3518
|
+
this.canPageForward = computed(() => {
|
|
3519
|
+
const max = this.maxDate();
|
|
3520
|
+
if (!max)
|
|
3521
|
+
return true;
|
|
3522
|
+
const { y, m } = this.view();
|
|
3523
|
+
switch (this.panelView()) {
|
|
3524
|
+
case 'month': return `${y + 1}-01` <= max.slice(0, 7);
|
|
3525
|
+
case 'year': return this.decadeStart() + 10 <= +max.slice(0, 4);
|
|
3526
|
+
case 'decade': return this.centuryStart() + 120 <= +max.slice(0, 4);
|
|
3527
|
+
default: return toIso$1(new Date(y, m + 1, 1)) <= max;
|
|
3528
|
+
}
|
|
3403
3529
|
}, /* @ts-ignore */
|
|
3404
|
-
...(ngDevMode ? [{ debugName: "
|
|
3405
|
-
this.yearRangeLabel = computed(() => `${this.yearPageStart()} – ${this.yearPageStart() + 11}`, /* @ts-ignore */
|
|
3406
|
-
...(ngDevMode ? [{ debugName: "yearRangeLabel" }] : /* istanbul ignore next */ []));
|
|
3530
|
+
...(ngDevMode ? [{ debugName: "canPageForward" }] : /* istanbul ignore next */ []));
|
|
3407
3531
|
/** Etykieta czasu na pasku trybu datetime (uwzględnia AM/PM). */
|
|
3408
3532
|
this.timeBarLabel = computed(() => {
|
|
3409
3533
|
const t = this.parseTime(this.timeStr());
|
|
@@ -3481,35 +3605,110 @@ class KptDatepicker {
|
|
|
3481
3605
|
return weeks;
|
|
3482
3606
|
}, /* @ts-ignore */
|
|
3483
3607
|
...(ngDevMode ? [{ debugName: "weeks" }] : /* istanbul ignore next */ []));
|
|
3484
|
-
|
|
3608
|
+
/** Rok/miesiąc bieżącej wartości — zaznaczenie w siatkach wyższych poziomów. */
|
|
3609
|
+
this.selectedYM = computed(() => {
|
|
3610
|
+
const v = this.value();
|
|
3611
|
+
switch (this.selectionMode()) {
|
|
3612
|
+
case 'month': {
|
|
3613
|
+
const m = /^(\d{2})$/.exec(v);
|
|
3614
|
+
return { y: null, m: m ? +m[1] - 1 : null };
|
|
3615
|
+
}
|
|
3616
|
+
case 'year':
|
|
3617
|
+
return { y: /^\d{4}$/.test(v) ? +v : null, m: null };
|
|
3618
|
+
case 'monthYear': {
|
|
3619
|
+
const m = /^(\d{4})-(\d{2})$/.exec(v);
|
|
3620
|
+
return m ? { y: +m[1], m: +m[2] - 1 } : { y: null, m: null };
|
|
3621
|
+
}
|
|
3622
|
+
case 'time':
|
|
3623
|
+
return { y: null, m: null };
|
|
3624
|
+
default: {
|
|
3625
|
+
const d = this.parseDate(this.selectedDateIso());
|
|
3626
|
+
return d ? { y: d.getFullYear(), m: d.getMonth() } : { y: null, m: null };
|
|
3627
|
+
}
|
|
3628
|
+
}
|
|
3629
|
+
}, /* @ts-ignore */
|
|
3630
|
+
...(ngDevMode ? [{ debugName: "selectedYM" }] : /* istanbul ignore next */ []));
|
|
3631
|
+
// ── Siatka miesięcy ──
|
|
3485
3632
|
this.monthCells = computed(() => {
|
|
3486
3633
|
const { y } = this.view();
|
|
3487
|
-
const sel = this.
|
|
3634
|
+
const sel = this.selectedYM();
|
|
3488
3635
|
const isMonthOnly = this.selectionMode() === 'month';
|
|
3489
3636
|
const numeric = this.monthDisplay() === 'number';
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
});
|
|
3637
|
+
const todayY = this.today.getFullYear();
|
|
3638
|
+
const todayM = this.today.getMonth();
|
|
3639
|
+
return this.months().map((name, i) => ({
|
|
3640
|
+
label: numeric ? pad$1(i + 1) : name,
|
|
3641
|
+
y,
|
|
3642
|
+
m: i,
|
|
3643
|
+
selected: sel.m === i && (isMonthOnly || sel.y === y),
|
|
3644
|
+
current: todayM === i && (isMonthOnly || todayY === y),
|
|
3645
|
+
disabled: isMonthOnly ? false : this.isMonthYearDisabled(y, i),
|
|
3646
|
+
}));
|
|
3500
3647
|
}, /* @ts-ignore */
|
|
3501
3648
|
...(ngDevMode ? [{ debugName: "monthCells" }] : /* istanbul ignore next */ []));
|
|
3502
|
-
// ── Siatka lat (
|
|
3649
|
+
// ── Siatka lat (pełna dekada) ──
|
|
3503
3650
|
this.yearCells = computed(() => {
|
|
3504
|
-
const start = this.
|
|
3505
|
-
const sel = this.
|
|
3506
|
-
|
|
3651
|
+
const start = this.decadeStart();
|
|
3652
|
+
const sel = this.selectedYM();
|
|
3653
|
+
const todayY = this.today.getFullYear();
|
|
3654
|
+
return Array.from({ length: 10 }, (_, i) => {
|
|
3507
3655
|
const year = start + i;
|
|
3508
|
-
|
|
3509
|
-
|
|
3656
|
+
return {
|
|
3657
|
+
label: String(year),
|
|
3658
|
+
y: year,
|
|
3659
|
+
m: 0,
|
|
3660
|
+
selected: sel.y === year,
|
|
3661
|
+
current: todayY === year,
|
|
3662
|
+
disabled: this.isYearDisabled(year),
|
|
3663
|
+
};
|
|
3510
3664
|
});
|
|
3511
3665
|
}, /* @ts-ignore */
|
|
3512
3666
|
...(ngDevMode ? [{ debugName: "yearCells" }] : /* istanbul ignore next */ []));
|
|
3667
|
+
// ── Siatka dekad (12 dekad = 120 lat) ──
|
|
3668
|
+
this.decadeCells = computed(() => {
|
|
3669
|
+
const start = this.centuryStart();
|
|
3670
|
+
const sel = this.selectedYM();
|
|
3671
|
+
const todayY = this.today.getFullYear();
|
|
3672
|
+
return Array.from({ length: 12 }, (_, i) => {
|
|
3673
|
+
const from = start + i * 10;
|
|
3674
|
+
const to = from + 9;
|
|
3675
|
+
return {
|
|
3676
|
+
label: `${from} – ${to}`,
|
|
3677
|
+
y: from,
|
|
3678
|
+
m: 0,
|
|
3679
|
+
selected: sel.y != null && sel.y >= from && sel.y <= to,
|
|
3680
|
+
current: todayY >= from && todayY <= to,
|
|
3681
|
+
// Dekada wypada z zakresu dopiero, gdy poza nim są oba jej krańce.
|
|
3682
|
+
disabled: this.isYearDisabled(from) && this.isYearDisabled(to),
|
|
3683
|
+
};
|
|
3684
|
+
});
|
|
3685
|
+
}, /* @ts-ignore */
|
|
3686
|
+
...(ngDevMode ? [{ debugName: "decadeCells" }] : /* istanbul ignore next */ []));
|
|
3687
|
+
/** Komórki bieżącego poziomu — siatka miesięcy/lat/dekad ma jeden wspólny markup. */
|
|
3688
|
+
this.levelCells = computed(() => {
|
|
3689
|
+
switch (this.panelView()) {
|
|
3690
|
+
case 'year':
|
|
3691
|
+
return this.yearCells();
|
|
3692
|
+
case 'decade':
|
|
3693
|
+
return this.decadeCells();
|
|
3694
|
+
default:
|
|
3695
|
+
return this.monthCells();
|
|
3696
|
+
}
|
|
3697
|
+
}, /* @ts-ignore */
|
|
3698
|
+
...(ngDevMode ? [{ debugName: "levelCells" }] : /* istanbul ignore next */ []));
|
|
3699
|
+
// Kalendarz może zostać otwarty także z zewnątrz (`[open]`), nie tylko klikiem w trigger —
|
|
3700
|
+
// widok i bufor czasu ustawiamy więc przy każdym otwarciu, nie w `toggleOpen()`.
|
|
3701
|
+
effect(() => {
|
|
3702
|
+
const isOpen = this.open();
|
|
3703
|
+
untracked(() => {
|
|
3704
|
+
if (!isOpen)
|
|
3705
|
+
return;
|
|
3706
|
+
this.view.set(this.initialView());
|
|
3707
|
+
this.panelView.set(this.effectiveStartView());
|
|
3708
|
+
this.syncTimeFromValue();
|
|
3709
|
+
this.dtView.set(this.selectionMode() === 'time' ? 'clock' : 'calendar');
|
|
3710
|
+
});
|
|
3711
|
+
});
|
|
3513
3712
|
}
|
|
3514
3713
|
// ── Prezentacja czasu ──
|
|
3515
3714
|
formatTime(h, m) {
|
|
@@ -3593,11 +3792,6 @@ class KptDatepicker {
|
|
|
3593
3792
|
toggleOpen() {
|
|
3594
3793
|
if (this.disabled())
|
|
3595
3794
|
return;
|
|
3596
|
-
if (!this.open()) {
|
|
3597
|
-
this.view.set(this.initialView());
|
|
3598
|
-
this.syncTimeFromValue();
|
|
3599
|
-
this.dtView.set(this.selectionMode() === 'time' ? 'clock' : 'calendar');
|
|
3600
|
-
}
|
|
3601
3795
|
this.open.update((o) => !o);
|
|
3602
3796
|
}
|
|
3603
3797
|
close() {
|
|
@@ -3617,11 +3811,29 @@ class KptDatepicker {
|
|
|
3617
3811
|
this.value.set(cell.iso);
|
|
3618
3812
|
this.close();
|
|
3619
3813
|
}
|
|
3814
|
+
/**
|
|
3815
|
+
* Klik w komórkę siatki: na poziomie zatwierdzania ustawia wartość i zamyka panel,
|
|
3816
|
+
* wyżej — przestawia widok i schodzi poziom niżej.
|
|
3817
|
+
*/
|
|
3620
3818
|
selectCell(cell) {
|
|
3621
3819
|
if (cell.disabled)
|
|
3622
3820
|
return;
|
|
3623
|
-
this.
|
|
3624
|
-
this.
|
|
3821
|
+
const level = this.panelView();
|
|
3822
|
+
if (level === this.commitLevel()) {
|
|
3823
|
+
this.value.set(level === 'year' ? String(cell.y) : this.monthValue(cell));
|
|
3824
|
+
this.close();
|
|
3825
|
+
return;
|
|
3826
|
+
}
|
|
3827
|
+
this.view.update(({ m }) => ({ y: cell.y, m: level === 'month' ? cell.m : m }));
|
|
3828
|
+
this.panelView.set(LEVELS[LEVELS.indexOf(level) - 1]);
|
|
3829
|
+
}
|
|
3830
|
+
monthValue(cell) {
|
|
3831
|
+
const mm = pad$1(cell.m + 1);
|
|
3832
|
+
return this.selectionMode() === 'month' ? mm : `${cell.y}-${mm}`;
|
|
3833
|
+
}
|
|
3834
|
+
/** Klik w tytuł — wejście poziom wyżej w stosie widoków. */
|
|
3835
|
+
goTo(level) {
|
|
3836
|
+
this.panelView.set(level);
|
|
3625
3837
|
}
|
|
3626
3838
|
// ── Zegar (delegowany do kpt-clock przez timeStr) ──
|
|
3627
3839
|
openClock() {
|
|
@@ -3642,23 +3854,33 @@ class KptDatepicker {
|
|
|
3642
3854
|
}
|
|
3643
3855
|
this.close();
|
|
3644
3856
|
}
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3857
|
+
/** Strzałki ‹ › — krok zależny od poziomu: miesiąc, rok, dekada, strona dekad. */
|
|
3858
|
+
page(dir) {
|
|
3859
|
+
const level = this.panelView();
|
|
3860
|
+
this.view.update(({ y, m }) => {
|
|
3861
|
+
switch (level) {
|
|
3862
|
+
case 'month':
|
|
3863
|
+
return { y: y + dir, m };
|
|
3864
|
+
case 'year':
|
|
3865
|
+
return { y: y + dir * 10, m };
|
|
3866
|
+
case 'decade':
|
|
3867
|
+
return { y: y + dir * 120, m };
|
|
3868
|
+
default: {
|
|
3869
|
+
const next = m + dir;
|
|
3870
|
+
if (next < 0)
|
|
3871
|
+
return { y: y - 1, m: 11 };
|
|
3872
|
+
if (next > 11)
|
|
3873
|
+
return { y: y + 1, m: 0 };
|
|
3874
|
+
return { y, m: next };
|
|
3875
|
+
}
|
|
3876
|
+
}
|
|
3877
|
+
});
|
|
3656
3878
|
}
|
|
3657
|
-
|
|
3658
|
-
this.
|
|
3879
|
+
pagePrev() {
|
|
3880
|
+
this.page(-1);
|
|
3659
3881
|
}
|
|
3660
|
-
|
|
3661
|
-
this.
|
|
3882
|
+
pageNext() {
|
|
3883
|
+
this.page(1);
|
|
3662
3884
|
}
|
|
3663
3885
|
clear(event) {
|
|
3664
3886
|
event.stopPropagation();
|
|
@@ -3666,7 +3888,7 @@ class KptDatepicker {
|
|
|
3666
3888
|
this.pendingDate.set('');
|
|
3667
3889
|
}
|
|
3668
3890
|
static { this.ɵfac = function KptDatepicker_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptDatepicker)(); }; }
|
|
3669
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptDatepicker, selectors: [["kpt-datepicker"]], hostAttrs: [1, "kpt-datepicker-host"], inputs: { value: [1, "value"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], placeholder: [1, "placeholder"], ariaLabel: [1, "ariaLabel"], displayFormat: [1, "displayFormat"], selectionMode: [1, "selectionMode"], monthDisplay: [1, "monthDisplay"], hourFormat: [1, "hourFormat"], minuteStep: [1, "minuteStep"], minDate: [1, "minDate"], maxDate: [1, "maxDate"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 8, vars: 15, consts: [["trigger", "cdkOverlayOrigin"], ["cdkOverlayOrigin", "", "role", "button", "tabindex", "0", 1, "kpt-datepicker", 3, "click", "keydown.enter", "blur"], [1, "kpt-datepicker__value"], [1, "kpt-datepicker__placeholder"], [1, "kpt-datepicker__spacer"], ["type", "button", 1, "kpt-datepicker__clear"], [1, "kpt-datepicker__icon", 3, "name"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop"], ["type", "button", 1, "kpt-datepicker__clear", 3, "click"], ["name", "x"], [1, "kpt-calendar", 3, "keydown.escape"], [3, "valueChange", "value", "hourFormat", "minuteStep"], [1, "kpt-
|
|
3891
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptDatepicker, selectors: [["kpt-datepicker"]], hostAttrs: [1, "kpt-datepicker-host"], inputs: { value: [1, "value"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], placeholder: [1, "placeholder"], ariaLabel: [1, "ariaLabel"], displayFormat: [1, "displayFormat"], selectionMode: [1, "selectionMode"], startView: [1, "startView"], monthDisplay: [1, "monthDisplay"], hourFormat: [1, "hourFormat"], minuteStep: [1, "minuteStep"], minDate: [1, "minDate"], maxDate: [1, "maxDate"], open: [1, "open"] }, outputs: { value: "valueChange", touch: "touch", open: "openChange" }, decls: 8, vars: 15, consts: [["trigger", "cdkOverlayOrigin"], ["cdkOverlayOrigin", "", "role", "button", "tabindex", "0", 1, "kpt-datepicker", 3, "click", "keydown.enter", "blur"], [1, "kpt-datepicker__value"], [1, "kpt-datepicker__placeholder"], [1, "kpt-datepicker__spacer"], ["type", "button", 1, "kpt-datepicker__clear"], [1, "kpt-datepicker__icon", 3, "name"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop"], ["type", "button", 1, "kpt-datepicker__clear", 3, "click"], ["name", "x"], [1, "kpt-calendar", 3, "keydown.escape"], [1, "kpt-calendar__footer"], [1, "kpt-calendar__header"], [3, "valueChange", "value", "hourFormat", "minuteStep"], ["type", "button", 1, "kpt-calendar__nav", 3, "click"], ["name", "chevron-left"], [1, "kpt-calendar__title"], ["type", "button", 1, "kpt-calendar__nav", 3, "disabled"], [1, "kpt-calendar__titles"], ["type", "button", 1, "kpt-calendar__title-btn"], [1, "kpt-calendar__grid", "kpt-calendar__grid--cells", 3, "kpt-calendar__grid--decades"], ["type", "button", 1, "kpt-calendar__timebar"], ["type", "button", 1, "kpt-calendar__nav", 3, "click", "disabled"], ["type", "button", 1, "kpt-calendar__title-btn", 3, "click"], ["name", "chevron-right"], [1, "kpt-calendar__weekdays"], [1, "kpt-calendar__weekday"], [1, "kpt-calendar__grid"], ["type", "button", 1, "kpt-calendar__day", 3, "kpt-calendar__day--muted", "kpt-calendar__day--today", "kpt-calendar__day--selected", "disabled"], ["type", "button", 1, "kpt-calendar__day", 3, "click", "disabled"], [1, "kpt-calendar__grid", "kpt-calendar__grid--cells"], ["type", "button", 1, "kpt-calendar__cell", 3, "kpt-calendar__cell--selected", "kpt-calendar__cell--current", "disabled"], ["type", "button", 1, "kpt-calendar__cell", 3, "click", "disabled"], ["type", "button", 1, "kpt-calendar__timebar", 3, "click"], ["name", "clock"], ["size", "sm", 3, "click"]], template: function KptDatepicker_Template(rf, ctx) { if (rf & 1) {
|
|
3670
3892
|
i0.ɵɵelementStart(0, "div", 1, 0);
|
|
3671
3893
|
i0.ɵɵlistener("click", function KptDatepicker_Template_div_click_0_listener() { return ctx.toggleOpen(); })("keydown.enter", function KptDatepicker_Template_div_keydown_enter_0_listener() { return ctx.toggleOpen(); })("blur", function KptDatepicker_Template_div_blur_0_listener() { return ctx.touch.emit(); });
|
|
3672
3894
|
i0.ɵɵconditionalCreate(2, KptDatepicker_Conditional_2_Template, 2, 1, "span", 2)(3, KptDatepicker_Conditional_3_Template, 2, 1, "span", 3);
|
|
@@ -3674,10 +3896,10 @@ class KptDatepicker {
|
|
|
3674
3896
|
i0.ɵɵconditionalCreate(5, KptDatepicker_Conditional_5_Template, 2, 1, "button", 5);
|
|
3675
3897
|
i0.ɵɵelement(6, "kpt-icon", 6);
|
|
3676
3898
|
i0.ɵɵelementEnd();
|
|
3677
|
-
i0.ɵɵtemplate(7, KptDatepicker_ng_template_7_Template,
|
|
3899
|
+
i0.ɵɵtemplate(7, KptDatepicker_ng_template_7_Template, 4, 4, "ng-template", 7);
|
|
3678
3900
|
i0.ɵɵlistener("backdropClick", function KptDatepicker_Template_ng_template_backdropClick_7_listener() { return ctx.close(); })("detach", function KptDatepicker_Template_ng_template_detach_7_listener() { return ctx.close(); });
|
|
3679
3901
|
} if (rf & 2) {
|
|
3680
|
-
const
|
|
3902
|
+
const trigger_r19 = i0.ɵɵreference(1);
|
|
3681
3903
|
i0.ɵɵclassProp("kpt-datepicker--open", ctx.open())("kpt-datepicker--disabled", ctx.disabled())("kpt-datepicker--invalid", ctx.showInvalid());
|
|
3682
3904
|
i0.ɵɵattribute("aria-disabled", ctx.disabled() || null)("aria-label", ctx.ariaLabel());
|
|
3683
3905
|
i0.ɵɵadvance(2);
|
|
@@ -3687,14 +3909,14 @@ class KptDatepicker {
|
|
|
3687
3909
|
i0.ɵɵadvance();
|
|
3688
3910
|
i0.ɵɵproperty("name", ctx.selectionMode() === "time" ? "clock" : "calendar");
|
|
3689
3911
|
i0.ɵɵadvance();
|
|
3690
|
-
i0.ɵɵproperty("cdkConnectedOverlayOrigin",
|
|
3691
|
-
} }, dependencies: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], styles: ["@layer kpt.components{.kpt-datepicker-host{display:block}.kpt-datepicker{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--%NS%kpt-space-3, .75rem);box-sizing:border-box;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-form-field-radius, .5rem);background:var(--%NS%kpt-form-field-bg);color:var(--%NS%kpt-form-field-text);font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer}.kpt-datepicker:hover:not(.kpt-datepicker--disabled){border-color:var(--%NS%kpt-form-field-border-hover)}.kpt-datepicker:focus-visible,.kpt-datepicker.kpt-datepicker--open{outline:none;border-color:var(--%NS%kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--%NS%kpt-form-field-border-focus) 30%,transparent)}.kpt-datepicker.kpt-datepicker--invalid{border-color:var(--%NS%kpt-form-field-border-error)}.kpt-datepicker.kpt-datepicker--disabled{cursor:not-allowed;opacity:.6;background:var(--%NS%kpt-color-surface-variant)}.kpt-datepicker__placeholder{color:var(--%NS%kpt-form-field-placeholder)}.kpt-datepicker__spacer{flex:1}.kpt-datepicker__icon{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-datepicker__clear{display:inline-flex;border:0;background:none;cursor:pointer;color:var(--%NS%kpt-color-on-surface-muted);padding:0}.kpt-datepicker__clear:hover{color:var(--%NS%kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--%NS%kpt-space-3, .75rem);background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);box-shadow:var(--%NS%kpt-elevation-3);color:var(--%NS%kpt-color-on-surface);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--%NS%kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--%NS%kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--%NS%kpt-radius-md, .5rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover{background:var(--%NS%kpt-color-muted)}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--%NS%kpt-font-size-xs, .75rem);color:var(--%NS%kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{aspect-ratio:1;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-calendar__day--muted{color:var(--%NS%kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--today{box-shadow:inset 0 0 0 1px var(--%NS%kpt-color-border-strong)}.kpt-calendar__day--selected{background:var(--%NS%kpt-color-primary)!important;color:var(--%NS%kpt-color-on-primary)}.kpt-calendar__day:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__grid--cells{grid-template-columns:repeat(3,1fr);gap:4px}.kpt-calendar__cell{padding:.6rem .25rem;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer;font:inherit;text-transform:capitalize}.kpt-calendar__cell:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-calendar__cell--selected{background:var(--%NS%kpt-color-primary)!important;color:var(--%NS%kpt-color-on-primary)}.kpt-calendar__cell:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__timebar{display:flex;align-items:center;justify-content:center;gap:var(--%NS%kpt-space-2, .5rem);width:100%;margin-top:var(--%NS%kpt-space-2, .5rem);padding:var(--%NS%kpt-space-2, .5rem);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);background:none;color:var(--%NS%kpt-color-on-surface);font:inherit;font-variant-numeric:tabular-nums;cursor:pointer}.kpt-calendar__timebar:hover{background:var(--%NS%kpt-color-muted)}.kpt-calendar__timebar kpt-icon{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--%NS%kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}}\n"], encapsulation: 2 }); }
|
|
3912
|
+
i0.ɵɵproperty("cdkConnectedOverlayOrigin", trigger_r19)("cdkConnectedOverlayOpen", ctx.open())("cdkConnectedOverlayPositions", ctx.positions)("cdkConnectedOverlayHasBackdrop", true);
|
|
3913
|
+
} }, dependencies: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], styles: ["@layer kpt.components{.kpt-datepicker-host{display:block}.kpt-datepicker{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--%NS%kpt-space-3, .75rem);box-sizing:border-box;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-form-field-radius, .5rem);background:var(--%NS%kpt-form-field-bg);color:var(--%NS%kpt-form-field-text);font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer}.kpt-datepicker:hover:not(.kpt-datepicker--disabled){border-color:var(--%NS%kpt-form-field-border-hover)}.kpt-datepicker:focus-visible,.kpt-datepicker.kpt-datepicker--open{outline:none;border-color:var(--%NS%kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--%NS%kpt-form-field-border-focus) 30%,transparent)}.kpt-datepicker.kpt-datepicker--invalid{border-color:var(--%NS%kpt-form-field-border-error)}.kpt-datepicker.kpt-datepicker--disabled{cursor:not-allowed;opacity:.6;background:var(--%NS%kpt-color-surface-variant)}.kpt-datepicker__placeholder{color:var(--%NS%kpt-form-field-placeholder)}.kpt-datepicker__spacer{flex:1}.kpt-datepicker__icon{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-datepicker__clear{display:inline-flex;border:0;background:none;cursor:pointer;color:var(--%NS%kpt-color-on-surface-muted);padding:0}.kpt-datepicker__clear:hover{color:var(--%NS%kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--%NS%kpt-space-3, .75rem);background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);box-shadow:var(--%NS%kpt-elevation-3);color:var(--%NS%kpt-color-on-surface);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--%NS%kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--%NS%kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__titles{display:flex;align-items:center;gap:var(--%NS%kpt-space-1, .25rem)}.kpt-calendar__title-btn{padding:.25rem var(--%NS%kpt-space-2, .5rem);border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:var(--%NS%kpt-color-muted);color:var(--%NS%kpt-color-on-surface);font:inherit;font-weight:var(--%NS%kpt-font-weight-semibold, 600);text-transform:capitalize;cursor:pointer}.kpt-calendar__title-btn:hover{background:var(--%NS%kpt-color-muted-hover)}.kpt-calendar__title-btn:focus-visible{outline:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border-strong);outline-offset:1px}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--%NS%kpt-radius-md, .5rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-calendar__nav:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--%NS%kpt-font-size-xs, .75rem);color:var(--%NS%kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{aspect-ratio:1;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-calendar__day--muted{color:var(--%NS%kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--today{box-shadow:inset 0 0 0 1px var(--%NS%kpt-color-border-strong)}.kpt-calendar__day--selected{background:var(--%NS%kpt-color-primary)!important;color:var(--%NS%kpt-color-on-primary)}.kpt-calendar__day:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__grid--cells{grid-template-columns:repeat(3,1fr);gap:4px}.kpt-calendar__cell{padding:.6rem .25rem;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer;font:inherit;text-transform:capitalize}.kpt-calendar__cell:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-calendar__cell--current{box-shadow:inset 0 0 0 1px var(--%NS%kpt-color-border-strong)}.kpt-calendar__cell--selected{background:var(--%NS%kpt-color-primary)!important;color:var(--%NS%kpt-color-on-primary)}.kpt-calendar__cell:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__grid--decades .kpt-calendar__cell{padding-inline:0;font-size:var(--%NS%kpt-font-size-xs, .75rem);white-space:nowrap}.kpt-calendar__timebar{display:flex;align-items:center;justify-content:center;gap:var(--%NS%kpt-space-2, .5rem);width:100%;margin-top:var(--%NS%kpt-space-2, .5rem);padding:var(--%NS%kpt-space-2, .5rem);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);background:none;color:var(--%NS%kpt-color-on-surface);font:inherit;font-variant-numeric:tabular-nums;cursor:pointer}.kpt-calendar__timebar:hover{background:var(--%NS%kpt-color-muted)}.kpt-calendar__timebar kpt-icon{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--%NS%kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}}\n"], encapsulation: 2 }); }
|
|
3692
3914
|
}
|
|
3693
3915
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptDatepicker, [{
|
|
3694
3916
|
type: Component,
|
|
3695
|
-
args: [{ selector: 'kpt-datepicker', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], host: { class: 'kpt-datepicker-host' }, template: "<div\n class=\"kpt-datepicker\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n role=\"button\"\n tabindex=\"0\"\n [class.kpt-datepicker--open]=\"open()\"\n [class.kpt-datepicker--disabled]=\"disabled()\"\n [class.kpt-datepicker--invalid]=\"showInvalid()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"toggleOpen()\"\n (keydown.enter)=\"toggleOpen()\"\n (blur)=\"touch.emit()\"\n>\n @if (display()) {\n <span class=\"kpt-datepicker__value\">{{ display() }}</span>\n } @else {\n <span class=\"kpt-datepicker__placeholder\">{{ effectivePlaceholder() }}</span>\n }\n <span class=\"kpt-datepicker__spacer\"></span>\n @if (display()) {\n <button type=\"button\" class=\"kpt-datepicker__clear\" (click)=\"clear($event)\" [attr.aria-label]=\"i18n.t('common.clear')\"><kpt-icon name=\"x\" /></button>\n }\n <kpt-icon\n class=\"kpt-datepicker__icon\"\n [name]=\"selectionMode() === 'time' ? 'clock' : 'calendar'\"\n />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div class=\"kpt-calendar\" [class.kpt-calendar--clock]=\"selectionMode() === 'time' || (selectionMode() === 'datetime' && dtView() === 'clock')\" (keydown.escape)=\"close()\">\n @switch (selectionMode()) {\n @case ('time') {\n <kpt-clock [(value)]=\"timeStr\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n }\n @case ('datetime') {\n @if (dtView() === 'calendar') {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevMonth()\" [attr.aria-label]=\"i18n.t('datepicker.prevMonth')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ monthLabel() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextMonth()\" [attr.aria-label]=\"i18n.t('datepicker.nextMonth')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__weekdays\">\n @for (wd of weekdays(); track wd) {\n <span class=\"kpt-calendar__weekday\">{{ wd }}</span>\n }\n </div>\n <div class=\"kpt-calendar__grid\">\n @for (week of weeks(); track $index) {\n @for (cell of week; track cell.iso) {\n <button\n type=\"button\"\n class=\"kpt-calendar__day\"\n [class.kpt-calendar__day--muted]=\"!cell.inMonth\"\n [class.kpt-calendar__day--today]=\"cell.today\"\n [class.kpt-calendar__day--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectDay(cell)\"\n >{{ cell.day }}</button>\n }\n }\n </div>\n <button type=\"button\" class=\"kpt-calendar__timebar\" (click)=\"openClock()\">\n <kpt-icon name=\"clock\" />\n <span>{{ timeBarLabel() }}</span>\n </button>\n } @else {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"backToCalendar()\" [attr.aria-label]=\"i18n.t('datepicker.calendar')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ i18n.t('datepicker.time') }}</span>\n </div>\n <kpt-clock [(value)]=\"timeStr\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n }\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n }\n @case ('monthYear') {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevYear()\" [attr.aria-label]=\"i18n.t('datepicker.prevYear')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ viewYear() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextYear()\" [attr.aria-label]=\"i18n.t('datepicker.nextYear')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__grid kpt-calendar__grid--cells\">\n @for (cell of monthCells(); track cell.value) {\n <button\n type=\"button\"\n class=\"kpt-calendar__cell\"\n [class.kpt-calendar__cell--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectCell(cell)\"\n >{{ cell.label }}</button>\n }\n </div>\n }\n @case ('year') {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevYearPage()\" [attr.aria-label]=\"i18n.t('datepicker.prevYears')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ yearRangeLabel() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextYearPage()\" [attr.aria-label]=\"i18n.t('datepicker.nextYears')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__grid kpt-calendar__grid--cells\">\n @for (cell of yearCells(); track cell.value) {\n <button\n type=\"button\"\n class=\"kpt-calendar__cell\"\n [class.kpt-calendar__cell--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectCell(cell)\"\n >{{ cell.label }}</button>\n }\n </div>\n }\n @case ('month') {\n <div class=\"kpt-calendar__header\">\n <span class=\"kpt-calendar__title\">{{ i18n.t('datepicker.month') }}</span>\n </div>\n <div class=\"kpt-calendar__grid kpt-calendar__grid--cells\">\n @for (cell of monthCells(); track cell.value) {\n <button\n type=\"button\"\n class=\"kpt-calendar__cell\"\n [class.kpt-calendar__cell--selected]=\"cell.selected\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectCell(cell)\"\n >{{ cell.label }}</button>\n }\n </div>\n }\n @default {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevMonth()\" [attr.aria-label]=\"i18n.t('datepicker.prevMonth')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ monthLabel() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextMonth()\" [attr.aria-label]=\"i18n.t('datepicker.nextMonth')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__weekdays\">\n @for (wd of weekdays(); track wd) {\n <span class=\"kpt-calendar__weekday\">{{ wd }}</span>\n }\n </div>\n <div class=\"kpt-calendar__grid\">\n @for (week of weeks(); track $index) {\n @for (cell of week; track cell.iso) {\n <button\n type=\"button\"\n class=\"kpt-calendar__day\"\n [class.kpt-calendar__day--muted]=\"!cell.inMonth\"\n [class.kpt-calendar__day--today]=\"cell.today\"\n [class.kpt-calendar__day--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectDay(cell)\"\n >{{ cell.day }}</button>\n }\n }\n </div>\n }\n }\n </div>\n</ng-template>\n", styles: ["@layer kpt.components{.kpt-datepicker-host{display:block}.kpt-datepicker{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--kpt-space-3, .75rem);box-sizing:border-box;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-datepicker:hover:not(.kpt-datepicker--disabled){border-color:var(--kpt-form-field-border-hover)}.kpt-datepicker:focus-visible,.kpt-datepicker.kpt-datepicker--open{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-datepicker.kpt-datepicker--invalid{border-color:var(--kpt-form-field-border-error)}.kpt-datepicker.kpt-datepicker--disabled{cursor:not-allowed;opacity:.6;background:var(--kpt-color-surface-variant)}.kpt-datepicker__placeholder{color:var(--kpt-form-field-placeholder)}.kpt-datepicker__spacer{flex:1}.kpt-datepicker__icon{color:var(--kpt-color-on-surface-muted)}.kpt-datepicker__clear{display:inline-flex;border:0;background:none;cursor:pointer;color:var(--kpt-color-on-surface-muted);padding:0}.kpt-datepicker__clear:hover{color:var(--kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3);color:var(--kpt-color-on-surface);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--kpt-radius-md, .5rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover{background:var(--kpt-color-muted)}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--kpt-font-size-xs, .75rem);color:var(--kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{aspect-ratio:1;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__day--muted{color:var(--kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--today{box-shadow:inset 0 0 0 1px var(--kpt-color-border-strong)}.kpt-calendar__day--selected{background:var(--kpt-color-primary)!important;color:var(--kpt-color-on-primary)}.kpt-calendar__day:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__grid--cells{grid-template-columns:repeat(3,1fr);gap:4px}.kpt-calendar__cell{padding:.6rem .25rem;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font:inherit;text-transform:capitalize}.kpt-calendar__cell:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__cell--selected{background:var(--kpt-color-primary)!important;color:var(--kpt-color-on-primary)}.kpt-calendar__cell:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__timebar{display:flex;align-items:center;justify-content:center;gap:var(--kpt-space-2, .5rem);width:100%;margin-top:var(--kpt-space-2, .5rem);padding:var(--kpt-space-2, .5rem);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);background:none;color:var(--kpt-color-on-surface);font:inherit;font-variant-numeric:tabular-nums;cursor:pointer}.kpt-calendar__timebar:hover{background:var(--kpt-color-muted)}.kpt-calendar__timebar kpt-icon{color:var(--kpt-color-on-surface-muted)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}}\n"] }]
|
|
3696
|
-
}],
|
|
3697
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDatepicker, { className: "KptDatepicker", filePath: "lib/datepicker/datepicker.component.ts", lineNumber:
|
|
3917
|
+
args: [{ selector: 'kpt-datepicker', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], host: { class: 'kpt-datepicker-host' }, template: "<div\n class=\"kpt-datepicker\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n role=\"button\"\n tabindex=\"0\"\n [class.kpt-datepicker--open]=\"open()\"\n [class.kpt-datepicker--disabled]=\"disabled()\"\n [class.kpt-datepicker--invalid]=\"showInvalid()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"toggleOpen()\"\n (keydown.enter)=\"toggleOpen()\"\n (blur)=\"touch.emit()\"\n>\n @if (display()) {\n <span class=\"kpt-datepicker__value\">{{ display() }}</span>\n } @else {\n <span class=\"kpt-datepicker__placeholder\">{{ effectivePlaceholder() }}</span>\n }\n <span class=\"kpt-datepicker__spacer\"></span>\n @if (display()) {\n <button type=\"button\" class=\"kpt-datepicker__clear\" (click)=\"clear($event)\" [attr.aria-label]=\"i18n.t('common.clear')\"><kpt-icon name=\"x\" /></button>\n }\n <kpt-icon\n class=\"kpt-datepicker__icon\"\n [name]=\"selectionMode() === 'time' ? 'clock' : 'calendar'\"\n />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div class=\"kpt-calendar\" [class.kpt-calendar--clock]=\"showClock()\" (keydown.escape)=\"close()\">\n @if (showClock()) {\n @if (selectionMode() === 'datetime') {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"backToCalendar()\" [attr.aria-label]=\"i18n.t('datepicker.calendar')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ i18n.t('datepicker.time') }}</span>\n </div>\n }\n <kpt-clock [(value)]=\"timeStr\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n } @else {\n <!-- Nag\u0142\u00F3wek wsp\u00F3lny dla czterech poziom\u00F3w: r\u00F3\u017Cni je tylko tre\u015B\u0107 tytu\u0142u. -->\n <div class=\"kpt-calendar__header\">\n @if (hasNav()) {\n <button type=\"button\" class=\"kpt-calendar__nav\" [disabled]=\"!canPageBack()\" (click)=\"pagePrev()\" [attr.aria-label]=\"navPrevLabel()\"><kpt-icon name=\"chevron-left\" /></button>\n }\n <span class=\"kpt-calendar__titles\">\n @switch (panelView()) {\n @case ('day') {\n <button type=\"button\" class=\"kpt-calendar__title-btn\" (click)=\"goTo('month')\" [attr.aria-label]=\"i18n.t('datepicker.chooseMonth')\">{{ monthName() }}</button>\n <button type=\"button\" class=\"kpt-calendar__title-btn\" (click)=\"goTo('year')\" [attr.aria-label]=\"i18n.t('datepicker.chooseYear')\">{{ viewYear() }}</button>\n }\n @case ('month') {\n @if (selectionMode() === 'month') {\n <span class=\"kpt-calendar__title\">{{ i18n.t('datepicker.month') }}</span>\n } @else {\n <button type=\"button\" class=\"kpt-calendar__title-btn\" (click)=\"goTo('year')\" [attr.aria-label]=\"i18n.t('datepicker.chooseYear')\">{{ viewYear() }}</button>\n }\n }\n @case ('year') {\n <button type=\"button\" class=\"kpt-calendar__title-btn\" (click)=\"goTo('decade')\" [attr.aria-label]=\"i18n.t('datepicker.chooseDecade')\">{{ yearRangeLabel() }}</button>\n }\n @case ('decade') {\n <span class=\"kpt-calendar__title\">{{ decadeRangeLabel() }}</span>\n }\n }\n </span>\n @if (hasNav()) {\n <button type=\"button\" class=\"kpt-calendar__nav\" [disabled]=\"!canPageForward()\" (click)=\"pageNext()\" [attr.aria-label]=\"navNextLabel()\"><kpt-icon name=\"chevron-right\" /></button>\n }\n </div>\n\n @switch (panelView()) {\n @case ('day') {\n <div class=\"kpt-calendar__weekdays\">\n @for (wd of weekdays(); track wd) {\n <span class=\"kpt-calendar__weekday\">{{ wd }}</span>\n }\n </div>\n <div class=\"kpt-calendar__grid\">\n @for (week of weeks(); track $index) {\n @for (cell of week; track cell.iso) {\n <button\n type=\"button\"\n class=\"kpt-calendar__day\"\n [class.kpt-calendar__day--muted]=\"!cell.inMonth\"\n [class.kpt-calendar__day--today]=\"cell.today\"\n [class.kpt-calendar__day--selected]=\"cell.selected\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectDay(cell)\"\n >{{ cell.day }}</button>\n }\n }\n </div>\n }\n @default {\n <div class=\"kpt-calendar__grid kpt-calendar__grid--cells\" [class.kpt-calendar__grid--decades]=\"panelView() === 'decade'\">\n @for (cell of levelCells(); track cell.label) {\n <button\n type=\"button\"\n class=\"kpt-calendar__cell\"\n [class.kpt-calendar__cell--selected]=\"cell.selected\"\n [class.kpt-calendar__cell--current]=\"cell.current\"\n [disabled]=\"cell.disabled\"\n [attr.aria-pressed]=\"cell.selected\"\n (click)=\"selectCell(cell)\"\n >{{ cell.label }}</button>\n }\n </div>\n }\n }\n\n @if (selectionMode() === 'datetime') {\n <button type=\"button\" class=\"kpt-calendar__timebar\" (click)=\"openClock()\">\n <kpt-icon name=\"clock\" />\n <span>{{ timeBarLabel() }}</span>\n </button>\n }\n }\n @if (hasFooter()) {\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n }\n </div>\n</ng-template>\n", styles: ["@layer kpt.components{.kpt-datepicker-host{display:block}.kpt-datepicker{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--kpt-space-3, .75rem);box-sizing:border-box;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-datepicker:hover:not(.kpt-datepicker--disabled){border-color:var(--kpt-form-field-border-hover)}.kpt-datepicker:focus-visible,.kpt-datepicker.kpt-datepicker--open{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-datepicker.kpt-datepicker--invalid{border-color:var(--kpt-form-field-border-error)}.kpt-datepicker.kpt-datepicker--disabled{cursor:not-allowed;opacity:.6;background:var(--kpt-color-surface-variant)}.kpt-datepicker__placeholder{color:var(--kpt-form-field-placeholder)}.kpt-datepicker__spacer{flex:1}.kpt-datepicker__icon{color:var(--kpt-color-on-surface-muted)}.kpt-datepicker__clear{display:inline-flex;border:0;background:none;cursor:pointer;color:var(--kpt-color-on-surface-muted);padding:0}.kpt-datepicker__clear:hover{color:var(--kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3);color:var(--kpt-color-on-surface);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__titles{display:flex;align-items:center;gap:var(--kpt-space-1, .25rem)}.kpt-calendar__title-btn{padding:.25rem var(--kpt-space-2, .5rem);border:0;border-radius:var(--kpt-radius-sm, .25rem);background:var(--kpt-color-muted);color:var(--kpt-color-on-surface);font:inherit;font-weight:var(--kpt-font-weight-semibold, 600);text-transform:capitalize;cursor:pointer}.kpt-calendar__title-btn:hover{background:var(--kpt-color-muted-hover)}.kpt-calendar__title-btn:focus-visible{outline:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border-strong);outline-offset:1px}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--kpt-radius-md, .5rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__nav:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--kpt-font-size-xs, .75rem);color:var(--kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{aspect-ratio:1;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__day--muted{color:var(--kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--today{box-shadow:inset 0 0 0 1px var(--kpt-color-border-strong)}.kpt-calendar__day--selected{background:var(--kpt-color-primary)!important;color:var(--kpt-color-on-primary)}.kpt-calendar__day:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__grid--cells{grid-template-columns:repeat(3,1fr);gap:4px}.kpt-calendar__cell{padding:.6rem .25rem;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font:inherit;text-transform:capitalize}.kpt-calendar__cell:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__cell--current{box-shadow:inset 0 0 0 1px var(--kpt-color-border-strong)}.kpt-calendar__cell--selected{background:var(--kpt-color-primary)!important;color:var(--kpt-color-on-primary)}.kpt-calendar__cell:disabled{opacity:.3;cursor:not-allowed}.kpt-calendar__grid--decades .kpt-calendar__cell{padding-inline:0;font-size:var(--kpt-font-size-xs, .75rem);white-space:nowrap}.kpt-calendar__timebar{display:flex;align-items:center;justify-content:center;gap:var(--kpt-space-2, .5rem);width:100%;margin-top:var(--kpt-space-2, .5rem);padding:var(--kpt-space-2, .5rem);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);background:none;color:var(--kpt-color-on-surface);font:inherit;font-variant-numeric:tabular-nums;cursor:pointer}.kpt-calendar__timebar:hover{background:var(--kpt-color-muted)}.kpt-calendar__timebar kpt-icon{color:var(--kpt-color-on-surface-muted)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}}\n"] }]
|
|
3918
|
+
}], () => [], { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], displayFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayFormat", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], startView: [{ type: i0.Input, args: [{ isSignal: true, alias: "startView", required: false }] }], monthDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "monthDisplay", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }] }); })();
|
|
3919
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDatepicker, { className: "KptDatepicker", filePath: "lib/datepicker/datepicker.component.ts", lineNumber: 81 }); })();
|
|
3698
3920
|
|
|
3699
3921
|
const _c0$u = ["ta"];
|
|
3700
3922
|
/**
|
|
@@ -4413,7 +4635,10 @@ const ALLOWED_STYLES = new Set([
|
|
|
4413
4635
|
'color', 'background-color', 'text-align', 'font-weight', 'font-style', 'text-decoration',
|
|
4414
4636
|
'width', 'height', 'border', 'border-color', 'border-width', 'border-style', 'vertical-align',
|
|
4415
4637
|
]);
|
|
4416
|
-
const ALLOWED_ATTRS = new Set(['colspan', 'rowspan', 'span', 'width', 'class']);
|
|
4638
|
+
const ALLOWED_ATTRS = new Set(['colspan', 'rowspan', 'span', 'width', 'class', 'target', 'rel', 'title']);
|
|
4639
|
+
// Schematy URL dopuszczone w `href` wstawianym narzędziem „link" (blocklista jest obchodzalna).
|
|
4640
|
+
const SAFE_URL_SCHEME = /^(https?:|mailto:|tel:)/i;
|
|
4641
|
+
const HAS_URL_SCHEME = /^[a-z][a-z0-9+.-]*:/i;
|
|
4417
4642
|
/**
|
|
4418
4643
|
* Lekki edytor tekstu sformatowanego (contenteditable) z konfigurowalnym paskiem sekcji.
|
|
4419
4644
|
* Narzędzia: schowek (kopiuj / wklej / wklej bez formatowania), styl (nagłówki H1–H6 / paragraf),
|
|
@@ -4508,11 +4733,14 @@ class KptRichText {
|
|
|
4508
4733
|
}, /* @ts-ignore */
|
|
4509
4734
|
...(ngDevMode ? [{ debugName: "sections" }] : /* istanbul ignore next */ []));
|
|
4510
4735
|
// Synchronizuj tylko przy zmianie zewnętrznej (bez resetu kursora podczas pisania).
|
|
4736
|
+
// Porównanie `el.innerHTML !== v` działa na SUROWEJ wartości modelu (tej samej, którą ustawia
|
|
4737
|
+
// `onInput()`), więc pisanie w edytorze nadal nie odpala tej gałęzi — sanityzacja włącza się
|
|
4738
|
+
// wyłącznie przy zewnętrznym zapisie `value` (init, `[(value)]` z aplikacji, `onSource()`).
|
|
4511
4739
|
effect(() => {
|
|
4512
4740
|
const el = this.editor()?.nativeElement;
|
|
4513
4741
|
const v = this.value();
|
|
4514
4742
|
if (el && el.innerHTML !== v)
|
|
4515
|
-
el.innerHTML = v;
|
|
4743
|
+
el.innerHTML = this.sanitizeHtml(v);
|
|
4516
4744
|
});
|
|
4517
4745
|
// Odzwierciedlenie stanu aktywnego narzędzi na podstawie zaznaczenia.
|
|
4518
4746
|
const onSel = () => this.refreshState();
|
|
@@ -4611,8 +4839,11 @@ class KptRichText {
|
|
|
4611
4839
|
switch (item) {
|
|
4612
4840
|
case 'link': {
|
|
4613
4841
|
const url = window.prompt(this.i18n.t('richText.linkPrompt'));
|
|
4614
|
-
if (url)
|
|
4615
|
-
|
|
4842
|
+
if (url) {
|
|
4843
|
+
const safe = this.sanitizeUrl(url);
|
|
4844
|
+
if (safe)
|
|
4845
|
+
document.execCommand('createLink', false, safe);
|
|
4846
|
+
}
|
|
4616
4847
|
break;
|
|
4617
4848
|
}
|
|
4618
4849
|
case 'copy':
|
|
@@ -5177,6 +5408,21 @@ class KptRichText {
|
|
|
5177
5408
|
canSplit() {
|
|
5178
5409
|
return this.canSplitCtx;
|
|
5179
5410
|
}
|
|
5411
|
+
/**
|
|
5412
|
+
* Waliduje URL z narzędzia „link" (blocklista jest obchodzalna, np. `javascript:`).
|
|
5413
|
+
* Brak schematu → dopisz `https://` (spójne z zachowaniem `normalizeUrl` w mapie); `#`/`/`
|
|
5414
|
+
* przechodzą bez zmian; schemat spoza `SAFE_URL_SCHEME` → `null` (link nie zostaje wstawiony).
|
|
5415
|
+
*/
|
|
5416
|
+
sanitizeUrl(url) {
|
|
5417
|
+
const trimmed = url.trim().replace(/[\x00-\x1f]/g, '');
|
|
5418
|
+
if (!trimmed)
|
|
5419
|
+
return null;
|
|
5420
|
+
if (trimmed.startsWith('#') || trimmed.startsWith('/'))
|
|
5421
|
+
return trimmed;
|
|
5422
|
+
if (!HAS_URL_SCHEME.test(trimmed))
|
|
5423
|
+
return `https://${trimmed}`;
|
|
5424
|
+
return SAFE_URL_SCHEME.test(trimmed) ? trimmed : null;
|
|
5425
|
+
}
|
|
5180
5426
|
sanitizeHtml(html) {
|
|
5181
5427
|
const tpl = document.createElement('template');
|
|
5182
5428
|
tpl.innerHTML = html;
|
|
@@ -5192,7 +5438,9 @@ class KptRichText {
|
|
|
5192
5438
|
el.removeAttribute(attr.name);
|
|
5193
5439
|
}
|
|
5194
5440
|
else if (name === 'href' || name === 'src') {
|
|
5195
|
-
|
|
5441
|
+
// Usuń znaki kontrolne przed testem schematu — przeglądarka i tak je ignoruje przy
|
|
5442
|
+
// parsowaniu URL-a (WHATWG URL spec), więc `jav\tascript:` obchodziłby sam blocklisting.
|
|
5443
|
+
if (/^\s*javascript:/i.test(attr.value.replace(/[\x00-\x1f]/g, '')))
|
|
5196
5444
|
el.removeAttribute(attr.name);
|
|
5197
5445
|
}
|
|
5198
5446
|
else if (name === 'style') {
|
|
@@ -5205,7 +5453,7 @@ class KptRichText {
|
|
|
5205
5453
|
else
|
|
5206
5454
|
el.removeAttribute('style');
|
|
5207
5455
|
}
|
|
5208
|
-
else if (!ALLOWED_ATTRS.has(name) && name !== 'color'
|
|
5456
|
+
else if (!ALLOWED_ATTRS.has(name) && name !== 'color') {
|
|
5209
5457
|
el.removeAttribute(attr.name);
|
|
5210
5458
|
}
|
|
5211
5459
|
}
|
|
@@ -5250,7 +5498,7 @@ class KptRichText {
|
|
|
5250
5498
|
type: Component,
|
|
5251
5499
|
args: [{ selector: 'kpt-rich-text', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [KptIcon, CdkOverlayOrigin, CdkConnectedOverlay, NgTemplateOutlet, KptTooltip], host: { class: 'kpt-rich-text-host' }, template: "<div class=\"kpt-rich-text\" [class.kpt-rich-text--invalid]=\"showInvalid()\" [class.kpt-rich-text--disabled]=\"disabled()\">\n <div class=\"kpt-rich-text__toolbar\" role=\"toolbar\">\n @for (section of sections(); track $index; let firstSection = $first) {\n @if (!firstSection) {\n <span class=\"kpt-rich-text__divider\" aria-hidden=\"true\"></span>\n }\n @for (item of section; track item) {\n @switch (item) {\n @case ('heading') {\n <button\n type=\"button\"\n class=\"kpt-rich-text__style\"\n cdkOverlayOrigin\n #styleOrigin=\"cdkOverlayOrigin\"\n [class.is-open]=\"styleOpen()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"aria(item)\"\n [attr.aria-expanded]=\"styleOpen()\"\n [kptTooltip]=\"aria(item)\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"openStyle()\"\n >\n <span>{{ styleLabel() }}</span>\n <kpt-icon name=\"chevron-down\" class=\"kpt-rich-text__style-caret\" />\n </button>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"styleOrigin\"\n [cdkConnectedOverlayOpen]=\"styleOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeStyle()\"\n (detach)=\"closeStyle()\"\n >\n <ul class=\"kpt-rich-text__style-panel\" role=\"listbox\">\n @for (o of styleOptions(); track o.tag) {\n <li\n class=\"kpt-rich-text__style-opt\"\n [class]=\"'kpt-rich-text__style-opt kpt-rich-text__style-opt--' + o.tag\"\n role=\"option\"\n [attr.aria-selected]=\"currentBlock() === o.tag\"\n [class.is-selected]=\"currentBlock() === o.tag\"\n (click)=\"pickStyle(o.tag)\"\n >{{ o.label }}</li>\n }\n </ul>\n </ng-template>\n }\n @case ('foreColor') {\n <button\n type=\"button\"\n class=\"kpt-rich-text__tool kpt-rich-text__tool--color\"\n cdkOverlayOrigin\n #foreOrigin=\"cdkOverlayOrigin\"\n [attr.aria-label]=\"aria(item)\"\n [kptTooltip]=\"aria(item)\"\n [disabled]=\"disabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"openColor('foreColor')\"\n >\n <kpt-icon [name]=\"icon(item)\" />\n </button>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"foreOrigin\"\n [cdkConnectedOverlayOpen]=\"colorOpen() && colorKind() === 'foreColor'\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeColor()\"\n (detach)=\"closeColor()\"\n >\n <ng-container [ngTemplateOutlet]=\"paletteTpl\" />\n </ng-template>\n }\n @case ('backColor') {\n <button\n type=\"button\"\n class=\"kpt-rich-text__tool kpt-rich-text__tool--color\"\n cdkOverlayOrigin\n #backOrigin=\"cdkOverlayOrigin\"\n [attr.aria-label]=\"aria(item)\"\n [kptTooltip]=\"aria(item)\"\n [disabled]=\"disabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"openColor('backColor')\"\n >\n <kpt-icon [name]=\"icon(item)\" />\n </button>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"backOrigin\"\n [cdkConnectedOverlayOpen]=\"colorOpen() && colorKind() === 'backColor'\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeColor()\"\n (detach)=\"closeColor()\"\n >\n <ng-container [ngTemplateOutlet]=\"paletteTpl\" />\n </ng-template>\n }\n @case ('table') {\n <button\n type=\"button\"\n class=\"kpt-rich-text__tool\"\n cdkOverlayOrigin\n #tableOrigin=\"cdkOverlayOrigin\"\n [class.is-active]=\"tableOpen()\"\n [attr.aria-label]=\"aria(item)\"\n [kptTooltip]=\"aria(item)\"\n [disabled]=\"disabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"exec(item)\"\n >\n <kpt-icon [name]=\"icon(item)\" />\n </button>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"tableOrigin\"\n [cdkConnectedOverlayOpen]=\"tableOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeTable()\"\n (detach)=\"closeTable()\"\n >\n <div class=\"kpt-rt-grid-pop\" (mousedown)=\"$event.preventDefault()\">\n <div class=\"kpt-rt-grid\" (mouseleave)=\"gridHover(0, 0)\">\n @for (r of gridRows; track r) {\n <div class=\"kpt-rt-grid__row\">\n @for (c of gridCols; track c) {\n <span\n class=\"kpt-rt-grid__cell\"\n [class.is-on]=\"r <= gridR() && c <= gridC()\"\n (mouseenter)=\"gridHover(r, c)\"\n (click)=\"insertTable(r, c)\"\n ></span>\n }\n </div>\n }\n </div>\n <div class=\"kpt-rt-grid__label\">{{ gridR() }} \u00D7 {{ gridC() }}</div>\n </div>\n </ng-template>\n }\n @default {\n <button\n type=\"button\"\n class=\"kpt-rich-text__tool\"\n [class.is-active]=\"isActive(item)\"\n [attr.aria-label]=\"aria(item)\"\n [attr.aria-pressed]=\"isActive(item)\"\n [kptTooltip]=\"aria(item)\"\n [disabled]=\"disabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"exec(item)\"\n >\n <kpt-icon [name]=\"icon(item)\" />\n </button>\n }\n }\n }\n }\n </div>\n @if (sourceView()) {\n <textarea\n class=\"kpt-rich-text__source\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n spellcheck=\"false\"\n [attr.aria-label]=\"i18n.t('richText.htmlSource')\"\n (input)=\"onSource($event)\"\n (blur)=\"touch.emit()\"\n ></textarea>\n } @else {\n <div\n #editor\n class=\"kpt-rich-text__editor\"\n [attr.contenteditable]=\"disabled() ? 'false' : 'true'\"\n [attr.data-placeholder]=\"placeholder()\"\n [attr.aria-invalid]=\"showInvalid() ? 'true' : null\"\n role=\"textbox\"\n aria-multiline=\"true\"\n (input)=\"onInput()\"\n (paste)=\"onPaste($event)\"\n (contextmenu)=\"onContextMenu($event)\"\n (mousedown)=\"onEditorMouseDown($event)\"\n (mousemove)=\"onEditorMouseMove($event)\"\n (blur)=\"touch.emit()\"\n ></div>\n }\n\n <!-- Menu kontekstowe tabeli (origin punktowy = pozycja kursora) -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"menuPoint()\"\n [cdkConnectedOverlayOpen]=\"menuOpen()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeMenu()\"\n (detach)=\"closeMenu()\"\n >\n <div class=\"kpt-rt-menu\" (contextmenu)=\"$event.preventDefault()\">\n <div class=\"kpt-rt-menu__group\">{{ i18n.t('richText.menu.column') }}</div>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"insertColumn('left')\"><kpt-icon name=\"plus\" /> {{ i18n.t('richText.menu.insertLeft') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"insertColumn('right')\"><kpt-icon name=\"plus\" /> {{ i18n.t('richText.menu.insertRight') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"toggleHeaderColumn()\"><kpt-icon name=\"table\" /> {{ i18n.t('richText.menu.headerColumn') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"deleteColumn()\"><kpt-icon name=\"trash\" /> {{ i18n.t('richText.menu.deleteColumn') }}</button>\n <div class=\"kpt-rt-menu__sep\"></div>\n <div class=\"kpt-rt-menu__group\">{{ i18n.t('richText.menu.row') }}</div>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"insertRow('above')\"><kpt-icon name=\"plus\" /> {{ i18n.t('richText.menu.insertAbove') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"insertRow('below')\"><kpt-icon name=\"plus\" /> {{ i18n.t('richText.menu.insertBelow') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"toggleHeaderRow()\"><kpt-icon name=\"table\" /> {{ i18n.t('richText.menu.headerRow') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"deleteRow()\"><kpt-icon name=\"trash\" /> {{ i18n.t('richText.menu.deleteRow') }}</button>\n <div class=\"kpt-rt-menu__sep\"></div>\n <div class=\"kpt-rt-menu__group\">{{ i18n.t('richText.menu.cell') }}</div>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"openCellBg()\"><kpt-icon name=\"palette\" /> {{ i18n.t('richText.menu.cellBackground') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"alignCell('left')\"><kpt-icon name=\"align-left\" /> {{ i18n.t('richText.menu.alignLeft') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"alignCell('center')\"><kpt-icon name=\"align-center\" /> {{ i18n.t('richText.menu.alignCenter') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"alignCell('right')\"><kpt-icon name=\"align-right\" /> {{ i18n.t('richText.menu.alignRight') }}</button>\n <div class=\"kpt-rt-menu__sep\"></div>\n <button type=\"button\" class=\"kpt-rt-menu__item\" [class.is-disabled]=\"!canMerge()\" (click)=\"mergeCells()\"><kpt-icon name=\"table\" /> {{ i18n.t('richText.menu.mergeCells') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" [class.is-disabled]=\"!canSplit()\" (click)=\"splitCell()\"><kpt-icon name=\"grip-vertical\" /> {{ i18n.t('richText.menu.splitCell') }}</button>\n <div class=\"kpt-rt-menu__sep\"></div>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"openBorder()\"><kpt-icon name=\"table\" /> {{ i18n.t('richText.menu.border') }}</button>\n <div class=\"kpt-rt-menu__sep\"></div>\n <button type=\"button\" class=\"kpt-rt-menu__item kpt-rt-menu__item--danger\" (click)=\"deleteTable()\"><kpt-icon name=\"trash\" /> {{ i18n.t('richText.menu.deleteTable') }}</button>\n </div>\n </ng-template>\n\n <!-- Popover obramowania (tabela / kom\u00F3rka) -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"menuPoint()\"\n [cdkConnectedOverlayOpen]=\"borderOpen()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeBorder()\"\n (detach)=\"closeBorder()\"\n >\n <div class=\"kpt-rt-border\" (mousedown)=\"$event.preventDefault()\">\n <div class=\"kpt-rt-border__seg\">\n <button type=\"button\" [class.is-active]=\"borderTarget() === 'table'\" (click)=\"borderTarget.set('table')\">{{ i18n.t('richText.border.table') }}</button>\n <button type=\"button\" [class.is-active]=\"borderTarget() === 'cell'\" (click)=\"borderTarget.set('cell')\">{{ i18n.t('richText.border.cell') }}</button>\n </div>\n <div class=\"kpt-rt-border__widths\">\n <button type=\"button\" (click)=\"setBorderWidth('none')\">{{ i18n.t('richText.border.none') }}</button>\n <button type=\"button\" (click)=\"setBorderWidth('thin')\">{{ i18n.t('richText.border.thin') }}</button>\n <button type=\"button\" (click)=\"setBorderWidth('medium')\">{{ i18n.t('richText.border.medium') }}</button>\n <button type=\"button\" (click)=\"setBorderWidth('thick')\">{{ i18n.t('richText.border.thick') }}</button>\n </div>\n <div class=\"kpt-rich-text__swatches\">\n @for (c of swatches; track c) {\n <button type=\"button\" class=\"kpt-rich-text__swatch\" [style.background]=\"c\" [attr.aria-label]=\"c\" (click)=\"setBorderColor(c)\"></button>\n }\n </div>\n <label class=\"kpt-rich-text__picker\">\n <span>{{ i18n.t('richText.border.customColor') }}</span>\n <input type=\"color\" (input)=\"onBorderColorInput($event)\" />\n </label>\n </div>\n </ng-template>\n\n <!-- Popover koloru t\u0142a kom\u00F3rki (z menu kontekstowego) -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"menuPoint()\"\n [cdkConnectedOverlayOpen]=\"colorOpen() && colorKind() === 'cellBg'\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeColor()\"\n (detach)=\"closeColor()\"\n >\n <ng-container [ngTemplateOutlet]=\"paletteTpl\" />\n </ng-template>\n</div>\n\n<ng-template #paletteTpl>\n <div class=\"kpt-rich-text__palette\" (mousedown)=\"$event.preventDefault()\">\n <div class=\"kpt-rich-text__swatches\">\n @for (c of swatches; track c) {\n <button\n type=\"button\"\n class=\"kpt-rich-text__swatch\"\n [style.background]=\"c\"\n [attr.aria-label]=\"c\"\n (click)=\"applyColor(c)\"\n ></button>\n }\n </div>\n <label class=\"kpt-rich-text__picker\">\n <span>{{ i18n.t('richText.paletteCustom') }}</span>\n <input type=\"color\" (input)=\"onColorInput($event)\" />\n </label>\n </div>\n</ng-template>\n", styles: ["@layer kpt.components{.kpt-rich-text-host{display:block}.kpt-rich-text{border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);overflow:hidden;background:var(--kpt-form-field-bg)}.kpt-rich-text:focus-within{border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-rich-text--invalid{border-color:var(--kpt-form-field-border-error)}.kpt-rich-text--disabled{opacity:.6}.kpt-rich-text__toolbar{display:flex;flex-wrap:wrap;gap:.15rem;padding:.3rem;border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);background:var(--kpt-color-surface-variant)}.kpt-rich-text__tool{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font-size:1.05rem}.kpt-rich-text__tool:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-rich-text__tool:disabled{opacity:.5;cursor:not-allowed}.kpt-rich-text__tool.is-active{background:var(--kpt-color-muted);color:var(--kpt-color-primary)}.kpt-rich-text__divider{width:var(--kpt-border-width-thin, 1px);align-self:stretch;margin-inline:.2rem;background:var(--kpt-color-border)}.kpt-rich-text__style{display:inline-flex;align-items:center;gap:var(--kpt-space-1, .25rem);height:2rem;min-width:8rem;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-radius-sm, .25rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text);font:inherit;font-size:var(--kpt-font-size-sm, .875rem);padding-inline:.5rem;cursor:pointer}.kpt-rich-text__style span{flex:1;text-align:start}.kpt-rich-text__style:hover:not(:disabled){border-color:var(--kpt-form-field-border-hover)}.kpt-rich-text__style.is-open{border-color:var(--kpt-form-field-border-focus)}.kpt-rich-text__style:disabled{opacity:.5;cursor:not-allowed}.kpt-rich-text__style-caret{opacity:.6}.kpt-rich-text__editor{min-height:6rem;padding:var(--kpt-space-3, .75rem);font-size:var(--kpt-font-size-sm, .875rem);line-height:var(--kpt-font-line-height-normal, 1.5);color:var(--kpt-form-field-text);outline:none;overflow-y:auto}.kpt-rich-text__editor:empty:before{content:attr(data-placeholder);color:var(--kpt-form-field-placeholder)}.kpt-rich-text__editor a{color:var(--kpt-color-primary)}.kpt-rich-text__editor ul,.kpt-rich-text__editor ol{padding-inline-start:1.5rem}.kpt-rich-text__editor h1{font-size:1.6em;font-weight:700;margin:.4em 0}.kpt-rich-text__editor h2{font-size:1.4em;font-weight:700;margin:.4em 0}.kpt-rich-text__editor h3{font-size:1.2em;font-weight:600;margin:.4em 0}.kpt-rich-text__editor h4{font-size:1.05em;font-weight:600;margin:.4em 0}.kpt-rich-text__editor h5{font-size:.95em;font-weight:600;margin:.4em 0}.kpt-rich-text__editor h6{font-size:.85em;font-weight:600;margin:.4em 0;text-transform:uppercase}.kpt-rich-text__editor blockquote{margin:.4em 0;padding-inline-start:.75rem;border-inline-start:3px solid var(--kpt-color-border-strong);color:var(--kpt-color-on-surface-muted)}.kpt-rich-text__editor .kpt-rt-table{border-collapse:collapse;table-layout:fixed;width:100%;margin:.5em 0}.kpt-rich-text__editor .kpt-rt-table td,.kpt-rich-text__editor .kpt-rt-table th{border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);padding:.35rem .5rem;min-width:2rem;vertical-align:top;overflow-wrap:anywhere}.kpt-rich-text__editor .kpt-rt-table th{background:var(--kpt-color-surface-variant);font-weight:var(--kpt-font-weight-semibold, 600)}.kpt-rich-text__editor .kpt-rt-table .kpt-rt-cell-sel{box-shadow:inset 0 0 0 2px var(--kpt-color-primary);background:color-mix(in oklch,var(--kpt-color-primary) 12%,transparent)}.kpt-rich-text__editor.is-col-resize{cursor:col-resize}.kpt-rich-text__source{display:block;width:100%;box-sizing:border-box;min-height:6rem;padding:var(--kpt-space-3, .75rem);border:0;background:var(--kpt-color-surface-variant);color:var(--kpt-form-field-text);font-family:var(--kpt-font-family-mono, ui-monospace, monospace);font-size:var(--kpt-font-size-xs, .75rem);line-height:var(--kpt-font-line-height-normal, 1.5);resize:vertical;outline:none}.kpt-rich-text__style-panel{min-width:11rem;margin:0;padding:.25rem;list-style:none;background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3);max-height:20rem;overflow-y:auto}.kpt-rich-text__style-opt{padding:.35rem .6rem;border-radius:var(--kpt-radius-sm, .25rem);color:var(--kpt-color-on-surface);cursor:pointer;line-height:1.2}.kpt-rich-text__style-opt:hover{background:var(--kpt-color-muted)}.kpt-rich-text__style-opt.is-selected{background:var(--kpt-color-muted);color:var(--kpt-color-primary)}.kpt-rich-text__style-opt--p{font-size:.95rem}.kpt-rich-text__style-opt--h1{font-size:1.7rem;font-weight:700}.kpt-rich-text__style-opt--h2{font-size:1.45rem;font-weight:700}.kpt-rich-text__style-opt--h3{font-size:1.25rem;font-weight:600}.kpt-rich-text__style-opt--h4{font-size:1.1rem;font-weight:600}.kpt-rich-text__style-opt--h5{font-size:1rem;font-weight:600}.kpt-rich-text__style-opt--h6{font-size:.85rem;font-weight:600;text-transform:uppercase;letter-spacing:.03em}.kpt-rich-text__palette{padding:var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3)}.kpt-rich-text__swatches{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.kpt-rich-text__swatch{width:1.4rem;height:1.4rem;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-sm, .25rem);cursor:pointer}.kpt-rich-text__swatch:hover{transform:scale(1.1)}.kpt-rich-text__picker{display:flex;align-items:center;justify-content:space-between;gap:var(--kpt-space-2, .5rem);margin-top:var(--kpt-space-2, .5rem);font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface-muted)}.kpt-rich-text__picker input[type=color]{width:2rem;height:1.6rem;padding:0;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-sm, .25rem);background:none;cursor:pointer}.kpt-rt-grid-pop{padding:var(--kpt-space-2, .5rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3)}.kpt-rt-grid{display:flex;flex-direction:column;gap:3px}.kpt-rt-grid__row{display:flex;gap:3px}.kpt-rt-grid__cell{width:1rem;height:1rem;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:2px;cursor:pointer}.kpt-rt-grid__cell.is-on{background:var(--kpt-color-primary);border-color:var(--kpt-color-primary)}.kpt-rt-grid__label{margin-top:var(--kpt-space-2, .5rem);text-align:center;font-size:var(--kpt-font-size-xs, .75rem);color:var(--kpt-color-on-surface-muted)}.kpt-rt-menu{min-width:12rem;padding:.25rem;background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-rt-menu__group{padding:.3rem .6rem .15rem;font-size:var(--kpt-font-size-xs, .75rem);font-weight:var(--kpt-font-weight-semibold, 600);text-transform:uppercase;letter-spacing:.03em;color:var(--kpt-color-on-surface-muted)}.kpt-rt-menu__item{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);width:100%;padding:.4rem .6rem;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);font:inherit;text-align:start;cursor:pointer}.kpt-rt-menu__item:hover{background:var(--kpt-color-muted)}.kpt-rt-menu__item kpt-icon{color:var(--kpt-color-on-surface-muted)}.kpt-rt-menu__item--danger{color:var(--kpt-color-danger)}.kpt-rt-menu__item--danger kpt-icon{color:var(--kpt-color-danger)}.kpt-rt-menu__item.is-disabled{opacity:.4;pointer-events:none}.kpt-rt-menu__sep{height:1px;margin:.25rem 0;background:var(--kpt-color-border)}.kpt-rt-border{display:flex;flex-direction:column;gap:var(--kpt-space-2, .5rem);padding:var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3)}.kpt-rt-border__seg{display:flex;gap:2px;padding:2px;background:var(--kpt-color-surface-variant);border-radius:var(--kpt-radius-md, .5rem)}.kpt-rt-border__seg button{flex:1;border:0;background:none;padding:.25rem .5rem;border-radius:var(--kpt-radius-sm, .25rem);color:var(--kpt-color-on-surface-muted);font:inherit;font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-rt-border__seg button.is-active{background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface);font-weight:var(--kpt-font-weight-medium, 500);box-shadow:var(--kpt-elevation-1)}.kpt-rt-border__widths{display:flex;gap:.25rem}.kpt-rt-border__widths button{flex:1;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);background:none;padding:.25rem .3rem;border-radius:var(--kpt-radius-sm, .25rem);color:var(--kpt-color-on-surface);font:inherit;font-size:var(--kpt-font-size-xs, .75rem);cursor:pointer}.kpt-rt-border__widths button:hover{background:var(--kpt-color-muted)}}\n"] }]
|
|
5252
5500
|
}], () => [], { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], toolbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "toolbar", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], editor: [{ type: i0.ViewChild, args: ['editor', { isSignal: true }] }] }); })();
|
|
5253
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptRichText, { className: "KptRichText", filePath: "lib/rich-text/rich-text.component.ts", lineNumber:
|
|
5501
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptRichText, { className: "KptRichText", filePath: "lib/rich-text/rich-text.component.ts", lineNumber: 121 }); })();
|
|
5254
5502
|
|
|
5255
5503
|
function KptSlider_Conditional_0_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
5256
5504
|
i0.ɵɵdomElementStart(0, "span", 5);
|
|
@@ -5311,8 +5559,13 @@ function KptSlider_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
5311
5559
|
* Suwak wartości (slider) na Signal Forms.
|
|
5312
5560
|
* W trybie `range` udostępnia dwa uchwyty, a wartość jest parą `[min, max]`.
|
|
5313
5561
|
*
|
|
5562
|
+
* Pod `[formField]` zakres bierze się ze schematu (`min(path.volume, 0)`,
|
|
5563
|
+
* `max(path.volume, 100)`) — `[min]`/`[max]` obok `[formField]` to błąd kompilacji.
|
|
5564
|
+
* Tryb `range` (wartość `[number, number]`) łączy się więc tylko z `[(value)]`.
|
|
5565
|
+
*
|
|
5314
5566
|
* @example
|
|
5315
|
-
* <kpt-slider [formField]="f.volume" [
|
|
5567
|
+
* <kpt-slider [formField]="f.volume" [step]="5" showValue />
|
|
5568
|
+
* <kpt-slider [(value)]="volume" [min]="0" [max]="100" [step]="5" showValue />
|
|
5316
5569
|
* <kpt-slider range [(value)]="zakres" [min]="0" [max]="100" showValue />
|
|
5317
5570
|
*/
|
|
5318
5571
|
class KptSlider {
|
|
@@ -5439,7 +5692,7 @@ class KptSlider {
|
|
|
5439
5692
|
}
|
|
5440
5693
|
`, host: { class: 'kpt-slider-host' }, styles: ["@layer kpt.components{.kpt-slider-host{display:flex;align-items:center;gap:var(--kpt-space-3, .75rem)}.kpt-slider__input{--_pct: 0%;flex:1;height:1.25rem;appearance:none;background:none;cursor:pointer}.kpt-slider__input::-webkit-slider-runnable-track{height:.4rem;border-radius:var(--kpt-radius-full, 9999px);background:linear-gradient(to right,var(--kpt-color-primary) var(--_pct),var(--kpt-color-surface-variant) var(--_pct))}.kpt-slider__input::-moz-range-track{height:.4rem;border-radius:var(--kpt-radius-full, 9999px);background:var(--kpt-color-surface-variant)}.kpt-slider__input::-moz-range-progress{height:.4rem;border-radius:var(--kpt-radius-full, 9999px);background:var(--kpt-color-primary)}.kpt-slider__input::-webkit-slider-thumb{appearance:none;width:1.1rem;height:1.1rem;margin-top:-.35rem;border-radius:50%;background:var(--kpt-color-primary);box-shadow:var(--kpt-elevation-1)}.kpt-slider__input::-moz-range-thumb{width:1.1rem;height:1.1rem;border:0;border-radius:50%;background:var(--kpt-color-primary);box-shadow:var(--kpt-elevation-1)}.kpt-slider__input:focus-visible{outline:none}.kpt-slider__input:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 4px color-mix(in oklch,var(--kpt-color-focus-ring) 30%,transparent)}.kpt-slider__input:focus-visible::-moz-range-thumb{box-shadow:0 0 0 4px color-mix(in oklch,var(--kpt-color-focus-ring) 30%,transparent)}.kpt-slider__input:disabled{opacity:.5;cursor:not-allowed}.kpt-slider__value{min-width:2.5rem;text-align:end;font-size:var(--kpt-font-size-sm, .875rem);font-variant-numeric:tabular-nums;color:var(--kpt-color-on-surface)}.kpt-slider__range{position:relative;flex:1;height:1.25rem;display:flex;align-items:center}.kpt-slider__rail{position:absolute;inset-inline:0;height:.4rem;border-radius:var(--kpt-radius-full, 9999px);background:var(--kpt-color-surface-variant)}.kpt-slider__fill{position:absolute;height:.4rem;border-radius:var(--kpt-radius-full, 9999px);background:var(--kpt-color-primary)}.kpt-slider__thumb{position:absolute;inset-inline:0;width:100%;height:1.25rem;margin:0;appearance:none;background:none;pointer-events:none}.kpt-slider__thumb::-webkit-slider-runnable-track{height:.4rem;background:none}.kpt-slider__thumb::-moz-range-track{height:.4rem;background:none}.kpt-slider__thumb::-webkit-slider-thumb{pointer-events:auto;appearance:none;width:1.1rem;height:1.1rem;margin-top:-.35rem;border-radius:50%;background:var(--kpt-color-primary);box-shadow:var(--kpt-elevation-1);cursor:pointer}.kpt-slider__thumb::-moz-range-thumb{pointer-events:auto;width:1.1rem;height:1.1rem;border:0;border-radius:50%;background:var(--kpt-color-primary);box-shadow:var(--kpt-elevation-1);cursor:pointer}.kpt-slider__thumb:focus-visible{outline:none}.kpt-slider__thumb:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 4px color-mix(in oklch,var(--kpt-color-focus-ring) 30%,transparent)}.kpt-slider__thumb:focus-visible::-moz-range-thumb{box-shadow:0 0 0 4px color-mix(in oklch,var(--kpt-color-focus-ring) 30%,transparent)}.kpt-slider__thumb--high{z-index:1}.kpt-slider__thumb:disabled{opacity:.5;cursor:not-allowed}}\n"] }]
|
|
5441
5694
|
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], range: [{ type: i0.Input, args: [{ isSignal: true, alias: "range", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], showValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValue", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }] }); })();
|
|
5442
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptSlider, { className: "KptSlider", filePath: "lib/slider/slider.component.ts", lineNumber:
|
|
5695
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptSlider, { className: "KptSlider", filePath: "lib/slider/slider.component.ts", lineNumber: 87 }); })();
|
|
5443
5696
|
|
|
5444
5697
|
function KptRating_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
5445
5698
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
@@ -5458,7 +5711,7 @@ function KptRating_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
5458
5711
|
* Ocena gwiazdkami (rating) na Signal Forms.
|
|
5459
5712
|
*
|
|
5460
5713
|
* @example
|
|
5461
|
-
* <kpt-rating [formField]="f.score" [
|
|
5714
|
+
* <kpt-rating [formField]="f.score" [count]="5" />
|
|
5462
5715
|
* <kpt-rating [value]="4" readonly />
|
|
5463
5716
|
*/
|
|
5464
5717
|
class KptRating {
|
|
@@ -5676,7 +5929,7 @@ function KptColorPicker_For_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
5676
5929
|
} if (rf & 2) {
|
|
5677
5930
|
const color_r2 = ctx.$implicit;
|
|
5678
5931
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
5679
|
-
i0.ɵɵstyleProp("background", color_r2);
|
|
5932
|
+
i0.ɵɵstyleProp("background-color", color_r2);
|
|
5680
5933
|
i0.ɵɵclassProp("is-active", color_r2 === ctx_r2.value());
|
|
5681
5934
|
i0.ɵɵdomProperty("disabled", ctx_r2.disabled());
|
|
5682
5935
|
i0.ɵɵattribute("aria-label", color_r2);
|
|
@@ -5704,7 +5957,7 @@ class KptColorPicker {
|
|
|
5704
5957
|
this.value.set(event.target.value);
|
|
5705
5958
|
}
|
|
5706
5959
|
static { this.ɵfac = function KptColorPicker_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptColorPicker)(); }; }
|
|
5707
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptColorPicker, selectors: [["kpt-color-picker"]], hostAttrs: [1, "kpt-color-picker-host"], inputs: { value: [1, "value"], presets: [1, "presets"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 7, vars: 6, consts: [[1, "kpt-color-picker"], [1, "kpt-color-picker__swatch"], ["type", "color", 3, "input", "blur", "value", "disabled"], ["type", "text", "maxlength", "7", 1, "kpt-color-picker__hex", 3, "input", "blur", "value", "disabled"], [1, "kpt-color-picker__presets"], ["type", "button", 1, "kpt-color-picker__preset", 3, "is-active", "background", "disabled"], ["type", "button", 1, "kpt-color-picker__preset", 3, "click", "disabled"]], template: function KptColorPicker_Template(rf, ctx) { if (rf & 1) {
|
|
5960
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptColorPicker, selectors: [["kpt-color-picker"]], hostAttrs: [1, "kpt-color-picker-host"], inputs: { value: [1, "value"], presets: [1, "presets"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 7, vars: 6, consts: [[1, "kpt-color-picker"], [1, "kpt-color-picker__swatch"], ["type", "color", 3, "input", "blur", "value", "disabled"], ["type", "text", "maxlength", "7", 1, "kpt-color-picker__hex", 3, "input", "blur", "value", "disabled"], [1, "kpt-color-picker__presets"], ["type", "button", 1, "kpt-color-picker__preset", 3, "is-active", "background-color", "disabled"], ["type", "button", 1, "kpt-color-picker__preset", 3, "click", "disabled"]], template: function KptColorPicker_Template(rf, ctx) { if (rf & 1) {
|
|
5708
5961
|
i0.ɵɵdomElementStart(0, "div", 0)(1, "label", 1)(2, "input", 2);
|
|
5709
5962
|
i0.ɵɵdomListener("input", function KptColorPicker_Template_input_input_2_listener($event) { return ctx.value.set($event.target.value); })("blur", function KptColorPicker_Template_input_blur_2_listener() { return ctx.touch.emit(); });
|
|
5710
5963
|
i0.ɵɵdomElementEnd()();
|
|
@@ -5716,7 +5969,7 @@ class KptColorPicker {
|
|
|
5716
5969
|
i0.ɵɵdomElementEnd()();
|
|
5717
5970
|
} if (rf & 2) {
|
|
5718
5971
|
i0.ɵɵadvance();
|
|
5719
|
-
i0.ɵɵstyleProp("background", ctx.value());
|
|
5972
|
+
i0.ɵɵstyleProp("background-color", ctx.value());
|
|
5720
5973
|
i0.ɵɵadvance();
|
|
5721
5974
|
i0.ɵɵdomProperty("value", ctx.value())("disabled", ctx.disabled());
|
|
5722
5975
|
i0.ɵɵadvance();
|
|
@@ -5729,7 +5982,7 @@ class KptColorPicker {
|
|
|
5729
5982
|
type: Component,
|
|
5730
5983
|
args: [{ selector: 'kpt-color-picker', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `
|
|
5731
5984
|
<div class="kpt-color-picker">
|
|
5732
|
-
<label class="kpt-color-picker__swatch" [style.background]="value()">
|
|
5985
|
+
<label class="kpt-color-picker__swatch" [style.background-color]="value()">
|
|
5733
5986
|
<input
|
|
5734
5987
|
type="color"
|
|
5735
5988
|
[value]="value()"
|
|
@@ -5753,7 +6006,7 @@ class KptColorPicker {
|
|
|
5753
6006
|
type="button"
|
|
5754
6007
|
class="kpt-color-picker__preset"
|
|
5755
6008
|
[class.is-active]="color === value()"
|
|
5756
|
-
[style.background]="color"
|
|
6009
|
+
[style.background-color]="color"
|
|
5757
6010
|
[disabled]="disabled()"
|
|
5758
6011
|
(click)="value.set(color)"
|
|
5759
6012
|
[attr.aria-label]="color"
|
|
@@ -5765,7 +6018,8 @@ class KptColorPicker {
|
|
|
5765
6018
|
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], presets: [{ type: i0.Input, args: [{ isSignal: true, alias: "presets", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }] }); })();
|
|
5766
6019
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptColorPicker, { className: "KptColorPicker", filePath: "lib/color-picker/color-picker.component.ts", lineNumber: 52 }); })();
|
|
5767
6020
|
|
|
5768
|
-
const _forTrack0$5 = ($index, $item) => $item.
|
|
6021
|
+
const _forTrack0$5 = ($index, $item) => $item.key;
|
|
6022
|
+
const _forTrack1$1 = ($index, $item) => $item.iso;
|
|
5769
6023
|
function KptDateRange_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
5770
6024
|
i0.ɵɵelementStart(0, "span", 2);
|
|
5771
6025
|
i0.ɵɵtext(1);
|
|
@@ -5842,64 +6096,129 @@ function KptDateRange_ng_template_7_Conditional_1_Template(rf, ctx) { if (rf & 1
|
|
|
5842
6096
|
i0.ɵɵadvance(4);
|
|
5843
6097
|
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("common.done"));
|
|
5844
6098
|
} }
|
|
5845
|
-
function
|
|
5846
|
-
i0.ɵɵ
|
|
6099
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
6100
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
6101
|
+
i0.ɵɵelementStart(0, "button", 26);
|
|
6102
|
+
i0.ɵɵlistener("click", function KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.prevMonth()); });
|
|
6103
|
+
i0.ɵɵelement(1, "kpt-icon", 27);
|
|
6104
|
+
i0.ɵɵelementEnd();
|
|
6105
|
+
} if (rf & 2) {
|
|
6106
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
6107
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.prevMonth"));
|
|
6108
|
+
} }
|
|
6109
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
6110
|
+
i0.ɵɵelement(0, "span", 21);
|
|
6111
|
+
} }
|
|
6112
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
6113
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
6114
|
+
i0.ɵɵelementStart(0, "button", 26);
|
|
6115
|
+
i0.ɵɵlistener("click", function KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.nextMonth()); });
|
|
6116
|
+
i0.ɵɵelement(1, "kpt-icon", 28);
|
|
6117
|
+
i0.ɵɵelementEnd();
|
|
6118
|
+
} if (rf & 2) {
|
|
6119
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
6120
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.nextMonth"));
|
|
6121
|
+
} }
|
|
6122
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
6123
|
+
i0.ɵɵelement(0, "span", 21);
|
|
6124
|
+
} }
|
|
6125
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_For_10_Template(rf, ctx) { if (rf & 1) {
|
|
6126
|
+
i0.ɵɵelementStart(0, "span", 24);
|
|
5847
6127
|
i0.ɵɵtext(1);
|
|
5848
6128
|
i0.ɵɵelementEnd();
|
|
5849
6129
|
} if (rf & 2) {
|
|
5850
|
-
const
|
|
6130
|
+
const wd_r9 = ctx.$implicit;
|
|
5851
6131
|
i0.ɵɵadvance();
|
|
5852
|
-
i0.ɵɵtextInterpolate(
|
|
6132
|
+
i0.ɵɵtextInterpolate(wd_r9);
|
|
5853
6133
|
} }
|
|
5854
|
-
function
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
6134
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_For_13_For_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
6135
|
+
i0.ɵɵelement(0, "span", 29);
|
|
6136
|
+
} }
|
|
6137
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_For_13_For_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
6138
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
6139
|
+
i0.ɵɵelementStart(0, "button", 31);
|
|
6140
|
+
i0.ɵɵlistener("click", function KptDateRange_ng_template_7_Conditional_2_For_2_For_13_For_1_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r10); const cell_r11 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r0.selectDay(cell_r11)); });
|
|
5858
6141
|
i0.ɵɵtext(1);
|
|
5859
6142
|
i0.ɵɵelementEnd();
|
|
5860
6143
|
} if (rf & 2) {
|
|
5861
|
-
const
|
|
5862
|
-
i0.ɵɵclassProp("kpt-calendar__day--muted", !
|
|
6144
|
+
const cell_r11 = i0.ɵɵnextContext().$implicit;
|
|
6145
|
+
i0.ɵɵclassProp("kpt-calendar__day--muted", !cell_r11.inMonth)("kpt-calendar__day--today", cell_r11.today)("kpt-calendar__day--range", cell_r11.inRange)("kpt-calendar__day--range-start", cell_r11.rangeStart)("kpt-calendar__day--range-end", cell_r11.rangeEnd)("kpt-calendar__day--selected", cell_r11.isStart || cell_r11.isEnd);
|
|
5863
6146
|
i0.ɵɵadvance();
|
|
5864
|
-
i0.ɵɵtextInterpolate(
|
|
6147
|
+
i0.ɵɵtextInterpolate(cell_r11.day);
|
|
5865
6148
|
} }
|
|
5866
|
-
function
|
|
5867
|
-
i0.ɵɵ
|
|
6149
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_For_13_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
6150
|
+
i0.ɵɵconditionalCreate(0, KptDateRange_ng_template_7_Conditional_2_For_2_For_13_For_1_Conditional_0_Template, 1, 0, "span", 29)(1, KptDateRange_ng_template_7_Conditional_2_For_2_For_13_For_1_Conditional_1_Template, 2, 13, "button", 30);
|
|
5868
6151
|
} if (rf & 2) {
|
|
5869
|
-
const
|
|
5870
|
-
i0.ɵɵ
|
|
6152
|
+
const cell_r11 = ctx.$implicit;
|
|
6153
|
+
i0.ɵɵconditional(cell_r11.blank ? 0 : 1);
|
|
5871
6154
|
} }
|
|
5872
|
-
function
|
|
5873
|
-
|
|
6155
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_For_13_Template(rf, ctx) { if (rf & 1) {
|
|
6156
|
+
i0.ɵɵrepeaterCreate(0, KptDateRange_ng_template_7_Conditional_2_For_2_For_13_For_1_Template, 2, 1, null, null, _forTrack1$1);
|
|
6157
|
+
} if (rf & 2) {
|
|
6158
|
+
const week_r12 = ctx.$implicit;
|
|
6159
|
+
i0.ɵɵrepeater(week_r12);
|
|
6160
|
+
} }
|
|
6161
|
+
function KptDateRange_ng_template_7_Conditional_2_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
6162
|
+
i0.ɵɵelementStart(0, "div", 18)(1, "div", 19);
|
|
6163
|
+
i0.ɵɵconditionalCreate(2, KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_2_Template, 2, 1, "button", 20)(3, KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_3_Template, 1, 0, "span", 21);
|
|
6164
|
+
i0.ɵɵelementStart(4, "span", 22);
|
|
6165
|
+
i0.ɵɵtext(5);
|
|
6166
|
+
i0.ɵɵelementEnd();
|
|
6167
|
+
i0.ɵɵconditionalCreate(6, KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_6_Template, 2, 1, "button", 20)(7, KptDateRange_ng_template_7_Conditional_2_For_2_Conditional_7_Template, 1, 0, "span", 21);
|
|
6168
|
+
i0.ɵɵelementEnd();
|
|
6169
|
+
i0.ɵɵelementStart(8, "div", 23);
|
|
6170
|
+
i0.ɵɵrepeaterCreate(9, KptDateRange_ng_template_7_Conditional_2_For_2_For_10_Template, 2, 1, "span", 24, i0.ɵɵrepeaterTrackByIdentity);
|
|
6171
|
+
i0.ɵɵelementEnd();
|
|
6172
|
+
i0.ɵɵelementStart(11, "div", 25);
|
|
6173
|
+
i0.ɵɵrepeaterCreate(12, KptDateRange_ng_template_7_Conditional_2_For_2_For_13_Template, 2, 0, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
6174
|
+
i0.ɵɵelementEnd()();
|
|
6175
|
+
} if (rf & 2) {
|
|
6176
|
+
const panel_r13 = ctx.$implicit;
|
|
6177
|
+
const ɵ$index_47_r14 = ctx.$index;
|
|
6178
|
+
const ɵ$count_47_r15 = ctx.$count;
|
|
6179
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
6180
|
+
i0.ɵɵadvance(2);
|
|
6181
|
+
i0.ɵɵconditional(ɵ$index_47_r14 === 0 ? 2 : 3);
|
|
6182
|
+
i0.ɵɵadvance(3);
|
|
6183
|
+
i0.ɵɵtextInterpolate(panel_r13.label);
|
|
6184
|
+
i0.ɵɵadvance();
|
|
6185
|
+
i0.ɵɵconditional(ɵ$index_47_r14 === ɵ$count_47_r15 - 1 ? 6 : 7);
|
|
6186
|
+
i0.ɵɵadvance(3);
|
|
6187
|
+
i0.ɵɵrepeater(ctx_r0.weekdays());
|
|
6188
|
+
i0.ɵɵadvance(3);
|
|
6189
|
+
i0.ɵɵrepeater(panel_r13.weeks);
|
|
6190
|
+
} }
|
|
6191
|
+
function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
6192
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
5874
6193
|
i0.ɵɵelementStart(0, "kpt-clock", 16);
|
|
5875
|
-
i0.ɵɵlistener("valueChange", function
|
|
6194
|
+
i0.ɵɵlistener("valueChange", function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Conditional_5_Template_kpt_clock_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r17); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.startTime.set($event)); });
|
|
5876
6195
|
i0.ɵɵelementEnd();
|
|
5877
6196
|
} if (rf & 2) {
|
|
5878
6197
|
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
5879
6198
|
i0.ɵɵproperty("value", ctx_r0.startTime())("hourFormat", ctx_r0.hourFormat())("minuteStep", ctx_r0.minuteStep());
|
|
5880
6199
|
} }
|
|
5881
|
-
function
|
|
5882
|
-
const
|
|
6200
|
+
function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
6201
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
5883
6202
|
i0.ɵɵelementStart(0, "kpt-clock", 16);
|
|
5884
|
-
i0.ɵɵlistener("valueChange", function
|
|
6203
|
+
i0.ɵɵlistener("valueChange", function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Conditional_6_Template_kpt_clock_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r18); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.endTime.set($event)); });
|
|
5885
6204
|
i0.ɵɵelementEnd();
|
|
5886
6205
|
} if (rf & 2) {
|
|
5887
6206
|
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
5888
6207
|
i0.ɵɵproperty("value", ctx_r0.endTime())("hourFormat", ctx_r0.hourFormat())("minuteStep", ctx_r0.minuteStep());
|
|
5889
6208
|
} }
|
|
5890
|
-
function
|
|
5891
|
-
const
|
|
6209
|
+
function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
6210
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
5892
6211
|
i0.ɵɵelementStart(0, "div", 11)(1, "button", 12);
|
|
5893
|
-
i0.ɵɵlistener("click", function
|
|
6212
|
+
i0.ɵɵlistener("click", function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r16); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.timeEnd.set("start")); });
|
|
5894
6213
|
i0.ɵɵtext(2);
|
|
5895
6214
|
i0.ɵɵelementEnd();
|
|
5896
6215
|
i0.ɵɵelementStart(3, "button", 12);
|
|
5897
|
-
i0.ɵɵlistener("click", function
|
|
6216
|
+
i0.ɵɵlistener("click", function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r16); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.timeEnd.set("end")); });
|
|
5898
6217
|
i0.ɵɵtext(4);
|
|
5899
6218
|
i0.ɵɵelementEnd()();
|
|
5900
|
-
i0.ɵɵconditionalCreate(5,
|
|
6219
|
+
i0.ɵɵconditionalCreate(5, KptDateRange_ng_template_7_Conditional_2_Conditional_3_Conditional_5_Template, 1, 3, "kpt-clock", 13)(6, KptDateRange_ng_template_7_Conditional_2_Conditional_3_Conditional_6_Template, 1, 3, "kpt-clock", 13);
|
|
5901
6220
|
i0.ɵɵelementStart(7, "div", 14)(8, "kpt-button", 15);
|
|
5902
|
-
i0.ɵɵlistener("click", function
|
|
6221
|
+
i0.ɵɵlistener("click", function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Template_kpt_button_click_8_listener() { i0.ɵɵrestoreView(_r16); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.commit()); });
|
|
5903
6222
|
i0.ɵɵtext(9);
|
|
5904
6223
|
i0.ɵɵelementEnd()();
|
|
5905
6224
|
} if (rf & 2) {
|
|
@@ -5918,49 +6237,26 @@ function KptDateRange_ng_template_7_Conditional_2_Conditional_13_Template(rf, ct
|
|
|
5918
6237
|
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("common.done"));
|
|
5919
6238
|
} }
|
|
5920
6239
|
function KptDateRange_ng_template_7_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
5921
|
-
|
|
5922
|
-
i0.ɵɵ
|
|
5923
|
-
i0.ɵɵlistener("click", function KptDateRange_ng_template_7_Conditional_2_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.prevMonth()); });
|
|
5924
|
-
i0.ɵɵelement(2, "kpt-icon", 19);
|
|
5925
|
-
i0.ɵɵelementEnd();
|
|
5926
|
-
i0.ɵɵelementStart(3, "span", 20);
|
|
5927
|
-
i0.ɵɵtext(4);
|
|
5928
|
-
i0.ɵɵelementEnd();
|
|
5929
|
-
i0.ɵɵelementStart(5, "button", 18);
|
|
5930
|
-
i0.ɵɵlistener("click", function KptDateRange_ng_template_7_Conditional_2_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.nextMonth()); });
|
|
5931
|
-
i0.ɵɵelement(6, "kpt-icon", 21);
|
|
5932
|
-
i0.ɵɵelementEnd()();
|
|
5933
|
-
i0.ɵɵelementStart(7, "div", 22);
|
|
5934
|
-
i0.ɵɵrepeaterCreate(8, KptDateRange_ng_template_7_Conditional_2_For_9_Template, 2, 1, "span", 23, i0.ɵɵrepeaterTrackByIdentity);
|
|
6240
|
+
i0.ɵɵelementStart(0, "div", 17);
|
|
6241
|
+
i0.ɵɵrepeaterCreate(1, KptDateRange_ng_template_7_Conditional_2_For_2_Template, 14, 3, "div", 18, _forTrack0$5);
|
|
5935
6242
|
i0.ɵɵelementEnd();
|
|
5936
|
-
i0.ɵɵ
|
|
5937
|
-
i0.ɵɵrepeaterCreate(11, KptDateRange_ng_template_7_Conditional_2_For_12_Template, 2, 0, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
5938
|
-
i0.ɵɵelementEnd();
|
|
5939
|
-
i0.ɵɵconditionalCreate(13, KptDateRange_ng_template_7_Conditional_2_Conditional_13_Template, 10, 8);
|
|
6243
|
+
i0.ɵɵconditionalCreate(3, KptDateRange_ng_template_7_Conditional_2_Conditional_3_Template, 10, 8);
|
|
5940
6244
|
} if (rf & 2) {
|
|
5941
6245
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
5942
6246
|
i0.ɵɵadvance();
|
|
5943
|
-
i0.ɵɵ
|
|
5944
|
-
i0.ɵɵadvance(3);
|
|
5945
|
-
i0.ɵɵtextInterpolate(ctx_r0.monthLabel());
|
|
5946
|
-
i0.ɵɵadvance();
|
|
5947
|
-
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("datepicker.nextMonth"));
|
|
5948
|
-
i0.ɵɵadvance(3);
|
|
5949
|
-
i0.ɵɵrepeater(ctx_r0.weekdays());
|
|
5950
|
-
i0.ɵɵadvance(3);
|
|
5951
|
-
i0.ɵɵrepeater(ctx_r0.weeks());
|
|
6247
|
+
i0.ɵɵrepeater(ctx_r0.panels());
|
|
5952
6248
|
i0.ɵɵadvance(2);
|
|
5953
|
-
i0.ɵɵconditional(ctx_r0.mode() === "datetime" ?
|
|
6249
|
+
i0.ɵɵconditional(ctx_r0.mode() === "datetime" ? 3 : -1);
|
|
5954
6250
|
} }
|
|
5955
6251
|
function KptDateRange_ng_template_7_Template(rf, ctx) { if (rf & 1) {
|
|
5956
6252
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
5957
6253
|
i0.ɵɵelementStart(0, "div", 10);
|
|
5958
6254
|
i0.ɵɵlistener("keydown.escape", function KptDateRange_ng_template_7_Template_div_keydown_escape_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.close()); });
|
|
5959
|
-
i0.ɵɵconditionalCreate(1, KptDateRange_ng_template_7_Conditional_1_Template, 10, 8)(2, KptDateRange_ng_template_7_Conditional_2_Template,
|
|
6255
|
+
i0.ɵɵconditionalCreate(1, KptDateRange_ng_template_7_Conditional_1_Template, 10, 8)(2, KptDateRange_ng_template_7_Conditional_2_Template, 4, 1);
|
|
5960
6256
|
i0.ɵɵelementEnd();
|
|
5961
6257
|
} if (rf & 2) {
|
|
5962
6258
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
5963
|
-
i0.ɵɵclassProp("kpt-calendar--clock", ctx_r0.mode() === "time");
|
|
6259
|
+
i0.ɵɵclassProp("kpt-calendar--clock", ctx_r0.mode() === "time")("kpt-calendar--range", ctx_r0.mode() !== "time")("kpt-calendar--multi", ctx_r0.multi() && ctx_r0.mode() !== "time");
|
|
5964
6260
|
i0.ɵɵadvance();
|
|
5965
6261
|
i0.ɵɵconditional(ctx_r0.mode() === "time" ? 1 : 2);
|
|
5966
6262
|
} }
|
|
@@ -5969,11 +6265,14 @@ const toIso = (d) => `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDat
|
|
|
5969
6265
|
/**
|
|
5970
6266
|
* Wybór zakresu dat z kalendarzem (CDK Overlay), Signal Forms.
|
|
5971
6267
|
* `mode`: 'date' (domyślnie), 'datetime' (data+godzina, tarcza zegara), 'time' (sama godzina).
|
|
6268
|
+
* `visibleMonths` pokazuje kilka miesięcy obok siebie (typowo 2) — zakres podświetla się
|
|
6269
|
+
* ciągłym pasmem przez wszystkie panele.
|
|
5972
6270
|
* Wartość: `{ start, end }` — daty 'RRRR-MM-DD', datetime 'RRRR-MM-DDTHH:mm', godziny 'HH:mm'.
|
|
5973
6271
|
* Wymaga `import '@angular/cdk/overlay-prebuilt.css';`
|
|
5974
6272
|
*
|
|
5975
6273
|
* @example
|
|
5976
6274
|
* <kpt-date-range [formField]="f.period" />
|
|
6275
|
+
* <kpt-date-range [visibleMonths]="2" [(value)]="period" />
|
|
5977
6276
|
* <kpt-date-range mode="datetime" [hourFormat]="12" [(value)]="span" />
|
|
5978
6277
|
* <kpt-date-range mode="time" [(value)]="hours" />
|
|
5979
6278
|
*/
|
|
@@ -5995,6 +6294,8 @@ class KptDateRange {
|
|
|
5995
6294
|
...(ngDevMode ? [{ debugName: "displayFormat" }] : /* istanbul ignore next */ []));
|
|
5996
6295
|
this.mode = input('date', /* @ts-ignore */
|
|
5997
6296
|
...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
6297
|
+
/** Liczba miesięcy obok siebie (1–3; domyślnie 1). Ignorowana w trybie 'time'. */
|
|
6298
|
+
this.visibleMonths = input(1, { ...(ngDevMode ? { debugName: "visibleMonths" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
5998
6299
|
this.hourFormat = input(24, { ...(ngDevMode ? { debugName: "hourFormat" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
5999
6300
|
this.minuteStep = input(1, { ...(ngDevMode ? { debugName: "minuteStep" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
6000
6301
|
this.i18n = inject(KptI18n);
|
|
@@ -6025,11 +6326,13 @@ class KptDateRange {
|
|
|
6025
6326
|
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },
|
|
6026
6327
|
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },
|
|
6027
6328
|
];
|
|
6028
|
-
this.
|
|
6029
|
-
const
|
|
6030
|
-
return
|
|
6329
|
+
this.panelCount = computed(() => {
|
|
6330
|
+
const n = Math.trunc(this.visibleMonths());
|
|
6331
|
+
return Number.isFinite(n) ? Math.min(3, Math.max(1, n)) : 1;
|
|
6031
6332
|
}, /* @ts-ignore */
|
|
6032
|
-
...(ngDevMode ? [{ debugName: "
|
|
6333
|
+
...(ngDevMode ? [{ debugName: "panelCount" }] : /* istanbul ignore next */ []));
|
|
6334
|
+
this.multi = computed(() => this.panelCount() > 1, /* @ts-ignore */
|
|
6335
|
+
...(ngDevMode ? [{ debugName: "multi" }] : /* istanbul ignore next */ []));
|
|
6033
6336
|
this.display = computed(() => {
|
|
6034
6337
|
const { start, end } = this.value();
|
|
6035
6338
|
if (!start)
|
|
@@ -6049,34 +6352,25 @@ class KptDateRange {
|
|
|
6049
6352
|
return end ? `${this.fmtDate(start)} – ${this.fmtDate(end)}` : `${this.fmtDate(start)} – …`;
|
|
6050
6353
|
}, /* @ts-ignore */
|
|
6051
6354
|
...(ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []));
|
|
6052
|
-
|
|
6355
|
+
/**
|
|
6356
|
+
* Panele miesięcy. Przy kilku panelach dni sąsiednich miesięcy są wygaszane do pustych slotów:
|
|
6357
|
+
* inaczej ta sama data byłaby klikalna dwa razy (jako „wyszarzona" w jednym panelu i właściwa
|
|
6358
|
+
* w drugim) i pasmo zakresu malowałoby się w obu miejscach.
|
|
6359
|
+
*/
|
|
6360
|
+
this.panels = computed(() => {
|
|
6053
6361
|
const { y, m } = this.view();
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
const iso = toIso(date);
|
|
6065
|
-
row.push({
|
|
6066
|
-
day: date.getDate(),
|
|
6067
|
-
iso,
|
|
6068
|
-
inMonth: date.getMonth() === m,
|
|
6069
|
-
isStart: iso === start,
|
|
6070
|
-
isEnd: iso === end,
|
|
6071
|
-
inRange: !!start && !!end && iso > start && iso < end,
|
|
6072
|
-
disabled: false,
|
|
6073
|
-
});
|
|
6074
|
-
}
|
|
6075
|
-
weeks.push(row);
|
|
6076
|
-
}
|
|
6077
|
-
return weeks;
|
|
6362
|
+
return Array.from({ length: this.panelCount() }, (_, i) => {
|
|
6363
|
+
const first = new Date(y, m + i, 1);
|
|
6364
|
+
const py = first.getFullYear();
|
|
6365
|
+
const pm = first.getMonth();
|
|
6366
|
+
return {
|
|
6367
|
+
key: `${py}-${pad(pm + 1)}`,
|
|
6368
|
+
label: `${this.months()[pm]} ${py}`,
|
|
6369
|
+
weeks: this.buildWeeks(py, pm),
|
|
6370
|
+
};
|
|
6371
|
+
});
|
|
6078
6372
|
}, /* @ts-ignore */
|
|
6079
|
-
...(ngDevMode ? [{ debugName: "
|
|
6373
|
+
...(ngDevMode ? [{ debugName: "panels" }] : /* istanbul ignore next */ []));
|
|
6080
6374
|
}
|
|
6081
6375
|
datePart(v) {
|
|
6082
6376
|
return v ? v.slice(0, 10) : '';
|
|
@@ -6102,6 +6396,41 @@ class KptDateRange {
|
|
|
6102
6396
|
}
|
|
6103
6397
|
return hhmm;
|
|
6104
6398
|
}
|
|
6399
|
+
buildWeeks(y, m) {
|
|
6400
|
+
const datetime = this.mode() === 'datetime';
|
|
6401
|
+
const start = datetime ? this.startDate() : this.value().start;
|
|
6402
|
+
const end = datetime ? this.endDate() : this.value().end;
|
|
6403
|
+
const hasBand = !!start && !!end && start < end;
|
|
6404
|
+
const hideOutside = this.multi();
|
|
6405
|
+
const todayIso = toIso(this.today);
|
|
6406
|
+
const first = new Date(y, m, 1);
|
|
6407
|
+
const startOffset = (first.getDay() + 6) % 7;
|
|
6408
|
+
const gridStart = new Date(y, m, 1 - startOffset);
|
|
6409
|
+
const weeks = [];
|
|
6410
|
+
for (let w = 0; w < 6; w++) {
|
|
6411
|
+
const row = [];
|
|
6412
|
+
for (let d = 0; d < 7; d++) {
|
|
6413
|
+
const date = new Date(gridStart.getFullYear(), gridStart.getMonth(), gridStart.getDate() + w * 7 + d);
|
|
6414
|
+
const iso = toIso(date);
|
|
6415
|
+
const inMonth = date.getMonth() === m;
|
|
6416
|
+
row.push({
|
|
6417
|
+
day: date.getDate(),
|
|
6418
|
+
iso,
|
|
6419
|
+
inMonth,
|
|
6420
|
+
today: iso === todayIso,
|
|
6421
|
+
isStart: iso === start,
|
|
6422
|
+
isEnd: iso === end,
|
|
6423
|
+
inRange: hasBand && iso > start && iso < end,
|
|
6424
|
+
rangeStart: hasBand && iso === start,
|
|
6425
|
+
rangeEnd: hasBand && iso === end,
|
|
6426
|
+
blank: hideOutside && !inMonth,
|
|
6427
|
+
disabled: false,
|
|
6428
|
+
});
|
|
6429
|
+
}
|
|
6430
|
+
weeks.push(row);
|
|
6431
|
+
}
|
|
6432
|
+
return weeks;
|
|
6433
|
+
}
|
|
6105
6434
|
toggleOpen() {
|
|
6106
6435
|
if (this.disabled())
|
|
6107
6436
|
return;
|
|
@@ -6131,6 +6460,8 @@ class KptDateRange {
|
|
|
6131
6460
|
this.touch.emit();
|
|
6132
6461
|
}
|
|
6133
6462
|
selectDay(cell) {
|
|
6463
|
+
if (cell.blank || cell.disabled)
|
|
6464
|
+
return;
|
|
6134
6465
|
if (this.mode() === 'datetime') {
|
|
6135
6466
|
const start = this.startDate();
|
|
6136
6467
|
const end = this.endDate();
|
|
@@ -6192,7 +6523,7 @@ class KptDateRange {
|
|
|
6192
6523
|
this.endDate.set('');
|
|
6193
6524
|
}
|
|
6194
6525
|
static { this.ɵfac = function KptDateRange_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptDateRange)(); }; }
|
|
6195
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptDateRange, selectors: [["kpt-date-range"]], hostAttrs: [1, "kpt-date-range-host"], inputs: { value: [1, "value"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], placeholder: [1, "placeholder"], displayFormat: [1, "displayFormat"], mode: [1, "mode"], hourFormat: [1, "hourFormat"], minuteStep: [1, "minuteStep"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 8, vars: 12, consts: [["trigger", "cdkOverlayOrigin"], ["cdkOverlayOrigin", "", "role", "button", "tabindex", "0", 1, "kpt-date-range", 3, "click", "keydown.enter", "blur"], [1, "kpt-date-range__value"], [1, "kpt-date-range__placeholder"], [1, "kpt-date-range__spacer"], ["type", "button", 1, "kpt-date-range__clear"], ["name", "calendar", 1, "kpt-date-range__icon"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop"], ["type", "button", 1, "kpt-date-range__clear", 3, "click"], ["name", "x"], [1, "kpt-calendar", 3, "keydown.escape"], [1, "kpt-range-tabs"], ["type", "button", 3, "click"], [3, "value", "hourFormat", "minuteStep"], [1, "kpt-calendar__footer"], ["size", "sm", 3, "click"], [3, "valueChange", "value", "hourFormat", "minuteStep"], [1, "kpt-calendar__header"], ["type", "button", 1, "kpt-calendar__nav",
|
|
6526
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptDateRange, selectors: [["kpt-date-range"]], hostAttrs: [1, "kpt-date-range-host"], inputs: { value: [1, "value"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], placeholder: [1, "placeholder"], displayFormat: [1, "displayFormat"], mode: [1, "mode"], visibleMonths: [1, "visibleMonths"], hourFormat: [1, "hourFormat"], minuteStep: [1, "minuteStep"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 8, vars: 12, consts: [["trigger", "cdkOverlayOrigin"], ["cdkOverlayOrigin", "", "role", "button", "tabindex", "0", 1, "kpt-date-range", 3, "click", "keydown.enter", "blur"], [1, "kpt-date-range__value"], [1, "kpt-date-range__placeholder"], [1, "kpt-date-range__spacer"], ["type", "button", 1, "kpt-date-range__clear"], ["name", "calendar", 1, "kpt-date-range__icon"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop"], ["type", "button", 1, "kpt-date-range__clear", 3, "click"], ["name", "x"], [1, "kpt-calendar", 3, "keydown.escape"], [1, "kpt-range-tabs"], ["type", "button", 3, "click"], [3, "value", "hourFormat", "minuteStep"], [1, "kpt-calendar__footer"], ["size", "sm", 3, "click"], [3, "valueChange", "value", "hourFormat", "minuteStep"], [1, "kpt-calendar__panels"], [1, "kpt-calendar__panel"], [1, "kpt-calendar__header"], ["type", "button", 1, "kpt-calendar__nav"], [1, "kpt-calendar__nav-slot"], [1, "kpt-calendar__title"], [1, "kpt-calendar__weekdays"], [1, "kpt-calendar__weekday"], [1, "kpt-calendar__grid"], ["type", "button", 1, "kpt-calendar__nav", 3, "click"], ["name", "chevron-left"], ["name", "chevron-right"], [1, "kpt-calendar__day", "kpt-calendar__day--blank"], ["type", "button", 1, "kpt-calendar__day", 3, "kpt-calendar__day--muted", "kpt-calendar__day--today", "kpt-calendar__day--range", "kpt-calendar__day--range-start", "kpt-calendar__day--range-end", "kpt-calendar__day--selected"], ["type", "button", 1, "kpt-calendar__day", 3, "click"]], template: function KptDateRange_Template(rf, ctx) { if (rf & 1) {
|
|
6196
6527
|
i0.ɵɵelementStart(0, "div", 1, 0);
|
|
6197
6528
|
i0.ɵɵlistener("click", function KptDateRange_Template_div_click_0_listener() { return ctx.toggleOpen(); })("keydown.enter", function KptDateRange_Template_div_keydown_enter_0_listener() { return ctx.toggleOpen(); })("blur", function KptDateRange_Template_div_blur_0_listener() { return ctx.touch.emit(); });
|
|
6198
6529
|
i0.ɵɵconditionalCreate(2, KptDateRange_Conditional_2_Template, 2, 1, "span", 2)(3, KptDateRange_Conditional_3_Template, 2, 1, "span", 3);
|
|
@@ -6200,24 +6531,24 @@ class KptDateRange {
|
|
|
6200
6531
|
i0.ɵɵconditionalCreate(5, KptDateRange_Conditional_5_Template, 2, 1, "button", 5);
|
|
6201
6532
|
i0.ɵɵelement(6, "kpt-icon", 6);
|
|
6202
6533
|
i0.ɵɵelementEnd();
|
|
6203
|
-
i0.ɵɵtemplate(7, KptDateRange_ng_template_7_Template, 3,
|
|
6534
|
+
i0.ɵɵtemplate(7, KptDateRange_ng_template_7_Template, 3, 7, "ng-template", 7);
|
|
6204
6535
|
i0.ɵɵlistener("backdropClick", function KptDateRange_Template_ng_template_backdropClick_7_listener() { return ctx.close(); })("detach", function KptDateRange_Template_ng_template_detach_7_listener() { return ctx.close(); });
|
|
6205
6536
|
} if (rf & 2) {
|
|
6206
|
-
const
|
|
6537
|
+
const trigger_r19 = i0.ɵɵreference(1);
|
|
6207
6538
|
i0.ɵɵclassProp("kpt-date-range--open", ctx.open())("kpt-date-range--disabled", ctx.disabled())("kpt-date-range--invalid", ctx.showInvalid());
|
|
6208
6539
|
i0.ɵɵadvance(2);
|
|
6209
6540
|
i0.ɵɵconditional(ctx.display() ? 2 : 3);
|
|
6210
6541
|
i0.ɵɵadvance(3);
|
|
6211
6542
|
i0.ɵɵconditional(ctx.display() ? 5 : -1);
|
|
6212
6543
|
i0.ɵɵadvance(2);
|
|
6213
|
-
i0.ɵɵproperty("cdkConnectedOverlayOrigin",
|
|
6214
|
-
} }, dependencies: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], styles: ["@layer kpt.components{.kpt-date-range-host{display:block}.kpt-date-range{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--%NS%kpt-space-3, .75rem);box-sizing:border-box;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-form-field-radius, .5rem);background:var(--%NS%kpt-form-field-bg);color:var(--%NS%kpt-form-field-text);font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer}.kpt-date-range:hover:not(.kpt-date-range--disabled){border-color:var(--%NS%kpt-form-field-border-hover)}.kpt-date-range:focus-visible,.kpt-date-range.kpt-date-range--open{outline:none;border-color:var(--%NS%kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--%NS%kpt-form-field-border-focus) 30%,transparent)}.kpt-date-range.kpt-date-range--invalid{border-color:var(--%NS%kpt-form-field-border-error)}.kpt-date-range.kpt-date-range--disabled{cursor:not-allowed;opacity:.6;background:var(--%NS%kpt-color-surface-variant)}.kpt-date-range__placeholder{color:var(--%NS%kpt-form-field-placeholder)}.kpt-date-range__spacer{flex:1}.kpt-date-range__icon{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-date-range__clear{display:inline-flex;border:0;background:none;cursor:pointer;padding:0;color:var(--%NS%kpt-color-on-surface-muted)}.kpt-date-range__clear:hover{color:var(--%NS%kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--%NS%kpt-space-3, .75rem);background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);box-shadow:var(--%NS%kpt-elevation-3);color:var(--%NS%kpt-color-on-surface);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--%NS%kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--%NS%kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--%NS%kpt-radius-md, .5rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover{background:var(--%NS%kpt-color-muted)}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--%NS%kpt-font-size-xs, .75rem);color:var(--%NS%kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{aspect-ratio:1;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-calendar__day--muted{color:var(--%NS%kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--
|
|
6544
|
+
i0.ɵɵproperty("cdkConnectedOverlayOrigin", trigger_r19)("cdkConnectedOverlayOpen", ctx.open())("cdkConnectedOverlayPositions", ctx.positions)("cdkConnectedOverlayHasBackdrop", true);
|
|
6545
|
+
} }, dependencies: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-date-range-host{display:block}.kpt-date-range{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--%NS%kpt-space-3, .75rem);box-sizing:border-box;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-form-field-radius, .5rem);background:var(--%NS%kpt-form-field-bg);color:var(--%NS%kpt-form-field-text);font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer}.kpt-date-range:hover:not(.kpt-date-range--disabled){border-color:var(--%NS%kpt-form-field-border-hover)}.kpt-date-range:focus-visible,.kpt-date-range.kpt-date-range--open{outline:none;border-color:var(--%NS%kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--%NS%kpt-form-field-border-focus) 30%,transparent)}.kpt-date-range.kpt-date-range--invalid{border-color:var(--%NS%kpt-form-field-border-error)}.kpt-date-range.kpt-date-range--disabled{cursor:not-allowed;opacity:.6;background:var(--%NS%kpt-color-surface-variant)}.kpt-date-range__placeholder{color:var(--%NS%kpt-form-field-placeholder)}.kpt-date-range__spacer{flex:1}.kpt-date-range__icon{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-date-range__clear{display:inline-flex;border:0;background:none;cursor:pointer;padding:0;color:var(--%NS%kpt-color-on-surface-muted)}.kpt-date-range__clear:hover{color:var(--%NS%kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--%NS%kpt-space-3, .75rem);background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);box-shadow:var(--%NS%kpt-elevation-3);color:var(--%NS%kpt-color-on-surface);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--%NS%kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--%NS%kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--%NS%kpt-radius-md, .5rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover{background:var(--%NS%kpt-color-muted)}.kpt-calendar__nav-slot{width:2rem;height:2rem}.kpt-calendar__panels{display:flex;flex-wrap:wrap;gap:var(--%NS%kpt-space-4, 1rem)}.kpt-calendar__panel{flex:none;width:15.5rem}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--%NS%kpt-font-size-xs, .75rem);color:var(--%NS%kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{position:relative;isolation:isolate;aspect-ratio:1;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-calendar__day--muted{color:var(--%NS%kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--blank{cursor:default;pointer-events:none}.kpt-calendar__day--today{box-shadow:inset 0 0 0 1px var(--%NS%kpt-color-border-strong)}.kpt-calendar__day--selected{background:var(--%NS%kpt-color-primary)!important;color:var(--%NS%kpt-color-on-primary)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--%NS%kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}.kpt-calendar--multi{width:auto;max-width:calc(100vw - 2rem)}.kpt-calendar--range .kpt-calendar__day--%NS%range:before,.kpt-calendar--range .kpt-calendar__day--%NS%range-start:before,.kpt-calendar--range .kpt-calendar__day--%NS%range-end:before{content:\"\";position:absolute;inset-block:0;inset-inline:-1px;z-index:-2;background:color-mix(in oklch,var(--%NS%kpt-color-primary) 14%,transparent)}.kpt-calendar--range .kpt-calendar__day--%NS%range-start:before{inset-inline-start:50%}.kpt-calendar--range .kpt-calendar__day--%NS%range-end:before{inset-inline-end:50%}.kpt-calendar--range .kpt-calendar__day--selected{background:none!important;color:var(--%NS%kpt-color-on-primary)}.kpt-calendar--range .kpt-calendar__day--%NS%selected:after{content:\"\";position:absolute;inset:0;z-index:-1;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:var(--%NS%kpt-color-primary)}.kpt-calendar--range .kpt-calendar__grid>.kpt-calendar__day:nth-child(7n+1):before{border-start-start-radius:var(--%NS%kpt-radius-sm, .25rem);border-end-start-radius:var(--%NS%kpt-radius-sm, .25rem)}.kpt-calendar--range .kpt-calendar__grid>.kpt-calendar__day:nth-child(7n):before{border-start-end-radius:var(--%NS%kpt-radius-sm, .25rem);border-end-end-radius:var(--%NS%kpt-radius-sm, .25rem)}.kpt-range-tabs{display:flex;gap:var(--%NS%kpt-space-1, .25rem);margin-block:var(--%NS%kpt-space-3, .75rem) var(--%NS%kpt-space-2, .5rem);padding:2px;background:var(--%NS%kpt-color-surface-variant);border-radius:var(--%NS%kpt-radius-md, .5rem)}.kpt-range-tabs button{flex:1;border:0;background:none;padding:var(--%NS%kpt-space-1, .25rem) var(--%NS%kpt-space-2, .5rem);border-radius:var(--%NS%kpt-radius-sm, .25rem);color:var(--%NS%kpt-color-on-surface-muted);font:inherit;font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer}.kpt-range-tabs button.is-active{background:var(--%NS%kpt-color-surface-raised);color:var(--%NS%kpt-color-on-surface);font-weight:var(--%NS%kpt-font-weight-medium, 500);box-shadow:var(--%NS%kpt-elevation-1)}}\n"], encapsulation: 2 }); }
|
|
6215
6546
|
}
|
|
6216
6547
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptDateRange, [{
|
|
6217
6548
|
type: Component,
|
|
6218
|
-
args: [{ selector: 'kpt-date-range', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], host: { class: 'kpt-date-range-host' }, template: "<div\n class=\"kpt-date-range\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n role=\"button\"\n tabindex=\"0\"\n [class.kpt-date-range--open]=\"open()\"\n [class.kpt-date-range--disabled]=\"disabled()\"\n [class.kpt-date-range--invalid]=\"showInvalid()\"\n (click)=\"toggleOpen()\"\n (keydown.enter)=\"toggleOpen()\"\n (blur)=\"touch.emit()\"\n>\n @if (display()) {\n <span class=\"kpt-date-range__value\">{{ display() }}</span>\n } @else {\n <span class=\"kpt-date-range__placeholder\">{{ effectivePlaceholder() }}</span>\n }\n <span class=\"kpt-date-range__spacer\"></span>\n @if (display()) {\n <button type=\"button\" class=\"kpt-date-range__clear\" (click)=\"clear($event)\" [attr.aria-label]=\"i18n.t('common.clear')\"><kpt-icon name=\"x\" /></button>\n }\n <kpt-icon class=\"kpt-date-range__icon\" name=\"calendar\" />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div class=\"kpt-calendar\" [class.kpt-calendar--clock]=\"mode() === 'time'\" (keydown.escape)=\"close()\">\n @if (mode() === 'time') {\n <div class=\"kpt-range-tabs\">\n <button type=\"button\" [class.is-active]=\"timeEnd() === 'start'\" (click)=\"timeEnd.set('start')\">{{ i18n.t('dateRange.from') }}</button>\n <button type=\"button\" [class.is-active]=\"timeEnd() === 'end'\" (click)=\"timeEnd.set('end')\">{{ i18n.t('dateRange.to') }}</button>\n </div>\n @if (timeEnd() === 'start') {\n <kpt-clock [value]=\"startTime()\" (valueChange)=\"startTime.set($event)\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n } @else {\n <kpt-clock [value]=\"endTime()\" (valueChange)=\"endTime.set($event)\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n }\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n } @else {\n <div class=\"kpt-calendar__header\">\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevMonth()\" [attr.aria-label]=\"i18n.t('datepicker.prevMonth')\"><kpt-icon name=\"chevron-left\" /></button>\n <span class=\"kpt-calendar__title\">{{ monthLabel() }}</span>\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextMonth()\" [attr.aria-label]=\"i18n.t('datepicker.nextMonth')\"><kpt-icon name=\"chevron-right\" /></button>\n </div>\n <div class=\"kpt-calendar__weekdays\">\n @for (wd of weekdays(); track wd) {\n <span class=\"kpt-calendar__weekday\">{{ wd }}</span>\n }\n </div>\n <div class=\"kpt-calendar__grid\">\n @for (week of weeks(); track $index) {\n @for (cell of week; track cell.iso) {\n <button\n type=\"button\"\n class=\"kpt-calendar__day\"\n [class.kpt-calendar__day--muted]=\"!cell.inMonth\"\n [class.kpt-calendar__day--range]=\"cell.inRange\"\n [class.kpt-calendar__day--selected]=\"cell.isStart || cell.isEnd\"\n (click)=\"selectDay(cell)\"\n >{{ cell.day }}</button>\n }\n }\n </div>\n\n @if (mode() === 'datetime') {\n <div class=\"kpt-range-tabs\">\n <button type=\"button\" [class.is-active]=\"timeEnd() === 'start'\" (click)=\"timeEnd.set('start')\">{{ i18n.t('dateRange.fromTime') }}</button>\n <button type=\"button\" [class.is-active]=\"timeEnd() === 'end'\" (click)=\"timeEnd.set('end')\">{{ i18n.t('dateRange.toTime') }}</button>\n </div>\n @if (timeEnd() === 'start') {\n <kpt-clock [value]=\"startTime()\" (valueChange)=\"startTime.set($event)\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n } @else {\n <kpt-clock [value]=\"endTime()\" (valueChange)=\"endTime.set($event)\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n }\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n }\n }\n </div>\n</ng-template>\n", styles: ["@layer kpt.components{.kpt-date-range-host{display:block}.kpt-date-range{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--kpt-space-3, .75rem);box-sizing:border-box;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-date-range:hover:not(.kpt-date-range--disabled){border-color:var(--kpt-form-field-border-hover)}.kpt-date-range:focus-visible,.kpt-date-range.kpt-date-range--open{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-date-range.kpt-date-range--invalid{border-color:var(--kpt-form-field-border-error)}.kpt-date-range.kpt-date-range--disabled{cursor:not-allowed;opacity:.6;background:var(--kpt-color-surface-variant)}.kpt-date-range__placeholder{color:var(--kpt-form-field-placeholder)}.kpt-date-range__spacer{flex:1}.kpt-date-range__icon{color:var(--kpt-color-on-surface-muted)}.kpt-date-range__clear{display:inline-flex;border:0;background:none;cursor:pointer;padding:0;color:var(--kpt-color-on-surface-muted)}.kpt-date-range__clear:hover{color:var(--kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3);color:var(--kpt-color-on-surface);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--kpt-radius-md, .5rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover{background:var(--kpt-color-muted)}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--kpt-font-size-xs, .75rem);color:var(--kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{aspect-ratio:1;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__day--muted{color:var(--kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--range{background:color-mix(in oklch,var(--kpt-color-primary) 14%,transparent);border-radius:0}.kpt-calendar__day--selected{background:var(--kpt-color-primary)!important;color:var(--kpt-color-on-primary)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}.kpt-range-tabs{display:flex;gap:var(--kpt-space-1, .25rem);margin-block:var(--kpt-space-3, .75rem) var(--kpt-space-2, .5rem);padding:2px;background:var(--kpt-color-surface-variant);border-radius:var(--kpt-radius-md, .5rem)}.kpt-range-tabs button{flex:1;border:0;background:none;padding:var(--kpt-space-1, .25rem) var(--kpt-space-2, .5rem);border-radius:var(--kpt-radius-sm, .25rem);color:var(--kpt-color-on-surface-muted);font:inherit;font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-range-tabs button.is-active{background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface);font-weight:var(--kpt-font-weight-medium, 500);box-shadow:var(--kpt-elevation-1)}}\n"] }]
|
|
6219
|
-
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], displayFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayFormat", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }] }); })();
|
|
6220
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDateRange, { className: "KptDateRange", filePath: "lib/date-range/date-range.component.ts", lineNumber:
|
|
6549
|
+
args: [{ selector: 'kpt-date-range', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkOverlayOrigin, CdkConnectedOverlay, KptIcon, KptButton, KptClock], host: { class: 'kpt-date-range-host' }, template: "<div\n class=\"kpt-date-range\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n role=\"button\"\n tabindex=\"0\"\n [class.kpt-date-range--open]=\"open()\"\n [class.kpt-date-range--disabled]=\"disabled()\"\n [class.kpt-date-range--invalid]=\"showInvalid()\"\n (click)=\"toggleOpen()\"\n (keydown.enter)=\"toggleOpen()\"\n (blur)=\"touch.emit()\"\n>\n @if (display()) {\n <span class=\"kpt-date-range__value\">{{ display() }}</span>\n } @else {\n <span class=\"kpt-date-range__placeholder\">{{ effectivePlaceholder() }}</span>\n }\n <span class=\"kpt-date-range__spacer\"></span>\n @if (display()) {\n <button type=\"button\" class=\"kpt-date-range__clear\" (click)=\"clear($event)\" [attr.aria-label]=\"i18n.t('common.clear')\"><kpt-icon name=\"x\" /></button>\n }\n <kpt-icon class=\"kpt-date-range__icon\" name=\"calendar\" />\n</div>\n\n<ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n class=\"kpt-calendar\"\n [class.kpt-calendar--clock]=\"mode() === 'time'\"\n [class.kpt-calendar--range]=\"mode() !== 'time'\"\n [class.kpt-calendar--multi]=\"multi() && mode() !== 'time'\"\n (keydown.escape)=\"close()\"\n >\n @if (mode() === 'time') {\n <div class=\"kpt-range-tabs\">\n <button type=\"button\" [class.is-active]=\"timeEnd() === 'start'\" (click)=\"timeEnd.set('start')\">{{ i18n.t('dateRange.from') }}</button>\n <button type=\"button\" [class.is-active]=\"timeEnd() === 'end'\" (click)=\"timeEnd.set('end')\">{{ i18n.t('dateRange.to') }}</button>\n </div>\n @if (timeEnd() === 'start') {\n <kpt-clock [value]=\"startTime()\" (valueChange)=\"startTime.set($event)\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n } @else {\n <kpt-clock [value]=\"endTime()\" (valueChange)=\"endTime.set($event)\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n }\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n } @else {\n <div class=\"kpt-calendar__panels\">\n @for (panel of panels(); track panel.key; let first = $first, last = $last) {\n <div class=\"kpt-calendar__panel\">\n <!-- Strza\u0142ki tylko na skrajnych panelach; puste sloty trzymaj\u0105 tytu\u0142 na \u015Brodku. -->\n <div class=\"kpt-calendar__header\">\n @if (first) {\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"prevMonth()\" [attr.aria-label]=\"i18n.t('datepicker.prevMonth')\"><kpt-icon name=\"chevron-left\" /></button>\n } @else {\n <span class=\"kpt-calendar__nav-slot\"></span>\n }\n <span class=\"kpt-calendar__title\">{{ panel.label }}</span>\n @if (last) {\n <button type=\"button\" class=\"kpt-calendar__nav\" (click)=\"nextMonth()\" [attr.aria-label]=\"i18n.t('datepicker.nextMonth')\"><kpt-icon name=\"chevron-right\" /></button>\n } @else {\n <span class=\"kpt-calendar__nav-slot\"></span>\n }\n </div>\n <div class=\"kpt-calendar__weekdays\">\n @for (wd of weekdays(); track wd) {\n <span class=\"kpt-calendar__weekday\">{{ wd }}</span>\n }\n </div>\n <div class=\"kpt-calendar__grid\">\n @for (week of panel.weeks; track $index) {\n @for (cell of week; track cell.iso) {\n @if (cell.blank) {\n <span class=\"kpt-calendar__day kpt-calendar__day--blank\"></span>\n } @else {\n <button\n type=\"button\"\n class=\"kpt-calendar__day\"\n [class.kpt-calendar__day--muted]=\"!cell.inMonth\"\n [class.kpt-calendar__day--today]=\"cell.today\"\n [class.kpt-calendar__day--range]=\"cell.inRange\"\n [class.kpt-calendar__day--range-start]=\"cell.rangeStart\"\n [class.kpt-calendar__day--range-end]=\"cell.rangeEnd\"\n [class.kpt-calendar__day--selected]=\"cell.isStart || cell.isEnd\"\n (click)=\"selectDay(cell)\"\n >{{ cell.day }}</button>\n }\n }\n }\n </div>\n </div>\n }\n </div>\n\n @if (mode() === 'datetime') {\n <div class=\"kpt-range-tabs\">\n <button type=\"button\" [class.is-active]=\"timeEnd() === 'start'\" (click)=\"timeEnd.set('start')\">{{ i18n.t('dateRange.fromTime') }}</button>\n <button type=\"button\" [class.is-active]=\"timeEnd() === 'end'\" (click)=\"timeEnd.set('end')\">{{ i18n.t('dateRange.toTime') }}</button>\n </div>\n @if (timeEnd() === 'start') {\n <kpt-clock [value]=\"startTime()\" (valueChange)=\"startTime.set($event)\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n } @else {\n <kpt-clock [value]=\"endTime()\" (valueChange)=\"endTime.set($event)\" [hourFormat]=\"hourFormat()\" [minuteStep]=\"minuteStep()\" />\n }\n <div class=\"kpt-calendar__footer\">\n <kpt-button size=\"sm\" (click)=\"commit()\">{{ i18n.t('common.done') }}</kpt-button>\n </div>\n }\n }\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-date-range-host{display:block}.kpt-date-range{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);height:2.5rem;padding-inline:var(--kpt-space-3, .75rem);box-sizing:border-box;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-date-range:hover:not(.kpt-date-range--disabled){border-color:var(--kpt-form-field-border-hover)}.kpt-date-range:focus-visible,.kpt-date-range.kpt-date-range--open{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-date-range.kpt-date-range--invalid{border-color:var(--kpt-form-field-border-error)}.kpt-date-range.kpt-date-range--disabled{cursor:not-allowed;opacity:.6;background:var(--kpt-color-surface-variant)}.kpt-date-range__placeholder{color:var(--kpt-form-field-placeholder)}.kpt-date-range__spacer{flex:1}.kpt-date-range__icon{color:var(--kpt-color-on-surface-muted)}.kpt-date-range__clear{display:inline-flex;border:0;background:none;cursor:pointer;padding:0;color:var(--kpt-color-on-surface-muted)}.kpt-date-range__clear:hover{color:var(--kpt-color-on-surface)}.kpt-calendar{width:17rem;padding:var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3);color:var(--kpt-color-on-surface);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-calendar__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--kpt-space-2, .5rem)}.kpt-calendar__title{font-weight:var(--kpt-font-weight-semibold, 600);text-transform:capitalize}.kpt-calendar__nav{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--kpt-radius-md, .5rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer}.kpt-calendar__nav:hover{background:var(--kpt-color-muted)}.kpt-calendar__nav-slot{width:2rem;height:2rem}.kpt-calendar__panels{display:flex;flex-wrap:wrap;gap:var(--kpt-space-4, 1rem)}.kpt-calendar__panel{flex:none;width:15.5rem}.kpt-calendar__weekdays,.kpt-calendar__grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.kpt-calendar__weekday{text-align:center;font-size:var(--kpt-font-size-xs, .75rem);color:var(--kpt-color-on-surface-muted);padding:.25rem 0}.kpt-calendar__day{position:relative;isolation:isolate;aspect-ratio:1;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font:inherit}.kpt-calendar__day:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-calendar__day--muted{color:var(--kpt-color-on-surface-muted);opacity:.5}.kpt-calendar__day--blank{cursor:default;pointer-events:none}.kpt-calendar__day--today{box-shadow:inset 0 0 0 1px var(--kpt-color-border-strong)}.kpt-calendar__day--selected{background:var(--kpt-color-primary)!important;color:var(--kpt-color-on-primary)}.kpt-calendar__footer{display:flex;justify-content:flex-end;margin-top:var(--kpt-space-3, .75rem)}.kpt-calendar--clock{width:16rem}.kpt-calendar--multi{width:auto;max-width:calc(100vw - 2rem)}.kpt-calendar--range .kpt-calendar__day--range:before,.kpt-calendar--range .kpt-calendar__day--range-start:before,.kpt-calendar--range .kpt-calendar__day--range-end:before{content:\"\";position:absolute;inset-block:0;inset-inline:-1px;z-index:-2;background:color-mix(in oklch,var(--kpt-color-primary) 14%,transparent)}.kpt-calendar--range .kpt-calendar__day--range-start:before{inset-inline-start:50%}.kpt-calendar--range .kpt-calendar__day--range-end:before{inset-inline-end:50%}.kpt-calendar--range .kpt-calendar__day--selected{background:none!important;color:var(--kpt-color-on-primary)}.kpt-calendar--range .kpt-calendar__day--selected:after{content:\"\";position:absolute;inset:0;z-index:-1;border-radius:var(--kpt-radius-sm, .25rem);background:var(--kpt-color-primary)}.kpt-calendar--range .kpt-calendar__grid>.kpt-calendar__day:nth-child(7n+1):before{border-start-start-radius:var(--kpt-radius-sm, .25rem);border-end-start-radius:var(--kpt-radius-sm, .25rem)}.kpt-calendar--range .kpt-calendar__grid>.kpt-calendar__day:nth-child(7n):before{border-start-end-radius:var(--kpt-radius-sm, .25rem);border-end-end-radius:var(--kpt-radius-sm, .25rem)}.kpt-range-tabs{display:flex;gap:var(--kpt-space-1, .25rem);margin-block:var(--kpt-space-3, .75rem) var(--kpt-space-2, .5rem);padding:2px;background:var(--kpt-color-surface-variant);border-radius:var(--kpt-radius-md, .5rem)}.kpt-range-tabs button{flex:1;border:0;background:none;padding:var(--kpt-space-1, .25rem) var(--kpt-space-2, .5rem);border-radius:var(--kpt-radius-sm, .25rem);color:var(--kpt-color-on-surface-muted);font:inherit;font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-range-tabs button.is-active{background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface);font-weight:var(--kpt-font-weight-medium, 500);box-shadow:var(--kpt-elevation-1)}}\n"] }]
|
|
6550
|
+
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], displayFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayFormat", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], visibleMonths: [{ type: i0.Input, args: [{ isSignal: true, alias: "visibleMonths", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }] }); })();
|
|
6551
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDateRange, { className: "KptDateRange", filePath: "lib/date-range/date-range.component.ts", lineNumber: 79 }); })();
|
|
6221
6552
|
|
|
6222
6553
|
function KptInputNumber_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
6223
6554
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
@@ -6246,8 +6577,13 @@ function KptInputNumber_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
6246
6577
|
* `showButtons="false"` chowa strzałki — wariant do zakresów „od–do", gdzie krokowanie
|
|
6247
6578
|
* nie ma sensu, a pole ma wyglądać jak zwykłe `kpt-input` obok.
|
|
6248
6579
|
*
|
|
6580
|
+
* Pod `[formField]` granic NIE bindujemy w szablonie — `[min]`/`[max]` obok `[formField]`
|
|
6581
|
+
* to błąd kompilacji. Deklaruje je schemat (`min(path.qty, 0)`, `max(path.qty, 99)`),
|
|
6582
|
+
* a dyrektywa `FormField` sama wstrzykuje je w wejścia `min`/`max`.
|
|
6583
|
+
*
|
|
6249
6584
|
* @example
|
|
6250
|
-
* <kpt-input-number [formField]="f.qty" [
|
|
6585
|
+
* <kpt-input-number [formField]="f.qty" [step]="1" />
|
|
6586
|
+
* <kpt-input-number [(value)]="qty" [min]="0" [max]="99" suffix=" szt." />
|
|
6251
6587
|
* <kpt-input-number [formField]="f.priceFrom" [showButtons]="false" suffix=" zł" />
|
|
6252
6588
|
*/
|
|
6253
6589
|
class KptInputNumber {
|
|
@@ -6363,7 +6699,7 @@ class KptInputNumber {
|
|
|
6363
6699
|
</div>
|
|
6364
6700
|
`, host: { class: 'kpt-input-number-host' }, styles: ["@layer kpt.components{.kpt-input-number-host{display:block}.kpt-input-number{display:inline-flex;align-items:stretch;width:100%;height:2.5rem;box-sizing:border-box;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);overflow:hidden}.kpt-input-number:focus-within:not(.kpt-input-number--disabled){border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-input-number--invalid{border-color:var(--kpt-form-field-border-error)}.kpt-input-number--disabled{opacity:.6;background:var(--kpt-color-surface-variant)}.kpt-input-number--plain .kpt-input-number__input{text-align:left;padding-inline:var(--kpt-space-3, .75rem)}.kpt-input-number__input{flex:1;min-width:0;border:0;background:none;text-align:center;color:var(--kpt-form-field-text);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-input-number__input:focus{outline:none}.kpt-input-number__input::placeholder{color:var(--kpt-form-field-placeholder)}.kpt-input-number__btn{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;border:0;background:var(--kpt-color-muted);color:var(--kpt-color-on-surface);cursor:pointer}.kpt-input-number__btn:hover:not(:disabled){background:var(--kpt-color-surface-variant)}.kpt-input-number__btn:disabled{cursor:not-allowed;opacity:.5}}\n"] }]
|
|
6365
6701
|
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], showButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showButtons", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }] }); })();
|
|
6366
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptInputNumber, { className: "KptInputNumber", filePath: "lib/input-number/input-number.component.ts", lineNumber:
|
|
6702
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptInputNumber, { className: "KptInputNumber", filePath: "lib/input-number/input-number.component.ts", lineNumber: 53 }); })();
|
|
6367
6703
|
|
|
6368
6704
|
const _c0$s = () => [0, 1, 2, 3];
|
|
6369
6705
|
function KptPassword_Conditional_4_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -6936,8 +7272,12 @@ const GAP = Math.PI / 4; // przerwa u dołu (kąt „otwarcia" łuku)
|
|
|
6936
7272
|
/**
|
|
6937
7273
|
* Pokrętło (knob) — wybór wartości po łuku, myszką lub strzałkami. Signal Forms.
|
|
6938
7274
|
*
|
|
7275
|
+
* Pod `[formField]` zakres bierze się ze schematu (`min(path.level, 0)`,
|
|
7276
|
+
* `max(path.level, 100)`) — `[min]`/`[max]` obok `[formField]` to błąd kompilacji.
|
|
7277
|
+
*
|
|
6939
7278
|
* @example
|
|
6940
|
-
* <kpt-knob [formField]="f.level" [
|
|
7279
|
+
* <kpt-knob [formField]="f.level" [step]="1" />
|
|
7280
|
+
* <kpt-knob [(value)]="level" [min]="0" [max]="100" [step]="1" />
|
|
6941
7281
|
*/
|
|
6942
7282
|
class KptKnob {
|
|
6943
7283
|
constructor() {
|
|
@@ -7089,7 +7429,7 @@ class KptKnob {
|
|
|
7089
7429
|
</div>
|
|
7090
7430
|
`, host: { class: 'kpt-knob-host' }, styles: ["@layer kpt.components{.kpt-knob-host{display:inline-block}.kpt-knob{display:inline-flex;cursor:pointer;touch-action:none;outline:none;border-radius:50%}.kpt-knob:focus-visible{box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-color-primary) 40%,transparent)}.kpt-knob[aria-disabled=true]{cursor:not-allowed;opacity:.6}.kpt-knob__range{stroke:var(--kpt-color-border)}.kpt-knob__value{stroke:var(--kpt-color-primary);transition:stroke-dashoffset .1s}.kpt-knob__text{fill:var(--kpt-color-on-surface);font-size:var(--kpt-font-size-lg, 1.125rem);font-weight:var(--kpt-font-weight-semibold, 600)}}\n"] }]
|
|
7091
7431
|
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], stroke: [{ type: i0.Input, args: [{ isSignal: true, alias: "stroke", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], showValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValue", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }] }); })();
|
|
7092
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptKnob, { className: "KptKnob", filePath: "lib/knob/knob.component.ts", lineNumber:
|
|
7432
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptKnob, { className: "KptKnob", filePath: "lib/knob/knob.component.ts", lineNumber: 45 }); })();
|
|
7093
7433
|
|
|
7094
7434
|
const _c0$r = ["*", [["", "kptCardFooter", ""]]];
|
|
7095
7435
|
const _c1$a = ["*", "[kptCardFooter]"];
|
|
@@ -7900,7 +8240,7 @@ function KptMeterGroup_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
7900
8240
|
const item_r1 = ctx.$implicit;
|
|
7901
8241
|
const ɵ$index_5_r2 = ctx.$index;
|
|
7902
8242
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
7903
|
-
i0.ɵɵstyleProp("width", ctx_r2.percent(item_r1), "%")("background", item_r1.color || ctx_r2.fallback(ɵ$index_5_r2));
|
|
8243
|
+
i0.ɵɵstyleProp("width", ctx_r2.percent(item_r1), "%")("background-color", item_r1.color || ctx_r2.fallback(ɵ$index_5_r2));
|
|
7904
8244
|
i0.ɵɵattribute("title", item_r1.label);
|
|
7905
8245
|
} }
|
|
7906
8246
|
function KptMeterGroup_Conditional_4_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -7917,7 +8257,7 @@ function KptMeterGroup_Conditional_4_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
7917
8257
|
const ɵ$index_11_r5 = ctx.$index;
|
|
7918
8258
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
7919
8259
|
i0.ɵɵadvance();
|
|
7920
|
-
i0.ɵɵstyleProp("background", item_r4.color || ctx_r2.fallback(ɵ$index_11_r5));
|
|
8260
|
+
i0.ɵɵstyleProp("background-color", item_r4.color || ctx_r2.fallback(ɵ$index_11_r5));
|
|
7921
8261
|
i0.ɵɵadvance(2);
|
|
7922
8262
|
i0.ɵɵtextInterpolate(item_r4.label);
|
|
7923
8263
|
i0.ɵɵadvance(2);
|
|
@@ -7963,7 +8303,7 @@ class KptMeterGroup {
|
|
|
7963
8303
|
return Math.round(n);
|
|
7964
8304
|
}
|
|
7965
8305
|
static { this.ɵfac = function KptMeterGroup_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptMeterGroup)(); }; }
|
|
7966
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptMeterGroup, selectors: [["kpt-meter-group"]], hostAttrs: [1, "kpt-meter-group-host"], inputs: { values: [1, "values"], max: [1, "max"], showLegend: [1, "showLegend"] }, decls: 5, vars: 3, consts: [[1, "kpt-meter-group"], ["role", "meter", 1, "kpt-meter-group__track"], [1, "kpt-meter-group__segment", 3, "width", "background"], [1, "kpt-meter-group__legend"], [1, "kpt-meter-group__segment"], [1, "kpt-meter-group__legend-item"], [1, "kpt-meter-group__dot"], [1, "kpt-meter-group__val"]], template: function KptMeterGroup_Template(rf, ctx) { if (rf & 1) {
|
|
8306
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptMeterGroup, selectors: [["kpt-meter-group"]], hostAttrs: [1, "kpt-meter-group-host"], inputs: { values: [1, "values"], max: [1, "max"], showLegend: [1, "showLegend"] }, decls: 5, vars: 3, consts: [[1, "kpt-meter-group"], ["role", "meter", 1, "kpt-meter-group__track"], [1, "kpt-meter-group__segment", 3, "width", "background-color"], [1, "kpt-meter-group__legend"], [1, "kpt-meter-group__segment"], [1, "kpt-meter-group__legend-item"], [1, "kpt-meter-group__dot"], [1, "kpt-meter-group__val"]], template: function KptMeterGroup_Template(rf, ctx) { if (rf & 1) {
|
|
7967
8307
|
i0.ɵɵdomElementStart(0, "div", 0)(1, "div", 1);
|
|
7968
8308
|
i0.ɵɵrepeaterCreate(2, KptMeterGroup_For_3_Template, 1, 5, "span", 2, i0.ɵɵrepeaterTrackByIndex);
|
|
7969
8309
|
i0.ɵɵdomElementEnd();
|
|
@@ -7987,7 +8327,7 @@ class KptMeterGroup {
|
|
|
7987
8327
|
<span
|
|
7988
8328
|
class="kpt-meter-group__segment"
|
|
7989
8329
|
[style.width.%]="percent(item)"
|
|
7990
|
-
[style.background]="item.color || fallback(i)"
|
|
8330
|
+
[style.background-color]="item.color || fallback(i)"
|
|
7991
8331
|
[attr.title]="item.label"
|
|
7992
8332
|
></span>
|
|
7993
8333
|
}
|
|
@@ -7996,7 +8336,7 @@ class KptMeterGroup {
|
|
|
7996
8336
|
<ul class="kpt-meter-group__legend">
|
|
7997
8337
|
@for (item of values(); track $index; let i = $index) {
|
|
7998
8338
|
<li class="kpt-meter-group__legend-item">
|
|
7999
|
-
<span class="kpt-meter-group__dot" [style.background]="item.color || fallback(i)"></span>
|
|
8339
|
+
<span class="kpt-meter-group__dot" [style.background-color]="item.color || fallback(i)"></span>
|
|
8000
8340
|
<span>{{ item.label }}</span>
|
|
8001
8341
|
<span class="kpt-meter-group__val">{{ round(percent(item)) }}%</span>
|
|
8002
8342
|
</li>
|
|
@@ -8852,6 +9192,68 @@ class KptCellDef {
|
|
|
8852
9192
|
}]
|
|
8853
9193
|
}], null, { kptCell: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptCell", required: true }] }] }); })();
|
|
8854
9194
|
|
|
9195
|
+
/**
|
|
9196
|
+
* Własny szablon edytora komórki dla kolumny `kpt-data-table` (gdy wbudowane typy
|
|
9197
|
+
* `KptColumnEdit.type` nie wystarczają). Kontekst: `$implicit` = bieżąca wartość edycji,
|
|
9198
|
+
* `row` = wiersz, `commit(value)` = zatwierdź wartość i zamknij edytor, `cancel()` = odrzuć.
|
|
9199
|
+
*
|
|
9200
|
+
* @example
|
|
9201
|
+
* <kpt-data-table [columns]="cols" [data]="rows">
|
|
9202
|
+
* <ng-template kptCellEdit="team" let-value let-commit="commit">
|
|
9203
|
+
* <my-custom-picker [value]="value" (valueChange)="commit($event)" />
|
|
9204
|
+
* </ng-template>
|
|
9205
|
+
* </kpt-data-table>
|
|
9206
|
+
*/
|
|
9207
|
+
class KptCellEditDef {
|
|
9208
|
+
constructor() {
|
|
9209
|
+
/** Nazwa pola kolumny, dla której obowiązuje szablon edytora. */
|
|
9210
|
+
this.kptCellEdit = input.required(/* @ts-ignore */
|
|
9211
|
+
...(ngDevMode ? [{ debugName: "kptCellEdit" }] : /* istanbul ignore next */ []));
|
|
9212
|
+
this.template = inject(TemplateRef);
|
|
9213
|
+
}
|
|
9214
|
+
static { this.ɵfac = function KptCellEditDef_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptCellEditDef)(); }; }
|
|
9215
|
+
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: KptCellEditDef, selectors: [["ng-template", "kptCellEdit", ""]], inputs: { kptCellEdit: [1, "kptCellEdit"] } }); }
|
|
9216
|
+
}
|
|
9217
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptCellEditDef, [{
|
|
9218
|
+
type: Directive,
|
|
9219
|
+
args: [{
|
|
9220
|
+
selector: 'ng-template[kptCellEdit]',
|
|
9221
|
+
}]
|
|
9222
|
+
}], null, { kptCellEdit: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptCellEdit", required: true }] }] }); })();
|
|
9223
|
+
|
|
9224
|
+
/*
|
|
9225
|
+
* Escapowanie komórek CSV dla `exportCsv()` — pure TS, wydzielone żeby dało się
|
|
9226
|
+
* testować `node --test` bez ciągnięcia Angulara.
|
|
9227
|
+
*/
|
|
9228
|
+
// Znak startowy, który arkusz kalkulacyjny czyta jako początek formuły (CWE-1236).
|
|
9229
|
+
const FORMULA_PREFIX = /^[=+\-@\t\r]/;
|
|
9230
|
+
function stringifyCsvValue(value) {
|
|
9231
|
+
switch (typeof value) {
|
|
9232
|
+
case 'undefined':
|
|
9233
|
+
return '';
|
|
9234
|
+
case 'string':
|
|
9235
|
+
return value;
|
|
9236
|
+
case 'number':
|
|
9237
|
+
case 'boolean':
|
|
9238
|
+
case 'bigint':
|
|
9239
|
+
return String(value);
|
|
9240
|
+
default:
|
|
9241
|
+
if (value === null)
|
|
9242
|
+
return '';
|
|
9243
|
+
if (value instanceof Date)
|
|
9244
|
+
return value.toISOString();
|
|
9245
|
+
return JSON.stringify(value);
|
|
9246
|
+
}
|
|
9247
|
+
}
|
|
9248
|
+
/** Escapuje pojedynczą wartość komórki/nagłówka do bezpiecznego pola CSV (separator `;`). */
|
|
9249
|
+
function escapeCsvCell(value) {
|
|
9250
|
+
let text = stringifyCsvValue(value);
|
|
9251
|
+
// Wiodący `'` każe arkuszowi traktować komórkę jako tekst — sam znak nie jest wyświetlany.
|
|
9252
|
+
if (FORMULA_PREFIX.test(text))
|
|
9253
|
+
text = `'${text}`;
|
|
9254
|
+
return /[",\n;]/.test(text) ? `"${text.replaceAll('"', '""')}"` : text;
|
|
9255
|
+
}
|
|
9256
|
+
|
|
8855
9257
|
/**
|
|
8856
9258
|
* Szablon rozwijanego wiersza (row detail) dla `kpt-data-table`. Renderowany pod
|
|
8857
9259
|
* wierszem po rozwinięciu. Kontekst: `$implicit` = wiersz. Wymaga `expandable`.
|
|
@@ -8879,17 +9281,21 @@ class KptRowDetailDef {
|
|
|
8879
9281
|
|
|
8880
9282
|
const _c0$e = ["scrollEl"];
|
|
8881
9283
|
const _c1$5 = ["theadEl"];
|
|
8882
|
-
const _c2$2 =
|
|
8883
|
-
const _c3 =
|
|
8884
|
-
const _c4 =
|
|
8885
|
-
const _c5 =
|
|
8886
|
-
const _c6 =
|
|
9284
|
+
const _c2$2 = ["editorHost"];
|
|
9285
|
+
const _c3 = [[["", "kptPaginatorActions", ""]]];
|
|
9286
|
+
const _c4 = ["[kptPaginatorActions]"];
|
|
9287
|
+
const _c5 = a0 => ({ $implicit: a0 });
|
|
9288
|
+
const _c6 = a0 => ({ column: a0 });
|
|
9289
|
+
const _c7 = (a0, a1, a2, a3) => ({ $implicit: a0, row: a1, commit: a2, cancel: a3 });
|
|
9290
|
+
const _c8 = () => [];
|
|
9291
|
+
const _c9 = (a0, a1) => ({ $implicit: a0, value: a1 });
|
|
9292
|
+
const _c10 = () => ({ start: "", end: "" });
|
|
8887
9293
|
const _forTrack0$1 = ($index, $item) => $item.field;
|
|
8888
9294
|
function _forTrack1($index, $item) { /* @ts-ignore */
|
|
8889
9295
|
return this.trackRow($item); }
|
|
8890
9296
|
function KptDataTable_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
8891
9297
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
8892
|
-
i0.ɵɵelementStart(0, "input",
|
|
9298
|
+
i0.ɵɵelementStart(0, "input", 15);
|
|
8893
9299
|
i0.ɵɵlistener("input", function KptDataTable_Conditional_0_Conditional_1_Template_input_input_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onFilter($event)); });
|
|
8894
9300
|
i0.ɵɵelementEnd();
|
|
8895
9301
|
} if (rf & 2) {
|
|
@@ -8899,7 +9305,7 @@ function KptDataTable_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1
|
|
|
8899
9305
|
} }
|
|
8900
9306
|
function KptDataTable_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
8901
9307
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
8902
|
-
i0.ɵɵelementStart(0, "kpt-button",
|
|
9308
|
+
i0.ɵɵelementStart(0, "kpt-button", 16);
|
|
8903
9309
|
i0.ɵɵlistener("click", function KptDataTable_Conditional_0_Conditional_2_Template_kpt_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.exportCsv()); });
|
|
8904
9310
|
i0.ɵɵtext(1);
|
|
8905
9311
|
i0.ɵɵelementEnd();
|
|
@@ -8909,9 +9315,9 @@ function KptDataTable_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1
|
|
|
8909
9315
|
i0.ɵɵtextInterpolate(ctx_r1.i18n.t("dataTable.exportCsv"));
|
|
8910
9316
|
} }
|
|
8911
9317
|
function KptDataTable_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
8912
|
-
i0.ɵɵelementStart(0, "div",
|
|
8913
|
-
i0.ɵɵconditionalCreate(1, KptDataTable_Conditional_0_Conditional_1_Template, 1, 2, "input",
|
|
8914
|
-
i0.ɵɵconditionalCreate(2, KptDataTable_Conditional_0_Conditional_2_Template, 2, 1, "kpt-button",
|
|
9318
|
+
i0.ɵɵelementStart(0, "div", 5);
|
|
9319
|
+
i0.ɵɵconditionalCreate(1, KptDataTable_Conditional_0_Conditional_1_Template, 1, 2, "input", 13);
|
|
9320
|
+
i0.ɵɵconditionalCreate(2, KptDataTable_Conditional_0_Conditional_2_Template, 2, 1, "kpt-button", 14);
|
|
8915
9321
|
i0.ɵɵelementEnd();
|
|
8916
9322
|
} if (rf & 2) {
|
|
8917
9323
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -8921,14 +9327,14 @@ function KptDataTable_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
8921
9327
|
i0.ɵɵconditional(ctx_r1.exportable() ? 2 : -1);
|
|
8922
9328
|
} }
|
|
8923
9329
|
function KptDataTable_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
8924
|
-
i0.ɵɵelementContainer(0,
|
|
9330
|
+
i0.ɵɵelementContainer(0, 8);
|
|
8925
9331
|
} if (rf & 2) {
|
|
8926
9332
|
i0.ɵɵnextContext();
|
|
8927
9333
|
const filterRowTpl_r4 = i0.ɵɵreference(22);
|
|
8928
9334
|
i0.ɵɵproperty("ngTemplateOutlet", filterRowTpl_r4);
|
|
8929
9335
|
} }
|
|
8930
9336
|
function KptDataTable_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
8931
|
-
i0.ɵɵelement(0, "th",
|
|
9337
|
+
i0.ɵɵelement(0, "th", 17);
|
|
8932
9338
|
} if (rf & 2) {
|
|
8933
9339
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
8934
9340
|
i0.ɵɵstyleProp("left", ctx_r1.expanderStickyLeft(), "px");
|
|
@@ -8936,7 +9342,7 @@ function KptDataTable_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
|
8936
9342
|
} }
|
|
8937
9343
|
function KptDataTable_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
8938
9344
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
8939
|
-
i0.ɵɵelementStart(0, "th",
|
|
9345
|
+
i0.ɵɵelementStart(0, "th", 18)(1, "input", 19);
|
|
8940
9346
|
i0.ɵɵlistener("change", function KptDataTable_Conditional_9_Template_input_change_1_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.toggleAllOnPage()); });
|
|
8941
9347
|
i0.ɵɵelementEnd()();
|
|
8942
9348
|
} if (rf & 2) {
|
|
@@ -8948,17 +9354,17 @@ function KptDataTable_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
|
8948
9354
|
i0.ɵɵattribute("aria-label", ctx_r1.i18n.t("dataTable.selectAll"));
|
|
8949
9355
|
} }
|
|
8950
9356
|
function KptDataTable_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
8951
|
-
i0.ɵɵelement(0, "th",
|
|
9357
|
+
i0.ɵɵelement(0, "th", 18);
|
|
8952
9358
|
} if (rf & 2) {
|
|
8953
9359
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
8954
9360
|
i0.ɵɵstyleProp("left", ctx_r1.checkboxStickyLeft(), "px");
|
|
8955
9361
|
i0.ɵɵclassProp("kpt-data-table__cell--frozen", ctx_r1.hasFrozen());
|
|
8956
9362
|
} }
|
|
8957
9363
|
function KptDataTable_For_12_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
8958
|
-
i0.ɵɵelement(0, "kpt-icon",
|
|
9364
|
+
i0.ɵɵelement(0, "kpt-icon", 21);
|
|
8959
9365
|
} }
|
|
8960
9366
|
function KptDataTable_For_12_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
8961
|
-
i0.ɵɵelement(0, "kpt-icon",
|
|
9367
|
+
i0.ɵɵelement(0, "kpt-icon", 23);
|
|
8962
9368
|
} if (rf & 2) {
|
|
8963
9369
|
const col_r7 = i0.ɵɵnextContext().$implicit;
|
|
8964
9370
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -8967,20 +9373,19 @@ function KptDataTable_For_12_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
8967
9373
|
} }
|
|
8968
9374
|
function KptDataTable_For_12_Template(rf, ctx) { if (rf & 1) {
|
|
8969
9375
|
const _r6 = i0.ɵɵgetCurrentView();
|
|
8970
|
-
i0.ɵɵelementStart(0, "th",
|
|
8971
|
-
i0.ɵɵlistener("click", function KptDataTable_For_12_Template_th_click_0_listener() { const col_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.toggleSort(col_r7)); })("dragstart", function KptDataTable_For_12_Template_th_dragstart_0_listener($event) { const
|
|
8972
|
-
i0.ɵɵconditionalCreate(1, KptDataTable_For_12_Conditional_1_Template, 1, 0, "kpt-icon",
|
|
9376
|
+
i0.ɵɵelementStart(0, "th", 20);
|
|
9377
|
+
i0.ɵɵlistener("click", function KptDataTable_For_12_Template_th_click_0_listener() { const col_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.toggleSort(col_r7)); })("dragstart", function KptDataTable_For_12_Template_th_dragstart_0_listener($event) { const col_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onColDragStart(col_r7.field, $event)); })("dragover", function KptDataTable_For_12_Template_th_dragover_0_listener($event) { const col_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.reorderable() ? ctx_r1.onColDragOver(col_r7.field, $event) : null); })("drop", function KptDataTable_For_12_Template_th_drop_0_listener($event) { const col_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.reorderable() ? ctx_r1.onColDrop(col_r7.field, $event) : null); })("dragend", function KptDataTable_For_12_Template_th_dragend_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onColDragEnd()); });
|
|
9378
|
+
i0.ɵɵconditionalCreate(1, KptDataTable_For_12_Conditional_1_Template, 1, 0, "kpt-icon", 21);
|
|
8973
9379
|
i0.ɵɵelementStart(2, "span");
|
|
8974
9380
|
i0.ɵɵtext(3);
|
|
8975
9381
|
i0.ɵɵelementEnd();
|
|
8976
|
-
i0.ɵɵconditionalCreate(4, KptDataTable_For_12_Conditional_4_Template, 1, 3, "kpt-icon",
|
|
9382
|
+
i0.ɵɵconditionalCreate(4, KptDataTable_For_12_Conditional_4_Template, 1, 3, "kpt-icon", 22);
|
|
8977
9383
|
i0.ɵɵelementEnd();
|
|
8978
9384
|
} if (rf & 2) {
|
|
8979
9385
|
const col_r7 = ctx.$implicit;
|
|
8980
|
-
const ɵ$index_33_r8 = ctx.$index;
|
|
8981
9386
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
8982
9387
|
i0.ɵɵstyleProp("width", col_r7.width)("left", ctx_r1.frozenLeft(col_r7.field), "px");
|
|
8983
|
-
i0.ɵɵclassProp("kpt-data-table__cell--frozen", ctx_r1.isFrozen(col_r7.field))("kpt-data-table__th--sortable", col_r7.sortable)("kpt-data-table__th--draggable", ctx_r1.isColDraggable(col_r7))("kpt-data-table__th--dragover", ctx_r1.
|
|
9388
|
+
i0.ɵɵclassProp("kpt-data-table__cell--frozen", ctx_r1.isFrozen(col_r7.field))("kpt-data-table__th--sortable", col_r7.sortable)("kpt-data-table__th--draggable", ctx_r1.isColDraggable(col_r7))("kpt-data-table__th--dragover", ctx_r1.dragField() !== null && ctx_r1.dragField() !== col_r7.field && !col_r7.frozen);
|
|
8984
9389
|
i0.ɵɵattribute("draggable", ctx_r1.isColDraggable(col_r7) ? true : null)("data-align", col_r7.align ?? "start")("aria-sort", ctx_r1.ariaSort(col_r7));
|
|
8985
9390
|
i0.ɵɵadvance();
|
|
8986
9391
|
i0.ɵɵconditional(ctx_r1.isColDraggable(col_r7) ? 1 : -1);
|
|
@@ -8990,14 +9395,14 @@ function KptDataTable_For_12_Template(rf, ctx) { if (rf & 1) {
|
|
|
8990
9395
|
i0.ɵɵconditional(col_r7.sortable ? 4 : -1);
|
|
8991
9396
|
} }
|
|
8992
9397
|
function KptDataTable_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
8993
|
-
i0.ɵɵelementContainer(0,
|
|
9398
|
+
i0.ɵɵelementContainer(0, 8);
|
|
8994
9399
|
} if (rf & 2) {
|
|
8995
9400
|
i0.ɵɵnextContext();
|
|
8996
9401
|
const filterRowTpl_r4 = i0.ɵɵreference(22);
|
|
8997
9402
|
i0.ɵɵproperty("ngTemplateOutlet", filterRowTpl_r4);
|
|
8998
9403
|
} }
|
|
8999
9404
|
function KptDataTable_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
9000
|
-
i0.ɵɵelementStart(0, "tr")(1, "td",
|
|
9405
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 24);
|
|
9001
9406
|
i0.ɵɵtext(2);
|
|
9002
9407
|
i0.ɵɵelementEnd()();
|
|
9003
9408
|
} if (rf & 2) {
|
|
@@ -9008,7 +9413,7 @@ function KptDataTable_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
|
9008
9413
|
i0.ɵɵtextInterpolate(ctx_r1.i18n.t("dataTable.loading"));
|
|
9009
9414
|
} }
|
|
9010
9415
|
function KptDataTable_Conditional_16_Template(rf, ctx) { if (rf & 1) {
|
|
9011
|
-
i0.ɵɵelementStart(0, "tr")(1, "td",
|
|
9416
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 24);
|
|
9012
9417
|
i0.ɵɵtext(2);
|
|
9013
9418
|
i0.ɵɵelementEnd()();
|
|
9014
9419
|
} if (rf & 2) {
|
|
@@ -9019,7 +9424,7 @@ function KptDataTable_Conditional_16_Template(rf, ctx) { if (rf & 1) {
|
|
|
9019
9424
|
i0.ɵɵtextInterpolate(ctx_r1.emptyText());
|
|
9020
9425
|
} }
|
|
9021
9426
|
function KptDataTable_Conditional_17_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
9022
|
-
i0.ɵɵelementStart(0, "tr",
|
|
9427
|
+
i0.ɵɵelementStart(0, "tr", 25);
|
|
9023
9428
|
i0.ɵɵelement(1, "td");
|
|
9024
9429
|
i0.ɵɵelementEnd();
|
|
9025
9430
|
} if (rf & 2) {
|
|
@@ -9029,15 +9434,15 @@ function KptDataTable_Conditional_17_Conditional_0_Template(rf, ctx) { if (rf &
|
|
|
9029
9434
|
i0.ɵɵattribute("colspan", ctx_r1.colspan());
|
|
9030
9435
|
} }
|
|
9031
9436
|
function KptDataTable_Conditional_17_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
9032
|
-
i0.ɵɵelementContainer(0,
|
|
9437
|
+
i0.ɵɵelementContainer(0, 26);
|
|
9033
9438
|
} if (rf & 2) {
|
|
9034
|
-
const
|
|
9439
|
+
const row_r8 = ctx.$implicit;
|
|
9035
9440
|
i0.ɵɵnextContext(2);
|
|
9036
|
-
const
|
|
9037
|
-
i0.ɵɵproperty("ngTemplateOutlet",
|
|
9441
|
+
const rowTpl_r9 = i0.ɵɵreference(20);
|
|
9442
|
+
i0.ɵɵproperty("ngTemplateOutlet", rowTpl_r9)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c5, row_r8));
|
|
9038
9443
|
} }
|
|
9039
9444
|
function KptDataTable_Conditional_17_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
9040
|
-
i0.ɵɵelementStart(0, "tr",
|
|
9445
|
+
i0.ɵɵelementStart(0, "tr", 25);
|
|
9041
9446
|
i0.ɵɵelement(1, "td");
|
|
9042
9447
|
i0.ɵɵelementEnd();
|
|
9043
9448
|
} if (rf & 2) {
|
|
@@ -9047,9 +9452,9 @@ function KptDataTable_Conditional_17_Conditional_3_Template(rf, ctx) { if (rf &
|
|
|
9047
9452
|
i0.ɵɵattribute("colspan", ctx_r1.colspan());
|
|
9048
9453
|
} }
|
|
9049
9454
|
function KptDataTable_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
9050
|
-
i0.ɵɵconditionalCreate(0, KptDataTable_Conditional_17_Conditional_0_Template, 2, 3, "tr",
|
|
9051
|
-
i0.ɵɵrepeaterCreate(1, KptDataTable_Conditional_17_For_2_Template, 1, 4, "ng-container",
|
|
9052
|
-
i0.ɵɵconditionalCreate(3, KptDataTable_Conditional_17_Conditional_3_Template, 2, 3, "tr",
|
|
9455
|
+
i0.ɵɵconditionalCreate(0, KptDataTable_Conditional_17_Conditional_0_Template, 2, 3, "tr", 25);
|
|
9456
|
+
i0.ɵɵrepeaterCreate(1, KptDataTable_Conditional_17_For_2_Template, 1, 4, "ng-container", 26, _forTrack1, true);
|
|
9457
|
+
i0.ɵɵconditionalCreate(3, KptDataTable_Conditional_17_Conditional_3_Template, 2, 3, "tr", 25);
|
|
9053
9458
|
} if (rf & 2) {
|
|
9054
9459
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
9055
9460
|
i0.ɵɵconditional(ctx_r1.topPad() > 0 ? 0 : -1);
|
|
@@ -9059,219 +9464,298 @@ function KptDataTable_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
|
9059
9464
|
i0.ɵɵconditional(ctx_r1.bottomPad() > 0 ? 3 : -1);
|
|
9060
9465
|
} }
|
|
9061
9466
|
function KptDataTable_Conditional_18_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
9062
|
-
i0.ɵɵelementContainer(0,
|
|
9467
|
+
i0.ɵɵelementContainer(0, 26);
|
|
9063
9468
|
} if (rf & 2) {
|
|
9064
|
-
const
|
|
9469
|
+
const row_r10 = ctx.$implicit;
|
|
9065
9470
|
i0.ɵɵnextContext(2);
|
|
9066
|
-
const
|
|
9067
|
-
i0.ɵɵproperty("ngTemplateOutlet",
|
|
9471
|
+
const rowTpl_r9 = i0.ɵɵreference(20);
|
|
9472
|
+
i0.ɵɵproperty("ngTemplateOutlet", rowTpl_r9)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c5, row_r10));
|
|
9068
9473
|
} }
|
|
9069
9474
|
function KptDataTable_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
9070
|
-
i0.ɵɵrepeaterCreate(0, KptDataTable_Conditional_18_For_1_Template, 1, 4, "ng-container",
|
|
9475
|
+
i0.ɵɵrepeaterCreate(0, KptDataTable_Conditional_18_For_1_Template, 1, 4, "ng-container", 26, _forTrack1, true);
|
|
9071
9476
|
} if (rf & 2) {
|
|
9072
9477
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
9073
9478
|
i0.ɵɵrepeater(ctx_r1.paged());
|
|
9074
9479
|
} }
|
|
9075
9480
|
function KptDataTable_ng_template_19_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
9076
|
-
const
|
|
9077
|
-
i0.ɵɵelementStart(0, "td",
|
|
9078
|
-
i0.ɵɵlistener("click", function KptDataTable_ng_template_19_Conditional_1_Template_button_click_1_listener($event) { i0.ɵɵrestoreView(
|
|
9079
|
-
i0.ɵɵelement(2, "kpt-icon",
|
|
9481
|
+
const _r13 = i0.ɵɵgetCurrentView();
|
|
9482
|
+
i0.ɵɵelementStart(0, "td", 17)(1, "button", 30);
|
|
9483
|
+
i0.ɵɵlistener("click", function KptDataTable_ng_template_19_Conditional_1_Template_button_click_1_listener($event) { i0.ɵɵrestoreView(_r13); const row_r12 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); $event.stopPropagation(); return i0.ɵɵresetView(ctx_r1.toggleExpand(row_r12)); });
|
|
9484
|
+
i0.ɵɵelement(2, "kpt-icon", 31);
|
|
9080
9485
|
i0.ɵɵelementEnd()();
|
|
9081
9486
|
} if (rf & 2) {
|
|
9082
|
-
const
|
|
9487
|
+
const row_r12 = i0.ɵɵnextContext().$implicit;
|
|
9083
9488
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
9084
9489
|
i0.ɵɵstyleProp("left", ctx_r1.expanderStickyLeft(), "px");
|
|
9085
9490
|
i0.ɵɵclassProp("kpt-data-table__cell--frozen", ctx_r1.hasFrozen());
|
|
9086
9491
|
i0.ɵɵadvance();
|
|
9087
|
-
i0.ɵɵclassProp("kpt-data-table__expander-btn--open", ctx_r1.isExpanded(
|
|
9088
|
-
i0.ɵɵattribute("aria-expanded", ctx_r1.isExpanded(
|
|
9492
|
+
i0.ɵɵclassProp("kpt-data-table__expander-btn--open", ctx_r1.isExpanded(row_r12));
|
|
9493
|
+
i0.ɵɵattribute("aria-expanded", ctx_r1.isExpanded(row_r12))("aria-label", ctx_r1.i18n.t("dataTable.expandRow"));
|
|
9089
9494
|
} }
|
|
9090
9495
|
function KptDataTable_ng_template_19_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
9091
|
-
const
|
|
9092
|
-
i0.ɵɵelementStart(0, "td",
|
|
9093
|
-
i0.ɵɵlistener("click", function KptDataTable_ng_template_19_Conditional_2_Template_input_click_1_listener($event) { return $event.stopPropagation(); })("change", function KptDataTable_ng_template_19_Conditional_2_Template_input_change_1_listener() { i0.ɵɵrestoreView(
|
|
9496
|
+
const _r14 = i0.ɵɵgetCurrentView();
|
|
9497
|
+
i0.ɵɵelementStart(0, "td", 18)(1, "input", 32);
|
|
9498
|
+
i0.ɵɵlistener("click", function KptDataTable_ng_template_19_Conditional_2_Template_input_click_1_listener($event) { return $event.stopPropagation(); })("change", function KptDataTable_ng_template_19_Conditional_2_Template_input_change_1_listener() { i0.ɵɵrestoreView(_r14); const row_r12 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.toggleRow(row_r12)); });
|
|
9094
9499
|
i0.ɵɵelementEnd()();
|
|
9095
9500
|
} if (rf & 2) {
|
|
9096
|
-
const
|
|
9501
|
+
const row_r12 = i0.ɵɵnextContext().$implicit;
|
|
9097
9502
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
9098
9503
|
i0.ɵɵstyleProp("left", ctx_r1.checkboxStickyLeft(), "px");
|
|
9099
9504
|
i0.ɵɵclassProp("kpt-data-table__cell--frozen", ctx_r1.hasFrozen());
|
|
9100
9505
|
i0.ɵɵadvance();
|
|
9101
|
-
i0.ɵɵproperty("checked", ctx_r1.isSelected(
|
|
9506
|
+
i0.ɵɵproperty("checked", ctx_r1.isSelected(row_r12));
|
|
9102
9507
|
i0.ɵɵattribute("aria-label", ctx_r1.i18n.t("dataTable.selectRow"));
|
|
9103
9508
|
} }
|
|
9509
|
+
function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
9510
|
+
i0.ɵɵelementContainer(0, 26);
|
|
9511
|
+
} if (rf & 2) {
|
|
9512
|
+
const row_r12 = i0.ɵɵnextContext(3).$implicit;
|
|
9513
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
9514
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx)("ngTemplateOutletContext", i0.ɵɵpureFunction4(2, _c7, ctx_r1.editingValue(), row_r12, ctx_r1.commitEditValue, ctx_r1.cancelEdit));
|
|
9515
|
+
} }
|
|
9516
|
+
function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_0_Template(rf, ctx) { if (rf & 1) {
|
|
9517
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
9518
|
+
i0.ɵɵelementStart(0, "kpt-input", 41);
|
|
9519
|
+
i0.ɵɵlistener("valueChange", function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_0_Template_kpt_input_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r18); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.editingValue.set($event)); })("keydown.enter", function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_0_Template_kpt_input_keydown_enter_0_listener() { i0.ɵɵrestoreView(_r18); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.commitEdit()); })("keydown.escape", function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_0_Template_kpt_input_keydown_escape_0_listener() { i0.ɵɵrestoreView(_r18); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.cancelEdit()); });
|
|
9520
|
+
i0.ɵɵelementEnd();
|
|
9521
|
+
} if (rf & 2) {
|
|
9522
|
+
const col_r16 = i0.ɵɵnextContext(3).$implicit;
|
|
9523
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
9524
|
+
i0.ɵɵproperty("value", ctx_r1.editingValue() ?? "")("placeholder", col_r16.edit.placeholder ?? "");
|
|
9525
|
+
} }
|
|
9526
|
+
function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_1_Template(rf, ctx) { if (rf & 1) {
|
|
9527
|
+
const _r19 = i0.ɵɵgetCurrentView();
|
|
9528
|
+
i0.ɵɵelementStart(0, "kpt-input-number", 42);
|
|
9529
|
+
i0.ɵɵlistener("valueChange", function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_1_Template_kpt_input_number_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.editingValue.set($event)); })("keydown.enter", function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_1_Template_kpt_input_number_keydown_enter_0_listener() { i0.ɵɵrestoreView(_r19); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.commitEdit()); })("keydown.escape", function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_1_Template_kpt_input_number_keydown_escape_0_listener() { i0.ɵɵrestoreView(_r19); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.cancelEdit()); });
|
|
9530
|
+
i0.ɵɵelementEnd();
|
|
9531
|
+
} if (rf & 2) {
|
|
9532
|
+
const col_r16 = i0.ɵɵnextContext(3).$implicit;
|
|
9533
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
9534
|
+
i0.ɵɵproperty("value", ctx_r1.editingValue())("min", col_r16.edit.min)("max", col_r16.edit.max)("step", col_r16.edit.step ?? 1);
|
|
9535
|
+
} }
|
|
9536
|
+
function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_2_Template(rf, ctx) { if (rf & 1) {
|
|
9537
|
+
const _r20 = i0.ɵɵgetCurrentView();
|
|
9538
|
+
i0.ɵɵelementStart(0, "kpt-datepicker", 43);
|
|
9539
|
+
i0.ɵɵlistener("valueChange", function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_2_Template_kpt_datepicker_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r20); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.editingValue.set($event)); })("openChange", function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_2_Template_kpt_datepicker_openChange_0_listener($event) { i0.ɵɵrestoreView(_r20); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.onEditorPanelToggle($event)); });
|
|
9540
|
+
i0.ɵɵelementEnd();
|
|
9541
|
+
} if (rf & 2) {
|
|
9542
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
9543
|
+
i0.ɵɵproperty("value", ctx_r1.editingValue() ?? "")("open", ctx_r1.editorPanelOpen());
|
|
9544
|
+
} }
|
|
9545
|
+
function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_3_Template(rf, ctx) { if (rf & 1) {
|
|
9546
|
+
const _r21 = i0.ɵɵgetCurrentView();
|
|
9547
|
+
i0.ɵɵelementStart(0, "kpt-select", 44);
|
|
9548
|
+
i0.ɵɵlistener("valueChange", function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_3_Template_kpt_select_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r21); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.editingValue.set($event)); })("openChange", function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_3_Template_kpt_select_openChange_0_listener($event) { i0.ɵɵrestoreView(_r21); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.onEditorPanelToggle($event)); });
|
|
9549
|
+
i0.ɵɵelementEnd();
|
|
9550
|
+
} if (rf & 2) {
|
|
9551
|
+
const col_r16 = i0.ɵɵnextContext(3).$implicit;
|
|
9552
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
9553
|
+
i0.ɵɵproperty("options", col_r16.edit.options ?? i0.ɵɵpureFunction0(4, _c8))("placeholder", col_r16.edit.placeholder ?? "")("value", ctx_r1.editingValue())("open", ctx_r1.editorPanelOpen());
|
|
9554
|
+
} }
|
|
9555
|
+
function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_4_Template(rf, ctx) { if (rf & 1) {
|
|
9556
|
+
const _r22 = i0.ɵɵgetCurrentView();
|
|
9557
|
+
i0.ɵɵelementStart(0, "kpt-select", 45);
|
|
9558
|
+
i0.ɵɵlistener("valueChange", function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_4_Template_kpt_select_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r22); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.editingValue.set($event)); })("openChange", function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_4_Template_kpt_select_openChange_0_listener($event) { i0.ɵɵrestoreView(_r22); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.onEditorPanelToggle($event)); });
|
|
9559
|
+
i0.ɵɵelementEnd();
|
|
9560
|
+
} if (rf & 2) {
|
|
9561
|
+
const col_r16 = i0.ɵɵnextContext(3).$implicit;
|
|
9562
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
9563
|
+
i0.ɵɵproperty("options", col_r16.edit.options ?? i0.ɵɵpureFunction0(4, _c8))("placeholder", col_r16.edit.placeholder ?? "")("value", ctx_r1.editingValue())("open", ctx_r1.editorPanelOpen());
|
|
9564
|
+
} }
|
|
9565
|
+
function KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
9566
|
+
i0.ɵɵconditionalCreate(0, KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_0_Template, 1, 2, "kpt-input", 36)(1, KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_1_Template, 1, 4, "kpt-input-number", 37)(2, KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_2_Template, 1, 2, "kpt-datepicker", 38)(3, KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_3_Template, 1, 5, "kpt-select", 39)(4, KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Case_4_Template, 1, 5, "kpt-select", 40);
|
|
9567
|
+
} if (rf & 2) {
|
|
9568
|
+
let tmp_19_0;
|
|
9569
|
+
const col_r16 = i0.ɵɵnextContext(2).$implicit;
|
|
9570
|
+
i0.ɵɵconditional((tmp_19_0 = col_r16.edit?.type) === "text" ? 0 : tmp_19_0 === "number" ? 1 : tmp_19_0 === "date" ? 2 : tmp_19_0 === "select" ? 3 : tmp_19_0 === "multiselect" ? 4 : -1);
|
|
9571
|
+
} }
|
|
9104
9572
|
function KptDataTable_ng_template_19_For_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
9105
|
-
i0.ɵɵ
|
|
9573
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
9574
|
+
i0.ɵɵelementStart(0, "div", 35, 4);
|
|
9575
|
+
i0.ɵɵlistener("click", function KptDataTable_ng_template_19_For_4_Conditional_1_Template_div_click_0_listener($event) { return $event.stopPropagation(); })("focusout", function KptDataTable_ng_template_19_For_4_Conditional_1_Template_div_focusout_0_listener($event) { i0.ɵɵrestoreView(_r17); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onEditorFocusOut($event)); });
|
|
9576
|
+
i0.ɵɵconditionalCreate(2, KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_2_Template, 1, 7, "ng-container", 26)(3, KptDataTable_ng_template_19_For_4_Conditional_1_Conditional_3_Template, 5, 1);
|
|
9577
|
+
i0.ɵɵelementEnd();
|
|
9106
9578
|
} if (rf & 2) {
|
|
9579
|
+
let tmp_18_0;
|
|
9107
9580
|
const col_r16 = i0.ɵɵnextContext().$implicit;
|
|
9108
|
-
const
|
|
9109
|
-
|
|
9110
|
-
i0.ɵɵ
|
|
9581
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
9582
|
+
i0.ɵɵadvance(2);
|
|
9583
|
+
i0.ɵɵconditional((tmp_18_0 = ctx_r1.cellEditTemplate(col_r16.field)) ? 2 : 3, tmp_18_0);
|
|
9111
9584
|
} }
|
|
9112
9585
|
function KptDataTable_ng_template_19_For_4_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
9586
|
+
i0.ɵɵelementContainer(0, 26);
|
|
9587
|
+
} if (rf & 2) {
|
|
9588
|
+
const col_r16 = i0.ɵɵnextContext().$implicit;
|
|
9589
|
+
const row_r12 = i0.ɵɵnextContext().$implicit;
|
|
9590
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
9591
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c9, row_r12, ctx_r1.getValue(row_r12, col_r16.field)));
|
|
9592
|
+
} }
|
|
9593
|
+
function KptDataTable_ng_template_19_For_4_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
9113
9594
|
i0.ɵɵtext(0);
|
|
9114
9595
|
} if (rf & 2) {
|
|
9115
9596
|
const col_r16 = i0.ɵɵnextContext().$implicit;
|
|
9116
|
-
const
|
|
9597
|
+
const row_r12 = i0.ɵɵnextContext().$implicit;
|
|
9117
9598
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
9118
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.getValue(
|
|
9599
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.getValue(row_r12, col_r16.field), " ");
|
|
9119
9600
|
} }
|
|
9120
9601
|
function KptDataTable_ng_template_19_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
9121
|
-
i0.ɵɵ
|
|
9122
|
-
i0.ɵɵ
|
|
9602
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
9603
|
+
i0.ɵɵelementStart(0, "td", 33);
|
|
9604
|
+
i0.ɵɵlistener("click", function KptDataTable_ng_template_19_For_4_Template_td_click_0_listener($event) { const col_r16 = i0.ɵɵrestoreView(_r15).$implicit; const row_r12 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.isEditable(col_r16) ? ctx_r1.startEdit(row_r12, col_r16, $event) : null); })("keydown.enter", function KptDataTable_ng_template_19_For_4_Template_td_keydown_enter_0_listener($event) { const col_r16 = i0.ɵɵrestoreView(_r15).$implicit; const row_r12 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.isEditable(col_r16) && !ctx_r1.isEditingCell(row_r12, col_r16.field) ? ctx_r1.startEdit(row_r12, col_r16, $event) : null); });
|
|
9605
|
+
i0.ɵɵconditionalCreate(1, KptDataTable_ng_template_19_For_4_Conditional_1_Template, 4, 1, "div", 34)(2, KptDataTable_ng_template_19_For_4_Conditional_2_Template, 1, 5, "ng-container", 26)(3, KptDataTable_ng_template_19_For_4_Conditional_3_Template, 1, 1);
|
|
9123
9606
|
i0.ɵɵelementEnd();
|
|
9124
9607
|
} if (rf & 2) {
|
|
9125
|
-
let
|
|
9608
|
+
let tmp_22_0;
|
|
9126
9609
|
const col_r16 = ctx.$implicit;
|
|
9127
|
-
const
|
|
9610
|
+
const row_r12 = i0.ɵɵnextContext().$implicit;
|
|
9611
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
9128
9612
|
i0.ɵɵstyleProp("left", ctx_r1.frozenLeft(col_r16.field), "px");
|
|
9129
|
-
i0.ɵɵclassProp("kpt-data-table__cell--frozen", ctx_r1.isFrozen(col_r16.field));
|
|
9130
|
-
i0.ɵɵattribute("data-align", col_r16.align ?? "start");
|
|
9613
|
+
i0.ɵɵclassProp("kpt-data-table__cell--frozen", ctx_r1.isFrozen(col_r16.field))("kpt-data-table__cell--editable", ctx_r1.isEditable(col_r16) && !ctx_r1.isEditingCell(row_r12, col_r16.field));
|
|
9614
|
+
i0.ɵɵattribute("data-align", col_r16.align ?? "start")("tabindex", ctx_r1.isEditable(col_r16) && !ctx_r1.isEditingCell(row_r12, col_r16.field) ? 0 : null)("aria-label", ctx_r1.isEditable(col_r16) && !ctx_r1.isEditingCell(row_r12, col_r16.field) ? ctx_r1.i18n.t("dataTable.editCell", i0.ɵɵpureFunction1(10, _c6, col_r16.header)) : null);
|
|
9131
9615
|
i0.ɵɵadvance();
|
|
9132
|
-
i0.ɵɵconditional((
|
|
9616
|
+
i0.ɵɵconditional(ctx_r1.isEditingCell(row_r12, col_r16.field) ? 1 : (tmp_22_0 = ctx_r1.cellTemplate(col_r16.field)) ? 2 : 3, tmp_22_0);
|
|
9133
9617
|
} }
|
|
9134
9618
|
function KptDataTable_ng_template_19_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
9135
|
-
i0.ɵɵelementStart(0, "tr",
|
|
9136
|
-
i0.ɵɵelementContainer(2,
|
|
9619
|
+
i0.ɵɵelementStart(0, "tr", 29)(1, "td", 46);
|
|
9620
|
+
i0.ɵɵelementContainer(2, 26);
|
|
9137
9621
|
i0.ɵɵelementEnd()();
|
|
9138
9622
|
} if (rf & 2) {
|
|
9139
|
-
const
|
|
9623
|
+
const row_r12 = i0.ɵɵnextContext().$implicit;
|
|
9140
9624
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
9141
9625
|
i0.ɵɵadvance();
|
|
9142
9626
|
i0.ɵɵattribute("colspan", ctx_r1.colspan());
|
|
9143
9627
|
i0.ɵɵadvance();
|
|
9144
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.rowDetailTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction1(3,
|
|
9628
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.rowDetailTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction1(3, _c5, row_r12));
|
|
9145
9629
|
} }
|
|
9146
9630
|
function KptDataTable_ng_template_19_Template(rf, ctx) { if (rf & 1) {
|
|
9147
|
-
const
|
|
9148
|
-
i0.ɵɵelementStart(0, "tr",
|
|
9149
|
-
i0.ɵɵlistener("click", function KptDataTable_ng_template_19_Template_tr_click_0_listener() { const
|
|
9150
|
-
i0.ɵɵconditionalCreate(1, KptDataTable_ng_template_19_Conditional_1_Template, 3, 8, "td",
|
|
9151
|
-
i0.ɵɵconditionalCreate(2, KptDataTable_ng_template_19_Conditional_2_Template, 2, 6, "td",
|
|
9152
|
-
i0.ɵɵrepeaterCreate(3, KptDataTable_ng_template_19_For_4_Template,
|
|
9631
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
9632
|
+
i0.ɵɵelementStart(0, "tr", 27);
|
|
9633
|
+
i0.ɵɵlistener("click", function KptDataTable_ng_template_19_Template_tr_click_0_listener() { const row_r12 = i0.ɵɵrestoreView(_r11).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onRowClick(row_r12)); });
|
|
9634
|
+
i0.ɵɵconditionalCreate(1, KptDataTable_ng_template_19_Conditional_1_Template, 3, 8, "td", 9);
|
|
9635
|
+
i0.ɵɵconditionalCreate(2, KptDataTable_ng_template_19_Conditional_2_Template, 2, 6, "td", 10);
|
|
9636
|
+
i0.ɵɵrepeaterCreate(3, KptDataTable_ng_template_19_For_4_Template, 4, 12, "td", 28, _forTrack0$1);
|
|
9153
9637
|
i0.ɵɵelementEnd();
|
|
9154
|
-
i0.ɵɵconditionalCreate(5, KptDataTable_ng_template_19_Conditional_5_Template, 3, 5, "tr",
|
|
9638
|
+
i0.ɵɵconditionalCreate(5, KptDataTable_ng_template_19_Conditional_5_Template, 3, 5, "tr", 29);
|
|
9155
9639
|
} if (rf & 2) {
|
|
9156
|
-
const
|
|
9640
|
+
const row_r12 = ctx.$implicit;
|
|
9157
9641
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
9158
9642
|
i0.ɵɵstyleProp("height", ctx_r1.virtualScroll() ? ctx_r1.rowHeight() : null, "px");
|
|
9159
|
-
i0.ɵɵclassProp("kpt-data-table__row--selected", ctx_r1.isSelected(
|
|
9643
|
+
i0.ɵɵclassProp("kpt-data-table__row--selected", ctx_r1.isSelected(row_r12))("kpt-data-table__row--expanded", ctx_r1.hasRowDetail() && ctx_r1.isExpanded(row_r12));
|
|
9160
9644
|
i0.ɵɵadvance();
|
|
9161
9645
|
i0.ɵɵconditional(ctx_r1.hasRowDetail() ? 1 : -1);
|
|
9162
9646
|
i0.ɵɵadvance();
|
|
9163
9647
|
i0.ɵɵconditional(ctx_r1.selectable() !== "none" ? 2 : -1);
|
|
9164
9648
|
i0.ɵɵadvance();
|
|
9165
|
-
i0.ɵɵrepeater(ctx_r1.
|
|
9649
|
+
i0.ɵɵrepeater(ctx_r1.visibleOrderedColumns());
|
|
9166
9650
|
i0.ɵɵadvance(2);
|
|
9167
|
-
i0.ɵɵconditional(ctx_r1.hasRowDetail() && ctx_r1.isExpanded(
|
|
9651
|
+
i0.ɵɵconditional(ctx_r1.hasRowDetail() && ctx_r1.isExpanded(row_r12) && !ctx_r1.virtualScroll() ? 5 : -1);
|
|
9168
9652
|
} }
|
|
9169
9653
|
function KptDataTable_ng_template_21_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
9170
|
-
i0.ɵɵelement(0, "th",
|
|
9654
|
+
i0.ɵɵelement(0, "th", 17);
|
|
9171
9655
|
} if (rf & 2) {
|
|
9172
9656
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
9173
9657
|
i0.ɵɵstyleProp("left", ctx_r1.expanderStickyLeft(), "px");
|
|
9174
9658
|
i0.ɵɵclassProp("kpt-data-table__cell--frozen", ctx_r1.hasFrozen());
|
|
9175
9659
|
} }
|
|
9176
9660
|
function KptDataTable_ng_template_21_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
9177
|
-
i0.ɵɵelement(0, "th",
|
|
9661
|
+
i0.ɵɵelement(0, "th", 18);
|
|
9178
9662
|
} if (rf & 2) {
|
|
9179
9663
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
9180
9664
|
i0.ɵɵstyleProp("left", ctx_r1.checkboxStickyLeft(), "px");
|
|
9181
9665
|
i0.ɵɵclassProp("kpt-data-table__cell--frozen", ctx_r1.hasFrozen());
|
|
9182
9666
|
} }
|
|
9183
9667
|
function KptDataTable_ng_template_21_For_4_Case_1_Template(rf, ctx) { if (rf & 1) {
|
|
9184
|
-
const
|
|
9185
|
-
i0.ɵɵelementStart(0, "input",
|
|
9186
|
-
i0.ɵɵlistener("input", function KptDataTable_ng_template_21_For_4_Case_1_Template_input_input_0_listener($event) { i0.ɵɵrestoreView(
|
|
9668
|
+
const _r23 = i0.ɵɵgetCurrentView();
|
|
9669
|
+
i0.ɵɵelementStart(0, "input", 55);
|
|
9670
|
+
i0.ɵɵlistener("input", function KptDataTable_ng_template_21_For_4_Case_1_Template_input_input_0_listener($event) { i0.ɵɵrestoreView(_r23); const col_r24 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.setColumnFilter(col_r24.field, $event.target.value)); })("click", function KptDataTable_ng_template_21_For_4_Case_1_Template_input_click_0_listener($event) { return $event.stopPropagation(); });
|
|
9187
9671
|
i0.ɵɵelementEnd();
|
|
9188
9672
|
} if (rf & 2) {
|
|
9189
|
-
const
|
|
9673
|
+
const col_r24 = i0.ɵɵnextContext().$implicit;
|
|
9190
9674
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
9191
|
-
i0.ɵɵproperty("value", ctx_r1.columnFilters()[
|
|
9192
|
-
i0.ɵɵattribute("placeholder",
|
|
9675
|
+
i0.ɵɵproperty("value", ctx_r1.columnFilters()[col_r24.field] || "");
|
|
9676
|
+
i0.ɵɵattribute("placeholder", col_r24.filter.placeholder || "")("aria-label", ctx_r1.i18n.t("dataTable.filter", i0.ɵɵpureFunction1(3, _c6, col_r24.header)));
|
|
9193
9677
|
} }
|
|
9194
9678
|
function KptDataTable_ng_template_21_For_4_Case_2_Template(rf, ctx) { if (rf & 1) {
|
|
9195
|
-
const
|
|
9196
|
-
i0.ɵɵelementStart(0, "input",
|
|
9197
|
-
i0.ɵɵlistener("input", function KptDataTable_ng_template_21_For_4_Case_2_Template_input_input_0_listener($event) { i0.ɵɵrestoreView(
|
|
9679
|
+
const _r25 = i0.ɵɵgetCurrentView();
|
|
9680
|
+
i0.ɵɵelementStart(0, "input", 56);
|
|
9681
|
+
i0.ɵɵlistener("input", function KptDataTable_ng_template_21_For_4_Case_2_Template_input_input_0_listener($event) { i0.ɵɵrestoreView(_r25); const col_r24 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onNumberFilter(col_r24.field, $event)); })("click", function KptDataTable_ng_template_21_For_4_Case_2_Template_input_click_0_listener($event) { return $event.stopPropagation(); });
|
|
9198
9682
|
i0.ɵɵelementEnd();
|
|
9199
9683
|
} if (rf & 2) {
|
|
9200
|
-
const
|
|
9684
|
+
const col_r24 = i0.ɵɵnextContext().$implicit;
|
|
9201
9685
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
9202
|
-
i0.ɵɵproperty("value", ctx_r1.columnFilters()[
|
|
9203
|
-
i0.ɵɵattribute("placeholder",
|
|
9686
|
+
i0.ɵɵproperty("value", ctx_r1.columnFilters()[col_r24.field] || "");
|
|
9687
|
+
i0.ɵɵattribute("placeholder", col_r24.filter.placeholder || "")("aria-label", ctx_r1.i18n.t("dataTable.filter", i0.ɵɵpureFunction1(3, _c6, col_r24.header)));
|
|
9204
9688
|
} }
|
|
9205
9689
|
function KptDataTable_ng_template_21_For_4_Case_3_Template(rf, ctx) { if (rf & 1) {
|
|
9206
|
-
const
|
|
9207
|
-
i0.ɵɵelementStart(0, "kpt-select",
|
|
9208
|
-
i0.ɵɵlistener("valueChange", function KptDataTable_ng_template_21_For_4_Case_3_Template_kpt_select_valueChange_0_listener($event) { i0.ɵɵrestoreView(
|
|
9690
|
+
const _r26 = i0.ɵɵgetCurrentView();
|
|
9691
|
+
i0.ɵɵelementStart(0, "kpt-select", 57);
|
|
9692
|
+
i0.ɵɵlistener("valueChange", function KptDataTable_ng_template_21_For_4_Case_3_Template_kpt_select_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r26); const col_r24 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.setColumnFilter(col_r24.field, $event)); });
|
|
9209
9693
|
i0.ɵɵelementEnd();
|
|
9210
9694
|
} if (rf & 2) {
|
|
9211
|
-
const
|
|
9695
|
+
const col_r24 = i0.ɵɵnextContext().$implicit;
|
|
9212
9696
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
9213
|
-
i0.ɵɵproperty("options",
|
|
9697
|
+
i0.ɵɵproperty("options", col_r24.filter.options || i0.ɵɵpureFunction0(4, _c8))("multiple", !!col_r24.filter.multiple)("placeholder", col_r24.filter.placeholder || ctx_r1.i18n.t("dataTable.all"))("value", ctx_r1.columnFilters()[col_r24.field] ?? null);
|
|
9214
9698
|
} }
|
|
9215
9699
|
function KptDataTable_ng_template_21_For_4_Case_4_Template(rf, ctx) { if (rf & 1) {
|
|
9216
|
-
const
|
|
9217
|
-
i0.ɵɵelementStart(0, "div",
|
|
9218
|
-
i0.ɵɵlistener("input", function KptDataTable_ng_template_21_For_4_Case_4_Template_input_input_1_listener($event) { i0.ɵɵrestoreView(
|
|
9700
|
+
const _r27 = i0.ɵɵgetCurrentView();
|
|
9701
|
+
i0.ɵɵelementStart(0, "div", 52)(1, "input", 56);
|
|
9702
|
+
i0.ɵɵlistener("input", function KptDataTable_ng_template_21_For_4_Case_4_Template_input_input_1_listener($event) { i0.ɵɵrestoreView(_r27); const col_r24 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.setRangeFilter(col_r24.field, "min", $event)); })("click", function KptDataTable_ng_template_21_For_4_Case_4_Template_input_click_1_listener($event) { return $event.stopPropagation(); });
|
|
9219
9703
|
i0.ɵɵelementEnd();
|
|
9220
|
-
i0.ɵɵelementStart(2, "input",
|
|
9221
|
-
i0.ɵɵlistener("input", function KptDataTable_ng_template_21_For_4_Case_4_Template_input_input_2_listener($event) { i0.ɵɵrestoreView(
|
|
9704
|
+
i0.ɵɵelementStart(2, "input", 56);
|
|
9705
|
+
i0.ɵɵlistener("input", function KptDataTable_ng_template_21_For_4_Case_4_Template_input_input_2_listener($event) { i0.ɵɵrestoreView(_r27); const col_r24 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.setRangeFilter(col_r24.field, "max", $event)); })("click", function KptDataTable_ng_template_21_For_4_Case_4_Template_input_click_2_listener($event) { return $event.stopPropagation(); });
|
|
9222
9706
|
i0.ɵɵelementEnd()();
|
|
9223
9707
|
} if (rf & 2) {
|
|
9224
|
-
const
|
|
9708
|
+
const col_r24 = i0.ɵɵnextContext().$implicit;
|
|
9225
9709
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
9226
9710
|
i0.ɵɵadvance();
|
|
9227
|
-
i0.ɵɵproperty("value", ctx_r1.rangeVal(
|
|
9228
|
-
i0.ɵɵattribute("placeholder", ctx_r1.i18n.t("dataTable.min"))("aria-label", ctx_r1.i18n.t("dataTable.filterMin", i0.ɵɵpureFunction1(6,
|
|
9711
|
+
i0.ɵɵproperty("value", ctx_r1.rangeVal(col_r24.field).min);
|
|
9712
|
+
i0.ɵɵattribute("placeholder", ctx_r1.i18n.t("dataTable.min"))("aria-label", ctx_r1.i18n.t("dataTable.filterMin", i0.ɵɵpureFunction1(6, _c6, col_r24.header)));
|
|
9229
9713
|
i0.ɵɵadvance();
|
|
9230
|
-
i0.ɵɵproperty("value", ctx_r1.rangeVal(
|
|
9231
|
-
i0.ɵɵattribute("placeholder", ctx_r1.i18n.t("dataTable.max"))("aria-label", ctx_r1.i18n.t("dataTable.filterMax", i0.ɵɵpureFunction1(8,
|
|
9714
|
+
i0.ɵɵproperty("value", ctx_r1.rangeVal(col_r24.field).max);
|
|
9715
|
+
i0.ɵɵattribute("placeholder", ctx_r1.i18n.t("dataTable.max"))("aria-label", ctx_r1.i18n.t("dataTable.filterMax", i0.ɵɵpureFunction1(8, _c6, col_r24.header)));
|
|
9232
9716
|
} }
|
|
9233
9717
|
function KptDataTable_ng_template_21_For_4_Case_5_Template(rf, ctx) { if (rf & 1) {
|
|
9234
|
-
const
|
|
9235
|
-
i0.ɵɵelementStart(0, "div",
|
|
9718
|
+
const _r28 = i0.ɵɵgetCurrentView();
|
|
9719
|
+
i0.ɵɵelementStart(0, "div", 58);
|
|
9236
9720
|
i0.ɵɵlistener("click", function KptDataTable_ng_template_21_For_4_Case_5_Template_div_click_0_listener($event) { return $event.stopPropagation(); });
|
|
9237
|
-
i0.ɵɵelementStart(1, "kpt-slider",
|
|
9238
|
-
i0.ɵɵlistener("valueChange", function KptDataTable_ng_template_21_For_4_Case_5_Template_kpt_slider_valueChange_1_listener($event) { i0.ɵɵrestoreView(
|
|
9721
|
+
i0.ɵɵelementStart(1, "kpt-slider", 59);
|
|
9722
|
+
i0.ɵɵlistener("valueChange", function KptDataTable_ng_template_21_For_4_Case_5_Template_kpt_slider_valueChange_1_listener($event) { i0.ɵɵrestoreView(_r28); const col_r24 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.setColumnFilter(col_r24.field, $event)); });
|
|
9239
9723
|
i0.ɵɵelementEnd()();
|
|
9240
9724
|
} if (rf & 2) {
|
|
9241
|
-
const
|
|
9725
|
+
const col_r24 = i0.ɵɵnextContext().$implicit;
|
|
9242
9726
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
9243
9727
|
i0.ɵɵadvance();
|
|
9244
|
-
i0.ɵɵproperty("min",
|
|
9728
|
+
i0.ɵɵproperty("min", col_r24.filter.min ?? 0)("max", col_r24.filter.max ?? 100)("step", col_r24.filter.step ?? 1)("value", ctx_r1.sliderVal(col_r24));
|
|
9245
9729
|
} }
|
|
9246
9730
|
function KptDataTable_ng_template_21_For_4_Case_6_Template(rf, ctx) { if (rf & 1) {
|
|
9247
|
-
const
|
|
9248
|
-
i0.ɵɵelementStart(0, "kpt-date-range",
|
|
9249
|
-
i0.ɵɵlistener("valueChange", function KptDataTable_ng_template_21_For_4_Case_6_Template_kpt_date_range_valueChange_0_listener($event) { i0.ɵɵrestoreView(
|
|
9731
|
+
const _r29 = i0.ɵɵgetCurrentView();
|
|
9732
|
+
i0.ɵɵelementStart(0, "kpt-date-range", 60);
|
|
9733
|
+
i0.ɵɵlistener("valueChange", function KptDataTable_ng_template_21_For_4_Case_6_Template_kpt_date_range_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r29); const col_r24 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.setColumnFilter(col_r24.field, $event)); });
|
|
9250
9734
|
i0.ɵɵelementEnd();
|
|
9251
9735
|
} if (rf & 2) {
|
|
9252
|
-
const
|
|
9736
|
+
const col_r24 = i0.ɵɵnextContext().$implicit;
|
|
9253
9737
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
9254
|
-
i0.ɵɵproperty("placeholder",
|
|
9738
|
+
i0.ɵɵproperty("placeholder", col_r24.filter.placeholder || ctx_r1.i18n.t("dataTable.dateRange"))("value", ctx_r1.columnFilters()[col_r24.field] || i0.ɵɵpureFunction0(2, _c10));
|
|
9255
9739
|
} }
|
|
9256
9740
|
function KptDataTable_ng_template_21_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
9257
9741
|
i0.ɵɵelementStart(0, "th");
|
|
9258
|
-
i0.ɵɵconditionalCreate(1, KptDataTable_ng_template_21_For_4_Case_1_Template, 1, 5, "input",
|
|
9742
|
+
i0.ɵɵconditionalCreate(1, KptDataTable_ng_template_21_For_4_Case_1_Template, 1, 5, "input", 49)(2, KptDataTable_ng_template_21_For_4_Case_2_Template, 1, 5, "input", 50)(3, KptDataTable_ng_template_21_For_4_Case_3_Template, 1, 5, "kpt-select", 51)(4, KptDataTable_ng_template_21_For_4_Case_4_Template, 3, 10, "div", 52)(5, KptDataTable_ng_template_21_For_4_Case_5_Template, 2, 4, "div", 53)(6, KptDataTable_ng_template_21_For_4_Case_6_Template, 1, 3, "kpt-date-range", 54);
|
|
9259
9743
|
i0.ɵɵelementEnd();
|
|
9260
9744
|
} if (rf & 2) {
|
|
9261
9745
|
let tmp_19_0;
|
|
9262
|
-
const
|
|
9746
|
+
const col_r24 = ctx.$implicit;
|
|
9263
9747
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
9264
|
-
i0.ɵɵstyleProp("width",
|
|
9265
|
-
i0.ɵɵclassProp("kpt-data-table__cell--frozen", ctx_r1.isFrozen(
|
|
9266
|
-
i0.ɵɵattribute("data-align",
|
|
9748
|
+
i0.ɵɵstyleProp("width", col_r24.width)("left", ctx_r1.frozenLeft(col_r24.field), "px");
|
|
9749
|
+
i0.ɵɵclassProp("kpt-data-table__cell--frozen", ctx_r1.isFrozen(col_r24.field));
|
|
9750
|
+
i0.ɵɵattribute("data-align", col_r24.align ?? "start");
|
|
9267
9751
|
i0.ɵɵadvance();
|
|
9268
|
-
i0.ɵɵconditional((tmp_19_0 =
|
|
9752
|
+
i0.ɵɵconditional((tmp_19_0 = col_r24.filter?.type) === "text" ? 1 : tmp_19_0 === "number" ? 2 : tmp_19_0 === "select" ? 3 : tmp_19_0 === "numberRange" ? 4 : tmp_19_0 === "slider" ? 5 : tmp_19_0 === "dateRange" ? 6 : -1);
|
|
9269
9753
|
} }
|
|
9270
9754
|
function KptDataTable_ng_template_21_Template(rf, ctx) { if (rf & 1) {
|
|
9271
|
-
i0.ɵɵelementStart(0, "tr",
|
|
9272
|
-
i0.ɵɵconditionalCreate(1, KptDataTable_ng_template_21_Conditional_1_Template, 1, 4, "th",
|
|
9273
|
-
i0.ɵɵconditionalCreate(2, KptDataTable_ng_template_21_Conditional_2_Template, 1, 4, "th",
|
|
9274
|
-
i0.ɵɵrepeaterCreate(3, KptDataTable_ng_template_21_For_4_Template, 7, 8, "th",
|
|
9755
|
+
i0.ɵɵelementStart(0, "tr", 47);
|
|
9756
|
+
i0.ɵɵconditionalCreate(1, KptDataTable_ng_template_21_Conditional_1_Template, 1, 4, "th", 9);
|
|
9757
|
+
i0.ɵɵconditionalCreate(2, KptDataTable_ng_template_21_Conditional_2_Template, 1, 4, "th", 10);
|
|
9758
|
+
i0.ɵɵrepeaterCreate(3, KptDataTable_ng_template_21_For_4_Template, 7, 8, "th", 48, _forTrack0$1);
|
|
9275
9759
|
i0.ɵɵelementEnd();
|
|
9276
9760
|
} if (rf & 2) {
|
|
9277
9761
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -9280,20 +9764,34 @@ function KptDataTable_ng_template_21_Template(rf, ctx) { if (rf & 1) {
|
|
|
9280
9764
|
i0.ɵɵadvance();
|
|
9281
9765
|
i0.ɵɵconditional(ctx_r1.selectable() !== "none" ? 2 : -1);
|
|
9282
9766
|
i0.ɵɵadvance();
|
|
9283
|
-
i0.ɵɵrepeater(ctx_r1.
|
|
9767
|
+
i0.ɵɵrepeater(ctx_r1.visibleOrderedColumns());
|
|
9284
9768
|
} }
|
|
9285
9769
|
function KptDataTable_Conditional_23_Template(rf, ctx) { if (rf & 1) {
|
|
9286
|
-
const
|
|
9287
|
-
i0.ɵɵelementStart(0, "
|
|
9288
|
-
i0.ɵɵ
|
|
9289
|
-
i0.ɵɵ
|
|
9770
|
+
const _r30 = i0.ɵɵgetCurrentView();
|
|
9771
|
+
i0.ɵɵelementStart(0, "div", 12);
|
|
9772
|
+
i0.ɵɵprojection(1);
|
|
9773
|
+
i0.ɵɵelementStart(2, "kpt-paginator", 61);
|
|
9774
|
+
i0.ɵɵlistener("pageIndexChange", function KptDataTable_Conditional_23_Template_kpt_paginator_pageIndexChange_2_listener($event) { i0.ɵɵrestoreView(_r30); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.pageIndex.set($event)); })("pageSizeChange", function KptDataTable_Conditional_23_Template_kpt_paginator_pageSizeChange_2_listener($event) { i0.ɵɵrestoreView(_r30); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.pageSizeState.set($event)); });
|
|
9775
|
+
i0.ɵɵelementEnd()();
|
|
9290
9776
|
} if (rf & 2) {
|
|
9291
9777
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
9778
|
+
i0.ɵɵadvance(2);
|
|
9292
9779
|
i0.ɵɵproperty("length", ctx_r1.filteredCount())("pageIndex", ctx_r1.pageIndex())("pageSize", ctx_r1.pageSizeState())("pageSizeOptions", ctx_r1.pageSizeOptions());
|
|
9293
9780
|
} }
|
|
9294
9781
|
const REM_PX = 16;
|
|
9295
9782
|
const CHECKBOX_FROZEN_W = 3; // rem
|
|
9296
9783
|
const EXPANDER_FROZEN_W = 2.5; // rem
|
|
9784
|
+
/** Edytory renderujące panel w CDK Overlay — otwierane od razu i zatwierdzane na zamknięciu panelu. */
|
|
9785
|
+
const OVERLAY_EDITORS = ['date', 'select', 'multiselect'];
|
|
9786
|
+
/** Tablice (multiselect) porównujemy po zawartości, resztę po referencji. */
|
|
9787
|
+
function sameEditValue(a, b) {
|
|
9788
|
+
if (a === b)
|
|
9789
|
+
return true;
|
|
9790
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
9791
|
+
return a.length === b.length && a.every((v, i) => v === b[i]);
|
|
9792
|
+
}
|
|
9793
|
+
return false;
|
|
9794
|
+
}
|
|
9297
9795
|
/**
|
|
9298
9796
|
* Flagowa tabela danych Koncept UI: kolumny konfiguracją, sortowanie,
|
|
9299
9797
|
* filtr globalny, paginacja, zaznaczanie wierszy i własne szablony komórek (`kptCell`).
|
|
@@ -9362,9 +9860,18 @@ class KptDataTable {
|
|
|
9362
9860
|
/** Rozwinięte wiersze (dwukierunkowo). */
|
|
9363
9861
|
this.expandedRows = model([], /* @ts-ignore */
|
|
9364
9862
|
...(ngDevMode ? [{ debugName: "expandedRows" }] : /* istanbul ignore next */ []));
|
|
9863
|
+
/**
|
|
9864
|
+
* Pola (`KptColumn.field`) aktualnie ukrytych kolumn (dwukierunkowo). Sam komponent nie
|
|
9865
|
+
* dostarcza UI do zarządzania tym stanem — to hak do podpięcia zewnętrznego przełącznika
|
|
9866
|
+
* kolumn (patrz przykład „Dostosowywanie kolumn" w playground).
|
|
9867
|
+
*/
|
|
9868
|
+
this.hiddenFields = model([], /* @ts-ignore */
|
|
9869
|
+
...(ngDevMode ? [{ debugName: "hiddenFields" }] : /* istanbul ignore next */ []));
|
|
9365
9870
|
this.rowClick = output();
|
|
9366
9871
|
/** Emitowane w trybie lazy przy zmianie sortowania/filtra/strony. */
|
|
9367
9872
|
this.lazyLoad = output();
|
|
9873
|
+
/** Emitowane po zatwierdzeniu edycji komórki (tylko gdy wartość faktycznie się zmieniła). */
|
|
9874
|
+
this.cellEdit = output();
|
|
9368
9875
|
this.i18n = inject(KptI18n);
|
|
9369
9876
|
/** Komunikat pustej tabeli (input albo domyślny z i18n). */
|
|
9370
9877
|
this.emptyText = computed(() => this.emptyMessage() ?? this.i18n.t('dataTable.empty'), /* @ts-ignore */
|
|
@@ -9372,6 +9879,9 @@ class KptDataTable {
|
|
|
9372
9879
|
/** Kolumny w bieżącej kolejności (po ewentualnym przestawieniu). */
|
|
9373
9880
|
this.orderedColumns = linkedSignal(() => this.columns(), /* @ts-ignore */
|
|
9374
9881
|
...(ngDevMode ? [{ debugName: "orderedColumns" }] : /* istanbul ignore next */ []));
|
|
9882
|
+
/** Kolumny w bieżącej kolejności, bez tych ukrytych przez `hiddenFields` — do renderowania i eksportu. */
|
|
9883
|
+
this.visibleOrderedColumns = computed(() => this.orderedColumns().filter((c) => !this.hiddenFields().includes(c.field)), /* @ts-ignore */
|
|
9884
|
+
...(ngDevMode ? [{ debugName: "visibleOrderedColumns" }] : /* istanbul ignore next */ []));
|
|
9375
9885
|
// ── Wirtualizacja (ręczne okno wierszy) ──
|
|
9376
9886
|
this.scrollEl = viewChild('scrollEl', /* @ts-ignore */
|
|
9377
9887
|
...(ngDevMode ? [{ debugName: "scrollEl" }] : /* istanbul ignore next */ []));
|
|
@@ -9385,6 +9895,16 @@ class KptDataTable {
|
|
|
9385
9895
|
...(ngDevMode ? [{ debugName: "theadEl" }] : /* istanbul ignore next */ []));
|
|
9386
9896
|
this.theadOffset = signal(0, /* @ts-ignore */
|
|
9387
9897
|
...(ngDevMode ? [{ debugName: "theadOffset" }] : /* istanbul ignore next */ []));
|
|
9898
|
+
// ── Edycja inline komórek ──
|
|
9899
|
+
this.editingCell = signal(null, /* @ts-ignore */
|
|
9900
|
+
...(ngDevMode ? [{ debugName: "editingCell" }] : /* istanbul ignore next */ []));
|
|
9901
|
+
this.editingValue = signal(null, /* @ts-ignore */
|
|
9902
|
+
...(ngDevMode ? [{ debugName: "editingValue" }] : /* istanbul ignore next */ []));
|
|
9903
|
+
/** Czy panel edytora overlayowego (date/select/multiselect) jest otwarty. */
|
|
9904
|
+
this.editorPanelOpen = signal(false, /* @ts-ignore */
|
|
9905
|
+
...(ngDevMode ? [{ debugName: "editorPanelOpen" }] : /* istanbul ignore next */ []));
|
|
9906
|
+
this.editorHost = viewChild('editorHost', /* @ts-ignore */
|
|
9907
|
+
...(ngDevMode ? [{ debugName: "editorHost" }] : /* istanbul ignore next */ []));
|
|
9388
9908
|
this.virtualStart = computed(() => Math.max(0, Math.floor(this.scrollTop() / this.rowHeight()) - this.buffer), /* @ts-ignore */
|
|
9389
9909
|
...(ngDevMode ? [{ debugName: "virtualStart" }] : /* istanbul ignore next */ []));
|
|
9390
9910
|
this.virtualEnd = computed(() => {
|
|
@@ -9400,8 +9920,12 @@ class KptDataTable {
|
|
|
9400
9920
|
this.bottomPad = computed(() => (this.sorted().length - this.virtualEnd()) * this.rowHeight(), /* @ts-ignore */
|
|
9401
9921
|
...(ngDevMode ? [{ debugName: "bottomPad" }] : /* istanbul ignore next */ []));
|
|
9402
9922
|
// ── Przestawianie kolumn (natywny HTML5 drag-and-drop; działa w trybie zoneless) ──
|
|
9403
|
-
|
|
9404
|
-
|
|
9923
|
+
/**
|
|
9924
|
+
* Pole przeciąganej kolumny (nie indeks — przy ukrytych kolumnach `$index` z pętli
|
|
9925
|
+
* `visibleOrderedColumns()` nie odpowiada pozycji w pełnej `orderedColumns()`).
|
|
9926
|
+
*/
|
|
9927
|
+
this.dragField = signal(null, /* @ts-ignore */
|
|
9928
|
+
...(ngDevMode ? [{ debugName: "dragField" }] : /* istanbul ignore next */ []));
|
|
9405
9929
|
// ── Szablony komórek ──
|
|
9406
9930
|
this.cellDefs = contentChildren(KptCellDef, /* @ts-ignore */
|
|
9407
9931
|
...(ngDevMode ? [{ debugName: "cellDefs" }] : /* istanbul ignore next */ []));
|
|
@@ -9412,6 +9936,21 @@ class KptDataTable {
|
|
|
9412
9936
|
return map;
|
|
9413
9937
|
}, /* @ts-ignore */
|
|
9414
9938
|
...(ngDevMode ? [{ debugName: "cellMap" }] : /* istanbul ignore next */ []));
|
|
9939
|
+
// ── Własne edytory komórek (furtka poza wbudowane typy `column.edit.type`) ──
|
|
9940
|
+
this.cellEditDefs = contentChildren(KptCellEditDef, /* @ts-ignore */
|
|
9941
|
+
...(ngDevMode ? [{ debugName: "cellEditDefs" }] : /* istanbul ignore next */ []));
|
|
9942
|
+
this.cellEditMap = computed(() => {
|
|
9943
|
+
const map = new Map();
|
|
9944
|
+
for (const def of this.cellEditDefs())
|
|
9945
|
+
map.set(def.kptCellEdit(), def.template);
|
|
9946
|
+
return map;
|
|
9947
|
+
}, /* @ts-ignore */
|
|
9948
|
+
...(ngDevMode ? [{ debugName: "cellEditMap" }] : /* istanbul ignore next */ []));
|
|
9949
|
+
/** Dla własnych szablonów (`kptCellEdit`): ustaw wartość i od razu zatwierdź. */
|
|
9950
|
+
this.commitEditValue = (value) => {
|
|
9951
|
+
this.editingValue.set(value);
|
|
9952
|
+
this.commitEdit();
|
|
9953
|
+
};
|
|
9415
9954
|
// ── Rozwijane wiersze ──
|
|
9416
9955
|
this.rowDetailDef = contentChild(KptRowDetailDef, /* @ts-ignore */
|
|
9417
9956
|
...(ngDevMode ? [{ debugName: "rowDetailDef" }] : /* istanbul ignore next */ []));
|
|
@@ -9482,7 +10021,7 @@ class KptDataTable {
|
|
|
9482
10021
|
return rows.slice(start, start + size);
|
|
9483
10022
|
}, /* @ts-ignore */
|
|
9484
10023
|
...(ngDevMode ? [{ debugName: "paged" }] : /* istanbul ignore next */ []));
|
|
9485
|
-
this.colspan = computed(() => this.
|
|
10024
|
+
this.colspan = computed(() => this.visibleOrderedColumns().length +
|
|
9486
10025
|
(this.selectable() !== 'none' ? 1 : 0) +
|
|
9487
10026
|
(this.hasRowDetail() ? 1 : 0), /* @ts-ignore */
|
|
9488
10027
|
...(ngDevMode ? [{ debugName: "colspan" }] : /* istanbul ignore next */ []));
|
|
@@ -9502,7 +10041,7 @@ class KptDataTable {
|
|
|
9502
10041
|
this.frozenOffsets = computed(() => {
|
|
9503
10042
|
const map = new Map();
|
|
9504
10043
|
let acc = this.leadingStickyWidth();
|
|
9505
|
-
for (const col of this.
|
|
10044
|
+
for (const col of this.visibleOrderedColumns()) {
|
|
9506
10045
|
if (!col.frozen)
|
|
9507
10046
|
break; // tylko wiodące, sąsiadujące
|
|
9508
10047
|
map.set(col.field, acc);
|
|
@@ -9560,11 +10099,19 @@ class KptDataTable {
|
|
|
9560
10099
|
afterRenderEffect(() => {
|
|
9561
10100
|
this.filterRowPosition();
|
|
9562
10101
|
this.hasColumnFilters();
|
|
9563
|
-
this.
|
|
10102
|
+
this.visibleOrderedColumns();
|
|
9564
10103
|
const first = this.theadEl()?.nativeElement?.rows?.[0];
|
|
9565
10104
|
if (first)
|
|
9566
10105
|
this.theadOffset.set(first.offsetHeight);
|
|
9567
10106
|
});
|
|
10107
|
+
// Wejście w edycję komórki → przenieś fokus na jej edytor.
|
|
10108
|
+
afterRenderEffect(() => {
|
|
10109
|
+
if (!this.editingCell())
|
|
10110
|
+
return;
|
|
10111
|
+
this.editorHost()
|
|
10112
|
+
?.nativeElement.querySelector('input, .kpt-select, [tabindex]')
|
|
10113
|
+
?.focus();
|
|
10114
|
+
});
|
|
9568
10115
|
}
|
|
9569
10116
|
onScroll(event) {
|
|
9570
10117
|
if (!this.virtualScroll())
|
|
@@ -9577,10 +10124,10 @@ class KptDataTable {
|
|
|
9577
10124
|
isColDraggable(col) {
|
|
9578
10125
|
return this.reorderable() && !col.frozen;
|
|
9579
10126
|
}
|
|
9580
|
-
/** Liczba wiodących kolumn zamrożonych — poza nie wolno upuszczać ani ich przesuwać. */
|
|
10127
|
+
/** Liczba wiodących widocznych kolumn zamrożonych — poza nie wolno upuszczać ani ich przesuwać. */
|
|
9581
10128
|
frozenLeadCount() {
|
|
9582
10129
|
let n = 0;
|
|
9583
|
-
for (const col of this.
|
|
10130
|
+
for (const col of this.visibleOrderedColumns()) {
|
|
9584
10131
|
if (col.frozen)
|
|
9585
10132
|
n++;
|
|
9586
10133
|
else
|
|
@@ -9588,45 +10135,48 @@ class KptDataTable {
|
|
|
9588
10135
|
}
|
|
9589
10136
|
return n;
|
|
9590
10137
|
}
|
|
9591
|
-
onColDragStart(
|
|
9592
|
-
|
|
10138
|
+
onColDragStart(field, event) {
|
|
10139
|
+
const col = this.orderedColumns().find((c) => c.field === field);
|
|
10140
|
+
if (col?.frozen)
|
|
9593
10141
|
return; // frozen nieprzeciągalne
|
|
9594
|
-
this.
|
|
9595
|
-
event.dataTransfer?.setData('text/plain',
|
|
10142
|
+
this.dragField.set(field);
|
|
10143
|
+
event.dataTransfer?.setData('text/plain', field);
|
|
9596
10144
|
if (event.dataTransfer)
|
|
9597
10145
|
event.dataTransfer.effectAllowed = 'move';
|
|
9598
10146
|
}
|
|
9599
|
-
onColDragOver(
|
|
10147
|
+
onColDragOver(field, event) {
|
|
9600
10148
|
// Zezwól na upuszczenie tylko poza obszarem kolumn zamrożonych.
|
|
9601
|
-
|
|
10149
|
+
const visIndex = this.visibleOrderedColumns().findIndex((c) => c.field === field);
|
|
10150
|
+
if (this.dragField() !== null && visIndex >= this.frozenLeadCount())
|
|
9602
10151
|
event.preventDefault();
|
|
9603
10152
|
}
|
|
9604
|
-
onColDrop(
|
|
10153
|
+
onColDrop(field, event) {
|
|
9605
10154
|
event.preventDefault();
|
|
9606
|
-
const from = this.
|
|
9607
|
-
if (from === null || from ===
|
|
10155
|
+
const from = this.dragField();
|
|
10156
|
+
if (from === null || from === field)
|
|
9608
10157
|
return;
|
|
9609
|
-
|
|
10158
|
+
const visIndex = this.visibleOrderedColumns().findIndex((c) => c.field === field);
|
|
10159
|
+
if (visIndex < this.frozenLeadCount())
|
|
9610
10160
|
return; // nie wsuwaj przed/pomiędzy kolumny zamrożone
|
|
9611
10161
|
const cols = [...this.orderedColumns()];
|
|
9612
|
-
const
|
|
9613
|
-
cols.
|
|
10162
|
+
const fromIdx = cols.findIndex((c) => c.field === from);
|
|
10163
|
+
const toIdx = cols.findIndex((c) => c.field === field);
|
|
10164
|
+
if (fromIdx === -1 || toIdx === -1)
|
|
10165
|
+
return;
|
|
10166
|
+
const [moved] = cols.splice(fromIdx, 1);
|
|
10167
|
+
cols.splice(toIdx, 0, moved);
|
|
9614
10168
|
this.orderedColumns.set(cols);
|
|
9615
|
-
this.
|
|
10169
|
+
this.dragField.set(null);
|
|
9616
10170
|
}
|
|
9617
10171
|
onColDragEnd() {
|
|
9618
|
-
this.
|
|
10172
|
+
this.dragField.set(null);
|
|
9619
10173
|
}
|
|
9620
10174
|
exportCsv() {
|
|
9621
|
-
const cols = this.
|
|
10175
|
+
const cols = this.visibleOrderedColumns();
|
|
9622
10176
|
const rows = this.lazy() ? this.data() : this.sorted();
|
|
9623
|
-
const
|
|
9624
|
-
const text = String(value ?? '');
|
|
9625
|
-
return /[",\n;]/.test(text) ? `"${text.replace(/"/g, '""')}"` : text;
|
|
9626
|
-
};
|
|
9627
|
-
const header = cols.map((c) => escape(c.header)).join(';');
|
|
10177
|
+
const header = cols.map((c) => escapeCsvCell(c.header)).join(';');
|
|
9628
10178
|
const body = rows
|
|
9629
|
-
.map((row) => cols.map((c) =>
|
|
10179
|
+
.map((row) => cols.map((c) => escapeCsvCell(row[c.field])).join(';'))
|
|
9630
10180
|
.join('\n');
|
|
9631
10181
|
// BOM () — poprawne polskie znaki w Excelu.
|
|
9632
10182
|
const csv = `${header}\n${body}`;
|
|
@@ -9641,6 +10191,72 @@ class KptDataTable {
|
|
|
9641
10191
|
cellTemplate(field) {
|
|
9642
10192
|
return this.cellMap().get(field) ?? null;
|
|
9643
10193
|
}
|
|
10194
|
+
cellEditTemplate(field) {
|
|
10195
|
+
return this.cellEditMap().get(field) ?? null;
|
|
10196
|
+
}
|
|
10197
|
+
// ── Edycja inline komórek ──
|
|
10198
|
+
isEditable(col) {
|
|
10199
|
+
return !!col.edit || !!this.cellEditTemplate(col.field);
|
|
10200
|
+
}
|
|
10201
|
+
isEditingCell(row, field) {
|
|
10202
|
+
const e = this.editingCell();
|
|
10203
|
+
return !!e && e.field === field && this.sameRow(e.row, row);
|
|
10204
|
+
}
|
|
10205
|
+
startEdit(row, col, event) {
|
|
10206
|
+
event.stopPropagation();
|
|
10207
|
+
if (!this.isEditable(col) || this.isEditingCell(row, col.field))
|
|
10208
|
+
return;
|
|
10209
|
+
this.editingCell.set({ row, field: col.field });
|
|
10210
|
+
this.editingValue.set(this.getValue(row, col.field));
|
|
10211
|
+
// Edytory na overlayu otwieramy od razu. To nie kosmetyka: backdrop CDK sprawia, że każdy klik
|
|
10212
|
+
// poza edytorem zamyka panel, a więc zatwierdza i zamyka edycję — bez tego edytor z zamkniętym
|
|
10213
|
+
// panelem potrafiłby zostać otwarty w nieskończoność.
|
|
10214
|
+
const type = col.edit?.type;
|
|
10215
|
+
this.editorPanelOpen.set(!!type && OVERLAY_EDITORS.includes(type));
|
|
10216
|
+
}
|
|
10217
|
+
/**
|
|
10218
|
+
* Panel edytora zamknięty (wybór, klik poza, Esc) → zatwierdź. Celowo NIE wieszamy tego na
|
|
10219
|
+
* `touch`: ten leci też z blur triggera, czyli już przy naciśnięciu myszy na opcji w panelu —
|
|
10220
|
+
* edytor ginąłby, zanim kliknięcie zdąży wybrać wartość.
|
|
10221
|
+
*/
|
|
10222
|
+
onEditorPanelToggle(open) {
|
|
10223
|
+
this.editorPanelOpen.set(open);
|
|
10224
|
+
if (!open)
|
|
10225
|
+
this.commitEdit();
|
|
10226
|
+
}
|
|
10227
|
+
/**
|
|
10228
|
+
* Edytory bez overlaya (text/number, własne `kptCellEdit`) zatwierdza dopiero wyjście fokusu
|
|
10229
|
+
* **poza cały edytor**. Nie wystarczy `touch`/blur samej kontrolki: `kpt-input-number` ma
|
|
10230
|
+
* fokusowalne strzałki `+`/`-` obok pola (i dodatkowo emituje `touch` w `step_()`), więc każde
|
|
10231
|
+
* kliknięcie strzałki zamykałoby edycję, zanim zdąży zmienić wartość.
|
|
10232
|
+
*/
|
|
10233
|
+
onEditorFocusOut(event) {
|
|
10234
|
+
if (this.editorPanelOpen())
|
|
10235
|
+
return; // edytory overlayowe zatwierdza zamknięcie panelu
|
|
10236
|
+
const host = this.editorHost()?.nativeElement;
|
|
10237
|
+
const next = event.relatedTarget;
|
|
10238
|
+
if (host && next && host.contains(next))
|
|
10239
|
+
return; // fokus został w edytorze (np. strzałki +/-)
|
|
10240
|
+
this.commitEdit();
|
|
10241
|
+
}
|
|
10242
|
+
/** Zatwierdza bieżącą edycję — emituje `cellEdit` tylko gdy wartość faktycznie się zmieniła. */
|
|
10243
|
+
commitEdit() {
|
|
10244
|
+
const editing = this.editingCell();
|
|
10245
|
+
if (!editing)
|
|
10246
|
+
return;
|
|
10247
|
+
const { row, field } = editing;
|
|
10248
|
+
const value = this.editingValue();
|
|
10249
|
+
this.editingCell.set(null);
|
|
10250
|
+
this.editorPanelOpen.set(false);
|
|
10251
|
+
if (sameEditValue(value, this.getValue(row, field)))
|
|
10252
|
+
return;
|
|
10253
|
+
const updatedRow = { ...row, [field]: value };
|
|
10254
|
+
this.cellEdit.emit({ row, field, value, updatedRow });
|
|
10255
|
+
}
|
|
10256
|
+
cancelEdit() {
|
|
10257
|
+
this.editingCell.set(null);
|
|
10258
|
+
this.editorPanelOpen.set(false);
|
|
10259
|
+
}
|
|
9644
10260
|
isExpanded(row) {
|
|
9645
10261
|
return this.expandedRows().some((r) => this.sameRow(r, row));
|
|
9646
10262
|
}
|
|
@@ -9837,33 +10453,34 @@ class KptDataTable {
|
|
|
9837
10453
|
}
|
|
9838
10454
|
static { this.ɵfac = function KptDataTable_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptDataTable)(); }; }
|
|
9839
10455
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptDataTable, selectors: [["kpt-data-table"]], contentQueries: function KptDataTable_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
9840
|
-
i0.ɵɵcontentQuerySignal(dirIndex, ctx.cellDefs, KptCellDef, 4)(dirIndex, ctx.rowDetailDef, KptRowDetailDef, 5);
|
|
10456
|
+
i0.ɵɵcontentQuerySignal(dirIndex, ctx.cellDefs, KptCellDef, 4)(dirIndex, ctx.cellEditDefs, KptCellEditDef, 4)(dirIndex, ctx.rowDetailDef, KptRowDetailDef, 5);
|
|
9841
10457
|
} if (rf & 2) {
|
|
9842
|
-
i0.ɵɵqueryAdvance(
|
|
10458
|
+
i0.ɵɵqueryAdvance(3);
|
|
9843
10459
|
} }, viewQuery: function KptDataTable_Query(rf, ctx) { if (rf & 1) {
|
|
9844
|
-
i0.ɵɵviewQuerySignal(ctx.scrollEl, _c0$e, 5)(ctx.theadEl, _c1$5, 5);
|
|
10460
|
+
i0.ɵɵviewQuerySignal(ctx.scrollEl, _c0$e, 5)(ctx.theadEl, _c1$5, 5)(ctx.editorHost, _c2$2, 5);
|
|
9845
10461
|
} if (rf & 2) {
|
|
9846
|
-
i0.ɵɵqueryAdvance(
|
|
10462
|
+
i0.ɵɵqueryAdvance(3);
|
|
9847
10463
|
} }, hostAttrs: [1, "kpt-data-table"], hostVars: 2, hostBindings: function KptDataTable_HostBindings(rf, ctx) { if (rf & 2) {
|
|
9848
10464
|
i0.ɵɵstyleProp("--%NS%kpt-thead-offset", ctx.theadOffset() + "px");
|
|
9849
|
-
} }, inputs: { columns: [1, "columns"], data: [1, "data"], filterable: [1, "filterable"], filterRowPosition: [1, "filterRowPosition"], pageSize: [1, "pageSize"], pageSizeOptions: [1, "pageSizeOptions"], selectable: [1, "selectable"], loading: [1, "loading"], emptyMessage: [1, "emptyMessage"], rowKey: [1, "rowKey"], scrollHeight: [1, "scrollHeight"], virtualScroll: [1, "virtualScroll"], rowHeight: [1, "rowHeight"], reorderable: [1, "reorderable"], exportable: [1, "exportable"], exportFilename: [1, "exportFilename"], lazy: [1, "lazy"], totalRecords: [1, "totalRecords"], expandable: [1, "expandable"], multiExpand: [1, "multiExpand"], selection: [1, "selection"], expandedRows: [1, "expandedRows"] }, outputs: { selection: "selectionChange", expandedRows: "expandedRowsChange", rowClick: "rowClick", lazyLoad: "lazyLoad" }, decls: 24, vars: 13, consts: [["scrollEl", ""], ["theadEl", ""], ["rowTpl", ""], ["filterRowTpl", ""], [1, "kpt-data-table__toolbar"], [1, "kpt-data-table__scroll", 3, "scroll"], [1, "kpt-data-table__table"], [3, "ngTemplateOutlet"], [1, "kpt-data-table__expander", 3, "kpt-data-table__cell--frozen", "left"], [1, "kpt-data-table__checkbox", 3, "kpt-data-table__cell--frozen", "left"], [3, "width", "left", "kpt-data-table__cell--frozen", "kpt-data-table__th--sortable", "kpt-data-table__th--draggable", "kpt-data-table__th--dragover"], [
|
|
9850
|
-
i0.ɵɵ
|
|
9851
|
-
i0.ɵɵ
|
|
10465
|
+
} }, inputs: { columns: [1, "columns"], data: [1, "data"], filterable: [1, "filterable"], filterRowPosition: [1, "filterRowPosition"], pageSize: [1, "pageSize"], pageSizeOptions: [1, "pageSizeOptions"], selectable: [1, "selectable"], loading: [1, "loading"], emptyMessage: [1, "emptyMessage"], rowKey: [1, "rowKey"], scrollHeight: [1, "scrollHeight"], virtualScroll: [1, "virtualScroll"], rowHeight: [1, "rowHeight"], reorderable: [1, "reorderable"], exportable: [1, "exportable"], exportFilename: [1, "exportFilename"], lazy: [1, "lazy"], totalRecords: [1, "totalRecords"], expandable: [1, "expandable"], multiExpand: [1, "multiExpand"], selection: [1, "selection"], expandedRows: [1, "expandedRows"], hiddenFields: [1, "hiddenFields"] }, outputs: { selection: "selectionChange", expandedRows: "expandedRowsChange", hiddenFields: "hiddenFieldsChange", rowClick: "rowClick", lazyLoad: "lazyLoad", cellEdit: "cellEdit" }, ngContentSelectors: _c4, decls: 24, vars: 13, consts: [["scrollEl", ""], ["theadEl", ""], ["rowTpl", ""], ["filterRowTpl", ""], ["editorHost", ""], [1, "kpt-data-table__toolbar"], [1, "kpt-data-table__scroll", 3, "scroll"], [1, "kpt-data-table__table"], [3, "ngTemplateOutlet"], [1, "kpt-data-table__expander", 3, "kpt-data-table__cell--frozen", "left"], [1, "kpt-data-table__checkbox", 3, "kpt-data-table__cell--frozen", "left"], [3, "width", "left", "kpt-data-table__cell--frozen", "kpt-data-table__th--sortable", "kpt-data-table__th--draggable", "kpt-data-table__th--dragover"], [1, "kpt-data-table__pager"], ["type", "search", 1, "kpt-data-table__filter", 3, "value"], ["variant", "outline", "size", "sm"], ["type", "search", 1, "kpt-data-table__filter", 3, "input", "value"], ["variant", "outline", "size", "sm", 3, "click"], [1, "kpt-data-table__expander"], [1, "kpt-data-table__checkbox"], ["type", "checkbox", 3, "change", "checked", "indeterminate"], [3, "click", "dragstart", "dragover", "drop", "dragend"], ["name", "grip-vertical", 1, "kpt-data-table__grip"], [1, "kpt-data-table__sort", 3, "kpt-data-table__sort--active", "name"], [1, "kpt-data-table__sort", 3, "name"], [1, "kpt-data-table__state"], ["aria-hidden", "true", 1, "kpt-data-table__spacer"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], [3, "click"], [3, "left", "kpt-data-table__cell--frozen", "kpt-data-table__cell--editable"], [1, "kpt-data-table__detail-row"], ["type", "button", 1, "kpt-data-table__expander-btn", 3, "click"], ["name", "chevron-right"], ["type", "checkbox", 3, "click", "change", "checked"], [3, "click", "keydown.enter"], [1, "kpt-data-table__editor"], [1, "kpt-data-table__editor", 3, "click", "focusout"], [3, "value", "placeholder"], [3, "value", "min", "max", "step"], [3, "value", "open"], [3, "options", "placeholder", "value", "open"], ["multiple", "", "filter", "", 3, "options", "placeholder", "value", "open"], [3, "valueChange", "keydown.enter", "keydown.escape", "value", "placeholder"], [3, "valueChange", "keydown.enter", "keydown.escape", "value", "min", "max", "step"], [3, "valueChange", "openChange", "value", "open"], [3, "valueChange", "openChange", "options", "placeholder", "value", "open"], ["multiple", "", "filter", "", 3, "valueChange", "openChange", "options", "placeholder", "value", "open"], [1, "kpt-data-table__detail"], [1, "kpt-data-table__filter-row"], [3, "width", "left", "kpt-data-table__cell--frozen"], ["type", "search", 1, "kpt-data-table__fcell", 3, "value"], ["type", "text", "inputmode", "numeric", 1, "kpt-data-table__fcell", 3, "value"], ["filter", "", 3, "options", "multiple", "placeholder", "value"], [1, "kpt-data-table__frange"], [1, "kpt-data-table__fslider"], [3, "placeholder", "value"], ["type", "search", 1, "kpt-data-table__fcell", 3, "input", "click", "value"], ["type", "text", "inputmode", "numeric", 1, "kpt-data-table__fcell", 3, "input", "click", "value"], ["filter", "", 3, "valueChange", "options", "multiple", "placeholder", "value"], [1, "kpt-data-table__fslider", 3, "click"], ["range", "", "showValue", "", 3, "valueChange", "min", "max", "step", "value"], [3, "valueChange", "placeholder", "value"], [3, "pageIndexChange", "pageSizeChange", "length", "pageIndex", "pageSize", "pageSizeOptions"]], template: function KptDataTable_Template(rf, ctx) { if (rf & 1) {
|
|
10466
|
+
i0.ɵɵprojectionDef(_c3);
|
|
10467
|
+
i0.ɵɵconditionalCreate(0, KptDataTable_Conditional_0_Template, 3, 2, "div", 5);
|
|
10468
|
+
i0.ɵɵelementStart(1, "div", 6, 0);
|
|
9852
10469
|
i0.ɵɵlistener("scroll", function KptDataTable_Template_div_scroll_1_listener($event) { return ctx.onScroll($event); });
|
|
9853
|
-
i0.ɵɵelementStart(3, "table",
|
|
9854
|
-
i0.ɵɵconditionalCreate(6, KptDataTable_Conditional_6_Template, 1, 1, "ng-container",
|
|
10470
|
+
i0.ɵɵelementStart(3, "table", 7)(4, "thead", null, 1);
|
|
10471
|
+
i0.ɵɵconditionalCreate(6, KptDataTable_Conditional_6_Template, 1, 1, "ng-container", 8);
|
|
9855
10472
|
i0.ɵɵelementStart(7, "tr");
|
|
9856
|
-
i0.ɵɵconditionalCreate(8, KptDataTable_Conditional_8_Template, 1, 4, "th",
|
|
9857
|
-
i0.ɵɵconditionalCreate(9, KptDataTable_Conditional_9_Template, 2, 7, "th",
|
|
9858
|
-
i0.ɵɵrepeaterCreate(11, KptDataTable_For_12_Template, 5, 18, "th",
|
|
10473
|
+
i0.ɵɵconditionalCreate(8, KptDataTable_Conditional_8_Template, 1, 4, "th", 9);
|
|
10474
|
+
i0.ɵɵconditionalCreate(9, KptDataTable_Conditional_9_Template, 2, 7, "th", 10)(10, KptDataTable_Conditional_10_Template, 1, 4, "th", 10);
|
|
10475
|
+
i0.ɵɵrepeaterCreate(11, KptDataTable_For_12_Template, 5, 18, "th", 11, _forTrack0$1);
|
|
9859
10476
|
i0.ɵɵelementEnd();
|
|
9860
|
-
i0.ɵɵconditionalCreate(13, KptDataTable_Conditional_13_Template, 1, 1, "ng-container",
|
|
10477
|
+
i0.ɵɵconditionalCreate(13, KptDataTable_Conditional_13_Template, 1, 1, "ng-container", 8);
|
|
9861
10478
|
i0.ɵɵelementEnd();
|
|
9862
10479
|
i0.ɵɵelementStart(14, "tbody");
|
|
9863
10480
|
i0.ɵɵconditionalCreate(15, KptDataTable_Conditional_15_Template, 3, 2, "tr")(16, KptDataTable_Conditional_16_Template, 3, 2, "tr")(17, KptDataTable_Conditional_17_Template, 4, 2)(18, KptDataTable_Conditional_18_Template, 2, 0);
|
|
9864
10481
|
i0.ɵɵelementEnd()()();
|
|
9865
10482
|
i0.ɵɵtemplate(19, KptDataTable_ng_template_19_Template, 6, 9, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor)(21, KptDataTable_ng_template_21_Template, 5, 2, "ng-template", null, 3, i0.ɵɵtemplateRefExtractor);
|
|
9866
|
-
i0.ɵɵconditionalCreate(23, KptDataTable_Conditional_23_Template,
|
|
10483
|
+
i0.ɵɵconditionalCreate(23, KptDataTable_Conditional_23_Template, 3, 4, "div", 12);
|
|
9867
10484
|
} if (rf & 2) {
|
|
9868
10485
|
i0.ɵɵconditional(ctx.filterable() || ctx.exportable() ? 0 : -1);
|
|
9869
10486
|
i0.ɵɵadvance();
|
|
@@ -9877,23 +10494,43 @@ class KptDataTable {
|
|
|
9877
10494
|
i0.ɵɵadvance();
|
|
9878
10495
|
i0.ɵɵconditional(ctx.selectable() === "multiple" ? 9 : ctx.selectable() === "single" ? 10 : -1);
|
|
9879
10496
|
i0.ɵɵadvance(2);
|
|
9880
|
-
i0.ɵɵrepeater(ctx.
|
|
10497
|
+
i0.ɵɵrepeater(ctx.visibleOrderedColumns());
|
|
9881
10498
|
i0.ɵɵadvance(2);
|
|
9882
10499
|
i0.ɵɵconditional(ctx.hasColumnFilters() && ctx.filterRowPosition() === "bottom" ? 13 : -1);
|
|
9883
10500
|
i0.ɵɵadvance(2);
|
|
9884
10501
|
i0.ɵɵconditional(ctx.loading() ? 15 : ctx.displayCount() === 0 ? 16 : ctx.virtualScroll() ? 17 : 18);
|
|
9885
10502
|
i0.ɵɵadvance(8);
|
|
9886
10503
|
i0.ɵɵconditional(ctx.pageSize() > 0 && !ctx.virtualScroll() ? 23 : -1);
|
|
9887
|
-
} }, dependencies: [NgTemplateOutlet,
|
|
10504
|
+
} }, dependencies: [NgTemplateOutlet,
|
|
10505
|
+
KptButton,
|
|
10506
|
+
KptIcon,
|
|
10507
|
+
KptPaginator,
|
|
10508
|
+
KptSelect,
|
|
10509
|
+
KptDateRange,
|
|
10510
|
+
KptSlider,
|
|
10511
|
+
KptInput,
|
|
10512
|
+
KptInputNumber,
|
|
10513
|
+
KptDatepicker], styles: ["@layer kpt.components{.kpt-data-table{display:flex;flex-direction:column;background:var(--%NS%kpt-table-bg);color:var(--%NS%kpt-table-fg);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-table-border);border-radius:var(--%NS%kpt-table-radius, .75rem);overflow:hidden;flex-grow:1}.kpt-data-table__toolbar{display:flex;align-items:center;justify-content:space-between;gap:var(--%NS%kpt-space-3, .75rem);padding:var(--%NS%kpt-space-3, .75rem);border-bottom:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-table-border)}.kpt-data-table__filter{width:100%;max-width:20rem;height:2.25rem;padding-inline:var(--%NS%kpt-space-3, .75rem);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-form-field-radius, .5rem);background:var(--%NS%kpt-form-field-bg);color:var(--%NS%kpt-form-field-text)}.kpt-data-table__filter:focus-visible{outline:none;border-color:var(--%NS%kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--%NS%kpt-form-field-border-focus) 30%,transparent)}.kpt-data-table__scroll{overflow:auto}.kpt-data-table__pager{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem)}.kpt-data-table__pager [kptPaginatorActions]{margin-inline-start:.5rem}.kpt-data-table__pager kpt-paginator{flex:1 1 auto;min-width:0}.kpt-data-table__table{width:100%;border-collapse:collapse;font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-data-table__table--frozen{width:max-content;min-width:100%}.kpt-data-table__table th,.kpt-data-table__table td{padding:var(--%NS%kpt-table-cell-padding, .75rem);text-align:start;border-bottom:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-table-border)}.kpt-data-table__table th[data-align=center],.kpt-data-table__table td[data-align=center]{text-align:center}.kpt-data-table__table th[data-align=end],.kpt-data-table__table td[data-align=end]{text-align:end}.kpt-data-table__table thead th{position:sticky;top:0;z-index:1;background:var(--%NS%kpt-table-header-bg);color:var(--%NS%kpt-table-header-fg);font-weight:var(--%NS%kpt-font-weight-semibold, 600);white-space:nowrap;-webkit-user-select:none;user-select:none}.kpt-data-table__table thead tr:nth-child(2) th{top:var(--%NS%kpt-thead-offset, 0px)}.kpt-data-table__filter-row th{padding:var(--%NS%kpt-space-2, .5rem);font-weight:var(--%NS%kpt-font-weight-normal, 400);cursor:auto}.kpt-data-table__fcell{width:100%;height:2rem;padding-inline:var(--%NS%kpt-space-2, .5rem);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-form-field-radius, .5rem);background:var(--%NS%kpt-form-field-bg);color:var(--%NS%kpt-form-field-text);font:inherit}.kpt-data-table__fcell:focus-visible{outline:none;border-color:var(--%NS%kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--%NS%kpt-form-field-border-focus) 30%,transparent)}.kpt-data-table__filter-row kpt-select,.kpt-data-table__filter-row kpt-date-range{display:block;width:100%;font-weight:var(--%NS%kpt-font-weight-normal, 400)}.kpt-data-table__frange{display:flex;gap:var(--%NS%kpt-space-2, .5rem)}.kpt-data-table__frange .kpt-data-table__fcell{min-width:0}.kpt-data-table__fslider .kpt-slider-host{width:100%}.kpt-data-table__fslider .kpt-slider__value{min-width:auto;font-size:var(--%NS%kpt-font-size-xs, .75rem);color:var(--%NS%kpt-color-on-surface-muted)}.kpt-data-table__th--sortable{cursor:pointer}.kpt-data-table__th--%NS%sortable:hover{color:var(--%NS%kpt-color-on-surface)}.kpt-data-table__cell--editable{cursor:pointer}.kpt-data-table__cell--%NS%editable:hover{background:var(--%NS%kpt-table-row-hover)}.kpt-data-table__cell--%NS%editable:focus-visible{outline:var(--%NS%kpt-border-width-medium, 2px) solid var(--%NS%kpt-color-focus-ring);outline-offset:-2px}.kpt-data-table__editor{display:block;min-width:8rem}.kpt-data-table__editor .kpt-input-number-host{max-width:6.5rem}.kpt-data-table__editor .kpt-input-number__btn{width:1.75rem}.kpt-data-table__sort{margin-inline-start:.35em;opacity:.35}.kpt-data-table__sort--active{opacity:1}.kpt-data-table__th--draggable{cursor:grab}.kpt-data-table__th--%NS%draggable:active{cursor:grabbing}.kpt-data-table__th--dragover{box-shadow:inset 2px 0 0 0 var(--%NS%kpt-color-primary)}.kpt-data-table__grip{margin-inline-end:.4em;opacity:.45}.kpt-data-table__checkbox{width:1px;white-space:nowrap;text-align:center}.kpt-data-table__checkbox input[type=checkbox]{appearance:none;-webkit-appearance:none;position:relative;display:inline-block;width:1.15rem;height:1.15rem;margin:0;vertical-align:middle;cursor:pointer;border:var(--%NS%kpt-border-width-medium, 2px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-radius-sm, .25rem);background:var(--%NS%kpt-form-field-bg);transition:background-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard),border-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-data-table__checkbox input[type=checkbox]:after{content:\"\";position:absolute;inset:0;opacity:0;background-color:var(--%NS%kpt-color-on-primary);transition:opacity var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard);-webkit-mask:no-repeat center/.85rem;mask:no-repeat center/.85rem}.kpt-data-table__checkbox input[type=checkbox]:checked,.kpt-data-table__checkbox input[type=checkbox]:indeterminate{background:var(--%NS%kpt-color-primary);border-color:var(--%NS%kpt-color-primary)}.kpt-data-table__checkbox input[type=checkbox]:checked:after{opacity:1;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13 4.5 6.5 11 3 7.5' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13 4.5 6.5 11 3 7.5' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\")}.kpt-data-table__checkbox input[type=checkbox]:indeterminate:after{opacity:1;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8h9' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8h9' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round'/%3E%3C/svg%3E\")}.kpt-data-table__checkbox input[type=checkbox]:focus-visible{outline:var(--%NS%kpt-border-width-medium, 2px) solid var(--%NS%kpt-color-focus-ring);outline-offset:2px}.kpt-data-table__expander{width:2.5rem;min-width:2.5rem;text-align:center;white-space:nowrap}.kpt-data-table__expander-btn{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;border:none;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:transparent;color:var(--%NS%kpt-color-on-surface-muted);cursor:pointer;transition:background-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard),color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-data-table__expander-btn kpt-icon{display:inline-flex;transition:transform var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-data-table__expander-btn:hover{background:var(--%NS%kpt-table-row-hover);color:var(--%NS%kpt-color-on-surface)}.kpt-data-table__expander-btn:focus-visible{outline:var(--%NS%kpt-border-width-medium, 2px) solid var(--%NS%kpt-color-focus-ring);outline-offset:2px}.kpt-data-table__expander-btn--open{color:var(--%NS%kpt-color-primary)}.kpt-data-table__expander-btn--open kpt-icon{transform:rotate(90deg)}.kpt-data-table__detail-row>.kpt-data-table__detail{padding:var(--%NS%kpt-space-4, 1rem);background:var(--%NS%kpt-table-detail-bg, var(--%NS%kpt-color-surface-variant, var(--%NS%kpt-table-row-hover)));border-bottom:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-table-border);box-shadow:inset 3px 0 0 0 var(--%NS%kpt-color-primary)}.kpt-data-table tbody tr{transition:background-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-data-table tbody tr:hover{background:var(--%NS%kpt-table-row-hover)}.kpt-data-table tbody tr.kpt-data-table__detail-row:hover{background:transparent}.kpt-data-table__row--selected{background:var(--%NS%kpt-table-row-selected)!important}.kpt-data-table__row--expanded{background:var(--%NS%kpt-table-row-hover)}.kpt-data-table__table--frozen .kpt-data-table__checkbox{width:3rem;min-width:3rem}.kpt-data-table__table--frozen .kpt-data-table__expander{width:2.5rem;min-width:2.5rem}.kpt-data-table__cell--frozen{position:sticky;z-index:1;background:var(--%NS%kpt-table-bg);border-inline-end:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-table-border)}.kpt-data-table thead th.kpt-data-table__cell--frozen{z-index:3;background:var(--%NS%kpt-table-header-bg)}.kpt-data-table tbody tr:hover .kpt-data-table__cell--frozen{background:var(--%NS%kpt-table-row-hover)}.kpt-data-table__row--selected.kpt-data-table__row--selected .kpt-data-table__cell--frozen,.kpt-data-table tbody tr.kpt-data-table__row--selected .kpt-data-table__cell--frozen{background:var(--%NS%kpt-table-row-selected)}.kpt-data-table__state{padding:var(--%NS%kpt-space-8, 2rem)!important;text-align:center!important;color:var(--%NS%kpt-color-on-surface-muted)}.kpt-data-table__table--virtual td{padding-block:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.kpt-data-table__spacer td{padding:0!important;border:0!important}.kpt-data-table tbody tr:last-child td{border-bottom:0}}\n"], encapsulation: 2 }); }
|
|
9888
10514
|
}
|
|
9889
10515
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptDataTable, [{
|
|
9890
10516
|
type: Component,
|
|
9891
|
-
args: [{ selector: 'kpt-data-table', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
|
|
10517
|
+
args: [{ selector: 'kpt-data-table', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
|
|
10518
|
+
NgTemplateOutlet,
|
|
10519
|
+
KptButton,
|
|
10520
|
+
KptIcon,
|
|
10521
|
+
KptPaginator,
|
|
10522
|
+
KptSelect,
|
|
10523
|
+
KptDateRange,
|
|
10524
|
+
KptSlider,
|
|
10525
|
+
KptInput,
|
|
10526
|
+
KptInputNumber,
|
|
10527
|
+
KptDatepicker,
|
|
10528
|
+
], host: {
|
|
9892
10529
|
'class': 'kpt-data-table',
|
|
9893
10530
|
'[style.--kpt-thead-offset]': "theadOffset() + 'px'",
|
|
9894
|
-
}, template: "@if (filterable() || exportable()) {\n <div class=\"kpt-data-table__toolbar\">\n @if (filterable()) {\n <input\n class=\"kpt-data-table__filter\"\n type=\"search\"\n [attr.placeholder]=\"i18n.t('dataTable.search')\"\n [value]=\"filterText()\"\n (input)=\"onFilter($event)\"\n />\n }\n @if (exportable()) {\n <kpt-button variant=\"outline\" size=\"sm\" (click)=\"exportCsv()\">{{ i18n.t('dataTable.exportCsv') }}</kpt-button>\n }\n </div>\n}\n\n<div class=\"kpt-data-table__scroll\" #scrollEl [style.max-height]=\"scrollHeight()\" (scroll)=\"onScroll($event)\">\n <table\n class=\"kpt-data-table__table\"\n [class.kpt-data-table__table--frozen]=\"hasFrozen()\"\n [class.kpt-data-table__table--virtual]=\"virtualScroll()\"\n >\n <thead #theadEl>\n @if (hasColumnFilters() && filterRowPosition() === 'top') {\n <ng-container [ngTemplateOutlet]=\"filterRowTpl\" />\n }\n <tr>\n @if (hasRowDetail()) {\n <th class=\"kpt-data-table__expander\" [class.kpt-data-table__cell--frozen]=\"hasFrozen()\" [style.left.px]=\"expanderStickyLeft()\"></th>\n }\n @if (selectable() === 'multiple') {\n <th class=\"kpt-data-table__checkbox\" [class.kpt-data-table__cell--frozen]=\"hasFrozen()\" [style.left.px]=\"checkboxStickyLeft()\">\n <input\n type=\"checkbox\"\n [checked]=\"pageAllSelected()\"\n [indeterminate]=\"pageSomeSelected()\"\n (change)=\"toggleAllOnPage()\"\n [attr.aria-label]=\"i18n.t('dataTable.selectAll')\"\n />\n </th>\n } @else if (selectable() === 'single') {\n <th class=\"kpt-data-table__checkbox\" [class.kpt-data-table__cell--frozen]=\"hasFrozen()\" [style.left.px]=\"checkboxStickyLeft()\"></th>\n }\n @for (col of orderedColumns(); track col.field; let i = $index) {\n <th\n [attr.draggable]=\"isColDraggable(col) ? true : null\"\n [style.width]=\"col.width\"\n [style.left.px]=\"frozenLeft(col.field)\"\n [attr.data-align]=\"col.align ?? 'start'\"\n [class.kpt-data-table__cell--frozen]=\"isFrozen(col.field)\"\n [class.kpt-data-table__th--sortable]=\"col.sortable\"\n [class.kpt-data-table__th--draggable]=\"isColDraggable(col)\"\n [class.kpt-data-table__th--dragover]=\"dragIndex() !== null && dragIndex() !== i && !col.frozen\"\n [attr.aria-sort]=\"ariaSort(col)\"\n (click)=\"toggleSort(col)\"\n (dragstart)=\"onColDragStart(i, $event)\"\n (dragover)=\"reorderable() ? onColDragOver(i, $event) : null\"\n (drop)=\"reorderable() ? onColDrop(i, $event) : null\"\n (dragend)=\"onColDragEnd()\"\n >\n @if (isColDraggable(col)) {\n <kpt-icon class=\"kpt-data-table__grip\" name=\"grip-vertical\" />\n }\n <span>{{ col.header }}</span>\n @if (col.sortable) {\n <kpt-icon\n class=\"kpt-data-table__sort\"\n [class.kpt-data-table__sort--active]=\"ariaSort(col) !== 'none'\"\n [name]=\"sortIconName(col)\"\n />\n }\n </th>\n }\n </tr>\n @if (hasColumnFilters() && filterRowPosition() === 'bottom') {\n <ng-container [ngTemplateOutlet]=\"filterRowTpl\" />\n }\n </thead>\n <tbody>\n @if (loading()) {\n <tr><td class=\"kpt-data-table__state\" [attr.colspan]=\"colspan()\">{{ i18n.t('dataTable.loading') }}</td></tr>\n } @else if (displayCount() === 0) {\n <tr><td class=\"kpt-data-table__state\" [attr.colspan]=\"colspan()\">{{ emptyText() }}</td></tr>\n } @else if (virtualScroll()) {\n @if (topPad() > 0) {\n <tr class=\"kpt-data-table__spacer\" aria-hidden=\"true\"><td [attr.colspan]=\"colspan()\" [style.height.px]=\"topPad()\"></td></tr>\n }\n @for (row of virtualRows(); track trackRow(row)) {\n <ng-container [ngTemplateOutlet]=\"rowTpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n }\n @if (bottomPad() > 0) {\n <tr class=\"kpt-data-table__spacer\" aria-hidden=\"true\"><td [attr.colspan]=\"colspan()\" [style.height.px]=\"bottomPad()\"></td></tr>\n }\n } @else {\n @for (row of paged(); track trackRow(row)) {\n <ng-container [ngTemplateOutlet]=\"rowTpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n }\n }\n </tbody>\n </table>\n</div>\n\n<ng-template #rowTpl let-row>\n <tr\n [class.kpt-data-table__row--selected]=\"isSelected(row)\"\n [class.kpt-data-table__row--expanded]=\"hasRowDetail() && isExpanded(row)\"\n [style.height.px]=\"virtualScroll() ? rowHeight() : null\"\n (click)=\"onRowClick(row)\"\n >\n @if (hasRowDetail()) {\n <td class=\"kpt-data-table__expander\" [class.kpt-data-table__cell--frozen]=\"hasFrozen()\" [style.left.px]=\"expanderStickyLeft()\">\n <button\n type=\"button\"\n class=\"kpt-data-table__expander-btn\"\n [class.kpt-data-table__expander-btn--open]=\"isExpanded(row)\"\n [attr.aria-expanded]=\"isExpanded(row)\"\n [attr.aria-label]=\"i18n.t('dataTable.expandRow')\"\n (click)=\"$event.stopPropagation(); toggleExpand(row)\"\n >\n <kpt-icon name=\"chevron-right\" />\n </button>\n </td>\n }\n @if (selectable() !== 'none') {\n <td class=\"kpt-data-table__checkbox\" [class.kpt-data-table__cell--frozen]=\"hasFrozen()\" [style.left.px]=\"checkboxStickyLeft()\">\n <input\n type=\"checkbox\"\n [checked]=\"isSelected(row)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleRow(row)\"\n [attr.aria-label]=\"i18n.t('dataTable.selectRow')\"\n />\n </td>\n }\n @for (col of orderedColumns(); track col.field) {\n <td\n [attr.data-align]=\"col.align ?? 'start'\"\n [style.left.px]=\"frozenLeft(col.field)\"\n [class.kpt-data-table__cell--frozen]=\"isFrozen(col.field)\"\n >\n @if (cellTemplate(col.field); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, value: getValue(row, col.field) }\"\n />\n } @else {\n {{ getValue(row, col.field) }}\n }\n </td>\n }\n </tr>\n @if (hasRowDetail() && isExpanded(row) && !virtualScroll()) {\n <tr class=\"kpt-data-table__detail-row\">\n <td class=\"kpt-data-table__detail\" [attr.colspan]=\"colspan()\">\n <ng-container [ngTemplateOutlet]=\"rowDetailTpl()\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n </td>\n </tr>\n }\n</ng-template>\n\n<ng-template #filterRowTpl>\n <tr class=\"kpt-data-table__filter-row\">\n @if (hasRowDetail()) {\n <th class=\"kpt-data-table__expander\" [class.kpt-data-table__cell--frozen]=\"hasFrozen()\" [style.left.px]=\"expanderStickyLeft()\"></th>\n }\n @if (selectable() !== 'none') {\n <th class=\"kpt-data-table__checkbox\" [class.kpt-data-table__cell--frozen]=\"hasFrozen()\" [style.left.px]=\"checkboxStickyLeft()\"></th>\n }\n @for (col of orderedColumns(); track col.field) {\n <th\n [style.width]=\"col.width\"\n [style.left.px]=\"frozenLeft(col.field)\"\n [attr.data-align]=\"col.align ?? 'start'\"\n [class.kpt-data-table__cell--frozen]=\"isFrozen(col.field)\"\n >\n @switch (col.filter?.type) {\n @case ('text') {\n <input\n class=\"kpt-data-table__fcell\"\n type=\"search\"\n [attr.placeholder]=\"col.filter.placeholder || ''\"\n [attr.aria-label]=\"i18n.t('dataTable.filter', { column: col.header })\"\n [value]=\"$any(columnFilters()[col.field]) || ''\"\n (input)=\"setColumnFilter(col.field, $any($event.target).value)\"\n (click)=\"$event.stopPropagation()\"\n />\n }\n @case ('number') {\n <input\n class=\"kpt-data-table__fcell\"\n type=\"text\"\n inputmode=\"numeric\"\n [attr.placeholder]=\"col.filter.placeholder || ''\"\n [attr.aria-label]=\"i18n.t('dataTable.filter', { column: col.header })\"\n [value]=\"$any(columnFilters()[col.field]) || ''\"\n (input)=\"onNumberFilter(col.field, $event)\"\n (click)=\"$event.stopPropagation()\"\n />\n }\n @case ('select') {\n <kpt-select\n [options]=\"col.filter.options || []\"\n [multiple]=\"!!col.filter.multiple\"\n filter\n [placeholder]=\"col.filter.placeholder || i18n.t('dataTable.all')\"\n [value]=\"columnFilters()[col.field] ?? null\"\n (valueChange)=\"setColumnFilter(col.field, $event)\"\n />\n }\n @case ('numberRange') {\n <div class=\"kpt-data-table__frange\">\n <input\n class=\"kpt-data-table__fcell\"\n type=\"text\"\n inputmode=\"numeric\"\n [attr.placeholder]=\"i18n.t('dataTable.min')\"\n [attr.aria-label]=\"i18n.t('dataTable.filterMin', { column: col.header })\"\n [value]=\"rangeVal(col.field).min\"\n (input)=\"setRangeFilter(col.field, 'min', $event)\"\n (click)=\"$event.stopPropagation()\"\n />\n <input\n class=\"kpt-data-table__fcell\"\n type=\"text\"\n inputmode=\"numeric\"\n [attr.placeholder]=\"i18n.t('dataTable.max')\"\n [attr.aria-label]=\"i18n.t('dataTable.filterMax', { column: col.header })\"\n [value]=\"rangeVal(col.field).max\"\n (input)=\"setRangeFilter(col.field, 'max', $event)\"\n (click)=\"$event.stopPropagation()\"\n />\n </div>\n }\n @case ('slider') {\n <div class=\"kpt-data-table__fslider\" (click)=\"$event.stopPropagation()\">\n <kpt-slider\n range\n [min]=\"col.filter.min ?? 0\"\n [max]=\"col.filter.max ?? 100\"\n [step]=\"col.filter.step ?? 1\"\n [value]=\"sliderVal(col)\"\n (valueChange)=\"setColumnFilter(col.field, $event)\"\n showValue\n />\n </div>\n }\n @case ('dateRange') {\n <kpt-date-range\n [placeholder]=\"col.filter.placeholder || i18n.t('dataTable.dateRange')\"\n [value]=\"$any(columnFilters()[col.field]) || { start: '', end: '' }\"\n (valueChange)=\"setColumnFilter(col.field, $event)\"\n />\n }\n }\n </th>\n }\n </tr>\n</ng-template>\n\n@if (pageSize() > 0 && !virtualScroll()) {\n <kpt-paginator\n [length]=\"filteredCount()\"\n [pageIndex]=\"pageIndex()\"\n (pageIndexChange)=\"pageIndex.set($event)\"\n [pageSize]=\"pageSizeState()\"\n (pageSizeChange)=\"pageSizeState.set($event)\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n />\n}\n", styles: ["@layer kpt.components{.kpt-data-table{display:flex;flex-direction:column;background:var(--kpt-table-bg);color:var(--kpt-table-fg);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-table-border);border-radius:var(--kpt-table-radius, .75rem);overflow:hidden}.kpt-data-table__toolbar{display:flex;align-items:center;justify-content:space-between;gap:var(--kpt-space-3, .75rem);padding:var(--kpt-space-3, .75rem);border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-table-border)}.kpt-data-table__filter{width:100%;max-width:20rem;height:2.25rem;padding-inline:var(--kpt-space-3, .75rem);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text)}.kpt-data-table__filter:focus-visible{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-data-table__scroll{overflow:auto}.kpt-data-table__table{width:100%;border-collapse:collapse;font-size:var(--kpt-font-size-sm, .875rem)}.kpt-data-table__table--frozen{width:max-content;min-width:100%}.kpt-data-table__table th,.kpt-data-table__table td{padding:var(--kpt-table-cell-padding, .75rem);text-align:start;border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-table-border)}.kpt-data-table__table th[data-align=center],.kpt-data-table__table td[data-align=center]{text-align:center}.kpt-data-table__table th[data-align=end],.kpt-data-table__table td[data-align=end]{text-align:end}.kpt-data-table__table thead th{position:sticky;top:0;z-index:1;background:var(--kpt-table-header-bg);color:var(--kpt-table-header-fg);font-weight:var(--kpt-font-weight-semibold, 600);white-space:nowrap;-webkit-user-select:none;user-select:none}.kpt-data-table__table thead tr:nth-child(2) th{top:var(--kpt-thead-offset, 0px)}.kpt-data-table__filter-row th{padding:var(--kpt-space-2, .5rem);font-weight:var(--kpt-font-weight-normal, 400);cursor:auto}.kpt-data-table__fcell{width:100%;height:2rem;padding-inline:var(--kpt-space-2, .5rem);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text);font:inherit}.kpt-data-table__fcell:focus-visible{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-data-table__filter-row kpt-select,.kpt-data-table__filter-row kpt-date-range{display:block;width:100%;font-weight:var(--kpt-font-weight-normal, 400)}.kpt-data-table__frange{display:flex;gap:var(--kpt-space-2, .5rem)}.kpt-data-table__frange .kpt-data-table__fcell{min-width:0}.kpt-data-table__fslider .kpt-slider-host{width:100%}.kpt-data-table__fslider .kpt-slider__value{min-width:auto;font-size:var(--kpt-font-size-xs, .75rem);color:var(--kpt-color-on-surface-muted)}.kpt-data-table__th--sortable{cursor:pointer}.kpt-data-table__th--sortable:hover{color:var(--kpt-color-on-surface)}.kpt-data-table__sort{margin-inline-start:.35em;opacity:.35}.kpt-data-table__sort--active{opacity:1}.kpt-data-table__th--draggable{cursor:grab}.kpt-data-table__th--draggable:active{cursor:grabbing}.kpt-data-table__th--dragover{box-shadow:inset 2px 0 0 0 var(--kpt-color-primary)}.kpt-data-table__grip{margin-inline-end:.4em;opacity:.45}.kpt-data-table__checkbox{width:1px;white-space:nowrap;text-align:center}.kpt-data-table__checkbox input[type=checkbox]{appearance:none;-webkit-appearance:none;position:relative;display:inline-block;width:1.15rem;height:1.15rem;margin:0;vertical-align:middle;cursor:pointer;border:var(--kpt-border-width-medium, 2px) solid var(--kpt-form-field-border);border-radius:var(--kpt-radius-sm, .25rem);background:var(--kpt-form-field-bg);transition:background-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard),border-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-data-table__checkbox input[type=checkbox]:after{content:\"\";position:absolute;inset:0;opacity:0;background-color:var(--kpt-color-on-primary);transition:opacity var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard);-webkit-mask:no-repeat center/.85rem;mask:no-repeat center/.85rem}.kpt-data-table__checkbox input[type=checkbox]:checked,.kpt-data-table__checkbox input[type=checkbox]:indeterminate{background:var(--kpt-color-primary);border-color:var(--kpt-color-primary)}.kpt-data-table__checkbox input[type=checkbox]:checked:after{opacity:1;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13 4.5 6.5 11 3 7.5' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13 4.5 6.5 11 3 7.5' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\")}.kpt-data-table__checkbox input[type=checkbox]:indeterminate:after{opacity:1;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8h9' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8h9' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round'/%3E%3C/svg%3E\")}.kpt-data-table__checkbox input[type=checkbox]:focus-visible{outline:var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);outline-offset:2px}.kpt-data-table__expander{width:2.5rem;min-width:2.5rem;text-align:center;white-space:nowrap}.kpt-data-table__expander-btn{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;border:none;border-radius:var(--kpt-radius-sm, .25rem);background:transparent;color:var(--kpt-color-on-surface-muted);cursor:pointer;transition:background-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard),color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-data-table__expander-btn kpt-icon{display:inline-flex;transition:transform var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-data-table__expander-btn:hover{background:var(--kpt-table-row-hover);color:var(--kpt-color-on-surface)}.kpt-data-table__expander-btn:focus-visible{outline:var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);outline-offset:2px}.kpt-data-table__expander-btn--open{color:var(--kpt-color-primary)}.kpt-data-table__expander-btn--open kpt-icon{transform:rotate(90deg)}.kpt-data-table__detail-row>.kpt-data-table__detail{padding:var(--kpt-space-4, 1rem);background:var(--kpt-table-detail-bg, var(--kpt-color-surface-variant, var(--kpt-table-row-hover)));border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-table-border);box-shadow:inset 3px 0 0 0 var(--kpt-color-primary)}.kpt-data-table tbody tr{transition:background-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-data-table tbody tr:hover{background:var(--kpt-table-row-hover)}.kpt-data-table tbody tr.kpt-data-table__detail-row:hover{background:transparent}.kpt-data-table__row--selected{background:var(--kpt-table-row-selected)!important}.kpt-data-table__row--expanded{background:var(--kpt-table-row-hover)}.kpt-data-table__table--frozen .kpt-data-table__checkbox{width:3rem;min-width:3rem}.kpt-data-table__table--frozen .kpt-data-table__expander{width:2.5rem;min-width:2.5rem}.kpt-data-table__cell--frozen{position:sticky;z-index:1;background:var(--kpt-table-bg);border-inline-end:var(--kpt-border-width-thin, 1px) solid var(--kpt-table-border)}.kpt-data-table thead th.kpt-data-table__cell--frozen{z-index:3;background:var(--kpt-table-header-bg)}.kpt-data-table tbody tr:hover .kpt-data-table__cell--frozen{background:var(--kpt-table-row-hover)}.kpt-data-table__row--selected.kpt-data-table__row--selected .kpt-data-table__cell--frozen,.kpt-data-table tbody tr.kpt-data-table__row--selected .kpt-data-table__cell--frozen{background:var(--kpt-table-row-selected)}.kpt-data-table__state{padding:var(--kpt-space-8, 2rem)!important;text-align:center!important;color:var(--kpt-color-on-surface-muted)}.kpt-data-table__table--virtual td{padding-block:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.kpt-data-table__spacer td{padding:0!important;border:0!important}.kpt-data-table tbody tr:last-child td{border-bottom:0}}\n"] }]
|
|
9895
|
-
}], () => [], { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], filterable: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterable", required: false }] }], filterRowPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterRowPosition", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], rowKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowKey", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], rowHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowHeight", required: false }] }], reorderable: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderable", required: false }] }], exportable: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportable", required: false }] }], exportFilename: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportFilename", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], totalRecords: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalRecords", required: false }] }], expandable: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandable", required: false }] }], multiExpand: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiExpand", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], expandedRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedRows", required: false }] }, { type: i0.Output, args: ["expandedRowsChange"] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], lazyLoad: [{ type: i0.Output, args: ["lazyLoad"] }], scrollEl: [{ type: i0.ViewChild, args: ['scrollEl', { isSignal: true }] }], theadEl: [{ type: i0.ViewChild, args: ['theadEl', { isSignal: true }] }], cellDefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KptCellDef), { isSignal: true }] }], rowDetailDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KptRowDetailDef), { isSignal: true }] }] }); })();
|
|
9896
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDataTable, { className: "KptDataTable", filePath: "lib/data-table/data-table.component.ts", lineNumber:
|
|
10531
|
+
}, template: "@if (filterable() || exportable()) {\n <div class=\"kpt-data-table__toolbar\">\n @if (filterable()) {\n <input\n class=\"kpt-data-table__filter\"\n type=\"search\"\n [attr.placeholder]=\"i18n.t('dataTable.search')\"\n [value]=\"filterText()\"\n (input)=\"onFilter($event)\"\n />\n }\n @if (exportable()) {\n <kpt-button variant=\"outline\" size=\"sm\" (click)=\"exportCsv()\">{{ i18n.t('dataTable.exportCsv') }}</kpt-button>\n }\n </div>\n}\n\n<div class=\"kpt-data-table__scroll\" #scrollEl [style.max-height]=\"scrollHeight()\" (scroll)=\"onScroll($event)\">\n <table\n class=\"kpt-data-table__table\"\n [class.kpt-data-table__table--frozen]=\"hasFrozen()\"\n [class.kpt-data-table__table--virtual]=\"virtualScroll()\"\n >\n <thead #theadEl>\n @if (hasColumnFilters() && filterRowPosition() === 'top') {\n <ng-container [ngTemplateOutlet]=\"filterRowTpl\" />\n }\n <tr>\n @if (hasRowDetail()) {\n <th class=\"kpt-data-table__expander\" [class.kpt-data-table__cell--frozen]=\"hasFrozen()\" [style.left.px]=\"expanderStickyLeft()\"></th>\n }\n @if (selectable() === 'multiple') {\n <th class=\"kpt-data-table__checkbox\" [class.kpt-data-table__cell--frozen]=\"hasFrozen()\" [style.left.px]=\"checkboxStickyLeft()\">\n <input\n type=\"checkbox\"\n [checked]=\"pageAllSelected()\"\n [indeterminate]=\"pageSomeSelected()\"\n (change)=\"toggleAllOnPage()\"\n [attr.aria-label]=\"i18n.t('dataTable.selectAll')\"\n />\n </th>\n } @else if (selectable() === 'single') {\n <th class=\"kpt-data-table__checkbox\" [class.kpt-data-table__cell--frozen]=\"hasFrozen()\" [style.left.px]=\"checkboxStickyLeft()\"></th>\n }\n @for (col of visibleOrderedColumns(); track col.field) {\n <th\n [attr.draggable]=\"isColDraggable(col) ? true : null\"\n [style.width]=\"col.width\"\n [style.left.px]=\"frozenLeft(col.field)\"\n [attr.data-align]=\"col.align ?? 'start'\"\n [class.kpt-data-table__cell--frozen]=\"isFrozen(col.field)\"\n [class.kpt-data-table__th--sortable]=\"col.sortable\"\n [class.kpt-data-table__th--draggable]=\"isColDraggable(col)\"\n [class.kpt-data-table__th--dragover]=\"dragField() !== null && dragField() !== col.field && !col.frozen\"\n [attr.aria-sort]=\"ariaSort(col)\"\n (click)=\"toggleSort(col)\"\n (dragstart)=\"onColDragStart(col.field, $event)\"\n (dragover)=\"reorderable() ? onColDragOver(col.field, $event) : null\"\n (drop)=\"reorderable() ? onColDrop(col.field, $event) : null\"\n (dragend)=\"onColDragEnd()\"\n >\n @if (isColDraggable(col)) {\n <kpt-icon class=\"kpt-data-table__grip\" name=\"grip-vertical\" />\n }\n <span>{{ col.header }}</span>\n @if (col.sortable) {\n <kpt-icon\n class=\"kpt-data-table__sort\"\n [class.kpt-data-table__sort--active]=\"ariaSort(col) !== 'none'\"\n [name]=\"sortIconName(col)\"\n />\n }\n </th>\n }\n </tr>\n @if (hasColumnFilters() && filterRowPosition() === 'bottom') {\n <ng-container [ngTemplateOutlet]=\"filterRowTpl\" />\n }\n </thead>\n <tbody>\n @if (loading()) {\n <tr><td class=\"kpt-data-table__state\" [attr.colspan]=\"colspan()\">{{ i18n.t('dataTable.loading') }}</td></tr>\n } @else if (displayCount() === 0) {\n <tr><td class=\"kpt-data-table__state\" [attr.colspan]=\"colspan()\">{{ emptyText() }}</td></tr>\n } @else if (virtualScroll()) {\n @if (topPad() > 0) {\n <tr class=\"kpt-data-table__spacer\" aria-hidden=\"true\"><td [attr.colspan]=\"colspan()\" [style.height.px]=\"topPad()\"></td></tr>\n }\n @for (row of virtualRows(); track trackRow(row)) {\n <ng-container [ngTemplateOutlet]=\"rowTpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n }\n @if (bottomPad() > 0) {\n <tr class=\"kpt-data-table__spacer\" aria-hidden=\"true\"><td [attr.colspan]=\"colspan()\" [style.height.px]=\"bottomPad()\"></td></tr>\n }\n } @else {\n @for (row of paged(); track trackRow(row)) {\n <ng-container [ngTemplateOutlet]=\"rowTpl\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n }\n }\n </tbody>\n </table>\n</div>\n\n<ng-template #rowTpl let-row>\n <tr\n [class.kpt-data-table__row--selected]=\"isSelected(row)\"\n [class.kpt-data-table__row--expanded]=\"hasRowDetail() && isExpanded(row)\"\n [style.height.px]=\"virtualScroll() ? rowHeight() : null\"\n (click)=\"onRowClick(row)\"\n >\n @if (hasRowDetail()) {\n <td class=\"kpt-data-table__expander\" [class.kpt-data-table__cell--frozen]=\"hasFrozen()\" [style.left.px]=\"expanderStickyLeft()\">\n <button\n type=\"button\"\n class=\"kpt-data-table__expander-btn\"\n [class.kpt-data-table__expander-btn--open]=\"isExpanded(row)\"\n [attr.aria-expanded]=\"isExpanded(row)\"\n [attr.aria-label]=\"i18n.t('dataTable.expandRow')\"\n (click)=\"$event.stopPropagation(); toggleExpand(row)\"\n >\n <kpt-icon name=\"chevron-right\" />\n </button>\n </td>\n }\n @if (selectable() !== 'none') {\n <td class=\"kpt-data-table__checkbox\" [class.kpt-data-table__cell--frozen]=\"hasFrozen()\" [style.left.px]=\"checkboxStickyLeft()\">\n <input\n type=\"checkbox\"\n [checked]=\"isSelected(row)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleRow(row)\"\n [attr.aria-label]=\"i18n.t('dataTable.selectRow')\"\n />\n </td>\n }\n @for (col of visibleOrderedColumns(); track col.field) {\n <td\n [attr.data-align]=\"col.align ?? 'start'\"\n [style.left.px]=\"frozenLeft(col.field)\"\n [class.kpt-data-table__cell--frozen]=\"isFrozen(col.field)\"\n [class.kpt-data-table__cell--editable]=\"isEditable(col) && !isEditingCell(row, col.field)\"\n [attr.tabindex]=\"isEditable(col) && !isEditingCell(row, col.field) ? 0 : null\"\n [attr.aria-label]=\"isEditable(col) && !isEditingCell(row, col.field) ? i18n.t('dataTable.editCell', { column: col.header }) : null\"\n (click)=\"isEditable(col) ? startEdit(row, col, $event) : null\"\n (keydown.enter)=\"isEditable(col) && !isEditingCell(row, col.field) ? startEdit(row, col, $event) : null\"\n >\n @if (isEditingCell(row, col.field)) {\n <div\n class=\"kpt-data-table__editor\"\n #editorHost\n (click)=\"$event.stopPropagation()\"\n (focusout)=\"onEditorFocusOut($event)\"\n >\n @if (cellEditTemplate(col.field); as etpl) {\n <ng-container\n [ngTemplateOutlet]=\"etpl\"\n [ngTemplateOutletContext]=\"{ $implicit: editingValue(), row, commit: commitEditValue, cancel: cancelEdit }\"\n />\n } @else {\n @switch (col.edit?.type) {\n @case ('text') {\n <kpt-input\n [value]=\"$any(editingValue()) ?? ''\"\n [placeholder]=\"col.edit.placeholder ?? ''\"\n (valueChange)=\"editingValue.set($event)\"\n (keydown.enter)=\"commitEdit()\"\n (keydown.escape)=\"cancelEdit()\"\n />\n }\n @case ('number') {\n <kpt-input-number\n [value]=\"$any(editingValue())\"\n [min]=\"col.edit.min\"\n [max]=\"col.edit.max\"\n [step]=\"col.edit.step ?? 1\"\n (valueChange)=\"editingValue.set($event)\"\n (keydown.enter)=\"commitEdit()\"\n (keydown.escape)=\"cancelEdit()\"\n />\n }\n @case ('date') {\n <kpt-datepicker\n [value]=\"$any(editingValue()) ?? ''\"\n (valueChange)=\"editingValue.set($event)\"\n [open]=\"editorPanelOpen()\"\n (openChange)=\"onEditorPanelToggle($event)\"\n />\n }\n @case ('select') {\n <kpt-select\n [options]=\"col.edit.options ?? []\"\n [placeholder]=\"col.edit.placeholder ?? ''\"\n [value]=\"editingValue()\"\n (valueChange)=\"editingValue.set($event)\"\n [open]=\"editorPanelOpen()\"\n (openChange)=\"onEditorPanelToggle($event)\"\n />\n }\n @case ('multiselect') {\n <kpt-select\n multiple\n filter\n [options]=\"col.edit.options ?? []\"\n [placeholder]=\"col.edit.placeholder ?? ''\"\n [value]=\"editingValue()\"\n (valueChange)=\"editingValue.set($event)\"\n [open]=\"editorPanelOpen()\"\n (openChange)=\"onEditorPanelToggle($event)\"\n />\n }\n }\n }\n </div>\n } @else if (cellTemplate(col.field); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, value: getValue(row, col.field) }\"\n />\n } @else {\n {{ getValue(row, col.field) }}\n }\n </td>\n }\n </tr>\n @if (hasRowDetail() && isExpanded(row) && !virtualScroll()) {\n <tr class=\"kpt-data-table__detail-row\">\n <td class=\"kpt-data-table__detail\" [attr.colspan]=\"colspan()\">\n <ng-container [ngTemplateOutlet]=\"rowDetailTpl()\" [ngTemplateOutletContext]=\"{ $implicit: row }\" />\n </td>\n </tr>\n }\n</ng-template>\n\n<ng-template #filterRowTpl>\n <tr class=\"kpt-data-table__filter-row\">\n @if (hasRowDetail()) {\n <th class=\"kpt-data-table__expander\" [class.kpt-data-table__cell--frozen]=\"hasFrozen()\" [style.left.px]=\"expanderStickyLeft()\"></th>\n }\n @if (selectable() !== 'none') {\n <th class=\"kpt-data-table__checkbox\" [class.kpt-data-table__cell--frozen]=\"hasFrozen()\" [style.left.px]=\"checkboxStickyLeft()\"></th>\n }\n @for (col of visibleOrderedColumns(); track col.field) {\n <th\n [style.width]=\"col.width\"\n [style.left.px]=\"frozenLeft(col.field)\"\n [attr.data-align]=\"col.align ?? 'start'\"\n [class.kpt-data-table__cell--frozen]=\"isFrozen(col.field)\"\n >\n @switch (col.filter?.type) {\n @case ('text') {\n <input\n class=\"kpt-data-table__fcell\"\n type=\"search\"\n [attr.placeholder]=\"col.filter.placeholder || ''\"\n [attr.aria-label]=\"i18n.t('dataTable.filter', { column: col.header })\"\n [value]=\"$any(columnFilters()[col.field]) || ''\"\n (input)=\"setColumnFilter(col.field, $any($event.target).value)\"\n (click)=\"$event.stopPropagation()\"\n />\n }\n @case ('number') {\n <input\n class=\"kpt-data-table__fcell\"\n type=\"text\"\n inputmode=\"numeric\"\n [attr.placeholder]=\"col.filter.placeholder || ''\"\n [attr.aria-label]=\"i18n.t('dataTable.filter', { column: col.header })\"\n [value]=\"$any(columnFilters()[col.field]) || ''\"\n (input)=\"onNumberFilter(col.field, $event)\"\n (click)=\"$event.stopPropagation()\"\n />\n }\n @case ('select') {\n <kpt-select\n [options]=\"col.filter.options || []\"\n [multiple]=\"!!col.filter.multiple\"\n filter\n [placeholder]=\"col.filter.placeholder || i18n.t('dataTable.all')\"\n [value]=\"columnFilters()[col.field] ?? null\"\n (valueChange)=\"setColumnFilter(col.field, $event)\"\n />\n }\n @case ('numberRange') {\n <div class=\"kpt-data-table__frange\">\n <input\n class=\"kpt-data-table__fcell\"\n type=\"text\"\n inputmode=\"numeric\"\n [attr.placeholder]=\"i18n.t('dataTable.min')\"\n [attr.aria-label]=\"i18n.t('dataTable.filterMin', { column: col.header })\"\n [value]=\"rangeVal(col.field).min\"\n (input)=\"setRangeFilter(col.field, 'min', $event)\"\n (click)=\"$event.stopPropagation()\"\n />\n <input\n class=\"kpt-data-table__fcell\"\n type=\"text\"\n inputmode=\"numeric\"\n [attr.placeholder]=\"i18n.t('dataTable.max')\"\n [attr.aria-label]=\"i18n.t('dataTable.filterMax', { column: col.header })\"\n [value]=\"rangeVal(col.field).max\"\n (input)=\"setRangeFilter(col.field, 'max', $event)\"\n (click)=\"$event.stopPropagation()\"\n />\n </div>\n }\n @case ('slider') {\n <div class=\"kpt-data-table__fslider\" (click)=\"$event.stopPropagation()\">\n <kpt-slider\n range\n [min]=\"col.filter.min ?? 0\"\n [max]=\"col.filter.max ?? 100\"\n [step]=\"col.filter.step ?? 1\"\n [value]=\"sliderVal(col)\"\n (valueChange)=\"setColumnFilter(col.field, $event)\"\n showValue\n />\n </div>\n }\n @case ('dateRange') {\n <kpt-date-range\n [placeholder]=\"col.filter.placeholder || i18n.t('dataTable.dateRange')\"\n [value]=\"$any(columnFilters()[col.field]) || { start: '', end: '' }\"\n (valueChange)=\"setColumnFilter(col.field, $event)\"\n />\n }\n }\n </th>\n }\n </tr>\n</ng-template>\n\n@if (pageSize() > 0 && !virtualScroll()) {\n <div class=\"kpt-data-table__pager\">\n <ng-content select=\"[kptPaginatorActions]\" />\n <kpt-paginator\n [length]=\"filteredCount()\"\n [pageIndex]=\"pageIndex()\"\n (pageIndexChange)=\"pageIndex.set($event)\"\n [pageSize]=\"pageSizeState()\"\n (pageSizeChange)=\"pageSizeState.set($event)\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n />\n </div>\n}\n", styles: ["@layer kpt.components{.kpt-data-table{display:flex;flex-direction:column;background:var(--kpt-table-bg);color:var(--kpt-table-fg);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-table-border);border-radius:var(--kpt-table-radius, .75rem);overflow:hidden;flex-grow:1}.kpt-data-table__toolbar{display:flex;align-items:center;justify-content:space-between;gap:var(--kpt-space-3, .75rem);padding:var(--kpt-space-3, .75rem);border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-table-border)}.kpt-data-table__filter{width:100%;max-width:20rem;height:2.25rem;padding-inline:var(--kpt-space-3, .75rem);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text)}.kpt-data-table__filter:focus-visible{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-data-table__scroll{overflow:auto}.kpt-data-table__pager{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem)}.kpt-data-table__pager [kptPaginatorActions]{margin-inline-start:.5rem}.kpt-data-table__pager kpt-paginator{flex:1 1 auto;min-width:0}.kpt-data-table__table{width:100%;border-collapse:collapse;font-size:var(--kpt-font-size-sm, .875rem)}.kpt-data-table__table--frozen{width:max-content;min-width:100%}.kpt-data-table__table th,.kpt-data-table__table td{padding:var(--kpt-table-cell-padding, .75rem);text-align:start;border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-table-border)}.kpt-data-table__table th[data-align=center],.kpt-data-table__table td[data-align=center]{text-align:center}.kpt-data-table__table th[data-align=end],.kpt-data-table__table td[data-align=end]{text-align:end}.kpt-data-table__table thead th{position:sticky;top:0;z-index:1;background:var(--kpt-table-header-bg);color:var(--kpt-table-header-fg);font-weight:var(--kpt-font-weight-semibold, 600);white-space:nowrap;-webkit-user-select:none;user-select:none}.kpt-data-table__table thead tr:nth-child(2) th{top:var(--kpt-thead-offset, 0px)}.kpt-data-table__filter-row th{padding:var(--kpt-space-2, .5rem);font-weight:var(--kpt-font-weight-normal, 400);cursor:auto}.kpt-data-table__fcell{width:100%;height:2rem;padding-inline:var(--kpt-space-2, .5rem);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text);font:inherit}.kpt-data-table__fcell:focus-visible{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-data-table__filter-row kpt-select,.kpt-data-table__filter-row kpt-date-range{display:block;width:100%;font-weight:var(--kpt-font-weight-normal, 400)}.kpt-data-table__frange{display:flex;gap:var(--kpt-space-2, .5rem)}.kpt-data-table__frange .kpt-data-table__fcell{min-width:0}.kpt-data-table__fslider .kpt-slider-host{width:100%}.kpt-data-table__fslider .kpt-slider__value{min-width:auto;font-size:var(--kpt-font-size-xs, .75rem);color:var(--kpt-color-on-surface-muted)}.kpt-data-table__th--sortable{cursor:pointer}.kpt-data-table__th--sortable:hover{color:var(--kpt-color-on-surface)}.kpt-data-table__cell--editable{cursor:pointer}.kpt-data-table__cell--editable:hover{background:var(--kpt-table-row-hover)}.kpt-data-table__cell--editable:focus-visible{outline:var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);outline-offset:-2px}.kpt-data-table__editor{display:block;min-width:8rem}.kpt-data-table__editor .kpt-input-number-host{max-width:6.5rem}.kpt-data-table__editor .kpt-input-number__btn{width:1.75rem}.kpt-data-table__sort{margin-inline-start:.35em;opacity:.35}.kpt-data-table__sort--active{opacity:1}.kpt-data-table__th--draggable{cursor:grab}.kpt-data-table__th--draggable:active{cursor:grabbing}.kpt-data-table__th--dragover{box-shadow:inset 2px 0 0 0 var(--kpt-color-primary)}.kpt-data-table__grip{margin-inline-end:.4em;opacity:.45}.kpt-data-table__checkbox{width:1px;white-space:nowrap;text-align:center}.kpt-data-table__checkbox input[type=checkbox]{appearance:none;-webkit-appearance:none;position:relative;display:inline-block;width:1.15rem;height:1.15rem;margin:0;vertical-align:middle;cursor:pointer;border:var(--kpt-border-width-medium, 2px) solid var(--kpt-form-field-border);border-radius:var(--kpt-radius-sm, .25rem);background:var(--kpt-form-field-bg);transition:background-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard),border-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-data-table__checkbox input[type=checkbox]:after{content:\"\";position:absolute;inset:0;opacity:0;background-color:var(--kpt-color-on-primary);transition:opacity var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard);-webkit-mask:no-repeat center/.85rem;mask:no-repeat center/.85rem}.kpt-data-table__checkbox input[type=checkbox]:checked,.kpt-data-table__checkbox input[type=checkbox]:indeterminate{background:var(--kpt-color-primary);border-color:var(--kpt-color-primary)}.kpt-data-table__checkbox input[type=checkbox]:checked:after{opacity:1;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13 4.5 6.5 11 3 7.5' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13 4.5 6.5 11 3 7.5' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\")}.kpt-data-table__checkbox input[type=checkbox]:indeterminate:after{opacity:1;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8h9' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8h9' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round'/%3E%3C/svg%3E\")}.kpt-data-table__checkbox input[type=checkbox]:focus-visible{outline:var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);outline-offset:2px}.kpt-data-table__expander{width:2.5rem;min-width:2.5rem;text-align:center;white-space:nowrap}.kpt-data-table__expander-btn{display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;padding:0;border:none;border-radius:var(--kpt-radius-sm, .25rem);background:transparent;color:var(--kpt-color-on-surface-muted);cursor:pointer;transition:background-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard),color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-data-table__expander-btn kpt-icon{display:inline-flex;transition:transform var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-data-table__expander-btn:hover{background:var(--kpt-table-row-hover);color:var(--kpt-color-on-surface)}.kpt-data-table__expander-btn:focus-visible{outline:var(--kpt-border-width-medium, 2px) solid var(--kpt-color-focus-ring);outline-offset:2px}.kpt-data-table__expander-btn--open{color:var(--kpt-color-primary)}.kpt-data-table__expander-btn--open kpt-icon{transform:rotate(90deg)}.kpt-data-table__detail-row>.kpt-data-table__detail{padding:var(--kpt-space-4, 1rem);background:var(--kpt-table-detail-bg, var(--kpt-color-surface-variant, var(--kpt-table-row-hover)));border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-table-border);box-shadow:inset 3px 0 0 0 var(--kpt-color-primary)}.kpt-data-table tbody tr{transition:background-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-data-table tbody tr:hover{background:var(--kpt-table-row-hover)}.kpt-data-table tbody tr.kpt-data-table__detail-row:hover{background:transparent}.kpt-data-table__row--selected{background:var(--kpt-table-row-selected)!important}.kpt-data-table__row--expanded{background:var(--kpt-table-row-hover)}.kpt-data-table__table--frozen .kpt-data-table__checkbox{width:3rem;min-width:3rem}.kpt-data-table__table--frozen .kpt-data-table__expander{width:2.5rem;min-width:2.5rem}.kpt-data-table__cell--frozen{position:sticky;z-index:1;background:var(--kpt-table-bg);border-inline-end:var(--kpt-border-width-thin, 1px) solid var(--kpt-table-border)}.kpt-data-table thead th.kpt-data-table__cell--frozen{z-index:3;background:var(--kpt-table-header-bg)}.kpt-data-table tbody tr:hover .kpt-data-table__cell--frozen{background:var(--kpt-table-row-hover)}.kpt-data-table__row--selected.kpt-data-table__row--selected .kpt-data-table__cell--frozen,.kpt-data-table tbody tr.kpt-data-table__row--selected .kpt-data-table__cell--frozen{background:var(--kpt-table-row-selected)}.kpt-data-table__state{padding:var(--kpt-space-8, 2rem)!important;text-align:center!important;color:var(--kpt-color-on-surface-muted)}.kpt-data-table__table--virtual td{padding-block:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.kpt-data-table__spacer td{padding:0!important;border:0!important}.kpt-data-table tbody tr:last-child td{border-bottom:0}}\n"] }]
|
|
10532
|
+
}], () => [], { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], filterable: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterable", required: false }] }], filterRowPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterRowPosition", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], rowKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowKey", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], rowHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowHeight", required: false }] }], reorderable: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderable", required: false }] }], exportable: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportable", required: false }] }], exportFilename: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportFilename", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], totalRecords: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalRecords", required: false }] }], expandable: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandable", required: false }] }], multiExpand: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiExpand", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], expandedRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedRows", required: false }] }, { type: i0.Output, args: ["expandedRowsChange"] }], hiddenFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenFields", required: false }] }, { type: i0.Output, args: ["hiddenFieldsChange"] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], lazyLoad: [{ type: i0.Output, args: ["lazyLoad"] }], cellEdit: [{ type: i0.Output, args: ["cellEdit"] }], scrollEl: [{ type: i0.ViewChild, args: ['scrollEl', { isSignal: true }] }], theadEl: [{ type: i0.ViewChild, args: ['theadEl', { isSignal: true }] }], editorHost: [{ type: i0.ViewChild, args: ['editorHost', { isSignal: true }] }], cellDefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KptCellDef), { isSignal: true }] }], cellEditDefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KptCellEditDef), { isSignal: true }] }], rowDetailDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KptRowDetailDef), { isSignal: true }] }] }); })();
|
|
10533
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDataTable, { className: "KptDataTable", filePath: "lib/data-table/data-table.component.ts", lineNumber: 168 }); })();
|
|
9897
10534
|
|
|
9898
10535
|
const _c0$d = a0 => ({ $implicit: a0, level: 0 });
|
|
9899
10536
|
const _c1$4 = (a0, a1) => ({ $implicit: a0, level: a1 });
|
|
@@ -12611,5 +13248,5 @@ class KptSpeedDial {
|
|
|
12611
13248
|
* Generated bundle index. Do not edit.
|
|
12612
13249
|
*/
|
|
12613
13250
|
|
|
12614
|
-
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 };
|
|
13251
|
+
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 };
|
|
12615
13252
|
//# sourceMappingURL=konce-pt-angular.mjs.map
|