@konce-pt/angular 0.8.3 → 0.8.5
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 +380 -0
- package/chat/src/lib/llms.txt +160 -0
- package/fesm2022/konce-pt-angular-chat.mjs +1270 -0
- package/fesm2022/konce-pt-angular-chat.mjs.map +1 -0
- package/fesm2022/konce-pt-angular.mjs +1755 -398
- package/fesm2022/konce-pt-angular.mjs.map +1 -1
- package/package.json +15 -8
- package/src/lib/backdrop/llms.txt +163 -0
- package/src/lib/chip/llms.txt +8 -0
- package/src/lib/data-view/llms.txt +18 -2
- package/src/lib/icon-button/llms.txt +1 -0
- package/src/lib/mention/llms.txt +60 -0
- package/src/lib/order-list/llms.txt +13 -2
- package/src/lib/peek/llms.txt +45 -0
- package/src/lib/pick-list/llms.txt +18 -2
- package/src/lib/rich-text/llms.txt +15 -0
- package/types/konce-pt-angular-chat.d.ts +334 -0
- package/types/konce-pt-angular-chat.d.ts.map +1 -0
- package/types/konce-pt-angular.d.ts +454 -18
- package/types/konce-pt-angular.d.ts.map +1 -1
|
@@ -7,10 +7,14 @@ import { KPT_MESSAGES_EN, KPT_MESSAGES_PL, deepMerge, translate, weekdayNames, m
|
|
|
7
7
|
export { KPT_MESSAGES_EN, KPT_MESSAGES_PL } from '@konce-pt/i18n';
|
|
8
8
|
import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
|
|
9
9
|
import { pad, hourMarks, minuteMarks, handAngle, handIsInner, parseTime, from12h, hourFromAngle, minuteFromAngle, commitLevelFor, decadeStart, centuryStart, canPageBack, canPageForward, formatTime, buildDayGrid, toIso, selectedYearMonth, buildMonthCells, buildYearCells, buildDecadeCells, initialPage, resolveStartView, parseDateTime, formatDate, KPT_CALENDAR_LEVELS, pageBy, clampVisibleMonths, datePart, timePart, buildRangeGrid, pickRangeDay } from '@konce-pt/datetime';
|
|
10
|
+
import { KPT_MENTION_LIMIT, mentionQuery, filterMentions, parseMentionText } from '@konce-pt/mention';
|
|
11
|
+
export { KPT_MENTION_LIMIT, applyMention, collectMentions, filterMentions, foldMentionText, mentionQuery, mentionToken, parseMentionText } from '@konce-pt/mention';
|
|
12
|
+
import { KPT_SIGNAL_GRID_CELL, KPT_SIGNAL_GRID_GAP, KPT_SIGNAL_GRID_DENSITY, KPT_SIGNAL_GRID_FALLOFF, KPT_WAVE_ROTATION, KPT_WAVE_BAND, KPT_WAVE_AMPLITUDE, KPT_BACKDROP_MAX_STEP, resolveBackdropColors, adaptBackdropValue, readBackdropSurface, readBackdropInk, createBackdropRenderer, KPT_BACKDROP_MAX_DPR, observeBackdropTheme, readBackdropLead } from '@konce-pt/backdrop';
|
|
13
|
+
export { KPT_SIGNAL_GRID_CELL, KPT_SIGNAL_GRID_DENSITY, KPT_SIGNAL_GRID_FALLOFF, KPT_SIGNAL_GRID_GAP, KPT_WAVE_AMPLITUDE, KPT_WAVE_BAND, KPT_WAVE_RESOLUTION, KPT_WAVE_ROTATION, buildSignalGrid, createBackdropRenderer, mixOklch, readCssColor, resolveWave, shiftHue, signalGridAlpha, signalGridDensity, waveIntensity, waveRamp } from '@konce-pt/backdrop';
|
|
10
14
|
import { form, required, email, minLength, validateTree, submit, FormField, FormRoot } from '@angular/forms/signals';
|
|
11
15
|
import { toText, aggregate, escapeCsvCell, isEmptyFilterValue, matchesColumnFilter } from '@konce-pt/table';
|
|
12
16
|
|
|
13
|
-
const _c0$
|
|
17
|
+
const _c0$J = ["*"];
|
|
14
18
|
function KptButton_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
15
19
|
i0.ɵɵdomElement(0, "span", 1);
|
|
16
20
|
} }
|
|
@@ -45,7 +49,7 @@ class KptButton {
|
|
|
45
49
|
static { this.ɵfac = function KptButton_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptButton)(); }; }
|
|
46
50
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptButton, selectors: [["kpt-button"]], hostAttrs: [1, "kpt-button-host"], hostVars: 2, hostBindings: function KptButton_HostBindings(rf, ctx) { if (rf & 2) {
|
|
47
51
|
i0.ɵɵclassProp("kpt-button-host--full", ctx.fullWidth());
|
|
48
|
-
} }, inputs: { variant: [1, "variant"], size: [1, "size"], type: [1, "type"], disabled: [1, "disabled"], loading: [1, "loading"], fullWidth: [1, "fullWidth"] }, ngContentSelectors: _c0$
|
|
52
|
+
} }, inputs: { variant: [1, "variant"], size: [1, "size"], type: [1, "type"], disabled: [1, "disabled"], loading: [1, "loading"], fullWidth: [1, "fullWidth"] }, ngContentSelectors: _c0$J, decls: 4, vars: 8, consts: [[1, "kpt-button", 3, "type", "disabled"], ["aria-hidden", "true", 1, "kpt-button__spinner"], [1, "kpt-button__content"]], template: function KptButton_Template(rf, ctx) { if (rf & 1) {
|
|
49
53
|
i0.ɵɵprojectionDef();
|
|
50
54
|
i0.ɵɵdomElementStart(0, "button", 0);
|
|
51
55
|
i0.ɵɵconditionalCreate(1, KptButton_Conditional_1_Template, 1, 0, "span", 1);
|
|
@@ -69,7 +73,7 @@ class KptButton {
|
|
|
69
73
|
}], null, { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }] }); })();
|
|
70
74
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptButton, { className: "KptButton", filePath: "lib/button/button.component.ts", lineNumber: 32 }); })();
|
|
71
75
|
|
|
72
|
-
const _c0$
|
|
76
|
+
const _c0$I = ["*"];
|
|
73
77
|
function KptIconButton_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
74
78
|
i0.ɵɵdomElement(0, "span", 1);
|
|
75
79
|
} }
|
|
@@ -106,18 +110,25 @@ class KptIconButton {
|
|
|
106
110
|
*/
|
|
107
111
|
this.ariaPressed = input(null, /* @ts-ignore */
|
|
108
112
|
...(ngDevMode ? [{ debugName: "ariaPressed" }] : /* istanbul ignore next */ []));
|
|
113
|
+
/**
|
|
114
|
+
* Stan rozwinięcia dla przycisku otwierającego panel (wybierak, menu). Z tego samego powodu
|
|
115
|
+
* co `ariaPressed` musi zjechać na wewnętrzny `<button>` — host nie ma roli przycisku, więc
|
|
116
|
+
* atrybut postawiony na nim nie znaczy dla czytnika nic. `null` (domyślnie) go nie wypisuje.
|
|
117
|
+
*/
|
|
118
|
+
this.ariaExpanded = input(null, /* @ts-ignore */
|
|
119
|
+
...(ngDevMode ? [{ debugName: "ariaExpanded" }] : /* istanbul ignore next */ []));
|
|
109
120
|
this.isDisabled = computed(() => this.disabled() || this.loading(), /* @ts-ignore */
|
|
110
121
|
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
111
122
|
}
|
|
112
123
|
static { this.ɵfac = function KptIconButton_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptIconButton)(); }; }
|
|
113
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptIconButton, selectors: [["kpt-icon-button"]], hostAttrs: [1, "kpt-icon-button-host"], inputs: { variant: [1, "variant"], size: [1, "size"], shape: [1, "shape"], type: [1, "type"], disabled: [1, "disabled"], loading: [1, "loading"], ariaLabel: [1, "ariaLabel"], ariaPressed: [1, "ariaPressed"] }, ngContentSelectors: _c0$
|
|
124
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptIconButton, selectors: [["kpt-icon-button"]], hostAttrs: [1, "kpt-icon-button-host"], inputs: { variant: [1, "variant"], size: [1, "size"], shape: [1, "shape"], type: [1, "type"], disabled: [1, "disabled"], loading: [1, "loading"], ariaLabel: [1, "ariaLabel"], ariaPressed: [1, "ariaPressed"], ariaExpanded: [1, "ariaExpanded"] }, ngContentSelectors: _c0$I, decls: 3, vars: 10, consts: [[1, "kpt-icon-button", 3, "type", "disabled"], ["aria-hidden", "true", 1, "kpt-icon-button__spinner"]], template: function KptIconButton_Template(rf, ctx) { if (rf & 1) {
|
|
114
125
|
i0.ɵɵprojectionDef();
|
|
115
126
|
i0.ɵɵdomElementStart(0, "button", 0);
|
|
116
127
|
i0.ɵɵconditionalCreate(1, KptIconButton_Conditional_1_Template, 1, 0, "span", 1)(2, KptIconButton_Conditional_2_Template, 1, 0);
|
|
117
128
|
i0.ɵɵdomElementEnd();
|
|
118
129
|
} if (rf & 2) {
|
|
119
130
|
i0.ɵɵdomProperty("type", ctx.type())("disabled", ctx.isDisabled());
|
|
120
|
-
i0.ɵɵattribute("data-variant", ctx.variant())("data-size", ctx.size())("data-shape", ctx.shape())("aria-label", ctx.ariaLabel())("aria-pressed", ctx.ariaPressed())("aria-busy", ctx.loading() ? "true" : null);
|
|
131
|
+
i0.ɵɵattribute("data-variant", ctx.variant())("data-size", ctx.size())("data-shape", ctx.shape())("aria-label", ctx.ariaLabel())("aria-pressed", ctx.ariaPressed())("aria-expanded", ctx.ariaExpanded())("aria-busy", ctx.loading() ? "true" : null);
|
|
121
132
|
i0.ɵɵadvance();
|
|
122
133
|
i0.ɵɵconditional(ctx.loading() ? 1 : 2);
|
|
123
134
|
} }, styles: ["@layer kpt.components{.kpt-icon-button-host{display:inline-flex}.kpt-icon-button{--%NS%_bg: transparent;--%NS%_fg: var(--%NS%kpt-color-on-surface);--%NS%_bg-hover: var(--%NS%kpt-color-muted);position:relative;isolation:isolate;display:inline-flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;border:var(--%NS%kpt-border-width-thin, 1px) solid transparent;border-radius:var(--%NS%kpt-radius-full, 9999px);background:var(--%NS%_bg);color:var(--%NS%_fg);cursor:pointer;font-size:1.25rem}.kpt-icon-button:after{content:\"\";position:absolute;inset:0;z-index:-1;border-radius:inherit;background-color:var(--%NS%_bg-hover);opacity:0;pointer-events:none;transition:opacity var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-icon-button:hover:not(:disabled):after{opacity:1}.kpt-icon-button:disabled{cursor:not-allowed;opacity:.5}.kpt-icon-button[data-shape=square]{border-radius:var(--%NS%kpt-radius-md, .5rem)}.kpt-icon-button[data-size=sm]{width:2rem;height:2rem;font-size:1rem}.kpt-icon-button[data-size=lg]{width:3rem;height:3rem;font-size:1.5rem}.kpt-icon-button[data-variant=filled]{--%NS%_bg: var(--%NS%kpt-color-primary);--%NS%_fg: var(--%NS%kpt-color-on-primary);--%NS%_bg-hover: var(--%NS%kpt-color-primary-hover)}.kpt-icon-button[data-variant=tonal]{--%NS%_bg: var(--%NS%kpt-color-muted);--%NS%_fg: var(--%NS%kpt-color-on-muted);--%NS%_bg-hover: var(--%NS%kpt-color-muted-hover)}.kpt-icon-button[data-variant=outline]{border-color:var(--%NS%kpt-color-border-strong)}.kpt-icon-button[data-variant=danger]{--%NS%_bg: var(--%NS%kpt-color-danger);--%NS%_fg: var(--%NS%kpt-color-on-danger);--%NS%_bg-hover: color-mix(in oklch, var(--%NS%kpt-color-danger) 88%, black)}@media(prefers-reduced-motion:reduce){.kpt-icon-button:after{transition:none}}.kpt-icon-button__spinner{width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:kpt-spinner-rotate .6s linear infinite}}\n"], encapsulation: 2 }); }
|
|
@@ -134,6 +145,7 @@ class KptIconButton {
|
|
|
134
145
|
[disabled]="isDisabled()"
|
|
135
146
|
[attr.aria-label]="ariaLabel()"
|
|
136
147
|
[attr.aria-pressed]="ariaPressed()"
|
|
148
|
+
[attr.aria-expanded]="ariaExpanded()"
|
|
137
149
|
[attr.aria-busy]="loading() ? 'true' : null"
|
|
138
150
|
>
|
|
139
151
|
@if (loading()) {
|
|
@@ -143,8 +155,8 @@ class KptIconButton {
|
|
|
143
155
|
}
|
|
144
156
|
</button>
|
|
145
157
|
`, host: { class: 'kpt-icon-button-host' }, styles: ["@layer kpt.components{.kpt-icon-button-host{display:inline-flex}.kpt-icon-button{--_bg: transparent;--_fg: var(--kpt-color-on-surface);--_bg-hover: var(--kpt-color-muted);position:relative;isolation:isolate;display:inline-flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;border:var(--kpt-border-width-thin, 1px) solid transparent;border-radius:var(--kpt-radius-full, 9999px);background:var(--_bg);color:var(--_fg);cursor:pointer;font-size:1.25rem}.kpt-icon-button:after{content:\"\";position:absolute;inset:0;z-index:-1;border-radius:inherit;background-color:var(--_bg-hover);opacity:0;pointer-events:none;transition:opacity var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-icon-button:hover:not(:disabled):after{opacity:1}.kpt-icon-button:disabled{cursor:not-allowed;opacity:.5}.kpt-icon-button[data-shape=square]{border-radius:var(--kpt-radius-md, .5rem)}.kpt-icon-button[data-size=sm]{width:2rem;height:2rem;font-size:1rem}.kpt-icon-button[data-size=lg]{width:3rem;height:3rem;font-size:1.5rem}.kpt-icon-button[data-variant=filled]{--_bg: var(--kpt-color-primary);--_fg: var(--kpt-color-on-primary);--_bg-hover: var(--kpt-color-primary-hover)}.kpt-icon-button[data-variant=tonal]{--_bg: var(--kpt-color-muted);--_fg: var(--kpt-color-on-muted);--_bg-hover: var(--kpt-color-muted-hover)}.kpt-icon-button[data-variant=outline]{border-color:var(--kpt-color-border-strong)}.kpt-icon-button[data-variant=danger]{--_bg: var(--kpt-color-danger);--_fg: var(--kpt-color-on-danger);--_bg-hover: color-mix(in oklch, var(--kpt-color-danger) 88%, black)}@media(prefers-reduced-motion:reduce){.kpt-icon-button:after{transition:none}}.kpt-icon-button__spinner{width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:kpt-spinner-rotate .6s linear infinite}}\n"] }]
|
|
146
|
-
}], null, { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: true }] }], ariaPressed: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaPressed", required: false }] }] }); })();
|
|
147
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptIconButton, { className: "KptIconButton", filePath: "lib/icon-button/icon-button.component.ts", lineNumber:
|
|
158
|
+
}], null, { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: true }] }], ariaPressed: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaPressed", required: false }] }], ariaExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaExpanded", required: false }] }] }); })();
|
|
159
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptIconButton, { className: "KptIconButton", filePath: "lib/icon-button/icon-button.component.ts", lineNumber: 38 }); })();
|
|
148
160
|
|
|
149
161
|
const _forTrack0$e = ($index, $item) => $item.value;
|
|
150
162
|
function KptButtonGroup_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -218,7 +230,7 @@ class KptButtonGroup {
|
|
|
218
230
|
}], null, { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", 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"] }] }); })();
|
|
219
231
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptButtonGroup, { className: "KptButtonGroup", filePath: "lib/button-group/button-group.component.ts", lineNumber: 41 }); })();
|
|
220
232
|
|
|
221
|
-
const _c0$
|
|
233
|
+
const _c0$H = ["*"];
|
|
222
234
|
/**
|
|
223
235
|
* Floating Action Button (FAB) — okrągły, wyniesiony przycisk akcji. Wariant `extended` = pigułka z tekstem.
|
|
224
236
|
*
|
|
@@ -241,7 +253,7 @@ class KptFab {
|
|
|
241
253
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
242
254
|
}
|
|
243
255
|
static { this.ɵfac = function KptFab_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptFab)(); }; }
|
|
244
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptFab, selectors: [["kpt-fab"]], hostAttrs: [1, "kpt-fab-host"], inputs: { variant: [1, "variant"], size: [1, "size"], extended: [1, "extended"], disabled: [1, "disabled"], type: [1, "type"], ariaLabel: [1, "ariaLabel"] }, ngContentSelectors: _c0$
|
|
256
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptFab, selectors: [["kpt-fab"]], hostAttrs: [1, "kpt-fab-host"], inputs: { variant: [1, "variant"], size: [1, "size"], extended: [1, "extended"], disabled: [1, "disabled"], type: [1, "type"], ariaLabel: [1, "ariaLabel"] }, ngContentSelectors: _c0$H, decls: 2, vars: 7, consts: [[1, "kpt-fab", 3, "type", "disabled"]], template: function KptFab_Template(rf, ctx) { if (rf & 1) {
|
|
245
257
|
i0.ɵɵprojectionDef();
|
|
246
258
|
i0.ɵɵdomElementStart(0, "button", 0);
|
|
247
259
|
i0.ɵɵprojection(1);
|
|
@@ -441,7 +453,7 @@ class KptAvatar {
|
|
|
441
453
|
}], 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 }] }] }); })();
|
|
442
454
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptAvatar, { className: "KptAvatar", filePath: "lib/avatar/avatar.component.ts", lineNumber: 46 }); })();
|
|
443
455
|
|
|
444
|
-
const _c0$
|
|
456
|
+
const _c0$G = ["*"];
|
|
445
457
|
/**
|
|
446
458
|
* Znacznik (badge) — licznik lub kropka statusu. Standalone lub nałożony na treść (`overlay`).
|
|
447
459
|
*
|
|
@@ -473,7 +485,7 @@ class KptBadge {
|
|
|
473
485
|
...(ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []));
|
|
474
486
|
}
|
|
475
487
|
static { this.ɵfac = function KptBadge_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptBadge)(); }; }
|
|
476
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptBadge, selectors: [["kpt-badge"]], hostAttrs: [1, "kpt-badge-host"], inputs: { value: [1, "value"], variant: [1, "variant"], size: [1, "size"], dot: [1, "dot"], overlay: [1, "overlay"], max: [1, "max"] }, ngContentSelectors: _c0$
|
|
488
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptBadge, selectors: [["kpt-badge"]], hostAttrs: [1, "kpt-badge-host"], inputs: { value: [1, "value"], variant: [1, "variant"], size: [1, "size"], dot: [1, "dot"], overlay: [1, "overlay"], max: [1, "max"] }, ngContentSelectors: _c0$G, decls: 3, vars: 7, consts: [[1, "kpt-badge"]], template: function KptBadge_Template(rf, ctx) { if (rf & 1) {
|
|
477
489
|
i0.ɵɵprojectionDef();
|
|
478
490
|
i0.ɵɵprojection(0);
|
|
479
491
|
i0.ɵɵdomElementStart(1, "span", 0);
|
|
@@ -566,7 +578,7 @@ class KptI18n {
|
|
|
566
578
|
args: [{ providedIn: 'root' }]
|
|
567
579
|
}], () => [], null); })();
|
|
568
580
|
|
|
569
|
-
const _c0$
|
|
581
|
+
const _c0$F = ["*"];
|
|
570
582
|
function KptSplitButton_ng_template_6_For_2_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
571
583
|
i0.ɵɵelement(0, "div", 7);
|
|
572
584
|
} }
|
|
@@ -708,7 +720,7 @@ class KptSplitButton {
|
|
|
708
720
|
this.open.set(false);
|
|
709
721
|
}
|
|
710
722
|
static { this.ɵfac = function KptSplitButton_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptSplitButton)(); }; }
|
|
711
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptSplitButton, selectors: [["kpt-split-button"]], hostAttrs: [1, "kpt-split-button-host"], inputs: { variant: [1, "variant"], items: [1, "items"], disabled: [1, "disabled"] }, outputs: { primaryClick: "primaryClick", selected: "selected" }, ngContentSelectors: _c0$
|
|
723
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptSplitButton, selectors: [["kpt-split-button"]], hostAttrs: [1, "kpt-split-button-host"], inputs: { variant: [1, "variant"], items: [1, "items"], disabled: [1, "disabled"] }, outputs: { primaryClick: "primaryClick", selected: "selected" }, ngContentSelectors: _c0$F, decls: 7, vars: 8, consts: [["origin", "cdkOverlayOrigin"], [1, "kpt-split-button"], ["type", "button", 1, "kpt-split-button__main", 3, "click", "disabled"], ["type", "button", "cdkOverlayOrigin", "", 1, "kpt-split-button__toggle", 3, "click", "disabled"], ["name", "chevron-down"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop"], ["role", "menu", 1, "kpt-split-button__panel"], ["role", "separator", 1, "kpt-split-button__separator"], ["role", "presentation", 1, "kpt-split-button__header"], ["type", "button", 1, "kpt-split-button__item", 3, "kpt-split-button__item--danger", "disabled"], ["size", "sm", 3, "src", "name", "icon"], [3, "name"], [1, "kpt-split-button__text"], [1, "kpt-split-button__label"], [1, "kpt-split-button__description"], ["type", "button", 1, "kpt-split-button__item", 3, "click", "disabled"], [1, "kpt-split-button__badge", 3, "value", "variant"]], template: function KptSplitButton_Template(rf, ctx) { if (rf & 1) {
|
|
712
724
|
i0.ɵɵprojectionDef();
|
|
713
725
|
i0.ɵɵelementStart(0, "div", 1)(1, "button", 2);
|
|
714
726
|
i0.ɵɵlistener("click", function KptSplitButton_Template_button_click_1_listener() { return ctx.primaryClick.emit(); });
|
|
@@ -941,7 +953,7 @@ function provideKptI18n(config = {}) {
|
|
|
941
953
|
* dzięki czemu komponenty i `public-api.ts` nie musiały się zmieniać.
|
|
942
954
|
*/
|
|
943
955
|
|
|
944
|
-
const _c0$
|
|
956
|
+
const _c0$E = ["*"];
|
|
945
957
|
function KptChip_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
946
958
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
947
959
|
i0.ɵɵelementStart(0, "button", 2);
|
|
@@ -959,18 +971,26 @@ function KptChip_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
959
971
|
* @example
|
|
960
972
|
* <kpt-chip>Angular</kpt-chip>
|
|
961
973
|
* <kpt-chip variant="success" removable (removed)="onRemove()">UI</kpt-chip>
|
|
974
|
+
* <kpt-chip textTransform="capitalize">nowość · zestaw startowy</kpt-chip>
|
|
962
975
|
*/
|
|
963
976
|
class KptChip {
|
|
964
977
|
constructor() {
|
|
965
978
|
this.variant = input('neutral', /* @ts-ignore */
|
|
966
979
|
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
980
|
+
/**
|
|
981
|
+
* Wielkość liter etykiety. `capitalize` podnosi pierwszą literę każdego słowa — także po
|
|
982
|
+
* dywizie („Agent-Ready"), bo CSS nie wie, gdzie kończy się wyraz złożony; przy takich
|
|
983
|
+
* napisach pewniejszy jest zapis wprost w treści.
|
|
984
|
+
*/
|
|
985
|
+
this.textTransform = input('none', /* @ts-ignore */
|
|
986
|
+
...(ngDevMode ? [{ debugName: "textTransform" }] : /* istanbul ignore next */ []));
|
|
967
987
|
this.removable = input(false, { ...(ngDevMode ? { debugName: "removable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
968
988
|
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
969
989
|
this.removed = output();
|
|
970
990
|
this.i18n = inject(KptI18n);
|
|
971
991
|
}
|
|
972
992
|
static { this.ɵfac = function KptChip_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptChip)(); }; }
|
|
973
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptChip, selectors: [["kpt-chip"]], hostAttrs: [1, "kpt-chip-host"], inputs: { variant: [1, "variant"], removable: [1, "removable"], disabled: [1, "disabled"] }, outputs: { removed: "removed" }, ngContentSelectors: _c0$
|
|
993
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptChip, selectors: [["kpt-chip"]], hostAttrs: [1, "kpt-chip-host"], inputs: { variant: [1, "variant"], textTransform: [1, "textTransform"], removable: [1, "removable"], disabled: [1, "disabled"] }, outputs: { removed: "removed" }, ngContentSelectors: _c0$E, decls: 3, vars: 5, consts: [[1, "kpt-chip"], ["type", "button", 1, "kpt-chip__remove", 3, "disabled"], ["type", "button", 1, "kpt-chip__remove", 3, "click", "disabled"], ["name", "x"]], template: function KptChip_Template(rf, ctx) { if (rf & 1) {
|
|
974
994
|
i0.ɵɵprojectionDef();
|
|
975
995
|
i0.ɵɵelementStart(0, "span", 0);
|
|
976
996
|
i0.ɵɵprojection(1);
|
|
@@ -978,15 +998,20 @@ class KptChip {
|
|
|
978
998
|
i0.ɵɵelementEnd();
|
|
979
999
|
} if (rf & 2) {
|
|
980
1000
|
i0.ɵɵclassProp("kpt-chip--disabled", ctx.disabled());
|
|
981
|
-
i0.ɵɵattribute("data-variant", ctx.variant());
|
|
1001
|
+
i0.ɵɵattribute("data-variant", ctx.variant())("data-text-transform", ctx.textTransform() === "none" ? null : ctx.textTransform());
|
|
982
1002
|
i0.ɵɵadvance(2);
|
|
983
1003
|
i0.ɵɵconditional(ctx.removable() ? 2 : -1);
|
|
984
|
-
} }, dependencies: [KptIcon], styles: ["@layer kpt.components{.kpt-chip-host{display:inline-flex;vertical-align:middle}.kpt-chip{--%NS%_bg: var(--%NS%kpt-color-muted);--%NS%_fg: var(--%NS%kpt-color-on-muted);display:inline-flex;align-items:center;gap:.35rem;height:1.6rem;padding-inline:.6rem;border-radius:var(--%NS%kpt-radius-full, 9999px);background:var(--%NS%_bg);color:var(--%NS%_fg);font-size:var(--%NS%kpt-font-size-xs, .75rem);font-weight:var(--%NS%kpt-font-weight-medium, 500);white-space:nowrap}.kpt-chip[data-variant=primary]{--%NS%_bg: color-mix(in oklch, var(--%NS%kpt-color-primary) 14%, var(--%NS%kpt-color-surface));--%NS%_fg: var(--%NS%kpt-color-primary)}.kpt-chip[data-variant=success]{--%NS%_bg: color-mix(in oklch, var(--%NS%kpt-color-success) 18%, transparent);--%NS%_fg: var(--%NS%kpt-color-success)}.kpt-chip[data-variant=danger]{--%NS%_bg: color-mix(in oklch, var(--%NS%kpt-color-danger) 16%, transparent);--%NS%_fg: var(--%NS%kpt-color-danger)}.kpt-chip[data-variant=warning]{--%NS%_bg: color-mix(in oklch, var(--%NS%kpt-color-warning) 20%, transparent);--%NS%_fg: var(--%NS%kpt-color-warning)}.kpt-chip[data-variant=info]{--%NS%_bg: color-mix(in oklch, var(--%NS%kpt-color-info) 16%, transparent);--%NS%_fg: var(--%NS%kpt-color-info)}.kpt-chip--disabled{opacity:.55}.kpt-chip__remove{display:inline-flex;align-items:center;border:0;background:none;cursor:pointer;color:inherit;opacity:.7;padding:0;margin-inline-end:-.2rem}.kpt-chip__remove:hover:not(:disabled){opacity:1}.kpt-chip__remove:disabled{cursor:not-allowed}}\n"], encapsulation: 2 }); }
|
|
1004
|
+
} }, dependencies: [KptIcon], styles: ["@layer kpt.components{.kpt-chip-host{display:inline-flex;vertical-align:middle}.kpt-chip{--%NS%_bg: var(--%NS%kpt-color-muted);--%NS%_fg: var(--%NS%kpt-color-on-muted);display:inline-flex;align-items:center;gap:.35rem;height:1.6rem;padding-inline:.6rem;border-radius:var(--%NS%kpt-radius-full, 9999px);background:var(--%NS%_bg);color:var(--%NS%_fg);font-size:var(--%NS%kpt-font-size-xs, .75rem);font-weight:var(--%NS%kpt-font-weight-medium, 500);white-space:nowrap}.kpt-chip[data-variant=primary]{--%NS%_bg: color-mix(in oklch, var(--%NS%kpt-color-primary) 14%, var(--%NS%kpt-color-surface));--%NS%_fg: var(--%NS%kpt-color-primary)}.kpt-chip[data-variant=success]{--%NS%_bg: color-mix(in oklch, var(--%NS%kpt-color-success) 18%, transparent);--%NS%_fg: var(--%NS%kpt-color-success)}.kpt-chip[data-variant=danger]{--%NS%_bg: color-mix(in oklch, var(--%NS%kpt-color-danger) 16%, transparent);--%NS%_fg: var(--%NS%kpt-color-danger)}.kpt-chip[data-variant=warning]{--%NS%_bg: color-mix(in oklch, var(--%NS%kpt-color-warning) 20%, transparent);--%NS%_fg: var(--%NS%kpt-color-warning)}.kpt-chip[data-variant=info]{--%NS%_bg: color-mix(in oklch, var(--%NS%kpt-color-info) 16%, transparent);--%NS%_fg: var(--%NS%kpt-color-info)}.kpt-chip[data-text-transform=capitalize]{text-transform:capitalize;font-size:var(--%NS%kpt-font-size-sm, .85rem);font-weight:var(--%NS%kpt-font-weight-light, 100)}.kpt-chip[data-text-transform=uppercase]{text-transform:uppercase;font-size:var(--%NS%kpt-font-size-sm, .85rem);font-weight:var(--%NS%kpt-font-weight-light, 100)}.kpt-chip[data-text-transform=lowercase]{text-transform:lowercase;font-size:var(--%NS%kpt-font-size-sm, .75rem);font-weight:var(--%NS%kpt-font-weight-light, 100)}.kpt-chip--disabled{opacity:.55}.kpt-chip__remove{display:inline-flex;align-items:center;border:0;background:none;cursor:pointer;color:inherit;opacity:.7;padding:0;margin-inline-end:-.2rem}.kpt-chip__remove:hover:not(:disabled){opacity:1}.kpt-chip__remove:disabled{cursor:not-allowed}}\n"], encapsulation: 2 }); }
|
|
985
1005
|
}
|
|
986
1006
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptChip, [{
|
|
987
1007
|
type: Component,
|
|
988
1008
|
args: [{ selector: 'kpt-chip', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [KptIcon], template: `
|
|
989
|
-
<span
|
|
1009
|
+
<span
|
|
1010
|
+
class="kpt-chip"
|
|
1011
|
+
[attr.data-variant]="variant()"
|
|
1012
|
+
[attr.data-text-transform]="textTransform() === 'none' ? null : textTransform()"
|
|
1013
|
+
[class.kpt-chip--disabled]="disabled()"
|
|
1014
|
+
>
|
|
990
1015
|
<ng-content />
|
|
991
1016
|
@if (removable()) {
|
|
992
1017
|
<button
|
|
@@ -998,9 +1023,9 @@ class KptChip {
|
|
|
998
1023
|
><kpt-icon name="x" /></button>
|
|
999
1024
|
}
|
|
1000
1025
|
</span>
|
|
1001
|
-
`, host: { class: 'kpt-chip-host' }, styles: ["@layer kpt.components{.kpt-chip-host{display:inline-flex;vertical-align:middle}.kpt-chip{--_bg: var(--kpt-color-muted);--_fg: var(--kpt-color-on-muted);display:inline-flex;align-items:center;gap:.35rem;height:1.6rem;padding-inline:.6rem;border-radius:var(--kpt-radius-full, 9999px);background:var(--_bg);color:var(--_fg);font-size:var(--kpt-font-size-xs, .75rem);font-weight:var(--kpt-font-weight-medium, 500);white-space:nowrap}.kpt-chip[data-variant=primary]{--_bg: color-mix(in oklch, var(--kpt-color-primary) 14%, var(--kpt-color-surface));--_fg: var(--kpt-color-primary)}.kpt-chip[data-variant=success]{--_bg: color-mix(in oklch, var(--kpt-color-success) 18%, transparent);--_fg: var(--kpt-color-success)}.kpt-chip[data-variant=danger]{--_bg: color-mix(in oklch, var(--kpt-color-danger) 16%, transparent);--_fg: var(--kpt-color-danger)}.kpt-chip[data-variant=warning]{--_bg: color-mix(in oklch, var(--kpt-color-warning) 20%, transparent);--_fg: var(--kpt-color-warning)}.kpt-chip[data-variant=info]{--_bg: color-mix(in oklch, var(--kpt-color-info) 16%, transparent);--_fg: var(--kpt-color-info)}.kpt-chip--disabled{opacity:.55}.kpt-chip__remove{display:inline-flex;align-items:center;border:0;background:none;cursor:pointer;color:inherit;opacity:.7;padding:0;margin-inline-end:-.2rem}.kpt-chip__remove:hover:not(:disabled){opacity:1}.kpt-chip__remove:disabled{cursor:not-allowed}}\n"] }]
|
|
1002
|
-
}], null, { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], removed: [{ type: i0.Output, args: ["removed"] }] }); })();
|
|
1003
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptChip, { className: "KptChip", filePath: "lib/chip/chip.component.ts", lineNumber:
|
|
1026
|
+
`, host: { class: 'kpt-chip-host' }, styles: ["@layer kpt.components{.kpt-chip-host{display:inline-flex;vertical-align:middle}.kpt-chip{--_bg: var(--kpt-color-muted);--_fg: var(--kpt-color-on-muted);display:inline-flex;align-items:center;gap:.35rem;height:1.6rem;padding-inline:.6rem;border-radius:var(--kpt-radius-full, 9999px);background:var(--_bg);color:var(--_fg);font-size:var(--kpt-font-size-xs, .75rem);font-weight:var(--kpt-font-weight-medium, 500);white-space:nowrap}.kpt-chip[data-variant=primary]{--_bg: color-mix(in oklch, var(--kpt-color-primary) 14%, var(--kpt-color-surface));--_fg: var(--kpt-color-primary)}.kpt-chip[data-variant=success]{--_bg: color-mix(in oklch, var(--kpt-color-success) 18%, transparent);--_fg: var(--kpt-color-success)}.kpt-chip[data-variant=danger]{--_bg: color-mix(in oklch, var(--kpt-color-danger) 16%, transparent);--_fg: var(--kpt-color-danger)}.kpt-chip[data-variant=warning]{--_bg: color-mix(in oklch, var(--kpt-color-warning) 20%, transparent);--_fg: var(--kpt-color-warning)}.kpt-chip[data-variant=info]{--_bg: color-mix(in oklch, var(--kpt-color-info) 16%, transparent);--_fg: var(--kpt-color-info)}.kpt-chip[data-text-transform=capitalize]{text-transform:capitalize;font-size:var(--kpt-font-size-sm, .85rem);font-weight:var(--kpt-font-weight-light, 100)}.kpt-chip[data-text-transform=uppercase]{text-transform:uppercase;font-size:var(--kpt-font-size-sm, .85rem);font-weight:var(--kpt-font-weight-light, 100)}.kpt-chip[data-text-transform=lowercase]{text-transform:lowercase;font-size:var(--kpt-font-size-sm, .75rem);font-weight:var(--kpt-font-weight-light, 100)}.kpt-chip--disabled{opacity:.55}.kpt-chip__remove{display:inline-flex;align-items:center;border:0;background:none;cursor:pointer;color:inherit;opacity:.7;padding:0;margin-inline-end:-.2rem}.kpt-chip__remove:hover:not(:disabled){opacity:1}.kpt-chip__remove:disabled{cursor:not-allowed}}\n"] }]
|
|
1027
|
+
}], null, { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], textTransform: [{ type: i0.Input, args: [{ isSignal: true, alias: "textTransform", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], removed: [{ type: i0.Output, args: ["removed"] }] }); })();
|
|
1028
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptChip, { className: "KptChip", filePath: "lib/chip/chip.component.ts", lineNumber: 45 }); })();
|
|
1004
1029
|
|
|
1005
1030
|
/**
|
|
1006
1031
|
* Wskaźnik ładowania (spinner). Kolor z `currentColor`.
|
|
@@ -1191,7 +1216,7 @@ class KptSkeleton {
|
|
|
1191
1216
|
/** Token DI, przez który kontrolka zgłasza `kpt-form-field` swój stan wypełnienia. */
|
|
1192
1217
|
const KPT_FORM_FIELD_CONTROL = new InjectionToken('KPT_FORM_FIELD_CONTROL');
|
|
1193
1218
|
|
|
1194
|
-
const _c0$
|
|
1219
|
+
const _c0$D = ["*"];
|
|
1195
1220
|
function KptFormField_Conditional_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
1196
1221
|
i0.ɵɵdomElementStart(0, "span", 6);
|
|
1197
1222
|
i0.ɵɵtext(1, "*");
|
|
@@ -1300,7 +1325,7 @@ class KptFormField {
|
|
|
1300
1325
|
i0.ɵɵqueryAdvance();
|
|
1301
1326
|
} }, hostAttrs: [1, "kpt-form-field-host"], hostBindings: function KptFormField_HostBindings(rf, ctx) { if (rf & 1) {
|
|
1302
1327
|
i0.ɵɵlistener("input", function KptFormField_input_HostBindingHandler() { return ctx.updateFilled(); })("change", function KptFormField_change_HostBindingHandler() { return ctx.updateFilled(); });
|
|
1303
|
-
} }, inputs: { label: [1, "label"], hint: [1, "hint"], error: [1, "error"], required: [1, "required"], controlId: [1, "controlId"], labelType: [1, "labelType"] }, ngContentSelectors: _c0$
|
|
1328
|
+
} }, inputs: { label: [1, "label"], hint: [1, "hint"], error: [1, "error"], required: [1, "required"], controlId: [1, "controlId"], labelType: [1, "labelType"] }, ngContentSelectors: _c0$D, decls: 7, vars: 10, consts: [[1, "kpt-form-field"], [1, "kpt-form-field__box"], [1, "kpt-form-field__label"], [1, "kpt-form-field__control"], ["role", "alert", 1, "kpt-form-field__message", "kpt-form-field__message--error"], [1, "kpt-form-field__message", "kpt-form-field__message--hint"], ["aria-hidden", "true", 1, "kpt-form-field__required"]], template: function KptFormField_Template(rf, ctx) { if (rf & 1) {
|
|
1304
1329
|
i0.ɵɵprojectionDef();
|
|
1305
1330
|
i0.ɵɵdomElementStart(0, "div", 0)(1, "div", 1);
|
|
1306
1331
|
i0.ɵɵconditionalCreate(2, KptFormField_Conditional_2_Template, 3, 3, "label", 2);
|
|
@@ -1401,7 +1426,7 @@ class KptInput {
|
|
|
1401
1426
|
}], 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 }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }] }); })();
|
|
1402
1427
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptInput, { className: "KptInput", filePath: "lib/input/input.component.ts", lineNumber: 49 }); })();
|
|
1403
1428
|
|
|
1404
|
-
const _c0$
|
|
1429
|
+
const _c0$C = ["*"];
|
|
1405
1430
|
function KptCheckbox_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
1406
1431
|
i0.ɵɵdomElementStart(0, "span", 5);
|
|
1407
1432
|
i0.ɵɵtext(1);
|
|
@@ -1432,7 +1457,7 @@ class KptCheckbox {
|
|
|
1432
1457
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1433
1458
|
}
|
|
1434
1459
|
static { this.ɵfac = function KptCheckbox_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptCheckbox)(); }; }
|
|
1435
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptCheckbox, selectors: [["kpt-checkbox"]], hostAttrs: [1, "kpt-checkbox-host"], inputs: { checked: [1, "checked"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], label: [1, "label"] }, outputs: { checked: "checkedChange", touch: "touch" }, ngContentSelectors: _c0$
|
|
1460
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptCheckbox, selectors: [["kpt-checkbox"]], hostAttrs: [1, "kpt-checkbox-host"], inputs: { checked: [1, "checked"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], label: [1, "label"] }, outputs: { checked: "checkedChange", touch: "touch" }, ngContentSelectors: _c0$C, decls: 7, vars: 6, consts: [[1, "kpt-checkbox"], ["type", "checkbox", 1, "kpt-checkbox__input", 3, "change", "blur", "checked", "disabled"], ["aria-hidden", "true", 1, "kpt-checkbox__box"], ["viewBox", "0 0 16 16", 1, "kpt-checkbox__check"], ["d", "M13 4.5 6.5 11 3 7.5"], [1, "kpt-checkbox__label"]], template: function KptCheckbox_Template(rf, ctx) { if (rf & 1) {
|
|
1436
1461
|
i0.ɵɵprojectionDef();
|
|
1437
1462
|
i0.ɵɵdomElementStart(0, "label", 0)(1, "input", 1);
|
|
1438
1463
|
i0.ɵɵdomListener("change", function KptCheckbox_Template_input_change_1_listener($event) { return ctx.checked.set($event.target.checked); })("blur", function KptCheckbox_Template_input_blur_1_listener() { return ctx.touch.emit(); });
|
|
@@ -1479,7 +1504,7 @@ class KptCheckbox {
|
|
|
1479
1504
|
}], null, { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], 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"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] }); })();
|
|
1480
1505
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptCheckbox, { className: "KptCheckbox", filePath: "lib/checkbox/checkbox.component.ts", lineNumber: 44 }); })();
|
|
1481
1506
|
|
|
1482
|
-
const _c0$
|
|
1507
|
+
const _c0$B = ["*"];
|
|
1483
1508
|
function KptSwitch_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
1484
1509
|
i0.ɵɵdomElementStart(0, "span", 1);
|
|
1485
1510
|
i0.ɵɵtext(1);
|
|
@@ -1545,7 +1570,7 @@ class KptSwitch {
|
|
|
1545
1570
|
...(ngDevMode ? [{ debugName: "stateLabel" }] : /* istanbul ignore next */ []));
|
|
1546
1571
|
}
|
|
1547
1572
|
static { this.ɵfac = function KptSwitch_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptSwitch)(); }; }
|
|
1548
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptSwitch, selectors: [["kpt-switch"]], hostAttrs: [1, "kpt-switch-host"], inputs: { checked: [1, "checked"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], label: [1, "label"], labelPosition: [1, "labelPosition"], onLabel: [1, "onLabel"], offLabel: [1, "offLabel"] }, outputs: { checked: "checkedChange", touch: "touch" }, ngContentSelectors: _c0$
|
|
1573
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptSwitch, selectors: [["kpt-switch"]], hostAttrs: [1, "kpt-switch-host"], inputs: { checked: [1, "checked"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], label: [1, "label"], labelPosition: [1, "labelPosition"], onLabel: [1, "onLabel"], offLabel: [1, "offLabel"] }, outputs: { checked: "checkedChange", touch: "touch" }, ngContentSelectors: _c0$B, decls: 8, vars: 8, consts: [[1, "kpt-switch"], [1, "kpt-switch__label", "kpt-switch__label--start"], ["type", "checkbox", "role", "switch", 1, "kpt-switch__input", 3, "change", "blur", "checked", "disabled"], ["aria-hidden", "true", 1, "kpt-switch__track"], [1, "kpt-switch__thumb"], [1, "kpt-switch__label"], [1, "kpt-switch__state", 3, "kpt-switch__state--on"], [1, "kpt-switch__state"]], template: function KptSwitch_Template(rf, ctx) { if (rf & 1) {
|
|
1549
1574
|
i0.ɵɵprojectionDef();
|
|
1550
1575
|
i0.ɵɵdomElementStart(0, "label", 0);
|
|
1551
1576
|
i0.ɵɵconditionalCreate(1, KptSwitch_Conditional_1_Template, 2, 1, "span", 1);
|
|
@@ -2338,7 +2363,7 @@ class KptClock {
|
|
|
2338
2363
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptClock, { className: "KptClock", filePath: "lib/datepicker/clock.component.ts", lineNumber: 93 }); })();
|
|
2339
2364
|
|
|
2340
2365
|
const _forTrack0$9 = ($index, $item) => $item.iso;
|
|
2341
|
-
const _forTrack1$
|
|
2366
|
+
const _forTrack1$3 = ($index, $item) => $item.label;
|
|
2342
2367
|
function KptDatepicker_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
2343
2368
|
i0.ɵɵelementStart(0, "span", 2);
|
|
2344
2369
|
i0.ɵɵtext(1);
|
|
@@ -2545,7 +2570,7 @@ function KptDatepicker_ng_template_7_Conditional_2_Case_9_For_2_Template(rf, ctx
|
|
|
2545
2570
|
} }
|
|
2546
2571
|
function KptDatepicker_ng_template_7_Conditional_2_Case_9_Template(rf, ctx) { if (rf & 1) {
|
|
2547
2572
|
i0.ɵɵelementStart(0, "div", 30);
|
|
2548
|
-
i0.ɵɵrepeaterCreate(1, KptDatepicker_ng_template_7_Conditional_2_Case_9_For_2_Template, 2, 7, "button", 31, _forTrack1$
|
|
2573
|
+
i0.ɵɵrepeaterCreate(1, KptDatepicker_ng_template_7_Conditional_2_Case_9_For_2_Template, 2, 7, "button", 31, _forTrack1$3);
|
|
2549
2574
|
i0.ɵɵelementEnd();
|
|
2550
2575
|
} if (rf & 2) {
|
|
2551
2576
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
@@ -3007,7 +3032,7 @@ class KptDatepicker {
|
|
|
3007
3032
|
}], () => [], { 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"] }] }); })();
|
|
3008
3033
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDatepicker, { className: "KptDatepicker", filePath: "lib/datepicker/datepicker.component.ts", lineNumber: 83 }); })();
|
|
3009
3034
|
|
|
3010
|
-
const _c0$
|
|
3035
|
+
const _c0$A = ["ta"];
|
|
3011
3036
|
/**
|
|
3012
3037
|
* Pole wieloliniowe (textarea) na Signal Forms, z opcjonalnym auto-resize.
|
|
3013
3038
|
*
|
|
@@ -3052,7 +3077,7 @@ class KptTextarea {
|
|
|
3052
3077
|
}
|
|
3053
3078
|
static { this.ɵfac = function KptTextarea_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptTextarea)(); }; }
|
|
3054
3079
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptTextarea, selectors: [["kpt-textarea"]], viewQuery: function KptTextarea_Query(rf, ctx) { if (rf & 1) {
|
|
3055
|
-
i0.ɵɵviewQuerySignal(ctx.ta, _c0$
|
|
3080
|
+
i0.ɵɵviewQuerySignal(ctx.ta, _c0$A, 5);
|
|
3056
3081
|
} if (rf & 2) {
|
|
3057
3082
|
i0.ɵɵqueryAdvance();
|
|
3058
3083
|
} }, hostAttrs: [1, "kpt-textarea-host"], inputs: { value: [1, "value"], placeholder: [1, "placeholder"], rows: [1, "rows"], autoResize: [1, "autoResize"], disabled: [1, "disabled"], readonly: [1, "readonly"], invalid: [1, "invalid"], touched: [1, "touched"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 2, vars: 6, consts: [["ta", ""], [1, "kpt-textarea__field", 3, "input", "blur", "value", "placeholder", "disabled", "readOnly", "rows"]], template: function KptTextarea_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -3204,14 +3229,15 @@ class KptTooltip {
|
|
|
3204
3229
|
}]
|
|
3205
3230
|
}], null, { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptTooltip", required: true }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptTooltipPosition", required: false }] }], onlyWhenTruncated: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptTooltipOnlyWhenTruncated", required: false }] }] }); })();
|
|
3206
3231
|
|
|
3207
|
-
const _c0$
|
|
3232
|
+
const _c0$z = ["editor"];
|
|
3208
3233
|
const _forTrack0$8 = ($index, $item) => $item.tag;
|
|
3234
|
+
const _forTrack1$2 = ($index, $item) => $item.id;
|
|
3209
3235
|
function KptRichText_For_3_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
3210
|
-
i0.ɵɵelement(0, "span",
|
|
3236
|
+
i0.ɵɵelement(0, "span", 12);
|
|
3211
3237
|
} }
|
|
3212
3238
|
function KptRichText_For_3_For_2_Case_0_ng_template_5_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
3213
3239
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
3214
|
-
i0.ɵɵelementStart(0, "li",
|
|
3240
|
+
i0.ɵɵelementStart(0, "li", 19);
|
|
3215
3241
|
i0.ɵɵlistener("click", function KptRichText_For_3_For_2_Case_0_ng_template_5_For_2_Template_li_click_0_listener() { const o_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.pickStyle(o_r4.tag)); });
|
|
3216
3242
|
i0.ɵɵtext(1);
|
|
3217
3243
|
i0.ɵɵelementEnd();
|
|
@@ -3225,8 +3251,8 @@ function KptRichText_For_3_For_2_Case_0_ng_template_5_For_2_Template(rf, ctx) {
|
|
|
3225
3251
|
i0.ɵɵtextInterpolate(o_r4.label);
|
|
3226
3252
|
} }
|
|
3227
3253
|
function KptRichText_For_3_For_2_Case_0_ng_template_5_Template(rf, ctx) { if (rf & 1) {
|
|
3228
|
-
i0.ɵɵelementStart(0, "ul",
|
|
3229
|
-
i0.ɵɵrepeaterCreate(1, KptRichText_For_3_For_2_Case_0_ng_template_5_For_2_Template, 2, 6, "li",
|
|
3254
|
+
i0.ɵɵelementStart(0, "ul", 17);
|
|
3255
|
+
i0.ɵɵrepeaterCreate(1, KptRichText_For_3_For_2_Case_0_ng_template_5_For_2_Template, 2, 6, "li", 18, _forTrack0$8);
|
|
3230
3256
|
i0.ɵɵelementEnd();
|
|
3231
3257
|
} if (rf & 2) {
|
|
3232
3258
|
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
@@ -3235,14 +3261,14 @@ function KptRichText_For_3_For_2_Case_0_ng_template_5_Template(rf, ctx) { if (rf
|
|
|
3235
3261
|
} }
|
|
3236
3262
|
function KptRichText_For_3_For_2_Case_0_Template(rf, ctx) { if (rf & 1) {
|
|
3237
3263
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
3238
|
-
i0.ɵɵelementStart(0, "button",
|
|
3264
|
+
i0.ɵɵelementStart(0, "button", 14, 1);
|
|
3239
3265
|
i0.ɵɵlistener("mousedown", function KptRichText_For_3_For_2_Case_0_Template_button_mousedown_0_listener($event) { return $event.preventDefault(); })("click", function KptRichText_For_3_For_2_Case_0_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.openStyle()); });
|
|
3240
3266
|
i0.ɵɵelementStart(2, "span");
|
|
3241
3267
|
i0.ɵɵtext(3);
|
|
3242
3268
|
i0.ɵɵelementEnd();
|
|
3243
|
-
i0.ɵɵelement(4, "kpt-icon",
|
|
3269
|
+
i0.ɵɵelement(4, "kpt-icon", 15);
|
|
3244
3270
|
i0.ɵɵelementEnd();
|
|
3245
|
-
i0.ɵɵtemplate(5, KptRichText_For_3_For_2_Case_0_ng_template_5_Template, 3, 0, "ng-template",
|
|
3271
|
+
i0.ɵɵtemplate(5, KptRichText_For_3_For_2_Case_0_ng_template_5_Template, 3, 0, "ng-template", 16);
|
|
3246
3272
|
i0.ɵɵlistener("backdropClick", function KptRichText_For_3_For_2_Case_0_Template_ng_template_backdropClick_5_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.closeStyle()); })("detach", function KptRichText_For_3_For_2_Case_0_Template_ng_template_detach_5_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.closeStyle()); });
|
|
3247
3273
|
} if (rf & 2) {
|
|
3248
3274
|
const styleOrigin_r5 = i0.ɵɵreference(1);
|
|
@@ -3257,19 +3283,19 @@ function KptRichText_For_3_For_2_Case_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
3257
3283
|
i0.ɵɵproperty("cdkConnectedOverlayOrigin", styleOrigin_r5)("cdkConnectedOverlayOpen", ctx_r1.styleOpen())("cdkConnectedOverlayPositions", ctx_r1.positions)("cdkConnectedOverlayHasBackdrop", true);
|
|
3258
3284
|
} }
|
|
3259
3285
|
function KptRichText_For_3_For_2_Case_1_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
3260
|
-
i0.ɵɵelementContainer(0,
|
|
3286
|
+
i0.ɵɵelementContainer(0, 22);
|
|
3261
3287
|
} if (rf & 2) {
|
|
3262
3288
|
i0.ɵɵnextContext(4);
|
|
3263
|
-
const paletteTpl_r8 = i0.ɵɵreference(
|
|
3289
|
+
const paletteTpl_r8 = i0.ɵɵreference(11);
|
|
3264
3290
|
i0.ɵɵproperty("ngTemplateOutlet", paletteTpl_r8);
|
|
3265
3291
|
} }
|
|
3266
3292
|
function KptRichText_For_3_For_2_Case_1_Template(rf, ctx) { if (rf & 1) {
|
|
3267
3293
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
3268
|
-
i0.ɵɵelementStart(0, "button",
|
|
3294
|
+
i0.ɵɵelementStart(0, "button", 20, 2);
|
|
3269
3295
|
i0.ɵɵlistener("mousedown", function KptRichText_For_3_For_2_Case_1_Template_button_mousedown_0_listener($event) { return $event.preventDefault(); })("click", function KptRichText_For_3_For_2_Case_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.openColor("foreColor")); });
|
|
3270
|
-
i0.ɵɵelement(2, "kpt-icon",
|
|
3296
|
+
i0.ɵɵelement(2, "kpt-icon", 21);
|
|
3271
3297
|
i0.ɵɵelementEnd();
|
|
3272
|
-
i0.ɵɵtemplate(3, KptRichText_For_3_For_2_Case_1_ng_template_3_Template, 1, 1, "ng-template",
|
|
3298
|
+
i0.ɵɵtemplate(3, KptRichText_For_3_For_2_Case_1_ng_template_3_Template, 1, 1, "ng-template", 16);
|
|
3273
3299
|
i0.ɵɵlistener("backdropClick", function KptRichText_For_3_For_2_Case_1_Template_ng_template_backdropClick_3_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.closeColor()); })("detach", function KptRichText_For_3_For_2_Case_1_Template_ng_template_detach_3_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.closeColor()); });
|
|
3274
3300
|
} if (rf & 2) {
|
|
3275
3301
|
const foreOrigin_r9 = i0.ɵɵreference(1);
|
|
@@ -3283,19 +3309,19 @@ function KptRichText_For_3_For_2_Case_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
3283
3309
|
i0.ɵɵproperty("cdkConnectedOverlayOrigin", foreOrigin_r9)("cdkConnectedOverlayOpen", ctx_r1.colorOpen() && ctx_r1.colorKind() === "foreColor")("cdkConnectedOverlayPositions", ctx_r1.positions)("cdkConnectedOverlayHasBackdrop", true);
|
|
3284
3310
|
} }
|
|
3285
3311
|
function KptRichText_For_3_For_2_Case_2_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
3286
|
-
i0.ɵɵelementContainer(0,
|
|
3312
|
+
i0.ɵɵelementContainer(0, 22);
|
|
3287
3313
|
} if (rf & 2) {
|
|
3288
3314
|
i0.ɵɵnextContext(4);
|
|
3289
|
-
const paletteTpl_r8 = i0.ɵɵreference(
|
|
3315
|
+
const paletteTpl_r8 = i0.ɵɵreference(11);
|
|
3290
3316
|
i0.ɵɵproperty("ngTemplateOutlet", paletteTpl_r8);
|
|
3291
3317
|
} }
|
|
3292
3318
|
function KptRichText_For_3_For_2_Case_2_Template(rf, ctx) { if (rf & 1) {
|
|
3293
3319
|
const _r10 = i0.ɵɵgetCurrentView();
|
|
3294
|
-
i0.ɵɵelementStart(0, "button",
|
|
3320
|
+
i0.ɵɵelementStart(0, "button", 20, 3);
|
|
3295
3321
|
i0.ɵɵlistener("mousedown", function KptRichText_For_3_For_2_Case_2_Template_button_mousedown_0_listener($event) { return $event.preventDefault(); })("click", function KptRichText_For_3_For_2_Case_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.openColor("backColor")); });
|
|
3296
|
-
i0.ɵɵelement(2, "kpt-icon",
|
|
3322
|
+
i0.ɵɵelement(2, "kpt-icon", 21);
|
|
3297
3323
|
i0.ɵɵelementEnd();
|
|
3298
|
-
i0.ɵɵtemplate(3, KptRichText_For_3_For_2_Case_2_ng_template_3_Template, 1, 1, "ng-template",
|
|
3324
|
+
i0.ɵɵtemplate(3, KptRichText_For_3_For_2_Case_2_ng_template_3_Template, 1, 1, "ng-template", 16);
|
|
3299
3325
|
i0.ɵɵlistener("backdropClick", function KptRichText_For_3_For_2_Case_2_Template_ng_template_backdropClick_3_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.closeColor()); })("detach", function KptRichText_For_3_For_2_Case_2_Template_ng_template_detach_3_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.closeColor()); });
|
|
3300
3326
|
} if (rf & 2) {
|
|
3301
3327
|
const backOrigin_r11 = i0.ɵɵreference(1);
|
|
@@ -3310,7 +3336,7 @@ function KptRichText_For_3_For_2_Case_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
3310
3336
|
} }
|
|
3311
3337
|
function KptRichText_For_3_For_2_Case_3_ng_template_3_For_3_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
3312
3338
|
const _r14 = i0.ɵɵgetCurrentView();
|
|
3313
|
-
i0.ɵɵelementStart(0, "span",
|
|
3339
|
+
i0.ɵɵelementStart(0, "span", 29);
|
|
3314
3340
|
i0.ɵɵlistener("mouseenter", function KptRichText_For_3_For_2_Case_3_ng_template_3_For_3_For_2_Template_span_mouseenter_0_listener() { const c_r15 = i0.ɵɵrestoreView(_r14).$implicit; const r_r16 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.gridHover(r_r16, c_r15)); })("click", function KptRichText_For_3_For_2_Case_3_ng_template_3_For_3_For_2_Template_span_click_0_listener() { const c_r15 = i0.ɵɵrestoreView(_r14).$implicit; const r_r16 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.insertTable(r_r16, c_r15)); });
|
|
3315
3341
|
i0.ɵɵelementEnd();
|
|
3316
3342
|
} if (rf & 2) {
|
|
@@ -3320,8 +3346,8 @@ function KptRichText_For_3_For_2_Case_3_ng_template_3_For_3_For_2_Template(rf, c
|
|
|
3320
3346
|
i0.ɵɵclassProp("is-on", r_r16 <= ctx_r1.gridR() && c_r15 <= ctx_r1.gridC());
|
|
3321
3347
|
} }
|
|
3322
3348
|
function KptRichText_For_3_For_2_Case_3_ng_template_3_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
3323
|
-
i0.ɵɵelementStart(0, "div",
|
|
3324
|
-
i0.ɵɵrepeaterCreate(1, KptRichText_For_3_For_2_Case_3_ng_template_3_For_3_For_2_Template, 1, 2, "span",
|
|
3349
|
+
i0.ɵɵelementStart(0, "div", 26);
|
|
3350
|
+
i0.ɵɵrepeaterCreate(1, KptRichText_For_3_For_2_Case_3_ng_template_3_For_3_For_2_Template, 1, 2, "span", 28, i0.ɵɵrepeaterTrackByIdentity);
|
|
3325
3351
|
i0.ɵɵelementEnd();
|
|
3326
3352
|
} if (rf & 2) {
|
|
3327
3353
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
@@ -3330,13 +3356,13 @@ function KptRichText_For_3_For_2_Case_3_ng_template_3_For_3_Template(rf, ctx) {
|
|
|
3330
3356
|
} }
|
|
3331
3357
|
function KptRichText_For_3_For_2_Case_3_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
3332
3358
|
const _r13 = i0.ɵɵgetCurrentView();
|
|
3333
|
-
i0.ɵɵelementStart(0, "div",
|
|
3359
|
+
i0.ɵɵelementStart(0, "div", 24);
|
|
3334
3360
|
i0.ɵɵlistener("mousedown", function KptRichText_For_3_For_2_Case_3_ng_template_3_Template_div_mousedown_0_listener($event) { return $event.preventDefault(); });
|
|
3335
|
-
i0.ɵɵelementStart(1, "div",
|
|
3361
|
+
i0.ɵɵelementStart(1, "div", 25);
|
|
3336
3362
|
i0.ɵɵlistener("mouseleave", function KptRichText_For_3_For_2_Case_3_ng_template_3_Template_div_mouseleave_1_listener() { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.gridHover(0, 0)); });
|
|
3337
|
-
i0.ɵɵrepeaterCreate(2, KptRichText_For_3_For_2_Case_3_ng_template_3_For_3_Template, 3, 0, "div",
|
|
3363
|
+
i0.ɵɵrepeaterCreate(2, KptRichText_For_3_For_2_Case_3_ng_template_3_For_3_Template, 3, 0, "div", 26, i0.ɵɵrepeaterTrackByIdentity);
|
|
3338
3364
|
i0.ɵɵelementEnd();
|
|
3339
|
-
i0.ɵɵelementStart(4, "div",
|
|
3365
|
+
i0.ɵɵelementStart(4, "div", 27);
|
|
3340
3366
|
i0.ɵɵtext(5);
|
|
3341
3367
|
i0.ɵɵelementEnd()();
|
|
3342
3368
|
} if (rf & 2) {
|
|
@@ -3348,11 +3374,11 @@ function KptRichText_For_3_For_2_Case_3_ng_template_3_Template(rf, ctx) { if (rf
|
|
|
3348
3374
|
} }
|
|
3349
3375
|
function KptRichText_For_3_For_2_Case_3_Template(rf, ctx) { if (rf & 1) {
|
|
3350
3376
|
const _r12 = i0.ɵɵgetCurrentView();
|
|
3351
|
-
i0.ɵɵelementStart(0, "button",
|
|
3377
|
+
i0.ɵɵelementStart(0, "button", 23, 4);
|
|
3352
3378
|
i0.ɵɵlistener("mousedown", function KptRichText_For_3_For_2_Case_3_Template_button_mousedown_0_listener($event) { return $event.preventDefault(); })("click", function KptRichText_For_3_For_2_Case_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r12); const item_r6 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.exec(item_r6)); });
|
|
3353
|
-
i0.ɵɵelement(2, "kpt-icon",
|
|
3379
|
+
i0.ɵɵelement(2, "kpt-icon", 21);
|
|
3354
3380
|
i0.ɵɵelementEnd();
|
|
3355
|
-
i0.ɵɵtemplate(3, KptRichText_For_3_For_2_Case_3_ng_template_3_Template, 6, 2, "ng-template",
|
|
3381
|
+
i0.ɵɵtemplate(3, KptRichText_For_3_For_2_Case_3_ng_template_3_Template, 6, 2, "ng-template", 16);
|
|
3356
3382
|
i0.ɵɵlistener("backdropClick", function KptRichText_For_3_For_2_Case_3_Template_ng_template_backdropClick_3_listener() { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.closeTable()); })("detach", function KptRichText_For_3_For_2_Case_3_Template_ng_template_detach_3_listener() { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.closeTable()); });
|
|
3357
3383
|
} if (rf & 2) {
|
|
3358
3384
|
const tableOrigin_r17 = i0.ɵɵreference(1);
|
|
@@ -3368,9 +3394,9 @@ function KptRichText_For_3_For_2_Case_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
3368
3394
|
} }
|
|
3369
3395
|
function KptRichText_For_3_For_2_Case_4_Template(rf, ctx) { if (rf & 1) {
|
|
3370
3396
|
const _r18 = i0.ɵɵgetCurrentView();
|
|
3371
|
-
i0.ɵɵelementStart(0, "button",
|
|
3397
|
+
i0.ɵɵelementStart(0, "button", 30);
|
|
3372
3398
|
i0.ɵɵlistener("mousedown", function KptRichText_For_3_For_2_Case_4_Template_button_mousedown_0_listener($event) { return $event.preventDefault(); })("click", function KptRichText_For_3_For_2_Case_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r18); const item_r6 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.exec(item_r6)); });
|
|
3373
|
-
i0.ɵɵelement(1, "kpt-icon",
|
|
3399
|
+
i0.ɵɵelement(1, "kpt-icon", 21);
|
|
3374
3400
|
i0.ɵɵelementEnd();
|
|
3375
3401
|
} if (rf & 2) {
|
|
3376
3402
|
const item_r6 = i0.ɵɵnextContext().$implicit;
|
|
@@ -3382,14 +3408,14 @@ function KptRichText_For_3_For_2_Case_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
3382
3408
|
i0.ɵɵproperty("name", ctx_r1.icon(item_r6));
|
|
3383
3409
|
} }
|
|
3384
3410
|
function KptRichText_For_3_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
3385
|
-
i0.ɵɵconditionalCreate(0, KptRichText_For_3_For_2_Case_0_Template, 6, 11)(1, KptRichText_For_3_For_2_Case_1_Template, 4, 8)(2, KptRichText_For_3_For_2_Case_2_Template, 4, 8)(3, KptRichText_For_3_For_2_Case_3_Template, 4, 10)(4, KptRichText_For_3_For_2_Case_4_Template, 2, 7, "button",
|
|
3411
|
+
i0.ɵɵconditionalCreate(0, KptRichText_For_3_For_2_Case_0_Template, 6, 11)(1, KptRichText_For_3_For_2_Case_1_Template, 4, 8)(2, KptRichText_For_3_For_2_Case_2_Template, 4, 8)(3, KptRichText_For_3_For_2_Case_3_Template, 4, 10)(4, KptRichText_For_3_For_2_Case_4_Template, 2, 7, "button", 13);
|
|
3386
3412
|
} if (rf & 2) {
|
|
3387
3413
|
let tmp_22_0;
|
|
3388
3414
|
const item_r6 = ctx.$implicit;
|
|
3389
3415
|
i0.ɵɵconditional((tmp_22_0 = item_r6) === "heading" ? 0 : tmp_22_0 === "foreColor" ? 1 : tmp_22_0 === "backColor" ? 2 : tmp_22_0 === "table" ? 3 : 4);
|
|
3390
3416
|
} }
|
|
3391
3417
|
function KptRichText_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
3392
|
-
i0.ɵɵconditionalCreate(0, KptRichText_For_3_Conditional_0_Template, 1, 0, "span",
|
|
3418
|
+
i0.ɵɵconditionalCreate(0, KptRichText_For_3_Conditional_0_Template, 1, 0, "span", 12);
|
|
3393
3419
|
i0.ɵɵrepeaterCreate(1, KptRichText_For_3_For_2_Template, 5, 1, null, null, i0.ɵɵrepeaterTrackByIdentity);
|
|
3394
3420
|
} if (rf & 2) {
|
|
3395
3421
|
const section_r19 = ctx.$implicit;
|
|
@@ -3400,7 +3426,7 @@ function KptRichText_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
3400
3426
|
} }
|
|
3401
3427
|
function KptRichText_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
3402
3428
|
const _r21 = i0.ɵɵgetCurrentView();
|
|
3403
|
-
i0.ɵɵelementStart(0, "textarea",
|
|
3429
|
+
i0.ɵɵelementStart(0, "textarea", 31);
|
|
3404
3430
|
i0.ɵɵlistener("input", function KptRichText_Conditional_4_Template_textarea_input_0_listener($event) { i0.ɵɵrestoreView(_r21); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSource($event)); })("blur", function KptRichText_Conditional_4_Template_textarea_blur_0_listener() { i0.ɵɵrestoreView(_r21); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.touch.emit()); });
|
|
3405
3431
|
i0.ɵɵelementEnd();
|
|
3406
3432
|
} if (rf & 2) {
|
|
@@ -3410,109 +3436,147 @@ function KptRichText_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
3410
3436
|
} }
|
|
3411
3437
|
function KptRichText_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
3412
3438
|
const _r22 = i0.ɵɵgetCurrentView();
|
|
3413
|
-
i0.ɵɵelementStart(0, "div",
|
|
3439
|
+
i0.ɵɵelementStart(0, "div", 32, 5);
|
|
3414
3440
|
i0.ɵɵlistener("input", function KptRichText_Conditional_5_Template_div_input_0_listener() { i0.ɵɵrestoreView(_r22); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onInput()); })("keydown", function KptRichText_Conditional_5_Template_div_keydown_0_listener($event) { i0.ɵɵrestoreView(_r22); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onKeydown($event)); })("paste", function KptRichText_Conditional_5_Template_div_paste_0_listener($event) { i0.ɵɵrestoreView(_r22); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onPaste($event)); })("contextmenu", function KptRichText_Conditional_5_Template_div_contextmenu_0_listener($event) { i0.ɵɵrestoreView(_r22); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onContextMenu($event)); })("mousedown", function KptRichText_Conditional_5_Template_div_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r22); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onEditorMouseDown($event)); })("mousemove", function KptRichText_Conditional_5_Template_div_mousemove_0_listener($event) { i0.ɵɵrestoreView(_r22); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onEditorMouseMove($event)); })("blur", function KptRichText_Conditional_5_Template_div_blur_0_listener() { i0.ɵɵrestoreView(_r22); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.touch.emit()); });
|
|
3415
3441
|
i0.ɵɵelementEnd();
|
|
3416
3442
|
} if (rf & 2) {
|
|
3417
3443
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
3418
3444
|
i0.ɵɵattribute("contenteditable", ctx_r1.disabled() ? "false" : "true")("data-placeholder", ctx_r1.placeholder())("aria-invalid", ctx_r1.showInvalid() ? "true" : null);
|
|
3419
3445
|
} }
|
|
3420
|
-
function
|
|
3446
|
+
function KptRichText_ng_template_6_For_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
3447
|
+
i0.ɵɵelementStart(0, "span", 37);
|
|
3448
|
+
i0.ɵɵtext(1);
|
|
3449
|
+
i0.ɵɵelementEnd();
|
|
3450
|
+
} if (rf & 2) {
|
|
3451
|
+
const item_r24 = i0.ɵɵnextContext().$implicit;
|
|
3452
|
+
i0.ɵɵadvance();
|
|
3453
|
+
i0.ɵɵtextInterpolate(item_r24.kind);
|
|
3454
|
+
} }
|
|
3455
|
+
function KptRichText_ng_template_6_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
3421
3456
|
const _r23 = i0.ɵɵgetCurrentView();
|
|
3422
|
-
i0.ɵɵelementStart(0, "
|
|
3423
|
-
i0.ɵɵlistener("
|
|
3424
|
-
i0.ɵɵelementStart(1, "
|
|
3457
|
+
i0.ɵɵelementStart(0, "li", 35);
|
|
3458
|
+
i0.ɵɵlistener("mousedown", function KptRichText_ng_template_6_For_2_Template_li_mousedown_0_listener($event) { const item_r24 = i0.ɵɵrestoreView(_r23).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); $event.preventDefault(); return i0.ɵɵresetView(ctx_r1.insertMention(item_r24)); })("mouseenter", function KptRichText_ng_template_6_For_2_Template_li_mouseenter_0_listener() { const ɵ$index_79_r25 = i0.ɵɵrestoreView(_r23).$index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.mentionActive.set(ɵ$index_79_r25)); });
|
|
3459
|
+
i0.ɵɵelementStart(1, "span", 36);
|
|
3460
|
+
i0.ɵɵtext(2);
|
|
3461
|
+
i0.ɵɵelementEnd();
|
|
3462
|
+
i0.ɵɵconditionalCreate(3, KptRichText_ng_template_6_For_2_Conditional_3_Template, 2, 1, "span", 37);
|
|
3463
|
+
i0.ɵɵelementEnd();
|
|
3464
|
+
} if (rf & 2) {
|
|
3465
|
+
const item_r24 = ctx.$implicit;
|
|
3466
|
+
const ɵ$index_79_r25 = ctx.$index;
|
|
3467
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
3468
|
+
i0.ɵɵattribute("aria-selected", ɵ$index_79_r25 === ctx_r1.mentionActive())("data-active", ɵ$index_79_r25 === ctx_r1.mentionActive() ? "" : null);
|
|
3469
|
+
i0.ɵɵadvance(2);
|
|
3470
|
+
i0.ɵɵtextInterpolate(item_r24.label);
|
|
3471
|
+
i0.ɵɵadvance();
|
|
3472
|
+
i0.ɵɵconditional(item_r24.kind ? 3 : -1);
|
|
3473
|
+
} }
|
|
3474
|
+
function KptRichText_ng_template_6_Template(rf, ctx) { if (rf & 1) {
|
|
3475
|
+
i0.ɵɵelementStart(0, "ul", 33);
|
|
3476
|
+
i0.ɵɵrepeaterCreate(1, KptRichText_ng_template_6_For_2_Template, 4, 4, "li", 34, _forTrack1$2);
|
|
3477
|
+
i0.ɵɵelementEnd();
|
|
3478
|
+
} if (rf & 2) {
|
|
3479
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
3480
|
+
i0.ɵɵattribute("aria-label", ctx_r1.i18n.t("richText.mentions"));
|
|
3481
|
+
i0.ɵɵadvance();
|
|
3482
|
+
i0.ɵɵrepeater(ctx_r1.mentionMatches());
|
|
3483
|
+
} }
|
|
3484
|
+
function KptRichText_ng_template_7_Template(rf, ctx) { if (rf & 1) {
|
|
3485
|
+
const _r26 = i0.ɵɵgetCurrentView();
|
|
3486
|
+
i0.ɵɵelementStart(0, "div", 38);
|
|
3487
|
+
i0.ɵɵlistener("contextmenu", function KptRichText_ng_template_7_Template_div_contextmenu_0_listener($event) { return $event.preventDefault(); });
|
|
3488
|
+
i0.ɵɵelementStart(1, "div", 39);
|
|
3425
3489
|
i0.ɵɵtext(2);
|
|
3426
3490
|
i0.ɵɵelementEnd();
|
|
3427
|
-
i0.ɵɵelementStart(3, "button",
|
|
3428
|
-
i0.ɵɵlistener("click", function
|
|
3429
|
-
i0.ɵɵelement(4, "kpt-icon",
|
|
3491
|
+
i0.ɵɵelementStart(3, "button", 40);
|
|
3492
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_7_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.insertColumn("left")); });
|
|
3493
|
+
i0.ɵɵelement(4, "kpt-icon", 41);
|
|
3430
3494
|
i0.ɵɵtext(5);
|
|
3431
3495
|
i0.ɵɵelementEnd();
|
|
3432
|
-
i0.ɵɵelementStart(6, "button",
|
|
3433
|
-
i0.ɵɵlistener("click", function
|
|
3434
|
-
i0.ɵɵelement(7, "kpt-icon",
|
|
3496
|
+
i0.ɵɵelementStart(6, "button", 40);
|
|
3497
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_7_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.insertColumn("right")); });
|
|
3498
|
+
i0.ɵɵelement(7, "kpt-icon", 41);
|
|
3435
3499
|
i0.ɵɵtext(8);
|
|
3436
3500
|
i0.ɵɵelementEnd();
|
|
3437
|
-
i0.ɵɵelementStart(9, "button",
|
|
3438
|
-
i0.ɵɵlistener("click", function
|
|
3439
|
-
i0.ɵɵelement(10, "kpt-icon",
|
|
3501
|
+
i0.ɵɵelementStart(9, "button", 40);
|
|
3502
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_7_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.toggleHeaderColumn()); });
|
|
3503
|
+
i0.ɵɵelement(10, "kpt-icon", 42);
|
|
3440
3504
|
i0.ɵɵtext(11);
|
|
3441
3505
|
i0.ɵɵelementEnd();
|
|
3442
|
-
i0.ɵɵelementStart(12, "button",
|
|
3443
|
-
i0.ɵɵlistener("click", function
|
|
3444
|
-
i0.ɵɵelement(13, "kpt-icon",
|
|
3506
|
+
i0.ɵɵelementStart(12, "button", 40);
|
|
3507
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_7_Template_button_click_12_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.deleteColumn()); });
|
|
3508
|
+
i0.ɵɵelement(13, "kpt-icon", 43);
|
|
3445
3509
|
i0.ɵɵtext(14);
|
|
3446
3510
|
i0.ɵɵelementEnd();
|
|
3447
|
-
i0.ɵɵelement(15, "div",
|
|
3448
|
-
i0.ɵɵelementStart(16, "div",
|
|
3511
|
+
i0.ɵɵelement(15, "div", 44);
|
|
3512
|
+
i0.ɵɵelementStart(16, "div", 39);
|
|
3449
3513
|
i0.ɵɵtext(17);
|
|
3450
3514
|
i0.ɵɵelementEnd();
|
|
3451
|
-
i0.ɵɵelementStart(18, "button",
|
|
3452
|
-
i0.ɵɵlistener("click", function
|
|
3453
|
-
i0.ɵɵelement(19, "kpt-icon",
|
|
3515
|
+
i0.ɵɵelementStart(18, "button", 40);
|
|
3516
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_7_Template_button_click_18_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.insertRow("above")); });
|
|
3517
|
+
i0.ɵɵelement(19, "kpt-icon", 41);
|
|
3454
3518
|
i0.ɵɵtext(20);
|
|
3455
3519
|
i0.ɵɵelementEnd();
|
|
3456
|
-
i0.ɵɵelementStart(21, "button",
|
|
3457
|
-
i0.ɵɵlistener("click", function
|
|
3458
|
-
i0.ɵɵelement(22, "kpt-icon",
|
|
3520
|
+
i0.ɵɵelementStart(21, "button", 40);
|
|
3521
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_7_Template_button_click_21_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.insertRow("below")); });
|
|
3522
|
+
i0.ɵɵelement(22, "kpt-icon", 41);
|
|
3459
3523
|
i0.ɵɵtext(23);
|
|
3460
3524
|
i0.ɵɵelementEnd();
|
|
3461
|
-
i0.ɵɵelementStart(24, "button",
|
|
3462
|
-
i0.ɵɵlistener("click", function
|
|
3463
|
-
i0.ɵɵelement(25, "kpt-icon",
|
|
3525
|
+
i0.ɵɵelementStart(24, "button", 40);
|
|
3526
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_7_Template_button_click_24_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.toggleHeaderRow()); });
|
|
3527
|
+
i0.ɵɵelement(25, "kpt-icon", 42);
|
|
3464
3528
|
i0.ɵɵtext(26);
|
|
3465
3529
|
i0.ɵɵelementEnd();
|
|
3466
|
-
i0.ɵɵelementStart(27, "button",
|
|
3467
|
-
i0.ɵɵlistener("click", function
|
|
3468
|
-
i0.ɵɵelement(28, "kpt-icon",
|
|
3530
|
+
i0.ɵɵelementStart(27, "button", 40);
|
|
3531
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_7_Template_button_click_27_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.deleteRow()); });
|
|
3532
|
+
i0.ɵɵelement(28, "kpt-icon", 43);
|
|
3469
3533
|
i0.ɵɵtext(29);
|
|
3470
3534
|
i0.ɵɵelementEnd();
|
|
3471
|
-
i0.ɵɵelement(30, "div",
|
|
3472
|
-
i0.ɵɵelementStart(31, "div",
|
|
3535
|
+
i0.ɵɵelement(30, "div", 44);
|
|
3536
|
+
i0.ɵɵelementStart(31, "div", 39);
|
|
3473
3537
|
i0.ɵɵtext(32);
|
|
3474
3538
|
i0.ɵɵelementEnd();
|
|
3475
|
-
i0.ɵɵelementStart(33, "button",
|
|
3476
|
-
i0.ɵɵlistener("click", function
|
|
3477
|
-
i0.ɵɵelement(34, "kpt-icon",
|
|
3539
|
+
i0.ɵɵelementStart(33, "button", 40);
|
|
3540
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_7_Template_button_click_33_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.openCellBg()); });
|
|
3541
|
+
i0.ɵɵelement(34, "kpt-icon", 45);
|
|
3478
3542
|
i0.ɵɵtext(35);
|
|
3479
3543
|
i0.ɵɵelementEnd();
|
|
3480
|
-
i0.ɵɵelementStart(36, "button",
|
|
3481
|
-
i0.ɵɵlistener("click", function
|
|
3482
|
-
i0.ɵɵelement(37, "kpt-icon",
|
|
3544
|
+
i0.ɵɵelementStart(36, "button", 40);
|
|
3545
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_7_Template_button_click_36_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.alignCell("left")); });
|
|
3546
|
+
i0.ɵɵelement(37, "kpt-icon", 46);
|
|
3483
3547
|
i0.ɵɵtext(38);
|
|
3484
3548
|
i0.ɵɵelementEnd();
|
|
3485
|
-
i0.ɵɵelementStart(39, "button",
|
|
3486
|
-
i0.ɵɵlistener("click", function
|
|
3487
|
-
i0.ɵɵelement(40, "kpt-icon",
|
|
3549
|
+
i0.ɵɵelementStart(39, "button", 40);
|
|
3550
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_7_Template_button_click_39_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.alignCell("center")); });
|
|
3551
|
+
i0.ɵɵelement(40, "kpt-icon", 47);
|
|
3488
3552
|
i0.ɵɵtext(41);
|
|
3489
3553
|
i0.ɵɵelementEnd();
|
|
3490
|
-
i0.ɵɵelementStart(42, "button",
|
|
3491
|
-
i0.ɵɵlistener("click", function
|
|
3492
|
-
i0.ɵɵelement(43, "kpt-icon",
|
|
3554
|
+
i0.ɵɵelementStart(42, "button", 40);
|
|
3555
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_7_Template_button_click_42_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.alignCell("right")); });
|
|
3556
|
+
i0.ɵɵelement(43, "kpt-icon", 48);
|
|
3493
3557
|
i0.ɵɵtext(44);
|
|
3494
3558
|
i0.ɵɵelementEnd();
|
|
3495
|
-
i0.ɵɵelement(45, "div",
|
|
3496
|
-
i0.ɵɵelementStart(46, "button",
|
|
3497
|
-
i0.ɵɵlistener("click", function
|
|
3498
|
-
i0.ɵɵelement(47, "kpt-icon",
|
|
3559
|
+
i0.ɵɵelement(45, "div", 44);
|
|
3560
|
+
i0.ɵɵelementStart(46, "button", 40);
|
|
3561
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_7_Template_button_click_46_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.mergeCells()); });
|
|
3562
|
+
i0.ɵɵelement(47, "kpt-icon", 42);
|
|
3499
3563
|
i0.ɵɵtext(48);
|
|
3500
3564
|
i0.ɵɵelementEnd();
|
|
3501
|
-
i0.ɵɵelementStart(49, "button",
|
|
3502
|
-
i0.ɵɵlistener("click", function
|
|
3503
|
-
i0.ɵɵelement(50, "kpt-icon",
|
|
3565
|
+
i0.ɵɵelementStart(49, "button", 40);
|
|
3566
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_7_Template_button_click_49_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.splitCell()); });
|
|
3567
|
+
i0.ɵɵelement(50, "kpt-icon", 49);
|
|
3504
3568
|
i0.ɵɵtext(51);
|
|
3505
3569
|
i0.ɵɵelementEnd();
|
|
3506
|
-
i0.ɵɵelement(52, "div",
|
|
3507
|
-
i0.ɵɵelementStart(53, "button",
|
|
3508
|
-
i0.ɵɵlistener("click", function
|
|
3509
|
-
i0.ɵɵelement(54, "kpt-icon",
|
|
3570
|
+
i0.ɵɵelement(52, "div", 44);
|
|
3571
|
+
i0.ɵɵelementStart(53, "button", 40);
|
|
3572
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_7_Template_button_click_53_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.openBorder()); });
|
|
3573
|
+
i0.ɵɵelement(54, "kpt-icon", 42);
|
|
3510
3574
|
i0.ɵɵtext(55);
|
|
3511
3575
|
i0.ɵɵelementEnd();
|
|
3512
|
-
i0.ɵɵelement(56, "div",
|
|
3513
|
-
i0.ɵɵelementStart(57, "button",
|
|
3514
|
-
i0.ɵɵlistener("click", function
|
|
3515
|
-
i0.ɵɵelement(58, "kpt-icon",
|
|
3576
|
+
i0.ɵɵelement(56, "div", 44);
|
|
3577
|
+
i0.ɵɵelementStart(57, "button", 50);
|
|
3578
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_7_Template_button_click_57_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.deleteTable()); });
|
|
3579
|
+
i0.ɵɵelement(58, "kpt-icon", 43);
|
|
3516
3580
|
i0.ɵɵtext(59);
|
|
3517
3581
|
i0.ɵɵelementEnd()();
|
|
3518
3582
|
} if (rf & 2) {
|
|
@@ -3560,52 +3624,52 @@ function KptRichText_ng_template_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
3560
3624
|
i0.ɵɵadvance(4);
|
|
3561
3625
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.i18n.t("richText.menu.deleteTable"));
|
|
3562
3626
|
} }
|
|
3563
|
-
function
|
|
3564
|
-
const
|
|
3565
|
-
i0.ɵɵelementStart(0, "button",
|
|
3566
|
-
i0.ɵɵlistener("click", function
|
|
3627
|
+
function KptRichText_ng_template_8_For_17_Template(rf, ctx) { if (rf & 1) {
|
|
3628
|
+
const _r28 = i0.ɵɵgetCurrentView();
|
|
3629
|
+
i0.ɵɵelementStart(0, "button", 59);
|
|
3630
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_8_For_17_Template_button_click_0_listener() { const c_r29 = i0.ɵɵrestoreView(_r28).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.setBorderColor(c_r29)); });
|
|
3567
3631
|
i0.ɵɵelementEnd();
|
|
3568
3632
|
} if (rf & 2) {
|
|
3569
|
-
const
|
|
3570
|
-
i0.ɵɵstyleProp("background",
|
|
3571
|
-
i0.ɵɵattribute("aria-label",
|
|
3633
|
+
const c_r29 = ctx.$implicit;
|
|
3634
|
+
i0.ɵɵstyleProp("background", c_r29);
|
|
3635
|
+
i0.ɵɵattribute("aria-label", c_r29);
|
|
3572
3636
|
} }
|
|
3573
|
-
function
|
|
3574
|
-
const
|
|
3575
|
-
i0.ɵɵelementStart(0, "div",
|
|
3576
|
-
i0.ɵɵlistener("mousedown", function
|
|
3577
|
-
i0.ɵɵelementStart(1, "div",
|
|
3578
|
-
i0.ɵɵlistener("click", function
|
|
3637
|
+
function KptRichText_ng_template_8_Template(rf, ctx) { if (rf & 1) {
|
|
3638
|
+
const _r27 = i0.ɵɵgetCurrentView();
|
|
3639
|
+
i0.ɵɵelementStart(0, "div", 51);
|
|
3640
|
+
i0.ɵɵlistener("mousedown", function KptRichText_ng_template_8_Template_div_mousedown_0_listener($event) { return $event.preventDefault(); });
|
|
3641
|
+
i0.ɵɵelementStart(1, "div", 52)(2, "button", 53);
|
|
3642
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_8_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r27); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.borderTarget.set("table")); });
|
|
3579
3643
|
i0.ɵɵtext(3);
|
|
3580
3644
|
i0.ɵɵelementEnd();
|
|
3581
|
-
i0.ɵɵelementStart(4, "button",
|
|
3582
|
-
i0.ɵɵlistener("click", function
|
|
3645
|
+
i0.ɵɵelementStart(4, "button", 53);
|
|
3646
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_8_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r27); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.borderTarget.set("cell")); });
|
|
3583
3647
|
i0.ɵɵtext(5);
|
|
3584
3648
|
i0.ɵɵelementEnd()();
|
|
3585
|
-
i0.ɵɵelementStart(6, "div",
|
|
3586
|
-
i0.ɵɵlistener("click", function
|
|
3649
|
+
i0.ɵɵelementStart(6, "div", 54)(7, "button", 53);
|
|
3650
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_8_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r27); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.setBorderWidth("none")); });
|
|
3587
3651
|
i0.ɵɵtext(8);
|
|
3588
3652
|
i0.ɵɵelementEnd();
|
|
3589
|
-
i0.ɵɵelementStart(9, "button",
|
|
3590
|
-
i0.ɵɵlistener("click", function
|
|
3653
|
+
i0.ɵɵelementStart(9, "button", 53);
|
|
3654
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_8_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r27); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.setBorderWidth("thin")); });
|
|
3591
3655
|
i0.ɵɵtext(10);
|
|
3592
3656
|
i0.ɵɵelementEnd();
|
|
3593
|
-
i0.ɵɵelementStart(11, "button",
|
|
3594
|
-
i0.ɵɵlistener("click", function
|
|
3657
|
+
i0.ɵɵelementStart(11, "button", 53);
|
|
3658
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_8_Template_button_click_11_listener() { i0.ɵɵrestoreView(_r27); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.setBorderWidth("medium")); });
|
|
3595
3659
|
i0.ɵɵtext(12);
|
|
3596
3660
|
i0.ɵɵelementEnd();
|
|
3597
|
-
i0.ɵɵelementStart(13, "button",
|
|
3598
|
-
i0.ɵɵlistener("click", function
|
|
3661
|
+
i0.ɵɵelementStart(13, "button", 53);
|
|
3662
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_8_Template_button_click_13_listener() { i0.ɵɵrestoreView(_r27); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.setBorderWidth("thick")); });
|
|
3599
3663
|
i0.ɵɵtext(14);
|
|
3600
3664
|
i0.ɵɵelementEnd()();
|
|
3601
|
-
i0.ɵɵelementStart(15, "div",
|
|
3602
|
-
i0.ɵɵrepeaterCreate(16,
|
|
3665
|
+
i0.ɵɵelementStart(15, "div", 55);
|
|
3666
|
+
i0.ɵɵrepeaterCreate(16, KptRichText_ng_template_8_For_17_Template, 1, 3, "button", 56, i0.ɵɵrepeaterTrackByIdentity);
|
|
3603
3667
|
i0.ɵɵelementEnd();
|
|
3604
|
-
i0.ɵɵelementStart(18, "label",
|
|
3668
|
+
i0.ɵɵelementStart(18, "label", 57)(19, "span");
|
|
3605
3669
|
i0.ɵɵtext(20);
|
|
3606
3670
|
i0.ɵɵelementEnd();
|
|
3607
|
-
i0.ɵɵelementStart(21, "input",
|
|
3608
|
-
i0.ɵɵlistener("input", function
|
|
3671
|
+
i0.ɵɵelementStart(21, "input", 58);
|
|
3672
|
+
i0.ɵɵlistener("input", function KptRichText_ng_template_8_Template_input_input_21_listener($event) { i0.ɵɵrestoreView(_r27); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onBorderColorInput($event)); });
|
|
3609
3673
|
i0.ɵɵelementEnd()()();
|
|
3610
3674
|
} if (rf & 2) {
|
|
3611
3675
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -3630,35 +3694,35 @@ function KptRichText_ng_template_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
3630
3694
|
i0.ɵɵadvance(4);
|
|
3631
3695
|
i0.ɵɵtextInterpolate(ctx_r1.i18n.t("richText.border.customColor"));
|
|
3632
3696
|
} }
|
|
3633
|
-
function
|
|
3634
|
-
i0.ɵɵelementContainer(0,
|
|
3697
|
+
function KptRichText_ng_template_9_Template(rf, ctx) { if (rf & 1) {
|
|
3698
|
+
i0.ɵɵelementContainer(0, 22);
|
|
3635
3699
|
} if (rf & 2) {
|
|
3636
3700
|
i0.ɵɵnextContext();
|
|
3637
|
-
const paletteTpl_r8 = i0.ɵɵreference(
|
|
3701
|
+
const paletteTpl_r8 = i0.ɵɵreference(11);
|
|
3638
3702
|
i0.ɵɵproperty("ngTemplateOutlet", paletteTpl_r8);
|
|
3639
3703
|
} }
|
|
3640
|
-
function
|
|
3641
|
-
const
|
|
3642
|
-
i0.ɵɵelementStart(0, "button",
|
|
3643
|
-
i0.ɵɵlistener("click", function
|
|
3704
|
+
function KptRichText_ng_template_10_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
3705
|
+
const _r31 = i0.ɵɵgetCurrentView();
|
|
3706
|
+
i0.ɵɵelementStart(0, "button", 59);
|
|
3707
|
+
i0.ɵɵlistener("click", function KptRichText_ng_template_10_For_3_Template_button_click_0_listener() { const c_r32 = i0.ɵɵrestoreView(_r31).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.applyColor(c_r32)); });
|
|
3644
3708
|
i0.ɵɵelementEnd();
|
|
3645
3709
|
} if (rf & 2) {
|
|
3646
|
-
const
|
|
3647
|
-
i0.ɵɵstyleProp("background",
|
|
3648
|
-
i0.ɵɵattribute("aria-label",
|
|
3710
|
+
const c_r32 = ctx.$implicit;
|
|
3711
|
+
i0.ɵɵstyleProp("background", c_r32);
|
|
3712
|
+
i0.ɵɵattribute("aria-label", c_r32);
|
|
3649
3713
|
} }
|
|
3650
|
-
function
|
|
3651
|
-
const
|
|
3652
|
-
i0.ɵɵelementStart(0, "div",
|
|
3653
|
-
i0.ɵɵlistener("mousedown", function
|
|
3654
|
-
i0.ɵɵelementStart(1, "div",
|
|
3655
|
-
i0.ɵɵrepeaterCreate(2,
|
|
3714
|
+
function KptRichText_ng_template_10_Template(rf, ctx) { if (rf & 1) {
|
|
3715
|
+
const _r30 = i0.ɵɵgetCurrentView();
|
|
3716
|
+
i0.ɵɵelementStart(0, "div", 60);
|
|
3717
|
+
i0.ɵɵlistener("mousedown", function KptRichText_ng_template_10_Template_div_mousedown_0_listener($event) { return $event.preventDefault(); });
|
|
3718
|
+
i0.ɵɵelementStart(1, "div", 55);
|
|
3719
|
+
i0.ɵɵrepeaterCreate(2, KptRichText_ng_template_10_For_3_Template, 1, 3, "button", 56, i0.ɵɵrepeaterTrackByIdentity);
|
|
3656
3720
|
i0.ɵɵelementEnd();
|
|
3657
|
-
i0.ɵɵelementStart(4, "label",
|
|
3721
|
+
i0.ɵɵelementStart(4, "label", 57)(5, "span");
|
|
3658
3722
|
i0.ɵɵtext(6);
|
|
3659
3723
|
i0.ɵɵelementEnd();
|
|
3660
|
-
i0.ɵɵelementStart(7, "input",
|
|
3661
|
-
i0.ɵɵlistener("input", function
|
|
3724
|
+
i0.ɵɵelementStart(7, "input", 58);
|
|
3725
|
+
i0.ɵɵlistener("input", function KptRichText_ng_template_10_Template_input_input_7_listener($event) { i0.ɵɵrestoreView(_r30); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onColorInput($event)); });
|
|
3662
3726
|
i0.ɵɵelementEnd()()();
|
|
3663
3727
|
} if (rf & 2) {
|
|
3664
3728
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -3726,7 +3790,16 @@ const ALLOWED_STYLES = new Set([
|
|
|
3726
3790
|
'color', 'background-color', 'text-align', 'font-weight', 'font-style', 'text-decoration',
|
|
3727
3791
|
'width', 'height', 'border', 'border-color', 'border-width', 'border-style', 'vertical-align',
|
|
3728
3792
|
]);
|
|
3729
|
-
|
|
3793
|
+
/*
|
|
3794
|
+
* `data-mention` i `contenteditable` są tu dla wzmianek: identyfikator musi przeżyć zapis treści,
|
|
3795
|
+
* a `contenteditable="false"` trzyma wzmiankę jako jeden kawałek, w którego środku nie da się
|
|
3796
|
+
* pisać. Oba atrybuty są bierne — nie wykonują niczego i nie wskazują zasobów, więc wpuszczenie
|
|
3797
|
+
* ich nie otwiera nowej furtki.
|
|
3798
|
+
*/
|
|
3799
|
+
const ALLOWED_ATTRS = new Set([
|
|
3800
|
+
'colspan', 'rowspan', 'span', 'width', 'class', 'target', 'rel', 'title',
|
|
3801
|
+
'data-mention', 'contenteditable',
|
|
3802
|
+
]);
|
|
3730
3803
|
// Schematy URL dopuszczone w `href` wstawianym narzędziem „link" (blocklista jest obchodzalna).
|
|
3731
3804
|
const SAFE_URL_SCHEME = /^(https?:|mailto:|tel:)/i;
|
|
3732
3805
|
const HAS_URL_SCHEME = /^[a-z][a-z0-9+.-]*:/i;
|
|
@@ -3757,12 +3830,34 @@ class KptRichText {
|
|
|
3757
3830
|
/** Stan nieprawidłowy pokazujemy dopiero po dotknięciu pola — jak natywne `:user-invalid`. */
|
|
3758
3831
|
this.showInvalid = computed(() => this.invalid() && this.touched(), /* @ts-ignore */
|
|
3759
3832
|
...(ngDevMode ? [{ debugName: "showInvalid" }] : /* istanbul ignore next */ []));
|
|
3833
|
+
/**
|
|
3834
|
+
* Pozycje do podpowiedzi wzmianek. Pusta lista wyłącza mechanizm: `@` zostaje wtedy zwykłym
|
|
3835
|
+
* znakiem, bo nie ma czego podpowiadać.
|
|
3836
|
+
*/
|
|
3837
|
+
this.mentions = input([], /* @ts-ignore */
|
|
3838
|
+
...(ngDevMode ? [{ debugName: "mentions" }] : /* istanbul ignore next */ []));
|
|
3839
|
+
/** Ile podpowiedzi naraz. */
|
|
3840
|
+
this.mentionLimit = input(KPT_MENTION_LIMIT, { ...(ngDevMode ? { debugName: "mentionLimit" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
3760
3841
|
this.touch = output();
|
|
3842
|
+
/** Wstawiona wzmianka — moment na powiadomienie osoby albo dopięcie powiązania. */
|
|
3843
|
+
this.mentioned = output();
|
|
3761
3844
|
this.i18n = inject(KptI18n);
|
|
3762
3845
|
this.swatches = SWATCHES;
|
|
3763
3846
|
this.editor = viewChild('editor', /* @ts-ignore */
|
|
3764
3847
|
...(ngDevMode ? [{ debugName: "editor" }] : /* istanbul ignore next */ []));
|
|
3765
3848
|
this.savedRange = null;
|
|
3849
|
+
// ── Wzmianki (`@`) ──
|
|
3850
|
+
this.mentionOpen = signal(false, /* @ts-ignore */
|
|
3851
|
+
...(ngDevMode ? [{ debugName: "mentionOpen" }] : /* istanbul ignore next */ []));
|
|
3852
|
+
this.mentionMatches = signal([], /* @ts-ignore */
|
|
3853
|
+
...(ngDevMode ? [{ debugName: "mentionMatches" }] : /* istanbul ignore next */ []));
|
|
3854
|
+
this.mentionActive = signal(0, /* @ts-ignore */
|
|
3855
|
+
...(ngDevMode ? [{ debugName: "mentionActive" }] : /* istanbul ignore next */ []));
|
|
3856
|
+
/** Zaczepienie listy w miejscu kursora — punkt, nie element, bo `@` nie ma własnego elementu. */
|
|
3857
|
+
this.mentionPoint = signal({ x: 0, y: 0 }, /* @ts-ignore */
|
|
3858
|
+
...(ngDevMode ? [{ debugName: "mentionPoint" }] : /* istanbul ignore next */ []));
|
|
3859
|
+
/** Węzeł tekstowy i zakres zapytania `@…`, który podmieni wybrana pozycja. */
|
|
3860
|
+
this.mentionRange = null;
|
|
3766
3861
|
this.colorOpen = signal(false, /* @ts-ignore */
|
|
3767
3862
|
...(ngDevMode ? [{ debugName: "colorOpen" }] : /* istanbul ignore next */ []));
|
|
3768
3863
|
this.colorKind = signal('foreColor', /* @ts-ignore */
|
|
@@ -3840,7 +3935,12 @@ class KptRichText {
|
|
|
3840
3935
|
el.innerHTML = this.sanitizeHtml(v);
|
|
3841
3936
|
});
|
|
3842
3937
|
// Odzwierciedlenie stanu aktywnego narzędzi na podstawie zaznaczenia.
|
|
3843
|
-
const onSel = () =>
|
|
3938
|
+
const onSel = () => {
|
|
3939
|
+
this.refreshState();
|
|
3940
|
+
// Kursor może odjechać od `@` także bez pisania (klik, strzałki) — wtedy podpowiedzi
|
|
3941
|
+
// muszą zniknąć, inaczej Enter wstawiłby wzmiankę w zupełnie innym miejscu.
|
|
3942
|
+
this.syncMention();
|
|
3943
|
+
};
|
|
3844
3944
|
const onMove = (e) => this.onResizeMove(e);
|
|
3845
3945
|
const onUp = () => this.onResizeEnd();
|
|
3846
3946
|
document.addEventListener('selectionchange', onSel);
|
|
@@ -3932,6 +4032,7 @@ class KptRichText {
|
|
|
3932
4032
|
const el = this.editor()?.nativeElement;
|
|
3933
4033
|
if (el)
|
|
3934
4034
|
this.value.set(el.innerHTML);
|
|
4035
|
+
this.syncMention();
|
|
3935
4036
|
}
|
|
3936
4037
|
onSource(event) {
|
|
3937
4038
|
this.value.set(event.target.value);
|
|
@@ -4144,7 +4245,13 @@ class KptRichText {
|
|
|
4144
4245
|
* natywny — inaczej edytor byłby pułapką klawiaturową (WCAG 2.1.2).
|
|
4145
4246
|
*/
|
|
4146
4247
|
onKeydown(event) {
|
|
4147
|
-
if (this.disabled()
|
|
4248
|
+
if (this.disabled())
|
|
4249
|
+
return;
|
|
4250
|
+
// Podpowiedzi wzmianek przechwytują klawiaturę jako pierwsze: Tab i Enter znaczą w nich
|
|
4251
|
+
// co innego niż w samym edytorze.
|
|
4252
|
+
if (this.mentionOpen() && this.onMentionKeydown(event))
|
|
4253
|
+
return;
|
|
4254
|
+
if (event.key !== 'Tab' || event.ctrlKey || event.altKey || event.metaKey)
|
|
4148
4255
|
return;
|
|
4149
4256
|
if (this.shiftItems(event.shiftKey ? 'outdent' : 'indent')) {
|
|
4150
4257
|
event.preventDefault();
|
|
@@ -4754,6 +4861,117 @@ class KptRichText {
|
|
|
4754
4861
|
* Brak schematu → dopisz `https://` (spójne z zachowaniem `normalizeUrl` w mapie); `#`/`/`
|
|
4755
4862
|
* przechodzą bez zmian; schemat spoza `SAFE_URL_SCHEME` → `null` (link nie zostaje wstawiony).
|
|
4756
4863
|
*/
|
|
4864
|
+
// ── Wzmianki (`@`) ──
|
|
4865
|
+
/**
|
|
4866
|
+
* Sprawdza, czy kursor stoi w zapytaniu `@…`, i ustawia listę podpowiedzi.
|
|
4867
|
+
*
|
|
4868
|
+
* Zapytanie liczymy z **węzła tekstowego**, nie z całego HTML-a: w treści siedzą tagi, a `@`
|
|
4869
|
+
* ma widzieć tylko to, co użytkownik naprawdę napisał w tym miejscu. Rozpoznanie zostawiamy
|
|
4870
|
+
* `mentionQuery()` z `@konce-pt/mention` — te same reguły działają w obu portach i w zwykłym
|
|
4871
|
+
* polu tekstowym.
|
|
4872
|
+
*/
|
|
4873
|
+
syncMention() {
|
|
4874
|
+
if (this.disabled() || !this.mentions().length)
|
|
4875
|
+
return this.closeMention();
|
|
4876
|
+
const selection = window.getSelection();
|
|
4877
|
+
const node = selection?.anchorNode;
|
|
4878
|
+
if (!selection?.isCollapsed || !(node instanceof Text) || !this.inEditor())
|
|
4879
|
+
return this.closeMention();
|
|
4880
|
+
const query = mentionQuery(node.data, selection.anchorOffset);
|
|
4881
|
+
if (!query)
|
|
4882
|
+
return this.closeMention();
|
|
4883
|
+
const matches = filterMentions(this.mentions(), query.query, this.mentionLimit());
|
|
4884
|
+
if (!matches.length)
|
|
4885
|
+
return this.closeMention();
|
|
4886
|
+
this.mentionRange = { node, start: query.start, end: query.end };
|
|
4887
|
+
this.mentionMatches.set(matches);
|
|
4888
|
+
this.mentionActive.set(0);
|
|
4889
|
+
this.mentionPoint.set(this.caretPoint(node, query.end));
|
|
4890
|
+
this.mentionOpen.set(true);
|
|
4891
|
+
}
|
|
4892
|
+
/** Punkt pod kursorem — lista podpowiedzi zaczepia się o niego, bo `@` nie ma swojego elementu. */
|
|
4893
|
+
caretPoint(node, offset) {
|
|
4894
|
+
const range = document.createRange();
|
|
4895
|
+
range.setStart(node, Math.min(offset, node.length));
|
|
4896
|
+
range.collapse(true);
|
|
4897
|
+
const rect = range.getBoundingClientRect();
|
|
4898
|
+
// Zwinięty zakres na początku wiersza potrafi dać zerowy prostokąt — wtedy bierzemy
|
|
4899
|
+
// krawędź samego edytora, żeby lista nie wylądowała w rogu ekranu.
|
|
4900
|
+
if (rect.width === 0 && rect.height === 0) {
|
|
4901
|
+
const fallback = this.editor()?.nativeElement.getBoundingClientRect();
|
|
4902
|
+
return { x: fallback?.left ?? 0, y: fallback?.top ?? 0 };
|
|
4903
|
+
}
|
|
4904
|
+
return { x: rect.left, y: rect.bottom };
|
|
4905
|
+
}
|
|
4906
|
+
/** Klawiatura listy podpowiedzi; `true` = zdarzenie obsłużone i edytor go już nie zobaczy. */
|
|
4907
|
+
onMentionKeydown(event) {
|
|
4908
|
+
const count = this.mentionMatches().length;
|
|
4909
|
+
if (!count)
|
|
4910
|
+
return false;
|
|
4911
|
+
switch (event.key) {
|
|
4912
|
+
case 'ArrowDown':
|
|
4913
|
+
this.mentionActive.update((index) => (index + 1) % count);
|
|
4914
|
+
break;
|
|
4915
|
+
case 'ArrowUp':
|
|
4916
|
+
this.mentionActive.update((index) => (index - 1 + count) % count);
|
|
4917
|
+
break;
|
|
4918
|
+
case 'Enter':
|
|
4919
|
+
case 'Tab': {
|
|
4920
|
+
const item = this.mentionMatches()[this.mentionActive()];
|
|
4921
|
+
if (!item)
|
|
4922
|
+
return false;
|
|
4923
|
+
this.insertMention(item);
|
|
4924
|
+
break;
|
|
4925
|
+
}
|
|
4926
|
+
case 'Escape':
|
|
4927
|
+
this.closeMention();
|
|
4928
|
+
break;
|
|
4929
|
+
default:
|
|
4930
|
+
return false;
|
|
4931
|
+
}
|
|
4932
|
+
event.preventDefault();
|
|
4933
|
+
return true;
|
|
4934
|
+
}
|
|
4935
|
+
/**
|
|
4936
|
+
* Wstawia wzmiankę w miejsce zapytania `@…`.
|
|
4937
|
+
*
|
|
4938
|
+
* Wzmianka jest elementem, nie samym tekstem: `data-mention` niesie identyfikator, który
|
|
4939
|
+
* przeżyje zmianę nazwy, a `contenteditable="false"` trzyma ją w jednym kawałku — bez tego
|
|
4940
|
+
* kursor wchodziłby w środek nazwiska i psuł zapis. Spacja po wzmiance daje gdzie postawić
|
|
4941
|
+
* kursor: bez niej nie da się wyjść poza element, który nie jest edytowalny.
|
|
4942
|
+
*/
|
|
4943
|
+
insertMention(item) {
|
|
4944
|
+
const target = this.mentionRange;
|
|
4945
|
+
if (!target)
|
|
4946
|
+
return;
|
|
4947
|
+
const range = document.createRange();
|
|
4948
|
+
range.setStart(target.node, target.start);
|
|
4949
|
+
range.setEnd(target.node, Math.min(target.end, target.node.length));
|
|
4950
|
+
range.deleteContents();
|
|
4951
|
+
const element = document.createElement('span');
|
|
4952
|
+
element.className = 'kpt-mention';
|
|
4953
|
+
element.dataset['mention'] = item.id;
|
|
4954
|
+
element.setAttribute('contenteditable', 'false');
|
|
4955
|
+
element.textContent = '@' + item.label;
|
|
4956
|
+
const space = document.createTextNode(' ');
|
|
4957
|
+
range.insertNode(space);
|
|
4958
|
+
range.insertNode(element);
|
|
4959
|
+
const after = document.createRange();
|
|
4960
|
+
after.setStartAfter(space);
|
|
4961
|
+
after.collapse(true);
|
|
4962
|
+
const selection = window.getSelection();
|
|
4963
|
+
selection?.removeAllRanges();
|
|
4964
|
+
selection?.addRange(after);
|
|
4965
|
+
this.closeMention();
|
|
4966
|
+
this.onInput();
|
|
4967
|
+
this.mentioned.emit(item);
|
|
4968
|
+
}
|
|
4969
|
+
closeMention() {
|
|
4970
|
+
this.mentionRange = null;
|
|
4971
|
+
this.mentionMatches.set([]);
|
|
4972
|
+
if (this.mentionOpen())
|
|
4973
|
+
this.mentionOpen.set(false);
|
|
4974
|
+
}
|
|
4757
4975
|
sanitizeUrl(url) {
|
|
4758
4976
|
const trimmed = url.trim().replace(/[\x00-\x1f]/g, '');
|
|
4759
4977
|
if (!trimmed)
|
|
@@ -4812,22 +5030,24 @@ class KptRichText {
|
|
|
4812
5030
|
}
|
|
4813
5031
|
static { this.ɵfac = function KptRichText_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptRichText)(); }; }
|
|
4814
5032
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptRichText, selectors: [["kpt-rich-text"]], viewQuery: function KptRichText_Query(rf, ctx) { if (rf & 1) {
|
|
4815
|
-
i0.ɵɵviewQuerySignal(ctx.editor, _c0$
|
|
5033
|
+
i0.ɵɵviewQuerySignal(ctx.editor, _c0$z, 5);
|
|
4816
5034
|
} if (rf & 2) {
|
|
4817
5035
|
i0.ɵɵqueryAdvance();
|
|
4818
|
-
} }, hostAttrs: [1, "kpt-rich-text-host"], inputs: { value: [1, "value"], toolbar: [1, "toolbar"], placeholder: [1, "placeholder"], maxListLevel: [1, "maxListLevel"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"] }, outputs: { value: "valueChange", touch: "touch" }, decls:
|
|
5036
|
+
} }, hostAttrs: [1, "kpt-rich-text-host"], inputs: { value: [1, "value"], toolbar: [1, "toolbar"], placeholder: [1, "placeholder"], maxListLevel: [1, "maxListLevel"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], mentions: [1, "mentions"], mentionLimit: [1, "mentionLimit"] }, outputs: { value: "valueChange", touch: "touch", mentioned: "mentioned" }, decls: 12, vars: 16, consts: [["paletteTpl", ""], ["styleOrigin", "cdkOverlayOrigin"], ["foreOrigin", "cdkOverlayOrigin"], ["backOrigin", "cdkOverlayOrigin"], ["tableOrigin", "cdkOverlayOrigin"], ["editor", ""], [1, "kpt-rich-text"], ["role", "toolbar", 1, "kpt-rich-text__toolbar"], ["spellcheck", "false", 1, "kpt-rich-text__source", 3, "value", "disabled"], ["role", "textbox", "aria-multiline", "true", 1, "kpt-rich-text__editor"], ["cdkConnectedOverlay", "", 3, "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayHasBackdrop"], ["aria-hidden", "true", 1, "kpt-rich-text__divider"], ["type", "button", 1, "kpt-rich-text__tool", 3, "is-active", "kptTooltip", "disabled"], ["type", "button", "cdkOverlayOrigin", "", 1, "kpt-rich-text__style", 3, "mousedown", "click", "disabled", "kptTooltip"], ["name", "chevron-down", 1, "kpt-rich-text__style-caret"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop"], ["role", "listbox", 1, "kpt-rich-text__style-panel"], ["role", "option", 1, "kpt-rich-text__style-opt", 3, "class", "is-selected"], ["role", "option", 1, "kpt-rich-text__style-opt", 3, "click"], ["type", "button", "cdkOverlayOrigin", "", 1, "kpt-rich-text__tool", "kpt-rich-text__tool--color", 3, "mousedown", "click", "kptTooltip", "disabled"], [3, "name"], [3, "ngTemplateOutlet"], ["type", "button", "cdkOverlayOrigin", "", 1, "kpt-rich-text__tool", 3, "mousedown", "click", "kptTooltip", "disabled"], [1, "kpt-rt-grid-pop", 3, "mousedown"], [1, "kpt-rt-grid", 3, "mouseleave"], [1, "kpt-rt-grid__row"], [1, "kpt-rt-grid__label"], [1, "kpt-rt-grid__cell", 3, "is-on"], [1, "kpt-rt-grid__cell", 3, "mouseenter", "click"], ["type", "button", 1, "kpt-rich-text__tool", 3, "mousedown", "click", "kptTooltip", "disabled"], ["spellcheck", "false", 1, "kpt-rich-text__source", 3, "input", "blur", "value", "disabled"], ["role", "textbox", "aria-multiline", "true", 1, "kpt-rich-text__editor", 3, "input", "keydown", "paste", "contextmenu", "mousedown", "mousemove", "blur"], ["role", "listbox", 1, "kpt-rt-mentions"], ["role", "option", 1, "kpt-rt-mentions__item"], ["role", "option", 1, "kpt-rt-mentions__item", 3, "mousedown", "mouseenter"], [1, "kpt-rt-mentions__label"], [1, "kpt-rt-mentions__kind"], [1, "kpt-rt-menu", 3, "contextmenu"], [1, "kpt-rt-menu__group"], ["type", "button", 1, "kpt-rt-menu__item", 3, "click"], ["name", "plus"], ["name", "table"], ["name", "trash"], [1, "kpt-rt-menu__sep"], ["name", "palette"], ["name", "align-left"], ["name", "align-center"], ["name", "align-right"], ["name", "grip-vertical"], ["type", "button", 1, "kpt-rt-menu__item", "kpt-rt-menu__item--danger", 3, "click"], [1, "kpt-rt-border", 3, "mousedown"], [1, "kpt-rt-border__seg"], ["type", "button", 3, "click"], [1, "kpt-rt-border__widths"], [1, "kpt-rich-text__swatches"], ["type", "button", 1, "kpt-rich-text__swatch", 3, "background"], [1, "kpt-rich-text__picker"], ["type", "color", 3, "input"], ["type", "button", 1, "kpt-rich-text__swatch", 3, "click"], [1, "kpt-rich-text__palette", 3, "mousedown"]], template: function KptRichText_Template(rf, ctx) { if (rf & 1) {
|
|
4819
5037
|
i0.ɵɵelementStart(0, "div", 6)(1, "div", 7);
|
|
4820
5038
|
i0.ɵɵrepeaterCreate(2, KptRichText_For_3_Template, 3, 1, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
4821
5039
|
i0.ɵɵelementEnd();
|
|
4822
5040
|
i0.ɵɵconditionalCreate(4, KptRichText_Conditional_4_Template, 1, 3, "textarea", 8)(5, KptRichText_Conditional_5_Template, 2, 3, "div", 9);
|
|
4823
|
-
i0.ɵɵtemplate(6, KptRichText_ng_template_6_Template,
|
|
4824
|
-
i0.ɵɵlistener("
|
|
4825
|
-
i0.ɵɵtemplate(7, KptRichText_ng_template_7_Template,
|
|
4826
|
-
i0.ɵɵlistener("backdropClick", function KptRichText_Template_ng_template_backdropClick_7_listener() { return ctx.
|
|
4827
|
-
i0.ɵɵtemplate(8, KptRichText_ng_template_8_Template,
|
|
4828
|
-
i0.ɵɵlistener("backdropClick", function KptRichText_Template_ng_template_backdropClick_8_listener() { return ctx.
|
|
5041
|
+
i0.ɵɵtemplate(6, KptRichText_ng_template_6_Template, 3, 1, "ng-template", 10);
|
|
5042
|
+
i0.ɵɵlistener("detach", function KptRichText_Template_ng_template_detach_6_listener() { return ctx.closeMention(); });
|
|
5043
|
+
i0.ɵɵtemplate(7, KptRichText_ng_template_7_Template, 60, 23, "ng-template", 11);
|
|
5044
|
+
i0.ɵɵlistener("backdropClick", function KptRichText_Template_ng_template_backdropClick_7_listener() { return ctx.closeMenu(); })("detach", function KptRichText_Template_ng_template_detach_7_listener() { return ctx.closeMenu(); });
|
|
5045
|
+
i0.ɵɵtemplate(8, KptRichText_ng_template_8_Template, 22, 11, "ng-template", 11);
|
|
5046
|
+
i0.ɵɵlistener("backdropClick", function KptRichText_Template_ng_template_backdropClick_8_listener() { return ctx.closeBorder(); })("detach", function KptRichText_Template_ng_template_detach_8_listener() { return ctx.closeBorder(); });
|
|
5047
|
+
i0.ɵɵtemplate(9, KptRichText_ng_template_9_Template, 1, 1, "ng-template", 11);
|
|
5048
|
+
i0.ɵɵlistener("backdropClick", function KptRichText_Template_ng_template_backdropClick_9_listener() { return ctx.closeColor(); })("detach", function KptRichText_Template_ng_template_detach_9_listener() { return ctx.closeColor(); });
|
|
4829
5049
|
i0.ɵɵelementEnd();
|
|
4830
|
-
i0.ɵɵtemplate(
|
|
5050
|
+
i0.ɵɵtemplate(10, KptRichText_ng_template_10_Template, 8, 1, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
4831
5051
|
} if (rf & 2) {
|
|
4832
5052
|
i0.ɵɵclassProp("kpt-rich-text--invalid", ctx.showInvalid())("kpt-rich-text--disabled", ctx.disabled());
|
|
4833
5053
|
i0.ɵɵadvance(2);
|
|
@@ -4835,18 +5055,20 @@ class KptRichText {
|
|
|
4835
5055
|
i0.ɵɵadvance(2);
|
|
4836
5056
|
i0.ɵɵconditional(ctx.sourceView() ? 4 : 5);
|
|
4837
5057
|
i0.ɵɵadvance(2);
|
|
5058
|
+
i0.ɵɵproperty("cdkConnectedOverlayOrigin", ctx.mentionPoint())("cdkConnectedOverlayOpen", ctx.mentionOpen());
|
|
5059
|
+
i0.ɵɵadvance();
|
|
4838
5060
|
i0.ɵɵproperty("cdkConnectedOverlayOrigin", ctx.menuPoint())("cdkConnectedOverlayOpen", ctx.menuOpen())("cdkConnectedOverlayHasBackdrop", true);
|
|
4839
5061
|
i0.ɵɵadvance();
|
|
4840
5062
|
i0.ɵɵproperty("cdkConnectedOverlayOrigin", ctx.menuPoint())("cdkConnectedOverlayOpen", ctx.borderOpen())("cdkConnectedOverlayHasBackdrop", true);
|
|
4841
5063
|
i0.ɵɵadvance();
|
|
4842
5064
|
i0.ɵɵproperty("cdkConnectedOverlayOrigin", ctx.menuPoint())("cdkConnectedOverlayOpen", ctx.colorOpen() && ctx.colorKind() === "cellBg")("cdkConnectedOverlayHasBackdrop", true);
|
|
4843
|
-
} }, dependencies: [KptIcon, CdkOverlayOrigin, CdkConnectedOverlay, NgTemplateOutlet, KptTooltip], styles: ["@layer kpt.components{.kpt-rich-text-host{display:block}.kpt-rich-text{border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-form-field-radius, .5rem);overflow:hidden;background:var(--%NS%kpt-form-field-bg)}.kpt-rich-text:focus-within{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-rich-text--invalid{border-color:var(--%NS%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(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);background:var(--%NS%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(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer;font-size:1.05rem}.kpt-rich-text__tool:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-rich-text__tool:disabled{opacity:.5;cursor:not-allowed}.kpt-rich-text__tool.is-active{background:var(--%NS%kpt-color-muted);color:var(--%NS%kpt-color-primary)}.kpt-rich-text__divider{width:var(--%NS%kpt-border-width-thin, 1px);align-self:stretch;margin-inline:.2rem;background:var(--%NS%kpt-color-border)}.kpt-rich-text__style{display:inline-flex;align-items:center;gap:var(--%NS%kpt-space-1, .25rem);height:2rem;min-width:8rem;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-radius-sm, .25rem);background:var(--%NS%kpt-form-field-bg);color:var(--%NS%kpt-form-field-text);font:inherit;font-size:var(--%NS%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(--%NS%kpt-form-field-border-hover)}.kpt-rich-text__style.is-open{border-color:var(--%NS%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(--%NS%kpt-space-3, .75rem);font-size:var(--%NS%kpt-font-size-sm, .875rem);line-height:var(--%NS%kpt-font-line-height-normal, 1.5);color:var(--%NS%kpt-form-field-text);outline:none;overflow-y:auto}.kpt-rich-text__editor:empty:before{content:attr(data-placeholder);color:var(--%NS%kpt-form-field-placeholder)}.kpt-rich-text__editor a{color:var(--%NS%kpt-color-primary)}.kpt-rich-text__editor ul,.kpt-rich-text__editor ol{padding-inline-start:1.5rem}.kpt-rich-text__editor ul{list-style-type:disc}.kpt-rich-text__editor ul ul{list-style-type:circle}.kpt-rich-text__editor ul ul ul{list-style-type:square}.kpt-rich-text__editor ul ul ul ul{list-style-type:disc}.kpt-rich-text__editor ul ul ul ul ul{list-style-type:circle}.kpt-rich-text__editor ul ul ul ul ul ul{list-style-type:square}.kpt-rich-text__editor ol{list-style-type:decimal}.kpt-rich-text__editor ol ol{list-style-type:lower-alpha}.kpt-rich-text__editor ol ol ol{list-style-type:lower-roman}.kpt-rich-text__editor ol ol ol ol{list-style-type:decimal}.kpt-rich-text__editor ol ol ol ol ol{list-style-type:lower-alpha}.kpt-rich-text__editor ol ol ol ol ol ol{list-style-type:lower-roman}.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(--%NS%kpt-color-border-strong);color:var(--%NS%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(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%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(--%NS%kpt-color-surface-variant);font-weight:var(--%NS%kpt-font-weight-semibold, 600)}.kpt-rich-text__editor .kpt-rt-table .kpt-rt-cell-sel{box-shadow:inset 0 0 0 2px var(--%NS%kpt-color-primary);background:color-mix(in oklch,var(--%NS%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(--%NS%kpt-space-3, .75rem);border:0;background:var(--%NS%kpt-color-surface-variant);color:var(--%NS%kpt-form-field-text);font-family:var(--%NS%kpt-font-family-mono, ui-monospace, monospace);font-size:var(--%NS%kpt-font-size-xs, .75rem);line-height:var(--%NS%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(--%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);max-height:20rem;overflow-y:auto}.kpt-rich-text__style-opt{padding:.35rem .6rem;border-radius:var(--%NS%kpt-radius-sm, .25rem);color:var(--%NS%kpt-color-on-surface);cursor:pointer;line-height:1.2}.kpt-rich-text__style-opt:hover{background:var(--%NS%kpt-color-muted)}.kpt-rich-text__style-opt.is-selected{background:var(--%NS%kpt-color-muted);color:var(--%NS%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(--%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)}.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(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%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(--%NS%kpt-space-2, .5rem);margin-top:var(--%NS%kpt-space-2, .5rem);font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface-muted)}.kpt-rich-text__picker input[type=color]{width:2rem;height:1.6rem;padding:0;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;cursor:pointer}.kpt-rt-grid-pop{padding:var(--%NS%kpt-space-2, .5rem);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)}.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(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:2px;cursor:pointer}.kpt-rt-grid__cell.is-on{background:var(--%NS%kpt-color-primary);border-color:var(--%NS%kpt-color-primary)}.kpt-rt-grid__label{margin-top:var(--%NS%kpt-space-2, .5rem);text-align:center;font-size:var(--%NS%kpt-font-size-xs, .75rem);color:var(--%NS%kpt-color-on-surface-muted)}.kpt-rt-menu{min-width:12rem;padding:.25rem;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);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-rt-menu__group{padding:.3rem .6rem .15rem;font-size:var(--%NS%kpt-font-size-xs, .75rem);font-weight:var(--%NS%kpt-font-weight-semibold, 600);text-transform:uppercase;letter-spacing:.03em;color:var(--%NS%kpt-color-on-surface-muted)}.kpt-rt-menu__item{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);width:100%;padding:.4rem .6rem;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);font:inherit;text-align:start;cursor:pointer}.kpt-rt-menu__item:hover{background:var(--%NS%kpt-color-muted)}.kpt-rt-menu__item .kpt-icon-host{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-rt-menu__item--danger,.kpt-rt-menu__item--danger .kpt-icon-host{color:var(--%NS%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(--%NS%kpt-color-border)}.kpt-rt-border{display:flex;flex-direction:column;gap:var(--%NS%kpt-space-2, .5rem);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)}.kpt-rt-border__seg{display:flex;gap:2px;padding:2px;background:var(--%NS%kpt-color-surface-variant);border-radius:var(--%NS%kpt-radius-md, .5rem)}.kpt-rt-border__seg button{flex:1;border:0;background:none;padding:.25rem .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-rt-border__seg 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)}.kpt-rt-border__widths{display:flex;gap:.25rem}.kpt-rt-border__widths button{flex:1;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);background:none;padding:.25rem .3rem;border-radius:var(--%NS%kpt-radius-sm, .25rem);color:var(--%NS%kpt-color-on-surface);font:inherit;font-size:var(--%NS%kpt-font-size-xs, .75rem);cursor:pointer}.kpt-rt-border__widths button:hover{background:var(--%NS%kpt-color-muted)}}\n"], encapsulation: 2 }); }
|
|
5065
|
+
} }, dependencies: [KptIcon, CdkOverlayOrigin, CdkConnectedOverlay, NgTemplateOutlet, KptTooltip], styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-rich-text-host{display:block}.kpt-rich-text{border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-form-field-radius, .5rem);overflow:hidden;background:var(--%NS%kpt-form-field-bg)}.kpt-rich-text:focus-within{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-rich-text--invalid{border-color:var(--%NS%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(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);background:var(--%NS%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(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);cursor:pointer;font-size:1.05rem}.kpt-rich-text__tool:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-rich-text__tool:disabled{opacity:.5;cursor:not-allowed}.kpt-rich-text__tool.is-active{background:var(--%NS%kpt-color-muted);color:var(--%NS%kpt-color-primary)}.kpt-rich-text__divider{width:var(--%NS%kpt-border-width-thin, 1px);align-self:stretch;margin-inline:.2rem;background:var(--%NS%kpt-color-border)}.kpt-rich-text__style{display:inline-flex;align-items:center;gap:var(--%NS%kpt-space-1, .25rem);height:2rem;min-width:8rem;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-radius-sm, .25rem);background:var(--%NS%kpt-form-field-bg);color:var(--%NS%kpt-form-field-text);font:inherit;font-size:var(--%NS%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(--%NS%kpt-form-field-border-hover)}.kpt-rich-text__style.is-open{border-color:var(--%NS%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(--%NS%kpt-space-3, .75rem);font-size:var(--%NS%kpt-font-size-sm, .875rem);line-height:var(--%NS%kpt-font-line-height-normal, 1.5);color:var(--%NS%kpt-form-field-text);outline:none;overflow-y:auto}.kpt-rich-text__editor:empty:before{content:attr(data-placeholder);color:var(--%NS%kpt-form-field-placeholder)}.kpt-rich-text__editor a{color:var(--%NS%kpt-color-primary)}.kpt-rich-text__editor ul,.kpt-rich-text__editor ol{padding-inline-start:1.5rem}.kpt-rich-text__editor ul{list-style-type:disc}.kpt-rich-text__editor ul ul{list-style-type:circle}.kpt-rich-text__editor ul ul ul{list-style-type:square}.kpt-rich-text__editor ul ul ul ul{list-style-type:disc}.kpt-rich-text__editor ul ul ul ul ul{list-style-type:circle}.kpt-rich-text__editor ul ul ul ul ul ul{list-style-type:square}.kpt-rich-text__editor ol{list-style-type:decimal}.kpt-rich-text__editor ol ol{list-style-type:lower-alpha}.kpt-rich-text__editor ol ol ol{list-style-type:lower-roman}.kpt-rich-text__editor ol ol ol ol{list-style-type:decimal}.kpt-rich-text__editor ol ol ol ol ol{list-style-type:lower-alpha}.kpt-rich-text__editor ol ol ol ol ol ol{list-style-type:lower-roman}.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(--%NS%kpt-color-border-strong);color:var(--%NS%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(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%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(--%NS%kpt-color-surface-variant);font-weight:var(--%NS%kpt-font-weight-semibold, 600)}.kpt-rich-text__editor .kpt-rt-table .kpt-rt-cell-sel{box-shadow:inset 0 0 0 2px var(--%NS%kpt-color-primary);background:color-mix(in oklch,var(--%NS%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(--%NS%kpt-space-3, .75rem);border:0;background:var(--%NS%kpt-color-surface-variant);color:var(--%NS%kpt-form-field-text);font-family:var(--%NS%kpt-font-family-mono, ui-monospace, monospace);font-size:var(--%NS%kpt-font-size-xs, .75rem);line-height:var(--%NS%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(--%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);max-height:20rem;overflow-y:auto}.kpt-rich-text__style-opt{padding:.35rem .6rem;border-radius:var(--%NS%kpt-radius-sm, .25rem);color:var(--%NS%kpt-color-on-surface);cursor:pointer;line-height:1.2}.kpt-rich-text__style-opt:hover{background:var(--%NS%kpt-color-muted)}.kpt-rich-text__style-opt.is-selected{background:var(--%NS%kpt-color-muted);color:var(--%NS%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(--%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)}.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(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%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(--%NS%kpt-space-2, .5rem);margin-top:var(--%NS%kpt-space-2, .5rem);font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface-muted)}.kpt-rich-text__picker input[type=color]{width:2rem;height:1.6rem;padding:0;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;cursor:pointer}.kpt-rt-grid-pop{padding:var(--%NS%kpt-space-2, .5rem);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)}.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(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:2px;cursor:pointer}.kpt-rt-grid__cell.is-on{background:var(--%NS%kpt-color-primary);border-color:var(--%NS%kpt-color-primary)}.kpt-rt-grid__label{margin-top:var(--%NS%kpt-space-2, .5rem);text-align:center;font-size:var(--%NS%kpt-font-size-xs, .75rem);color:var(--%NS%kpt-color-on-surface-muted)}.kpt-rt-mentions{min-inline-size:12rem;max-inline-size:20rem;margin:0;padding:.25rem;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);background:var(--%NS%kpt-color-surface-raised);list-style:none;box-shadow:var(--%NS%kpt-elevation-3)}.kpt-rt-mentions__item{display:flex;align-items:baseline;gap:var(--%NS%kpt-space-2, .5rem);padding:var(--%NS%kpt-space-1, .25rem) var(--%NS%kpt-space-2, .5rem);border-radius:var(--%NS%kpt-radius-sm, .25rem);font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer}.kpt-rt-mentions__item[data-active]{background:var(--%NS%kpt-color-surface-hover)}.kpt-rt-mentions__kind{margin-inline-start:auto;color:var(--%NS%kpt-color-text-muted);font-size:var(--%NS%kpt-font-size-xs, .75rem)}.kpt-rt-menu{min-width:12rem;padding:.25rem;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);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-rt-menu__group{padding:.3rem .6rem .15rem;font-size:var(--%NS%kpt-font-size-xs, .75rem);font-weight:var(--%NS%kpt-font-weight-semibold, 600);text-transform:uppercase;letter-spacing:.03em;color:var(--%NS%kpt-color-on-surface-muted)}.kpt-rt-menu__item{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);width:100%;padding:.4rem .6rem;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:none;color:var(--%NS%kpt-color-on-surface);font:inherit;text-align:start;cursor:pointer}.kpt-rt-menu__item:hover{background:var(--%NS%kpt-color-muted)}.kpt-rt-menu__item .kpt-icon-host{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-rt-menu__item--danger,.kpt-rt-menu__item--danger .kpt-icon-host{color:var(--%NS%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(--%NS%kpt-color-border)}.kpt-rt-border{display:flex;flex-direction:column;gap:var(--%NS%kpt-space-2, .5rem);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)}.kpt-rt-border__seg{display:flex;gap:2px;padding:2px;background:var(--%NS%kpt-color-surface-variant);border-radius:var(--%NS%kpt-radius-md, .5rem)}.kpt-rt-border__seg button{flex:1;border:0;background:none;padding:.25rem .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-rt-border__seg 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)}.kpt-rt-border__widths{display:flex;gap:.25rem}.kpt-rt-border__widths button{flex:1;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);background:none;padding:.25rem .3rem;border-radius:var(--%NS%kpt-radius-sm, .25rem);color:var(--%NS%kpt-color-on-surface);font:inherit;font-size:var(--%NS%kpt-font-size-xs, .75rem);cursor:pointer}.kpt-rt-border__widths button:hover{background:var(--%NS%kpt-color-muted)}}\n"], encapsulation: 2 }); }
|
|
4844
5066
|
}
|
|
4845
5067
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptRichText, [{
|
|
4846
5068
|
type: Component,
|
|
4847
|
-
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]=\"pressed(item)\"\n [kptTooltip]=\"aria(item)\"\n [disabled]=\"disabled() || !enabled(item)\"\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 (keydown)=\"onKeydown($event)\"\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 ul{list-style-type:disc}.kpt-rich-text__editor ul ul{list-style-type:circle}.kpt-rich-text__editor ul ul ul{list-style-type:square}.kpt-rich-text__editor ul ul ul ul{list-style-type:disc}.kpt-rich-text__editor ul ul ul ul ul{list-style-type:circle}.kpt-rich-text__editor ul ul ul ul ul ul{list-style-type:square}.kpt-rich-text__editor ol{list-style-type:decimal}.kpt-rich-text__editor ol ol{list-style-type:lower-alpha}.kpt-rich-text__editor ol ol ol{list-style-type:lower-roman}.kpt-rich-text__editor ol ol ol ol{list-style-type:decimal}.kpt-rich-text__editor ol ol ol ol ol{list-style-type:lower-alpha}.kpt-rich-text__editor ol ol ol ol ol ol{list-style-type:lower-roman}.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-host{color:var(--kpt-color-on-surface-muted)}.kpt-rt-menu__item--danger,.kpt-rt-menu__item--danger .kpt-icon-host{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"] }]
|
|
4848
|
-
}], () => [], { 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 }] }], maxListLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxListLevel", 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 }] }] }); })();
|
|
4849
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptRichText, { className: "KptRichText", filePath: "lib/rich-text/rich-text.component.ts", lineNumber:
|
|
5069
|
+
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]=\"pressed(item)\"\n [kptTooltip]=\"aria(item)\"\n [disabled]=\"disabled() || !enabled(item)\"\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 (keydown)=\"onKeydown($event)\"\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 <!-- Podpowiedzi wzmianek (origin punktowy = miejsce kursora, bo `@` nie ma swojego elementu) -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"mentionPoint()\"\n [cdkConnectedOverlayOpen]=\"mentionOpen()\"\n (detach)=\"closeMention()\"\n >\n <ul class=\"kpt-rt-mentions\" role=\"listbox\" [attr.aria-label]=\"i18n.t('richText.mentions')\">\n @for (item of mentionMatches(); track item.id; let index = $index) {\n <li\n class=\"kpt-rt-mentions__item\"\n role=\"option\"\n [attr.aria-selected]=\"index === mentionActive()\"\n [attr.data-active]=\"index === mentionActive() ? '' : null\"\n (mousedown)=\"$event.preventDefault(); insertMention(item)\"\n (mouseenter)=\"mentionActive.set(index)\"\n >\n <span class=\"kpt-rt-mentions__label\">{{ item.label }}</span>\n @if (item.kind) {\n <span class=\"kpt-rt-mentions__kind\">{{ item.kind }}</span>\n }\n </li>\n }\n </ul>\n </ng-template>\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: ["@charset \"UTF-8\";@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 ul{list-style-type:disc}.kpt-rich-text__editor ul ul{list-style-type:circle}.kpt-rich-text__editor ul ul ul{list-style-type:square}.kpt-rich-text__editor ul ul ul ul{list-style-type:disc}.kpt-rich-text__editor ul ul ul ul ul{list-style-type:circle}.kpt-rich-text__editor ul ul ul ul ul ul{list-style-type:square}.kpt-rich-text__editor ol{list-style-type:decimal}.kpt-rich-text__editor ol ol{list-style-type:lower-alpha}.kpt-rich-text__editor ol ol ol{list-style-type:lower-roman}.kpt-rich-text__editor ol ol ol ol{list-style-type:decimal}.kpt-rich-text__editor ol ol ol ol ol{list-style-type:lower-alpha}.kpt-rich-text__editor ol ol ol ol ol ol{list-style-type:lower-roman}.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-mentions{min-inline-size:12rem;max-inline-size:20rem;margin:0;padding:.25rem;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);background:var(--kpt-color-surface-raised);list-style:none;box-shadow:var(--kpt-elevation-3)}.kpt-rt-mentions__item{display:flex;align-items:baseline;gap:var(--kpt-space-2, .5rem);padding:var(--kpt-space-1, .25rem) var(--kpt-space-2, .5rem);border-radius:var(--kpt-radius-sm, .25rem);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-rt-mentions__item[data-active]{background:var(--kpt-color-surface-hover)}.kpt-rt-mentions__kind{margin-inline-start:auto;color:var(--kpt-color-text-muted);font-size:var(--kpt-font-size-xs, .75rem)}.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-host{color:var(--kpt-color-on-surface-muted)}.kpt-rt-menu__item--danger,.kpt-rt-menu__item--danger .kpt-icon-host{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"] }]
|
|
5070
|
+
}], () => [], { 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 }] }], maxListLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxListLevel", 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 }] }], mentions: [{ type: i0.Input, args: [{ isSignal: true, alias: "mentions", required: false }] }], mentionLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "mentionLimit", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], mentioned: [{ type: i0.Output, args: ["mentioned"] }], editor: [{ type: i0.ViewChild, args: ['editor', { isSignal: true }] }] }); })();
|
|
5071
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptRichText, { className: "KptRichText", filePath: "lib/rich-text/rich-text.component.ts", lineNumber: 145 }); })();
|
|
4850
5072
|
|
|
4851
5073
|
function KptSlider_Conditional_0_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
4852
5074
|
i0.ɵɵdomElementStart(0, "span", 5);
|
|
@@ -5042,7 +5264,7 @@ class KptSlider {
|
|
|
5042
5264
|
}], 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"] }] }); })();
|
|
5043
5265
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptSlider, { className: "KptSlider", filePath: "lib/slider/slider.component.ts", lineNumber: 87 }); })();
|
|
5044
5266
|
|
|
5045
|
-
const _c0$
|
|
5267
|
+
const _c0$y = (a0, a1) => ({ value: a0, max: a1 });
|
|
5046
5268
|
function KptRating_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
5047
5269
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
5048
5270
|
i0.ɵɵelementStart(0, "button", 2);
|
|
@@ -5054,7 +5276,7 @@ function KptRating_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
5054
5276
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
5055
5277
|
i0.ɵɵclassProp("is-filled", star_r2 <= (ctx_r2.hover() || ctx_r2.value()));
|
|
5056
5278
|
i0.ɵɵproperty("disabled", ctx_r2.readonly() || ctx_r2.disabled());
|
|
5057
|
-
i0.ɵɵattribute("aria-label", ctx_r2.i18n.t("rating.star", i0.ɵɵpureFunction2(4, _c0$
|
|
5279
|
+
i0.ɵɵattribute("aria-label", ctx_r2.i18n.t("rating.star", i0.ɵɵpureFunction2(4, _c0$y, star_r2, ctx_r2.count())));
|
|
5058
5280
|
} }
|
|
5059
5281
|
/**
|
|
5060
5282
|
* Ocena gwiazdkami (rating) na Signal Forms.
|
|
@@ -5987,7 +6209,7 @@ class KptInputNumber {
|
|
|
5987
6209
|
}], 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"] }] }); })();
|
|
5988
6210
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptInputNumber, { className: "KptInputNumber", filePath: "lib/input-number/input-number.component.ts", lineNumber: 53 }); })();
|
|
5989
6211
|
|
|
5990
|
-
const _c0$
|
|
6212
|
+
const _c0$x = () => [0, 1, 2, 3];
|
|
5991
6213
|
function KptPassword_Conditional_4_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
5992
6214
|
i0.ɵɵelement(0, "span", 8);
|
|
5993
6215
|
} if (rf & 2) {
|
|
@@ -6006,7 +6228,7 @@ function KptPassword_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
6006
6228
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
6007
6229
|
i0.ɵɵattribute("data-score", ctx_r1.strength().score);
|
|
6008
6230
|
i0.ɵɵadvance(2);
|
|
6009
|
-
i0.ɵɵrepeater(i0.ɵɵpureFunction0(2, _c0$
|
|
6231
|
+
i0.ɵɵrepeater(i0.ɵɵpureFunction0(2, _c0$x));
|
|
6010
6232
|
i0.ɵɵadvance(3);
|
|
6011
6233
|
i0.ɵɵtextInterpolate(ctx_r1.strength().label);
|
|
6012
6234
|
} }
|
|
@@ -6729,8 +6951,8 @@ class KptKnob {
|
|
|
6729
6951
|
}], 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"] }] }); })();
|
|
6730
6952
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptKnob, { className: "KptKnob", filePath: "lib/knob/knob.component.ts", lineNumber: 45 }); })();
|
|
6731
6953
|
|
|
6732
|
-
const _c0$
|
|
6733
|
-
const _c1$
|
|
6954
|
+
const _c0$w = ["*", [["", "kptCardFooter", ""]]];
|
|
6955
|
+
const _c1$e = ["*", "[kptCardFooter]"];
|
|
6734
6956
|
function KptCard_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
6735
6957
|
i0.ɵɵdomElementStart(0, "div", 0);
|
|
6736
6958
|
i0.ɵɵtext(1);
|
|
@@ -6767,8 +6989,8 @@ class KptCard {
|
|
|
6767
6989
|
static { this.ɵfac = function KptCard_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptCard)(); }; }
|
|
6768
6990
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptCard, selectors: [["kpt-card"]], hostAttrs: [1, "kpt-card"], hostVars: 1, hostBindings: function KptCard_HostBindings(rf, ctx) { if (rf & 2) {
|
|
6769
6991
|
i0.ɵɵattribute("data-variant", ctx.variant());
|
|
6770
|
-
} }, inputs: { variant: [1, "variant"], header: [1, "header"], flush: [1, "flush"] }, ngContentSelectors: _c1$
|
|
6771
|
-
i0.ɵɵprojectionDef(_c0$
|
|
6992
|
+
} }, inputs: { variant: [1, "variant"], header: [1, "header"], flush: [1, "flush"] }, ngContentSelectors: _c1$e, decls: 4, vars: 3, consts: [[1, "kpt-card__header"], [1, "kpt-card__body"]], template: function KptCard_Template(rf, ctx) { if (rf & 1) {
|
|
6993
|
+
i0.ɵɵprojectionDef(_c0$w);
|
|
6772
6994
|
i0.ɵɵconditionalCreate(0, KptCard_Conditional_0_Template, 2, 1, "div", 0);
|
|
6773
6995
|
i0.ɵɵdomElementStart(1, "div", 1);
|
|
6774
6996
|
i0.ɵɵprojection(2);
|
|
@@ -6823,7 +7045,7 @@ class KptDivider {
|
|
|
6823
7045
|
}], null, { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }] }); })();
|
|
6824
7046
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDivider, { className: "KptDivider", filePath: "lib/divider/divider.component.ts", lineNumber: 27 }); })();
|
|
6825
7047
|
|
|
6826
|
-
const _c0$
|
|
7048
|
+
const _c0$v = ["*"];
|
|
6827
7049
|
/**
|
|
6828
7050
|
* Górny pasek (toolbar) — pozioma belka na treść aplikacji (logo, akcje).
|
|
6829
7051
|
* Elementowi z atrybutem `kptToolbarSpacer` nadaj elastyczny odstęp, aby rozepchnąć zawartość.
|
|
@@ -6851,7 +7073,7 @@ class KptToolbar {
|
|
|
6851
7073
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptToolbar, selectors: [["kpt-toolbar"]], hostAttrs: [1, "kpt-toolbar"], hostVars: 3, hostBindings: function KptToolbar_HostBindings(rf, ctx) { if (rf & 2) {
|
|
6852
7074
|
i0.ɵɵattribute("data-wrap", ctx.wrap() ? "" : null);
|
|
6853
7075
|
i0.ɵɵclassProp("kpt-toolbar--elevated", ctx.elevated());
|
|
6854
|
-
} }, inputs: { elevated: [1, "elevated"], wrap: [1, "wrap"] }, ngContentSelectors: _c0$
|
|
7076
|
+
} }, inputs: { elevated: [1, "elevated"], wrap: [1, "wrap"] }, ngContentSelectors: _c0$v, decls: 1, vars: 0, template: function KptToolbar_Template(rf, ctx) { if (rf & 1) {
|
|
6855
7077
|
i0.ɵɵprojectionDef();
|
|
6856
7078
|
i0.ɵɵprojection(0);
|
|
6857
7079
|
} }, styles: ["@layer kpt.components{.kpt-toolbar{--%NS%_kpt-toolbar-height: var(--%NS%kpt-toolbar-height, 3.5rem);--%NS%_kpt-toolbar-padding-inline: var(--%NS%kpt-space-4, 1rem);--%NS%_kpt-toolbar-gap: var(--%NS%kpt-space-3, .75rem);display:flex;align-items:center;gap:var(--%NS%_kpt-toolbar-gap);min-height:var(--%NS%_kpt-toolbar-height);padding-inline:var(--%NS%_kpt-toolbar-padding-inline);background:var(--%NS%kpt-toolbar-bg);color:var(--%NS%kpt-toolbar-fg);border-bottom:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-toolbar-border);min-inline-size:0}.kpt-toolbar--elevated{box-shadow:var(--%NS%kpt-elevation-1)}.kpt-toolbar [kptToolbarSpacer]{flex:1 1 auto;min-inline-size:0}.kpt-toolbar[data-wrap]{flex-wrap:wrap;row-gap:var(--%NS%kpt-space-2, .5rem);padding-block:var(--%NS%kpt-space-2, .5rem)}@media(max-width:639.98px){.kpt-toolbar{--%NS%_kpt-toolbar-height: var(--%NS%kpt-toolbar-height-compact, 3rem);--%NS%_kpt-toolbar-padding-inline: var(--%NS%kpt-space-3, .75rem);--%NS%_kpt-toolbar-gap: var(--%NS%kpt-space-2, .5rem)}}}\n"], encapsulation: 2 }); }
|
|
@@ -6866,8 +7088,8 @@ class KptToolbar {
|
|
|
6866
7088
|
}], null, { elevated: [{ type: i0.Input, args: [{ isSignal: true, alias: "elevated", required: false }] }], wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrap", required: false }] }] }); })();
|
|
6867
7089
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptToolbar, { className: "KptToolbar", filePath: "lib/toolbar/toolbar.component.ts", lineNumber: 27 }); })();
|
|
6868
7090
|
|
|
6869
|
-
const _c0$
|
|
6870
|
-
const _c1$
|
|
7091
|
+
const _c0$u = ["*", [["", "kptSidenavFooter", ""]]];
|
|
7092
|
+
const _c1$d = ["*", "[kptSidenavFooter]"];
|
|
6871
7093
|
/**
|
|
6872
7094
|
* Panel boczny (sidenav) — stylowany kontener nawigacji, zwykle umieszczany w slocie
|
|
6873
7095
|
* `kptShellSidenav` komponentu `kpt-app-shell`.
|
|
@@ -6887,8 +7109,8 @@ const _c1$a = ["*", "[kptSidenavFooter]"];
|
|
|
6887
7109
|
*/
|
|
6888
7110
|
class KptSidenav {
|
|
6889
7111
|
static { this.ɵfac = function KptSidenav_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptSidenav)(); }; }
|
|
6890
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptSidenav, selectors: [["kpt-sidenav"]], hostAttrs: [1, "kpt-sidenav"], ngContentSelectors: _c1$
|
|
6891
|
-
i0.ɵɵprojectionDef(_c0$
|
|
7112
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptSidenav, selectors: [["kpt-sidenav"]], hostAttrs: [1, "kpt-sidenav"], ngContentSelectors: _c1$d, decls: 3, vars: 0, consts: [[1, "kpt-sidenav__scroll"]], template: function KptSidenav_Template(rf, ctx) { if (rf & 1) {
|
|
7113
|
+
i0.ɵɵprojectionDef(_c0$u);
|
|
6892
7114
|
i0.ɵɵdomElementStart(0, "div", 0);
|
|
6893
7115
|
i0.ɵɵprojection(1);
|
|
6894
7116
|
i0.ɵɵdomElementEnd();
|
|
@@ -6901,8 +7123,8 @@ class KptSidenav {
|
|
|
6901
7123
|
}], null, null); })();
|
|
6902
7124
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptSidenav, { className: "KptSidenav", filePath: "lib/sidenav/sidenav.component.ts", lineNumber: 30 }); })();
|
|
6903
7125
|
|
|
6904
|
-
const _c0$
|
|
6905
|
-
const _c1$
|
|
7126
|
+
const _c0$t = [[["", "kptShellToolbar", ""]], [["", "kptShellSidenav", ""]], "*"];
|
|
7127
|
+
const _c1$c = ["[kptShellToolbar]", "[kptShellSidenav]", "*"];
|
|
6906
7128
|
/**
|
|
6907
7129
|
* Szkielet aplikacji: pasek u góry, panel boczny i treść. Sloty projekcji:
|
|
6908
7130
|
* `[kptShellToolbar]`, `[kptShellSidenav]` oraz treść domyślna.
|
|
@@ -7022,8 +7244,8 @@ class KptAppShell {
|
|
|
7022
7244
|
} if (rf & 2) {
|
|
7023
7245
|
i0.ɵɵattribute("data-sidenav-mode", ctx.sidenavMode())("data-sidenav-breakpoint", ctx.sidenavBreakpoint())("data-sidenav-rail", ctx.sidenavRailBreakpoint());
|
|
7024
7246
|
i0.ɵɵclassProp("kpt-app-shell--nav-open", ctx.sidenavOpen())("kpt-app-shell--nav-compact-open", ctx.sidenavCompactOpen());
|
|
7025
|
-
} }, inputs: { sidenavOpen: [1, "sidenavOpen"], sidenavCompactOpen: [1, "sidenavCompactOpen"], sidenavMode: [1, "sidenavMode"], sidenavBreakpoint: [1, "sidenavBreakpoint"], sidenavRailBreakpoint: [1, "sidenavRailBreakpoint"], sidenavLabel: [1, "sidenavLabel"] }, outputs: { sidenavOpen: "sidenavOpenChange", sidenavCompactOpen: "sidenavCompactOpenChange" }, ngContentSelectors: _c1$
|
|
7026
|
-
i0.ɵɵprojectionDef(_c0$
|
|
7247
|
+
} }, inputs: { sidenavOpen: [1, "sidenavOpen"], sidenavCompactOpen: [1, "sidenavCompactOpen"], sidenavMode: [1, "sidenavMode"], sidenavBreakpoint: [1, "sidenavBreakpoint"], sidenavRailBreakpoint: [1, "sidenavRailBreakpoint"], sidenavLabel: [1, "sidenavLabel"] }, outputs: { sidenavOpen: "sidenavOpenChange", sidenavCompactOpen: "sidenavCompactOpenChange" }, ngContentSelectors: _c1$c, decls: 7, vars: 3, consts: [[1, "kpt-app-shell__body"], ["role", "navigation", "tabindex", "-1", 1, "kpt-app-shell__sidenav", 3, "id"], ["aria-hidden", "true", 1, "kpt-app-shell__scrim", 3, "click"], [1, "kpt-app-shell__content"]], template: function KptAppShell_Template(rf, ctx) { if (rf & 1) {
|
|
7248
|
+
i0.ɵɵprojectionDef(_c0$t);
|
|
7027
7249
|
i0.ɵɵprojection(0);
|
|
7028
7250
|
i0.ɵɵdomElementStart(1, "div", 0)(2, "aside", 1);
|
|
7029
7251
|
i0.ɵɵprojection(3, 1);
|
|
@@ -7121,7 +7343,359 @@ class KptShellNavToggle {
|
|
|
7121
7343
|
}]
|
|
7122
7344
|
}], () => [], { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptShellNavToggle", required: false }] }] }); })();
|
|
7123
7345
|
|
|
7124
|
-
const _c0$
|
|
7346
|
+
const _c0$s = ["canvas"];
|
|
7347
|
+
const _c1$b = ["*"];
|
|
7348
|
+
/**
|
|
7349
|
+
* Dekoracyjna warstwa tła dla sekcji: komponent obejmuje treść i maluje pod nią animowany canvas.
|
|
7350
|
+
* Sięga się po niego tam, gdzie płaska powierzchnia wygląda na niedokończoną, a wideo albo duży
|
|
7351
|
+
* obraz kosztowałyby transfer i nie poszłyby za motywem.
|
|
7352
|
+
*
|
|
7353
|
+
* Komponent jest opakowaniem: canvas leży pod spodem, a treść z `ng-content` idzie warstwę wyżej
|
|
7354
|
+
* i zachowuje się zwyczajnie. Rysowanie stoi, gdy nie ma czego oglądać — sekcja poza ekranem,
|
|
7355
|
+
* karta w tle, `paused`, `speed` równe zeru albo ograniczony ruch w systemie; wtedy zostaje jedna
|
|
7356
|
+
* statyczna klatka zamiast pustki, bo efekt jest częścią kompozycji, nie ozdobą.
|
|
7357
|
+
*
|
|
7358
|
+
* Dwa efekty: `signal-grid` (drobna siatka migoczących kwadratów, gęsta przy jednej krawędzi)
|
|
7359
|
+
* i `wave` (jedna miękka wstęga światła z barwami przesuwającymi się wzdłuż niej). Każdy czyta
|
|
7360
|
+
* własny zestaw wejść — pozostałe po prostu go nie dotyczą.
|
|
7361
|
+
*
|
|
7362
|
+
* Sam komponent to cykl życia; rysowanie i cała matematyka siedzą w `@konce-pt/backdrop`,
|
|
7363
|
+
* wspólnym z portem Reacta.
|
|
7364
|
+
*
|
|
7365
|
+
* @example
|
|
7366
|
+
* <kpt-backdrop effect="wave" [rotation]="18" [colors]="['#5b8af2', '#a86df2', '#f25b9e']">
|
|
7367
|
+
* <h1>Zbuduj aplikację od pierwszego promptu</h1>
|
|
7368
|
+
* <kpt-button>Zacznij</kpt-button>
|
|
7369
|
+
* </kpt-backdrop>
|
|
7370
|
+
*/
|
|
7371
|
+
class KptBackdrop {
|
|
7372
|
+
constructor() {
|
|
7373
|
+
/** Rysowany efekt. */
|
|
7374
|
+
this.effect = input('signal-grid', /* @ts-ignore */
|
|
7375
|
+
...(ngDevMode ? [{ debugName: "effect" }] : /* istanbul ignore next */ []));
|
|
7376
|
+
/** Tło sekcji. Puste bierze `--kpt-color-surface`. */
|
|
7377
|
+
this.background = input('', /* @ts-ignore */
|
|
7378
|
+
...(ngDevMode ? [{ debugName: "background" }] : /* istanbul ignore next */ []));
|
|
7379
|
+
/** Tempo; 1 to spokojne tempo obu efektów, 0 zatrzymuje obraz. */
|
|
7380
|
+
this.speed = input(1, { ...(ngDevMode ? { debugName: "speed" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
7381
|
+
/** Ziarno losowania — ta sama wartość daje ten sam układ kwadratów i ten sam przebieg wstęgi. */
|
|
7382
|
+
this.seed = input(0, { ...(ngDevMode ? { debugName: "seed" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
7383
|
+
/** Zatrzymuje animację, zostawiając ostatnią klatkę. */
|
|
7384
|
+
this.paused = input(false, { ...(ngDevMode ? { debugName: "paused" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
7385
|
+
/**
|
|
7386
|
+
* Przenosi barwy wpisane na sztywno na powierzchnię bieżącego motywu: czerń dobrana do białego
|
|
7387
|
+
* tła staje się bielą, gdy tło jest ciemne. Rusza wyłącznie jasność — odcień i nasycenie
|
|
7388
|
+
* zostają, więc barwa marki nie zmienia się w inną barwę.
|
|
7389
|
+
*
|
|
7390
|
+
* Dotyczy `color`, `colors` i `background`, ale tylko wtedy, gdy podano je literałem. Wejście
|
|
7391
|
+
* puste bierze token, a zapis z `var()` sam po token sięga — jedno i drugie już idzie za motywem
|
|
7392
|
+
* i adaptacja odwróciłaby je drugi raz.
|
|
7393
|
+
*/
|
|
7394
|
+
this.adaptive = input(false, { ...(ngDevMode ? { debugName: "adaptive" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
7395
|
+
/**
|
|
7396
|
+
* `signal-grid`: kolor kwadratów — dowolny zapis CSS, także sięgający po tokeny, np.
|
|
7397
|
+
* `color-mix(in oklab, #5b8af2, var(--kpt-color-surface) 30%)`. Taki zapis przelicza się przy
|
|
7398
|
+
* zmianie motywu; literał zostaje literałem. Puste bierze `--kpt-color-primary`.
|
|
7399
|
+
*/
|
|
7400
|
+
this.color = input('', /* @ts-ignore */
|
|
7401
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
7402
|
+
/** `signal-grid`: przy której krawędzi siatka jest najgęstsza. */
|
|
7403
|
+
this.anchor = input('right', /* @ts-ignore */
|
|
7404
|
+
...(ngDevMode ? [{ debugName: "anchor" }] : /* istanbul ignore next */ []));
|
|
7405
|
+
/** `signal-grid`: bok kwadratu (px). */
|
|
7406
|
+
this.cell = input(KPT_SIGNAL_GRID_CELL, { ...(ngDevMode ? { debugName: "cell" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
7407
|
+
/** `signal-grid`: odstęp między kwadratami (px). */
|
|
7408
|
+
this.gap = input(KPT_SIGNAL_GRID_GAP, { ...(ngDevMode ? { debugName: "gap" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
7409
|
+
/** `signal-grid`: udział zapalonych komórek przy kotwicy, 0–1. */
|
|
7410
|
+
this.density = input(KPT_SIGNAL_GRID_DENSITY, { ...(ngDevMode ? { debugName: "density" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
7411
|
+
/** `signal-grid`: jak szybko siatka gaśnie ku przeciwnej krawędzi. */
|
|
7412
|
+
this.falloff = input(KPT_SIGNAL_GRID_FALLOFF, { ...(ngDevMode ? { debugName: "falloff" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
7413
|
+
/**
|
|
7414
|
+
* `wave`: rampa barw, po której przesuwa się wstęga — każdy przystanek dowolnym zapisem CSS.
|
|
7415
|
+
* Zamknięta w pętlę, więc ostatnia barwa wraca do pierwszej. Pusta bierze `--kpt-color-primary`
|
|
7416
|
+
* i dwie barwy wyprowadzone z niego obrotem odcienia — paleta biblioteki jest neutralna, więc
|
|
7417
|
+
* domyślna wstęga jest jednobarwna i przygaszona. Po kolory sięga się tu, nie do tokenów
|
|
7418
|
+
* statusowych. Zapis może sięgać po tokeny i wtedy idzie za motywem. Przystanek, którego
|
|
7419
|
+
* przeglądarka nie uznaje za kolor, wypada z rampy; gdy wypadną wszystkie, zostaje rampa
|
|
7420
|
+
* domyślna.
|
|
7421
|
+
*/
|
|
7422
|
+
this.colors = input([], /* @ts-ignore */
|
|
7423
|
+
...(ngDevMode ? [{ debugName: "colors" }] : /* istanbul ignore next */ []));
|
|
7424
|
+
/** `wave`: kąt, pod jakim prąd przecina kadr (stopnie); 0 to poziomo w prawo. */
|
|
7425
|
+
this.rotation = input(KPT_WAVE_ROTATION, { ...(ngDevMode ? { debugName: "rotation" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
7426
|
+
/** `wave`: szerokość wstęgi jako ułamek wysokości kadru. */
|
|
7427
|
+
this.band = input(KPT_WAVE_BAND, { ...(ngDevMode ? { debugName: "band" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
7428
|
+
/** `wave`: jak mocno faluje linia środkowa. Zero zatrzymuje falowanie, nie barwy. */
|
|
7429
|
+
this.amplitude = input(KPT_WAVE_AMPLITUDE, { ...(ngDevMode ? { debugName: "amplitude" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
7430
|
+
this.canvas = viewChild.required('canvas', /* @ts-ignore */
|
|
7431
|
+
...(ngDevMode ? [{ debugName: "canvas" }] : /* istanbul ignore next */ []));
|
|
7432
|
+
this.host = inject(ElementRef);
|
|
7433
|
+
this.context = null;
|
|
7434
|
+
this.renderer = null;
|
|
7435
|
+
this.width = 0;
|
|
7436
|
+
this.height = 0;
|
|
7437
|
+
/**
|
|
7438
|
+
* Czas animacji w sekundach. Rośnie o krok przemnożony przez `speed`, więc ruch suwaka
|
|
7439
|
+
* prędkości przyspiesza obraz zamiast go przeskakiwać.
|
|
7440
|
+
*/
|
|
7441
|
+
this.clock = 0;
|
|
7442
|
+
this.last = 0;
|
|
7443
|
+
this.raf = 0;
|
|
7444
|
+
this.onScreen = true;
|
|
7445
|
+
this.reduced = false;
|
|
7446
|
+
this.ready = false;
|
|
7447
|
+
/** Kolor wiodący, z którym zbudowany jest bieżący renderer — punkt odniesienia dla zmiany motywu. */
|
|
7448
|
+
this.lead = '';
|
|
7449
|
+
/** Ostatnio zgłoszony zestaw odrzuconych barw — żeby nie powtarzać tego samego ostrzeżenia. */
|
|
7450
|
+
this.reported = '';
|
|
7451
|
+
/** Tło po adaptacji. Puste znaczy „nie ma czego podmieniać" i wtedy liczy się samo `background`. */
|
|
7452
|
+
this.adapted = signal('', /* @ts-ignore */
|
|
7453
|
+
...(ngDevMode ? [{ debugName: "adapted" }] : /* istanbul ignore next */ []));
|
|
7454
|
+
/** Tło malowane na hoście: po adaptacji, jeśli jest, inaczej to, co podano. */
|
|
7455
|
+
this.surface = computed(() => (this.adapted() || this.background()) || null, /* @ts-ignore */
|
|
7456
|
+
...(ngDevMode ? [{ debugName: "surface" }] : /* istanbul ignore next */ []));
|
|
7457
|
+
/**
|
|
7458
|
+
* Ton i kolor treści dobrane do malowanego tła. Puste znaczy „sekcja nie ma własnego tła"
|
|
7459
|
+
* i wtedy treść zostaje przy `--kpt-color-on-surface` ze stylu.
|
|
7460
|
+
*/
|
|
7461
|
+
this.ink = signal({ tone: '', color: '' }, /* @ts-ignore */
|
|
7462
|
+
...(ngDevMode ? [{ debugName: "ink" }] : /* istanbul ignore next */ []));
|
|
7463
|
+
this.tick = (now) => {
|
|
7464
|
+
const step = this.last === 0 ? 0 : Math.min(now - this.last, KPT_BACKDROP_MAX_STEP);
|
|
7465
|
+
this.last = now;
|
|
7466
|
+
this.clock += (step / 1000) * this.speed();
|
|
7467
|
+
this.paint();
|
|
7468
|
+
this.raf = requestAnimationFrame(this.tick);
|
|
7469
|
+
};
|
|
7470
|
+
this.onTabSwitch = () => {
|
|
7471
|
+
this.onScreen = !document.hidden;
|
|
7472
|
+
this.sync();
|
|
7473
|
+
};
|
|
7474
|
+
this.onMotionChange = (event) => {
|
|
7475
|
+
this.reduced = event.matches;
|
|
7476
|
+
this.sync();
|
|
7477
|
+
this.paint();
|
|
7478
|
+
};
|
|
7479
|
+
this.refreshColors = () => {
|
|
7480
|
+
if (!this.ready)
|
|
7481
|
+
return;
|
|
7482
|
+
if (this.leadNow() === this.lead)
|
|
7483
|
+
return;
|
|
7484
|
+
this.build();
|
|
7485
|
+
this.paint();
|
|
7486
|
+
};
|
|
7487
|
+
// Każda zmiana wejść buduje renderer od nowa — zamiast doklejać do istniejącego ścieżki
|
|
7488
|
+
// „co się zmieniło". Przed pierwszym renderem wystarczy, że sygnały zostaną odczytane;
|
|
7489
|
+
// sama budowa dzieje się w afterNextRender.
|
|
7490
|
+
effect(() => {
|
|
7491
|
+
this.effect();
|
|
7492
|
+
this.color();
|
|
7493
|
+
this.anchor();
|
|
7494
|
+
this.cell();
|
|
7495
|
+
this.gap();
|
|
7496
|
+
this.density();
|
|
7497
|
+
this.falloff();
|
|
7498
|
+
this.colors();
|
|
7499
|
+
this.rotation();
|
|
7500
|
+
this.band();
|
|
7501
|
+
this.amplitude();
|
|
7502
|
+
this.seed();
|
|
7503
|
+
// Tło nie jest wejściem renderera, ale adaptacja je przelicza — stąd odczyt obu.
|
|
7504
|
+
this.adaptive();
|
|
7505
|
+
this.background();
|
|
7506
|
+
if (!this.ready)
|
|
7507
|
+
return;
|
|
7508
|
+
this.build();
|
|
7509
|
+
this.paint();
|
|
7510
|
+
});
|
|
7511
|
+
// Prędkość i pauza nie ruszają renderera, decydują tylko o tym, czy pętla ma chodzić.
|
|
7512
|
+
effect(() => {
|
|
7513
|
+
this.speed();
|
|
7514
|
+
this.paused();
|
|
7515
|
+
if (this.ready)
|
|
7516
|
+
this.sync();
|
|
7517
|
+
});
|
|
7518
|
+
afterNextRender(() => {
|
|
7519
|
+
const canvas = this.canvas().nativeElement;
|
|
7520
|
+
this.context = canvas.getContext('2d');
|
|
7521
|
+
if (!this.context)
|
|
7522
|
+
return;
|
|
7523
|
+
this.ready = true;
|
|
7524
|
+
this.watchSize(canvas);
|
|
7525
|
+
this.watchVisibility();
|
|
7526
|
+
this.watchMotion();
|
|
7527
|
+
this.watchTheme();
|
|
7528
|
+
this.measure();
|
|
7529
|
+
this.build();
|
|
7530
|
+
this.paint();
|
|
7531
|
+
this.sync();
|
|
7532
|
+
});
|
|
7533
|
+
inject(DestroyRef).onDestroy(() => this.teardown());
|
|
7534
|
+
}
|
|
7535
|
+
/** Nowy przebieg efektu przy tym samym rozmiarze i tych samych wejściach. */
|
|
7536
|
+
reseed() {
|
|
7537
|
+
if (!this.ready)
|
|
7538
|
+
return;
|
|
7539
|
+
this.measure();
|
|
7540
|
+
this.build();
|
|
7541
|
+
this.paint();
|
|
7542
|
+
}
|
|
7543
|
+
paint() {
|
|
7544
|
+
if (this.context)
|
|
7545
|
+
this.renderer?.draw(this.context, this.clock);
|
|
7546
|
+
}
|
|
7547
|
+
build() {
|
|
7548
|
+
this.renderer?.dispose();
|
|
7549
|
+
const scope = this.canvas().nativeElement;
|
|
7550
|
+
const adaptive = this.adaptive();
|
|
7551
|
+
const { color, colors, invalid } = resolveBackdropColors(scope, this.color(), this.colors(), adaptive);
|
|
7552
|
+
this.lead = color;
|
|
7553
|
+
this.adapted.set(adaptive ? adaptBackdropValue(this.background(), readBackdropSurface(scope)) : '');
|
|
7554
|
+
// Ton liczymy z tła, które sekcja naprawdę pomaluje — czyli już po adaptacji.
|
|
7555
|
+
this.ink.set(readBackdropInk(scope, this.adapted() || this.background()));
|
|
7556
|
+
this.reportInvalid(invalid);
|
|
7557
|
+
this.renderer = createBackdropRenderer({
|
|
7558
|
+
effect: this.effect(),
|
|
7559
|
+
color,
|
|
7560
|
+
colors,
|
|
7561
|
+
anchor: this.anchor(),
|
|
7562
|
+
cell: this.cell(),
|
|
7563
|
+
gap: this.gap(),
|
|
7564
|
+
density: this.density(),
|
|
7565
|
+
falloff: this.falloff(),
|
|
7566
|
+
rotation: this.rotation(),
|
|
7567
|
+
band: this.band(),
|
|
7568
|
+
amplitude: this.amplitude(),
|
|
7569
|
+
seed: this.seed(),
|
|
7570
|
+
});
|
|
7571
|
+
this.renderer.resize(this.width, this.height);
|
|
7572
|
+
}
|
|
7573
|
+
/**
|
|
7574
|
+
* Ostrzeżenie o przystankach rampy, których przeglądarka nie uznała za kolor.
|
|
7575
|
+
*
|
|
7576
|
+
* `build()` chodzi przy każdej zmianie wejść, więc ciągnięcie suwaka nad wadliwą rampą zasypałoby
|
|
7577
|
+
* konsolę tym samym zdaniem — zgłaszamy dopiero zestaw inny niż poprzednio.
|
|
7578
|
+
*/
|
|
7579
|
+
reportInvalid(invalid) {
|
|
7580
|
+
const key = invalid.join(', ');
|
|
7581
|
+
if (key === this.reported)
|
|
7582
|
+
return;
|
|
7583
|
+
this.reported = key;
|
|
7584
|
+
if (key !== '' && typeof ngDevMode !== 'undefined' && ngDevMode) {
|
|
7585
|
+
console.warn(`[kpt-backdrop] Pominięto barwy, których przeglądarka nie rozpoznaje: ${key}`);
|
|
7586
|
+
}
|
|
7587
|
+
}
|
|
7588
|
+
measure() {
|
|
7589
|
+
const canvas = this.canvas().nativeElement;
|
|
7590
|
+
const rect = canvas.getBoundingClientRect();
|
|
7591
|
+
const dpr = Math.min(globalThis.devicePixelRatio || 1, KPT_BACKDROP_MAX_DPR);
|
|
7592
|
+
this.width = Math.round(rect.width);
|
|
7593
|
+
this.height = Math.round(rect.height);
|
|
7594
|
+
canvas.width = Math.round(this.width * dpr);
|
|
7595
|
+
canvas.height = Math.round(this.height * dpr);
|
|
7596
|
+
// Zapis width/height zeruje kontekst, więc skala musi wrócić po każdym pomiarze.
|
|
7597
|
+
this.context?.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
7598
|
+
}
|
|
7599
|
+
sync() {
|
|
7600
|
+
const running = this.raf !== 0;
|
|
7601
|
+
const should = this.ready && this.onScreen && !this.paused() && !this.reduced && this.speed() > 0;
|
|
7602
|
+
if (should && !running) {
|
|
7603
|
+
this.last = 0;
|
|
7604
|
+
this.raf = requestAnimationFrame(this.tick);
|
|
7605
|
+
}
|
|
7606
|
+
else if (!should && running) {
|
|
7607
|
+
cancelAnimationFrame(this.raf);
|
|
7608
|
+
this.raf = 0;
|
|
7609
|
+
}
|
|
7610
|
+
}
|
|
7611
|
+
watchSize(canvas) {
|
|
7612
|
+
this.resize = new ResizeObserver(() => {
|
|
7613
|
+
const rect = canvas.getBoundingClientRect();
|
|
7614
|
+
if (Math.round(rect.width) === this.width && Math.round(rect.height) === this.height)
|
|
7615
|
+
return;
|
|
7616
|
+
this.measure();
|
|
7617
|
+
// Sam rozmiar nie zmienia ustawień, więc renderer zostaje — przelicza tylko geometrię.
|
|
7618
|
+
this.renderer?.resize(this.width, this.height);
|
|
7619
|
+
this.paint();
|
|
7620
|
+
});
|
|
7621
|
+
this.resize.observe(canvas);
|
|
7622
|
+
}
|
|
7623
|
+
/** Sekcja poza ekranem i karta w tle to ten sam przypadek: nie ma czego oglądać. */
|
|
7624
|
+
watchVisibility() {
|
|
7625
|
+
this.intersect = new IntersectionObserver((entries) => {
|
|
7626
|
+
this.onScreen = entries.some((entry) => entry.isIntersecting) && !document.hidden;
|
|
7627
|
+
this.sync();
|
|
7628
|
+
});
|
|
7629
|
+
this.intersect.observe(this.host.nativeElement);
|
|
7630
|
+
document.addEventListener('visibilitychange', this.onTabSwitch);
|
|
7631
|
+
}
|
|
7632
|
+
watchMotion() {
|
|
7633
|
+
this.motion = matchMedia('(prefers-reduced-motion: reduce)');
|
|
7634
|
+
this.reduced = this.motion.matches;
|
|
7635
|
+
this.motion.addEventListener('change', this.onMotionChange);
|
|
7636
|
+
}
|
|
7637
|
+
watchTheme() {
|
|
7638
|
+
this.unwatchTheme = observeBackdropTheme(this.host.nativeElement, this.refreshColors);
|
|
7639
|
+
}
|
|
7640
|
+
/**
|
|
7641
|
+
* Zmiana motywu przestawia tokeny, a kolory renderera są już wyliczone — trzeba je odczytać
|
|
7642
|
+
* na nowo. Nasłuch trafia też w zmiany niezwiązane z barwą (klasa nakładki na `<html>`, dowolne
|
|
7643
|
+
* nadpisanie inline u przodka), więc renderer przebudowuje się dopiero wtedy, gdy odczyt
|
|
7644
|
+
* naprawdę dał inny kolor.
|
|
7645
|
+
*/
|
|
7646
|
+
/**
|
|
7647
|
+
* Kolor wiodący liczony dokładnie tak, jak liczy go `build()` — inaczej strażnik porównywałby
|
|
7648
|
+
* wartość sprzed adaptacji z zapamiętaną po adaptacji i przebudowywałby renderer bez przerwy.
|
|
7649
|
+
*/
|
|
7650
|
+
leadNow() {
|
|
7651
|
+
const scope = this.canvas().nativeElement;
|
|
7652
|
+
const color = this.adaptive() ? adaptBackdropValue(this.color(), readBackdropSurface(scope)) : this.color();
|
|
7653
|
+
return readBackdropLead(scope, color);
|
|
7654
|
+
}
|
|
7655
|
+
teardown() {
|
|
7656
|
+
if (this.raf)
|
|
7657
|
+
cancelAnimationFrame(this.raf);
|
|
7658
|
+
this.raf = 0;
|
|
7659
|
+
this.renderer?.dispose();
|
|
7660
|
+
this.renderer = null;
|
|
7661
|
+
this.resize?.disconnect();
|
|
7662
|
+
this.intersect?.disconnect();
|
|
7663
|
+
this.unwatchTheme?.();
|
|
7664
|
+
this.motion?.removeEventListener('change', this.onMotionChange);
|
|
7665
|
+
document.removeEventListener('visibilitychange', this.onTabSwitch);
|
|
7666
|
+
}
|
|
7667
|
+
static { this.ɵfac = function KptBackdrop_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptBackdrop)(); }; }
|
|
7668
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptBackdrop, selectors: [["kpt-backdrop"]], viewQuery: function KptBackdrop_Query(rf, ctx) { if (rf & 1) {
|
|
7669
|
+
i0.ɵɵviewQuerySignal(ctx.canvas, _c0$s, 5);
|
|
7670
|
+
} if (rf & 2) {
|
|
7671
|
+
i0.ɵɵqueryAdvance();
|
|
7672
|
+
} }, hostAttrs: [1, "kpt-backdrop-host"], hostVars: 6, hostBindings: function KptBackdrop_HostBindings(rf, ctx) { if (rf & 2) {
|
|
7673
|
+
i0.ɵɵattribute("data-effect", ctx.effect())("data-tone", ctx.ink().tone || null);
|
|
7674
|
+
i0.ɵɵstyleProp("background", ctx.surface())("color", ctx.ink().color || null);
|
|
7675
|
+
} }, inputs: { effect: [1, "effect"], background: [1, "background"], speed: [1, "speed"], seed: [1, "seed"], paused: [1, "paused"], adaptive: [1, "adaptive"], color: [1, "color"], anchor: [1, "anchor"], cell: [1, "cell"], gap: [1, "gap"], density: [1, "density"], falloff: [1, "falloff"], colors: [1, "colors"], rotation: [1, "rotation"], band: [1, "band"], amplitude: [1, "amplitude"] }, ngContentSelectors: _c1$b, decls: 4, vars: 0, consts: [["canvas", ""], ["aria-hidden", "true", 1, "kpt-backdrop__canvas"], [1, "kpt-backdrop__content"]], template: function KptBackdrop_Template(rf, ctx) { if (rf & 1) {
|
|
7676
|
+
i0.ɵɵprojectionDef();
|
|
7677
|
+
i0.ɵɵdomElement(0, "canvas", 1, 0);
|
|
7678
|
+
i0.ɵɵdomElementStart(2, "div", 2);
|
|
7679
|
+
i0.ɵɵprojection(3);
|
|
7680
|
+
i0.ɵɵdomElementEnd();
|
|
7681
|
+
} }, styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-backdrop-host{--%NS%_dot: var(--%NS%kpt-backdrop-color, var(--%NS%kpt-color-primary));position:relative;display:block;overflow:hidden;isolation:isolate;background:var(--%NS%kpt-backdrop-surface, var(--%NS%kpt-color-surface));color:var(--%NS%kpt-color-on-surface)}.kpt-backdrop__canvas{position:absolute;inset:0;z-index:0;display:block;inline-size:100%;block-size:100%;pointer-events:none}.kpt-backdrop__content{position:relative;z-index:1;block-size:100%}}\n"], encapsulation: 2 }); }
|
|
7682
|
+
}
|
|
7683
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptBackdrop, [{
|
|
7684
|
+
type: Component,
|
|
7685
|
+
args: [{ selector: 'kpt-backdrop', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `
|
|
7686
|
+
<canvas #canvas class="kpt-backdrop__canvas" aria-hidden="true"></canvas>
|
|
7687
|
+
<div class="kpt-backdrop__content"><ng-content /></div>
|
|
7688
|
+
`, host: {
|
|
7689
|
+
class: 'kpt-backdrop-host',
|
|
7690
|
+
'[attr.data-effect]': 'effect()',
|
|
7691
|
+
'[style.background]': 'surface()',
|
|
7692
|
+
'[style.color]': 'ink().color || null',
|
|
7693
|
+
'[attr.data-tone]': 'ink().tone || null',
|
|
7694
|
+
}, styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-backdrop-host{--_dot: var(--kpt-backdrop-color, var(--kpt-color-primary));position:relative;display:block;overflow:hidden;isolation:isolate;background:var(--kpt-backdrop-surface, var(--kpt-color-surface));color:var(--kpt-color-on-surface)}.kpt-backdrop__canvas{position:absolute;inset:0;z-index:0;display:block;inline-size:100%;block-size:100%;pointer-events:none}.kpt-backdrop__content{position:relative;z-index:1;block-size:100%}}\n"] }]
|
|
7695
|
+
}], () => [], { effect: [{ type: i0.Input, args: [{ isSignal: true, alias: "effect", required: false }] }], background: [{ type: i0.Input, args: [{ isSignal: true, alias: "background", required: false }] }], speed: [{ type: i0.Input, args: [{ isSignal: true, alias: "speed", required: false }] }], seed: [{ type: i0.Input, args: [{ isSignal: true, alias: "seed", required: false }] }], paused: [{ type: i0.Input, args: [{ isSignal: true, alias: "paused", required: false }] }], adaptive: [{ type: i0.Input, args: [{ isSignal: true, alias: "adaptive", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], anchor: [{ type: i0.Input, args: [{ isSignal: true, alias: "anchor", required: false }] }], cell: [{ type: i0.Input, args: [{ isSignal: true, alias: "cell", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], falloff: [{ type: i0.Input, args: [{ isSignal: true, alias: "falloff", required: false }] }], colors: [{ type: i0.Input, args: [{ isSignal: true, alias: "colors", required: false }] }], rotation: [{ type: i0.Input, args: [{ isSignal: true, alias: "rotation", required: false }] }], band: [{ type: i0.Input, args: [{ isSignal: true, alias: "band", required: false }] }], amplitude: [{ type: i0.Input, args: [{ isSignal: true, alias: "amplitude", required: false }] }], canvas: [{ type: i0.ViewChild, args: ['canvas', { isSignal: true }] }] }); })();
|
|
7696
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptBackdrop, { className: "KptBackdrop", filePath: "lib/backdrop/backdrop.component.ts", lineNumber: 82 }); })();
|
|
7697
|
+
|
|
7698
|
+
const _c0$r = ["*"];
|
|
7125
7699
|
function KptAlert_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
7126
7700
|
i0.ɵɵelementStart(0, "div", 3);
|
|
7127
7701
|
i0.ɵɵtext(1);
|
|
@@ -7169,7 +7743,7 @@ class KptAlert {
|
|
|
7169
7743
|
static { this.ɵfac = function KptAlert_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptAlert)(); }; }
|
|
7170
7744
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptAlert, selectors: [["kpt-alert"]], hostAttrs: [1, "kpt-alert-host"], hostVars: 1, hostBindings: function KptAlert_HostBindings(rf, ctx) { if (rf & 2) {
|
|
7171
7745
|
i0.ɵɵdomProperty("hidden", !ctx.visible());
|
|
7172
|
-
} }, inputs: { variant: [1, "variant"], title: [1, "title"], dismissible: [1, "dismissible"] }, outputs: { closed: "closed" }, ngContentSelectors: _c0$
|
|
7746
|
+
} }, inputs: { variant: [1, "variant"], title: [1, "title"], dismissible: [1, "dismissible"] }, outputs: { closed: "closed" }, ngContentSelectors: _c0$r, decls: 7, vars: 4, consts: [["role", "alert", 1, "kpt-alert"], [1, "kpt-alert__icon", 3, "name"], [1, "kpt-alert__content"], [1, "kpt-alert__title"], [1, "kpt-alert__message"], ["type", "button", 1, "kpt-alert__close"], ["type", "button", 1, "kpt-alert__close", 3, "click"], ["name", "x"]], template: function KptAlert_Template(rf, ctx) { if (rf & 1) {
|
|
7173
7747
|
i0.ɵɵprojectionDef();
|
|
7174
7748
|
i0.ɵɵelementStart(0, "div", 0);
|
|
7175
7749
|
i0.ɵɵelement(1, "kpt-icon", 1);
|
|
@@ -7242,9 +7816,9 @@ class KptAuthProviderDef {
|
|
|
7242
7816
|
}]
|
|
7243
7817
|
}], null, { kptAuthProvider: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptAuthProvider", required: true }] }] }); })();
|
|
7244
7818
|
|
|
7245
|
-
const _c0$
|
|
7246
|
-
const _c1$
|
|
7247
|
-
const _c2$
|
|
7819
|
+
const _c0$q = ["heading"];
|
|
7820
|
+
const _c1$a = [[["", "kptAuthBrand", ""]], [["", "kptAuthFooter", ""]], [["", "kptAuthPromo", ""]], [["", "kptAuthFields", ""]], [["", "kptAuthFields", ""]], [["", "kptAuthSso", ""]]];
|
|
7821
|
+
const _c2$4 = ["[kptAuthBrand]", "[kptAuthFooter]", "[kptAuthPromo]", "[kptAuthFields]", "[kptAuthFields]", "[kptAuthSso]"];
|
|
7248
7822
|
const _c3$1 = () => ({ min: 8 });
|
|
7249
7823
|
const _c4$1 = a0 => ({ provider: a0 });
|
|
7250
7824
|
const _forTrack0$4 = ($index, $item) => $item.id;
|
|
@@ -7799,14 +8373,14 @@ class KptAuth {
|
|
|
7799
8373
|
} if (rf & 2) {
|
|
7800
8374
|
i0.ɵɵqueryAdvance();
|
|
7801
8375
|
} }, viewQuery: function KptAuth_Query(rf, ctx) { if (rf & 1) {
|
|
7802
|
-
i0.ɵɵviewQuerySignal(ctx.headings, _c0$
|
|
8376
|
+
i0.ɵɵviewQuerySignal(ctx.headings, _c0$q, 5);
|
|
7803
8377
|
} if (rf & 2) {
|
|
7804
8378
|
i0.ɵɵqueryAdvance();
|
|
7805
8379
|
} }, hostAttrs: [1, "kpt-auth-host"], hostVars: 4, hostBindings: function KptAuth_HostBindings(rf, ctx) { if (rf & 2) {
|
|
7806
8380
|
i0.ɵɵattribute("data-layout", ctx.layout())("data-mode", ctx.mode());
|
|
7807
8381
|
i0.ɵɵstyleProp("--%NS%kpt-anim-duration", (ctx.animated() ? ctx.animationDuration() : 0) + "ms");
|
|
7808
|
-
} }, inputs: { mode: [1, "mode"], layout: [1, "layout"], providers: [1, "providers"], providerLayout: [1, "providerLayout"], showName: [1, "showName"], requireTerms: [1, "requireTerms"], showRemember: [1, "showRemember"], busy: [1, "busy"], error: [1, "error"], notice: [1, "notice"], promoTitle: [1, "promoTitle"], promoText: [1, "promoText"], animated: [1, "animated"], animationDuration: [1, "animationDuration"] }, outputs: { mode: "modeChange", signIn: "signIn", signUp: "signUp", resetPassword: "resetPassword", providerSelect: "providerSelect" }, ngContentSelectors: _c2$
|
|
7809
|
-
i0.ɵɵprojectionDef(_c1$
|
|
8382
|
+
} }, inputs: { mode: [1, "mode"], layout: [1, "layout"], providers: [1, "providers"], providerLayout: [1, "providerLayout"], showName: [1, "showName"], requireTerms: [1, "requireTerms"], showRemember: [1, "showRemember"], busy: [1, "busy"], error: [1, "error"], notice: [1, "notice"], promoTitle: [1, "promoTitle"], promoText: [1, "promoText"], animated: [1, "animated"], animationDuration: [1, "animationDuration"] }, outputs: { mode: "modeChange", signIn: "signIn", signUp: "signUp", resetPassword: "resetPassword", providerSelect: "providerSelect" }, ngContentSelectors: _c2$4, decls: 25, vars: 12, consts: [["heading", ""], [1, "kpt-auth"], [1, "kpt-auth__card"], [1, "kpt-auth__form-side"], [1, "kpt-auth__inner"], [1, "kpt-auth__brand"], ["tabindex", "-1", 1, "kpt-auth__title", 3, "id"], [1, "kpt-auth__subtitle"], ["variant", "danger"], ["variant", "success"], [1, "kpt-auth__form", 3, "formRoot"], [1, "kpt-auth__footer"], [1, "kpt-auth__promo"], [1, "kpt-auth__promo-inner"], [1, "kpt-auth__promo-title"], [1, "kpt-auth__promo-text"], ["variant", "outline", 1, "kpt-auth__promo-cta"], [1, "kpt-auth__form", 3, "submit", "formRoot"], ["required", "", 3, "label", "error", "controlId"], ["type", "email", "autocomplete", "email", 3, "formField", "id", "placeholder"], ["autocomplete", "current-password", 3, "formField", "id"], [1, "kpt-auth__row"], [3, "formField", "label"], ["type", "button", 1, "kpt-auth__link", 3, "click"], ["type", "submit", "fullWidth", "", 3, "loading", "disabled"], ["required", "", 3, "label", "error", "hint", "controlId"], ["autocomplete", "new-password", "feedback", "", 3, "formField", "id"], ["autocomplete", "new-password", 3, "formField", "id"], [3, "error"], ["autocomplete", "name", 3, "formField", "id"], ["type", "button", 1, "kpt-auth__link", "kpt-auth__link--center", 3, "click"], [1, "kpt-auth__sso"], [1, "kpt-auth__switch"], ["role", "separator", 1, "kpt-auth__separator"], [1, "kpt-auth__separator-text"], [1, "kpt-auth__providers"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], ["type", "button", 1, "kpt-auth__provider", 3, "disabled"], ["type", "button", 1, "kpt-auth__provider", 3, "click", "disabled"], ["alt", "", 1, "kpt-auth__provider-logo", 3, "src"], [1, "kpt-auth__provider-logo", 3, "name"], [1, "kpt-auth__provider-label"], [1, "kpt-auth__provider-desc"], ["variant", "outline", 1, "kpt-auth__promo-cta", 3, "click"]], template: function KptAuth_Template(rf, ctx) { if (rf & 1) {
|
|
8383
|
+
i0.ɵɵprojectionDef(_c1$a);
|
|
7810
8384
|
i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "div", 3)(3, "div", 4)(4, "div", 5);
|
|
7811
8385
|
i0.ɵɵprojection(5);
|
|
7812
8386
|
i0.ɵɵelementEnd();
|
|
@@ -7887,8 +8461,8 @@ class KptAuth {
|
|
|
7887
8461
|
}], null, { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }, { type: i0.Output, args: ["modeChange"] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], providers: [{ type: i0.Input, args: [{ isSignal: true, alias: "providers", required: false }] }], providerLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "providerLayout", required: false }] }], showName: [{ type: i0.Input, args: [{ isSignal: true, alias: "showName", required: false }] }], requireTerms: [{ type: i0.Input, args: [{ isSignal: true, alias: "requireTerms", required: false }] }], showRemember: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRemember", required: false }] }], busy: [{ type: i0.Input, args: [{ isSignal: true, alias: "busy", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], notice: [{ type: i0.Input, args: [{ isSignal: true, alias: "notice", required: false }] }], promoTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "promoTitle", required: false }] }], promoText: [{ type: i0.Input, args: [{ isSignal: true, alias: "promoText", required: false }] }], animated: [{ type: i0.Input, args: [{ isSignal: true, alias: "animated", required: false }] }], animationDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "animationDuration", required: false }] }], signIn: [{ type: i0.Output, args: ["signIn"] }], signUp: [{ type: i0.Output, args: ["signUp"] }], resetPassword: [{ type: i0.Output, args: ["resetPassword"] }], providerSelect: [{ type: i0.Output, args: ["providerSelect"] }], headings: [{ type: i0.ViewChildren, args: ['heading', { isSignal: true }] }], providerDefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KptAuthProviderDef), { isSignal: true }] }] }); })();
|
|
7888
8462
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptAuth, { className: "KptAuth", filePath: "lib/auth/auth.component.ts", lineNumber: 94 }); })();
|
|
7889
8463
|
|
|
7890
|
-
const _c0$
|
|
7891
|
-
const _c1$
|
|
8464
|
+
const _c0$p = [[["", "kptPanelActions", ""]], "*"];
|
|
8465
|
+
const _c1$9 = ["[kptPanelActions]", "*"];
|
|
7892
8466
|
function KptPanel_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
7893
8467
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
7894
8468
|
i0.ɵɵelementStart(0, "button", 8);
|
|
@@ -7922,8 +8496,8 @@ class KptPanel {
|
|
|
7922
8496
|
static { this.ɵfac = function KptPanel_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptPanel)(); }; }
|
|
7923
8497
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptPanel, selectors: [["kpt-panel"]], hostAttrs: [1, "kpt-panel-host"], hostVars: 2, hostBindings: function KptPanel_HostBindings(rf, ctx) { if (rf & 2) {
|
|
7924
8498
|
i0.ɵɵstyleProp("--%NS%kpt-anim-duration", (ctx.animated() ? ctx.animationDuration() : 0) + "ms");
|
|
7925
|
-
} }, inputs: { header: [1, "header"], toggleable: [1, "toggleable"], collapsed: [1, "collapsed"], animated: [1, "animated"], animationDuration: [1, "animationDuration"] }, outputs: { collapsed: "collapsedChange" }, ngContentSelectors: _c1$
|
|
7926
|
-
i0.ɵɵprojectionDef(_c0$
|
|
8499
|
+
} }, inputs: { header: [1, "header"], toggleable: [1, "toggleable"], collapsed: [1, "collapsed"], animated: [1, "animated"], animationDuration: [1, "animationDuration"] }, outputs: { collapsed: "collapsedChange" }, ngContentSelectors: _c1$9, decls: 11, vars: 6, consts: [[1, "kpt-panel"], [1, "kpt-panel__header"], [1, "kpt-panel__title"], [1, "kpt-panel__actions"], ["type", "button", 1, "kpt-panel__toggle"], [1, "kpt-panel__collapse"], [1, "kpt-panel__collapse-inner"], [1, "kpt-panel__body"], ["type", "button", 1, "kpt-panel__toggle", 3, "click"], [3, "name"]], template: function KptPanel_Template(rf, ctx) { if (rf & 1) {
|
|
8500
|
+
i0.ɵɵprojectionDef(_c0$p);
|
|
7927
8501
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "span", 2);
|
|
7928
8502
|
i0.ɵɵtext(3);
|
|
7929
8503
|
i0.ɵɵelementEnd();
|
|
@@ -7976,7 +8550,7 @@ class KptPanel {
|
|
|
7976
8550
|
}], null, { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], toggleable: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleable", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], animated: [{ type: i0.Input, args: [{ isSignal: true, alias: "animated", required: false }] }], animationDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "animationDuration", required: false }] }] }); })();
|
|
7977
8551
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptPanel, { className: "KptPanel", filePath: "lib/panel/panel.component.ts", lineNumber: 45 }); })();
|
|
7978
8552
|
|
|
7979
|
-
const _c0$
|
|
8553
|
+
const _c0$o = ["*"];
|
|
7980
8554
|
function KptFieldset_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
7981
8555
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
7982
8556
|
i0.ɵɵelementStart(0, "button", 6);
|
|
@@ -8022,7 +8596,7 @@ class KptFieldset {
|
|
|
8022
8596
|
static { this.ɵfac = function KptFieldset_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptFieldset)(); }; }
|
|
8023
8597
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptFieldset, selectors: [["kpt-fieldset"]], hostAttrs: [1, "kpt-fieldset-host"], hostVars: 2, hostBindings: function KptFieldset_HostBindings(rf, ctx) { if (rf & 2) {
|
|
8024
8598
|
i0.ɵɵstyleProp("--%NS%kpt-anim-duration", (ctx.animated() ? ctx.animationDuration() : 0) + "ms");
|
|
8025
|
-
} }, inputs: { legend: [1, "legend"], toggleable: [1, "toggleable"], collapsed: [1, "collapsed"], animated: [1, "animated"], animationDuration: [1, "animationDuration"] }, outputs: { collapsed: "collapsedChange" }, ngContentSelectors: _c0$
|
|
8599
|
+
} }, inputs: { legend: [1, "legend"], toggleable: [1, "toggleable"], collapsed: [1, "collapsed"], animated: [1, "animated"], animationDuration: [1, "animationDuration"] }, outputs: { collapsed: "collapsedChange" }, ngContentSelectors: _c0$o, decls: 8, vars: 5, consts: [[1, "kpt-fieldset"], [1, "kpt-fieldset__legend"], ["type", "button", 1, "kpt-fieldset__toggle"], [1, "kpt-fieldset__collapse"], [1, "kpt-fieldset__collapse-inner"], [1, "kpt-fieldset__body"], ["type", "button", 1, "kpt-fieldset__toggle", 3, "click"], [3, "name"]], template: function KptFieldset_Template(rf, ctx) { if (rf & 1) {
|
|
8026
8600
|
i0.ɵɵprojectionDef();
|
|
8027
8601
|
i0.ɵɵelementStart(0, "fieldset", 0)(1, "legend", 1);
|
|
8028
8602
|
i0.ɵɵconditionalCreate(2, KptFieldset_Conditional_2_Template, 4, 3, "button", 2)(3, KptFieldset_Conditional_3_Template, 2, 1, "span");
|
|
@@ -8070,8 +8644,8 @@ class KptFieldset {
|
|
|
8070
8644
|
}], null, { legend: [{ type: i0.Input, args: [{ isSignal: true, alias: "legend", required: false }] }], toggleable: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleable", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], animated: [{ type: i0.Input, args: [{ isSignal: true, alias: "animated", required: false }] }], animationDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "animationDuration", required: false }] }] }); })();
|
|
8071
8645
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptFieldset, { className: "KptFieldset", filePath: "lib/fieldset/fieldset.component.ts", lineNumber: 45 }); })();
|
|
8072
8646
|
|
|
8073
|
-
const _c0$
|
|
8074
|
-
const _c1$
|
|
8647
|
+
const _c0$n = [[["", "kptSplitStart", ""]], [["", "kptSplitEnd", ""]]];
|
|
8648
|
+
const _c1$8 = ["[kptSplitStart]", "[kptSplitEnd]"];
|
|
8075
8649
|
/**
|
|
8076
8650
|
* Splitter — dwa panele z przeciąganym uchwytem. Panele przez sloty `[kptSplitStart]` i `[kptSplitEnd]`.
|
|
8077
8651
|
* `horizontal` = panele obok siebie, `vertical` = jeden pod drugim.
|
|
@@ -8124,8 +8698,8 @@ class KptSplitter {
|
|
|
8124
8698
|
this.startSize.set(Math.min(100 - min, Math.max(min, Math.round(pct))));
|
|
8125
8699
|
}
|
|
8126
8700
|
static { this.ɵfac = function KptSplitter_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptSplitter)(); }; }
|
|
8127
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptSplitter, selectors: [["kpt-splitter"]], hostAttrs: [1, "kpt-splitter-host"], inputs: { orientation: [1, "orientation"], startSize: [1, "startSize"], minSize: [1, "minSize"] }, outputs: { startSize: "startSizeChange" }, ngContentSelectors: _c1$
|
|
8128
|
-
i0.ɵɵprojectionDef(_c0$
|
|
8701
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptSplitter, selectors: [["kpt-splitter"]], hostAttrs: [1, "kpt-splitter-host"], inputs: { orientation: [1, "orientation"], startSize: [1, "startSize"], minSize: [1, "minSize"] }, outputs: { startSize: "startSizeChange" }, ngContentSelectors: _c1$8, decls: 6, vars: 7, consts: [[1, "kpt-splitter"], [1, "kpt-splitter__pane"], ["role", "separator", "tabindex", "0", 1, "kpt-splitter__gutter", 3, "pointerdown", "keydown"]], template: function KptSplitter_Template(rf, ctx) { if (rf & 1) {
|
|
8702
|
+
i0.ɵɵprojectionDef(_c0$n);
|
|
8129
8703
|
i0.ɵɵdomElementStart(0, "div", 0)(1, "div", 1);
|
|
8130
8704
|
i0.ɵɵprojection(2);
|
|
8131
8705
|
i0.ɵɵdomElementEnd();
|
|
@@ -8497,7 +9071,7 @@ class KptAvatarGroup {
|
|
|
8497
9071
|
}], null, { avatars: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatars", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] }); })();
|
|
8498
9072
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptAvatarGroup, { className: "KptAvatarGroup", filePath: "lib/avatar-group/avatar-group.component.ts", lineNumber: 36 }); })();
|
|
8499
9073
|
|
|
8500
|
-
const _c0$
|
|
9074
|
+
const _c0$m = ["*"];
|
|
8501
9075
|
function KptEmpty_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
8502
9076
|
i0.ɵɵelementStart(0, "div", 1);
|
|
8503
9077
|
i0.ɵɵelement(1, "kpt-icon", 5);
|
|
@@ -8543,7 +9117,7 @@ class KptEmpty {
|
|
|
8543
9117
|
...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
8544
9118
|
}
|
|
8545
9119
|
static { this.ɵfac = function KptEmpty_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptEmpty)(); }; }
|
|
8546
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptEmpty, selectors: [["kpt-empty"]], hostAttrs: [1, "kpt-empty-host"], inputs: { icon: [1, "icon"], title: [1, "title"], description: [1, "description"] }, ngContentSelectors: _c0$
|
|
9120
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptEmpty, selectors: [["kpt-empty"]], hostAttrs: [1, "kpt-empty-host"], inputs: { icon: [1, "icon"], title: [1, "title"], description: [1, "description"] }, ngContentSelectors: _c0$m, decls: 6, vars: 3, consts: [[1, "kpt-empty"], [1, "kpt-empty__icon"], [1, "kpt-empty__title"], [1, "kpt-empty__desc"], [1, "kpt-empty__actions"], [3, "name"]], template: function KptEmpty_Template(rf, ctx) { if (rf & 1) {
|
|
8547
9121
|
i0.ɵɵprojectionDef();
|
|
8548
9122
|
i0.ɵɵelementStart(0, "div", 0);
|
|
8549
9123
|
i0.ɵɵconditionalCreate(1, KptEmpty_Conditional_1_Template, 2, 1, "div", 1);
|
|
@@ -8574,7 +9148,7 @@ class KptEmpty {
|
|
|
8574
9148
|
}], null, { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }] }); })();
|
|
8575
9149
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptEmpty, { className: "KptEmpty", filePath: "lib/empty/empty.component.ts", lineNumber: 28 }); })();
|
|
8576
9150
|
|
|
8577
|
-
const _c0$
|
|
9151
|
+
const _c0$l = ["*"];
|
|
8578
9152
|
function KptTab_ng_template_0_Template(rf, ctx) { if (rf & 1) {
|
|
8579
9153
|
i0.ɵɵprojection(0);
|
|
8580
9154
|
} }
|
|
@@ -8597,7 +9171,7 @@ class KptTab {
|
|
|
8597
9171
|
i0.ɵɵviewQuerySignal(ctx.content, TemplateRef, 5);
|
|
8598
9172
|
} if (rf & 2) {
|
|
8599
9173
|
i0.ɵɵqueryAdvance();
|
|
8600
|
-
} }, inputs: { label: [1, "label"], disabled: [1, "disabled"] }, ngContentSelectors: _c0$
|
|
9174
|
+
} }, inputs: { label: [1, "label"], disabled: [1, "disabled"] }, ngContentSelectors: _c0$l, decls: 1, vars: 0, template: function KptTab_Template(rf, ctx) { if (rf & 1) {
|
|
8601
9175
|
i0.ɵɵprojectionDef();
|
|
8602
9176
|
i0.ɵɵdomTemplate(0, KptTab_ng_template_0_Template, 1, 0, "ng-template");
|
|
8603
9177
|
} }, encapsulation: 2 }); }
|
|
@@ -8612,7 +9186,7 @@ class KptTab {
|
|
|
8612
9186
|
}], null, { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], content: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] }); })();
|
|
8613
9187
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptTab, { className: "KptTab", filePath: "lib/tabs/tab.component.ts", lineNumber: 14 }); })();
|
|
8614
9188
|
|
|
8615
|
-
const _c0$
|
|
9189
|
+
const _c0$k = ["tabBtn"];
|
|
8616
9190
|
function _forTrack0$3($index, $item) { /* @ts-ignore */
|
|
8617
9191
|
return this.activeIndex(); }
|
|
8618
9192
|
function KptTabs_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -8694,7 +9268,7 @@ class KptTabs {
|
|
|
8694
9268
|
} if (rf & 2) {
|
|
8695
9269
|
i0.ɵɵqueryAdvance();
|
|
8696
9270
|
} }, viewQuery: function KptTabs_Query(rf, ctx) { if (rf & 1) {
|
|
8697
|
-
i0.ɵɵviewQuerySignal(ctx.tabBtns, _c0$
|
|
9271
|
+
i0.ɵɵviewQuerySignal(ctx.tabBtns, _c0$k, 5);
|
|
8698
9272
|
} if (rf & 2) {
|
|
8699
9273
|
i0.ɵɵqueryAdvance();
|
|
8700
9274
|
} }, hostAttrs: [1, "kpt-tabs-host"], hostVars: 4, hostBindings: function KptTabs_HostBindings(rf, ctx) { if (rf & 1) {
|
|
@@ -8750,7 +9324,7 @@ class KptTabs {
|
|
|
8750
9324
|
}], () => [], { tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KptTab), { isSignal: true }] }], activeIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeIndex", required: false }] }, { type: i0.Output, args: ["activeIndexChange"] }], animated: [{ type: i0.Input, args: [{ isSignal: true, alias: "animated", required: false }] }], animationDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "animationDuration", required: false }] }], tabBtns: [{ type: i0.ViewChildren, args: ['tabBtn', { isSignal: true }] }] }); })();
|
|
8751
9325
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptTabs, { className: "KptTabs", filePath: "lib/tabs/tabs.component.ts", lineNumber: 62 }); })();
|
|
8752
9326
|
|
|
8753
|
-
const _c0$
|
|
9327
|
+
const _c0$j = ["*"];
|
|
8754
9328
|
/**
|
|
8755
9329
|
* Panel akordeonu. Umieszczaj w `kpt-accordion`. Stan `expanded` jest dwukierunkowy.
|
|
8756
9330
|
*/
|
|
@@ -8780,7 +9354,7 @@ class KptAccordionPanel {
|
|
|
8780
9354
|
static { this.ɵfac = function KptAccordionPanel_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptAccordionPanel)(); }; }
|
|
8781
9355
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptAccordionPanel, selectors: [["kpt-accordion-panel"]], hostAttrs: [1, "kpt-accordion-panel-host"], hostVars: 2, hostBindings: function KptAccordionPanel_HostBindings(rf, ctx) { if (rf & 2) {
|
|
8782
9356
|
i0.ɵɵstyleProp("--%NS%kpt-anim-duration", ctx.animMs());
|
|
8783
|
-
} }, inputs: { title: [1, "title"], disabled: [1, "disabled"], expanded: [1, "expanded"] }, outputs: { expanded: "expandedChange" }, ngContentSelectors: _c0$
|
|
9357
|
+
} }, inputs: { title: [1, "title"], disabled: [1, "disabled"], expanded: [1, "expanded"] }, outputs: { expanded: "expandedChange" }, ngContentSelectors: _c0$j, decls: 9, vars: 11, consts: [[1, "kpt-accordion-panel"], ["type", "button", 1, "kpt-accordion-panel__header", 3, "click", "disabled"], [1, "kpt-accordion-panel__title"], ["name", "chevron-down", 1, "kpt-accordion-panel__chevron"], [1, "kpt-accordion-panel__collapse"], [1, "kpt-accordion-panel__collapse-inner"], [1, "kpt-accordion-panel__body"]], template: function KptAccordionPanel_Template(rf, ctx) { if (rf & 1) {
|
|
8784
9358
|
i0.ɵɵprojectionDef();
|
|
8785
9359
|
i0.ɵɵelementStart(0, "div", 0)(1, "button", 1);
|
|
8786
9360
|
i0.ɵɵlistener("click", function KptAccordionPanel_Template_button_click_1_listener() { return ctx.toggle(); });
|
|
@@ -8838,7 +9412,7 @@ class KptAccordionPanel {
|
|
|
8838
9412
|
}], null, { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }] }); })();
|
|
8839
9413
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptAccordionPanel, { className: "KptAccordionPanel", filePath: "lib/accordion/accordion-panel.component.ts", lineNumber: 52 }); })();
|
|
8840
9414
|
|
|
8841
|
-
const _c0$
|
|
9415
|
+
const _c0$i = ["*"];
|
|
8842
9416
|
/**
|
|
8843
9417
|
* Akordeon — grupa rozwijanych paneli. `multi` pozwala otworzyć wiele naraz.
|
|
8844
9418
|
*
|
|
@@ -8871,7 +9445,7 @@ class KptAccordion {
|
|
|
8871
9445
|
i0.ɵɵcontentQuerySignal(dirIndex, ctx.panels, KptAccordionPanel, 4);
|
|
8872
9446
|
} if (rf & 2) {
|
|
8873
9447
|
i0.ɵɵqueryAdvance();
|
|
8874
|
-
} }, hostAttrs: [1, "kpt-accordion-host"], inputs: { multi: [1, "multi"], animated: [1, "animated"], animationDuration: [1, "animationDuration"] }, ngContentSelectors: _c0$
|
|
9448
|
+
} }, hostAttrs: [1, "kpt-accordion-host"], inputs: { multi: [1, "multi"], animated: [1, "animated"], animationDuration: [1, "animationDuration"] }, ngContentSelectors: _c0$i, decls: 1, vars: 0, template: function KptAccordion_Template(rf, ctx) { if (rf & 1) {
|
|
8875
9449
|
i0.ɵɵprojectionDef();
|
|
8876
9450
|
i0.ɵɵprojection(0);
|
|
8877
9451
|
} }, styles: ["@layer kpt.components{.kpt-accordion-host{display:block;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-lg, .75rem);overflow:hidden}}\n"], encapsulation: 2 }); }
|
|
@@ -8961,7 +9535,7 @@ class KptBreadcrumb {
|
|
|
8961
9535
|
}], null, { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }] }); })();
|
|
8962
9536
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptBreadcrumb, { className: "KptBreadcrumb", filePath: "lib/breadcrumb/breadcrumb.component.ts", lineNumber: 38 }); })();
|
|
8963
9537
|
|
|
8964
|
-
const _c0$
|
|
9538
|
+
const _c0$h = ["*"];
|
|
8965
9539
|
function KptStep_ng_template_0_Template(rf, ctx) { if (rf & 1) {
|
|
8966
9540
|
i0.ɵɵprojection(0);
|
|
8967
9541
|
} }
|
|
@@ -8983,7 +9557,7 @@ class KptStep {
|
|
|
8983
9557
|
i0.ɵɵviewQuerySignal(ctx.content, TemplateRef, 5);
|
|
8984
9558
|
} if (rf & 2) {
|
|
8985
9559
|
i0.ɵɵqueryAdvance();
|
|
8986
|
-
} }, inputs: { label: [1, "label"] }, ngContentSelectors: _c0$
|
|
9560
|
+
} }, inputs: { label: [1, "label"] }, ngContentSelectors: _c0$h, decls: 1, vars: 0, template: function KptStep_Template(rf, ctx) { if (rf & 1) {
|
|
8987
9561
|
i0.ɵɵprojectionDef();
|
|
8988
9562
|
i0.ɵɵdomTemplate(0, KptStep_ng_template_0_Template, 1, 0, "ng-template");
|
|
8989
9563
|
} }, encapsulation: 2 }); }
|
|
@@ -9336,9 +9910,9 @@ class KptRowDetailDef {
|
|
|
9336
9910
|
}]
|
|
9337
9911
|
}], null, null); })();
|
|
9338
9912
|
|
|
9339
|
-
const _c0$
|
|
9340
|
-
const _c1$
|
|
9341
|
-
const _c2$
|
|
9913
|
+
const _c0$g = ["scrollEl"];
|
|
9914
|
+
const _c1$7 = ["theadEl"];
|
|
9915
|
+
const _c2$3 = ["editorHost"];
|
|
9342
9916
|
const _c3 = [[["", "kptPaginatorActions", ""]]];
|
|
9343
9917
|
const _c4 = ["[kptPaginatorActions]"];
|
|
9344
9918
|
const _c5 = a0 => ({ $implicit: a0 });
|
|
@@ -10575,7 +11149,7 @@ class KptDataTable {
|
|
|
10575
11149
|
} if (rf & 2) {
|
|
10576
11150
|
i0.ɵɵqueryAdvance(3);
|
|
10577
11151
|
} }, viewQuery: function KptDataTable_Query(rf, ctx) { if (rf & 1) {
|
|
10578
|
-
i0.ɵɵviewQuerySignal(ctx.scrollEl, _c0$
|
|
11152
|
+
i0.ɵɵviewQuerySignal(ctx.scrollEl, _c0$g, 5)(ctx.theadEl, _c1$7, 5)(ctx.editorHost, _c2$3, 5);
|
|
10579
11153
|
} if (rf & 2) {
|
|
10580
11154
|
i0.ɵɵqueryAdvance(3);
|
|
10581
11155
|
} }, hostAttrs: [1, "kpt-data-table"], hostVars: 2, hostBindings: function KptDataTable_HostBindings(rf, ctx) { if (rf & 2) {
|
|
@@ -10654,8 +11228,8 @@ class KptDataTable {
|
|
|
10654
11228
|
}], () => [], { 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 }] }], summaryLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "summaryLabel", required: false }] }], summaryValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "summaryValues", 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 }] }] }); })();
|
|
10655
11229
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDataTable, { className: "KptDataTable", filePath: "lib/data-table/data-table.component.ts", lineNumber: 164 }); })();
|
|
10656
11230
|
|
|
10657
|
-
const _c0$
|
|
10658
|
-
const _c1$
|
|
11231
|
+
const _c0$f = a0 => ({ $implicit: a0, level: 0 });
|
|
11232
|
+
const _c1$6 = (a0, a1) => ({ $implicit: a0, level: a1 });
|
|
10659
11233
|
function KptTree_ng_template_2_For_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
10660
11234
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
10661
11235
|
i0.ɵɵelementStart(0, "button", 10);
|
|
@@ -10688,7 +11262,7 @@ function KptTree_ng_template_2_For_1_Conditional_7_Template(rf, ctx) { if (rf &
|
|
|
10688
11262
|
i0.ɵɵnextContext();
|
|
10689
11263
|
const nodeTpl_r6 = i0.ɵɵreference(3);
|
|
10690
11264
|
i0.ɵɵadvance();
|
|
10691
|
-
i0.ɵɵproperty("ngTemplateOutlet", nodeTpl_r6)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$
|
|
11265
|
+
i0.ɵɵproperty("ngTemplateOutlet", nodeTpl_r6)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$6, node_r2.children, level_r5 + 1));
|
|
10692
11266
|
} }
|
|
10693
11267
|
function KptTree_ng_template_2_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
10694
11268
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
@@ -10777,7 +11351,7 @@ class KptTree {
|
|
|
10777
11351
|
} if (rf & 2) {
|
|
10778
11352
|
const nodeTpl_r6 = i0.ɵɵreference(3);
|
|
10779
11353
|
i0.ɵɵadvance();
|
|
10780
|
-
i0.ɵɵproperty("ngTemplateOutlet", nodeTpl_r6)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0$
|
|
11354
|
+
i0.ɵɵproperty("ngTemplateOutlet", nodeTpl_r6)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0$f, ctx.nodes()));
|
|
10781
11355
|
} }, dependencies: [NgTemplateOutlet, KptIcon], styles: ["@layer kpt.components{.kpt-tree-host{display:block}.kpt-tree,.kpt-tree ul{list-style:none;margin:0;padding:0}.kpt-tree__row{display:flex;align-items:center;gap:.35rem;padding-block:.3rem;padding-inline-end:.5rem;border-radius:var(--%NS%kpt-radius-sm, .25rem);cursor:pointer;font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface)}.kpt-tree__row:hover{background:var(--%NS%kpt-color-surface-variant)}.kpt-tree__row.is-selected{background:color-mix(in oklch,var(--%NS%kpt-color-primary) 14%,var(--%NS%kpt-color-surface));color:var(--%NS%kpt-color-primary)}.kpt-tree__row.is-disabled{opacity:.5;cursor:not-allowed}.kpt-tree__toggle{display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;flex-shrink:0;border:0;background:none;cursor:pointer;color:var(--%NS%kpt-color-on-surface-muted);padding:0}.kpt-tree__spacer{display:inline-block;width:1.25rem;flex-shrink:0}.kpt-tree__chevron{transition:transform var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-tree__chevron.is-open{transform:rotate(90deg)}.kpt-tree__icon{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-tree__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}\n"], encapsulation: 2 }); }
|
|
10782
11356
|
}
|
|
10783
11357
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptTree, [{
|
|
@@ -10911,8 +11485,8 @@ class KptTimeline {
|
|
|
10911
11485
|
}], null, { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }] }); })();
|
|
10912
11486
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptTimeline, { className: "KptTimeline", filePath: "lib/timeline/timeline.component.ts", lineNumber: 44 }); })();
|
|
10913
11487
|
|
|
10914
|
-
const _c0$
|
|
10915
|
-
const _c1$
|
|
11488
|
+
const _c0$e = (a0, a1) => ({ $implicit: a0, index: a1 });
|
|
11489
|
+
const _c1$5 = a0 => ({ index: a0 });
|
|
10916
11490
|
function KptCarousel_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
10917
11491
|
i0.ɵɵelementStart(0, "div", 3);
|
|
10918
11492
|
i0.ɵɵelementContainer(1, 10);
|
|
@@ -10922,7 +11496,7 @@ function KptCarousel_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
10922
11496
|
const $index_r2 = ctx.$index;
|
|
10923
11497
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
10924
11498
|
i0.ɵɵadvance();
|
|
10925
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.slideTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c0$
|
|
11499
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.slideTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c0$e, item_r1, $index_r2));
|
|
10926
11500
|
} }
|
|
10927
11501
|
function KptCarousel_For_11_Template(rf, ctx) { if (rf & 1) {
|
|
10928
11502
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
@@ -10933,7 +11507,7 @@ function KptCarousel_For_11_Template(rf, ctx) { if (rf & 1) {
|
|
|
10933
11507
|
const ɵ$index_22_r5 = ctx.$index;
|
|
10934
11508
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
10935
11509
|
i0.ɵɵclassProp("is-active", ɵ$index_22_r5 === ctx_r2.activeIndex());
|
|
10936
|
-
i0.ɵɵattribute("aria-label", ctx_r2.i18n.t("carousel.slide", i0.ɵɵpureFunction1(3, _c1$
|
|
11510
|
+
i0.ɵɵattribute("aria-label", ctx_r2.i18n.t("carousel.slide", i0.ɵɵpureFunction1(3, _c1$5, ɵ$index_22_r5 + 1)));
|
|
10937
11511
|
} }
|
|
10938
11512
|
/**
|
|
10939
11513
|
* Karuzela slajdów. Dane przez `items`, szablon slajdu przez projekcję `<ng-template let-item>`.
|
|
@@ -11034,39 +11608,63 @@ class KptCarousel {
|
|
|
11034
11608
|
}], null, { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], activeIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeIndex", required: false }] }, { type: i0.Output, args: ["activeIndexChange"] }], slideTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] }); })();
|
|
11035
11609
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptCarousel, { className: "KptCarousel", filePath: "lib/carousel/carousel.component.ts", lineNumber: 54 }); })();
|
|
11036
11610
|
|
|
11037
|
-
const _c0$
|
|
11038
|
-
const _c1$
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
i0.ɵɵelementStart(0, "
|
|
11042
|
-
i0.ɵɵ
|
|
11611
|
+
const _c0$d = a0 => ({ count: a0 });
|
|
11612
|
+
const _c1$4 = (a0, a1) => ({ $implicit: a0, index: a1 });
|
|
11613
|
+
function KptDataView_Conditional_5_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
11614
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
11615
|
+
i0.ɵɵelementStart(0, "button", 6);
|
|
11616
|
+
i0.ɵɵlistener("click", function KptDataView_Conditional_5_For_2_Template_button_click_0_listener() { const n_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.gridColumns.set(n_r2)); });
|
|
11617
|
+
i0.ɵɵelement(1, "kpt-icon", 14);
|
|
11618
|
+
i0.ɵɵtext(2);
|
|
11043
11619
|
i0.ɵɵelementEnd();
|
|
11044
11620
|
} if (rf & 2) {
|
|
11045
|
-
const
|
|
11046
|
-
const
|
|
11047
|
-
|
|
11621
|
+
const n_r2 = ctx.$implicit;
|
|
11622
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
11623
|
+
i0.ɵɵclassProp("is-active", ctx_r2.gridColumns() === n_r2);
|
|
11624
|
+
i0.ɵɵattribute("aria-pressed", ctx_r2.gridColumns() === n_r2);
|
|
11625
|
+
i0.ɵɵadvance(2);
|
|
11626
|
+
i0.ɵɵtextInterpolate(n_r2);
|
|
11627
|
+
} }
|
|
11628
|
+
function KptDataView_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
11629
|
+
i0.ɵɵelementStart(0, "div", 4);
|
|
11630
|
+
i0.ɵɵrepeaterCreate(1, KptDataView_Conditional_5_For_2_Template, 3, 4, "button", 13, i0.ɵɵrepeaterTrackByIdentity);
|
|
11631
|
+
i0.ɵɵelementEnd();
|
|
11632
|
+
} if (rf & 2) {
|
|
11633
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
11634
|
+
i0.ɵɵattribute("aria-label", ctx_r2.i18n.t("dataView.columns"));
|
|
11048
11635
|
i0.ɵɵadvance();
|
|
11049
|
-
i0.ɵɵ
|
|
11636
|
+
i0.ɵɵrepeater(ctx_r2.gridColumnsOptions());
|
|
11050
11637
|
} }
|
|
11051
|
-
function
|
|
11052
|
-
i0.ɵɵelementStart(0, "div",
|
|
11638
|
+
function KptDataView_For_13_Template(rf, ctx) { if (rf & 1) {
|
|
11639
|
+
i0.ɵɵelementStart(0, "div", 10);
|
|
11640
|
+
i0.ɵɵelementContainer(1, 15);
|
|
11641
|
+
i0.ɵɵelementEnd();
|
|
11642
|
+
} if (rf & 2) {
|
|
11643
|
+
const item_r4 = ctx.$implicit;
|
|
11644
|
+
const $index_r5 = ctx.$index;
|
|
11645
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
11646
|
+
i0.ɵɵadvance();
|
|
11647
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.itemTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c1$4, item_r4, $index_r5));
|
|
11648
|
+
} }
|
|
11649
|
+
function KptDataView_ForEmpty_14_Template(rf, ctx) { if (rf & 1) {
|
|
11650
|
+
i0.ɵɵelementStart(0, "div", 11);
|
|
11053
11651
|
i0.ɵɵtext(1);
|
|
11054
11652
|
i0.ɵɵelementEnd();
|
|
11055
11653
|
} if (rf & 2) {
|
|
11056
|
-
const
|
|
11654
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
11057
11655
|
i0.ɵɵadvance();
|
|
11058
|
-
i0.ɵɵtextInterpolate(
|
|
11656
|
+
i0.ɵɵtextInterpolate(ctx_r2.i18n.t("dataView.empty"));
|
|
11059
11657
|
} }
|
|
11060
|
-
function
|
|
11061
|
-
const
|
|
11062
|
-
i0.ɵɵelementStart(0, "kpt-paginator",
|
|
11063
|
-
i0.ɵɵtwoWayListener("pageIndexChange", function
|
|
11658
|
+
function KptDataView_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
11659
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
11660
|
+
i0.ɵɵelementStart(0, "kpt-paginator", 16);
|
|
11661
|
+
i0.ɵɵtwoWayListener("pageIndexChange", function KptDataView_Conditional_15_Template_kpt_paginator_pageIndexChange_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r2.pageIndex, $event) || (ctx_r2.pageIndex = $event); return i0.ɵɵresetView($event); })("pageSizeChange", function KptDataView_Conditional_15_Template_kpt_paginator_pageSizeChange_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r2.pageSize, $event) || (ctx_r2.pageSize = $event); return i0.ɵɵresetView($event); });
|
|
11064
11662
|
i0.ɵɵelementEnd();
|
|
11065
11663
|
} if (rf & 2) {
|
|
11066
|
-
const
|
|
11067
|
-
i0.ɵɵproperty("length",
|
|
11068
|
-
i0.ɵɵtwoWayProperty("pageIndex",
|
|
11069
|
-
i0.ɵɵproperty("
|
|
11664
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
11665
|
+
i0.ɵɵproperty("length", ctx_r2.items().length);
|
|
11666
|
+
i0.ɵɵtwoWayProperty("pageIndex", ctx_r2.pageIndex)("pageSize", ctx_r2.pageSize);
|
|
11667
|
+
i0.ɵɵproperty("pageSizeOptions", ctx_r2.pagerSizeOptions());
|
|
11070
11668
|
} }
|
|
11071
11669
|
/**
|
|
11072
11670
|
* DataView — prezentacja listy elementów w układzie lista/siatka, z opcjonalną paginacją.
|
|
@@ -11083,15 +11681,47 @@ class KptDataView {
|
|
|
11083
11681
|
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
11084
11682
|
this.layout = model('grid', /* @ts-ignore */
|
|
11085
11683
|
...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
11086
|
-
|
|
11684
|
+
/** Rozmiar strony (dwukierunkowy — select paginatora go zmienia); 0 wyłącza stronicowanie. */
|
|
11685
|
+
this.pageSize = model(0, /* @ts-ignore */
|
|
11087
11686
|
...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
|
|
11687
|
+
/** Rozmiary do wyboru w paginatorze. Pusta lista = select z jedną, bieżącą wartością. */
|
|
11688
|
+
this.pageSizeOptions = input([], /* @ts-ignore */
|
|
11689
|
+
...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : /* istanbul ignore next */ []));
|
|
11690
|
+
/**
|
|
11691
|
+
* Liczba kolumn siatki jako SUFIT, nie sztywna liczba; 0 = tyle, ile się zmieści.
|
|
11692
|
+
* Dwukierunkowa, bo pasek gęstości w toolbarze ją zmienia.
|
|
11693
|
+
*/
|
|
11694
|
+
this.gridColumns = model(0, /* @ts-ignore */
|
|
11695
|
+
...(ngDevMode ? [{ debugName: "gridColumns" }] : /* istanbul ignore next */ []));
|
|
11696
|
+
/** Wartości w pasku gęstości. Mniej niż dwie = paska nie ma po co pokazywać. */
|
|
11697
|
+
this.gridColumnsOptions = input([], /* @ts-ignore */
|
|
11698
|
+
...(ngDevMode ? [{ debugName: "gridColumnsOptions" }] : /* istanbul ignore next */ []));
|
|
11699
|
+
/** Najwęższa sensowna karta — poniżej tego siatka zdejmuje kolumnę, zamiast ściskać. */
|
|
11700
|
+
this.gridMinWidth = input('10rem', /* @ts-ignore */
|
|
11701
|
+
...(ngDevMode ? [{ debugName: "gridMinWidth" }] : /* istanbul ignore next */ []));
|
|
11088
11702
|
this.paginated = input(true, { ...(ngDevMode ? { debugName: "paginated" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
11089
11703
|
this.i18n = inject(KptI18n);
|
|
11090
11704
|
this.itemTpl = contentChild.required(TemplateRef, /* @ts-ignore */
|
|
11091
11705
|
...(ngDevMode ? [{ debugName: "itemTpl" }] : /* istanbul ignore next */ []));
|
|
11092
11706
|
this.pageIndex = model(0, /* @ts-ignore */
|
|
11093
11707
|
...(ngDevMode ? [{ debugName: "pageIndex" }] : /* istanbul ignore next */ []));
|
|
11094
|
-
|
|
11708
|
+
/** Pasek gęstości ma sens tylko w siatce i tylko wtedy, gdy jest w czym wybierać. */
|
|
11709
|
+
this.showColumns = computed(() => this.layout() === 'grid' && this.gridColumnsOptions().length > 1, /* @ts-ignore */
|
|
11710
|
+
...(ngDevMode ? [{ debugName: "showColumns" }] : /* istanbul ignore next */ []));
|
|
11711
|
+
/** Opcje selecta: własna lista albo — gdy pusta — sam bieżący rozmiar. */
|
|
11712
|
+
this.pagerSizeOptions = computed(() => {
|
|
11713
|
+
const options = this.pageSizeOptions();
|
|
11714
|
+
return options.length ? options : [this.pageSize()];
|
|
11715
|
+
}, /* @ts-ignore */
|
|
11716
|
+
...(ngDevMode ? [{ debugName: "pagerSizeOptions" }] : /* istanbul ignore next */ []));
|
|
11717
|
+
/**
|
|
11718
|
+
* Pager zostaje na ekranie także wtedy, gdy wszystko mieści się na jednej stronie, o ile jest
|
|
11719
|
+
* w czym wybierać. Bez tego wybranie największego rozmiaru chowa select, którym użytkownik
|
|
11720
|
+
* właśnie się posłużył — i nie ma jak wrócić do mniejszego.
|
|
11721
|
+
*/
|
|
11722
|
+
this.showPager = computed(() => this.paginated() &&
|
|
11723
|
+
this.pageSize() > 0 &&
|
|
11724
|
+
(this.items().length > this.pageSize() || this.pagerSizeOptions().length > 1), /* @ts-ignore */
|
|
11095
11725
|
...(ngDevMode ? [{ debugName: "showPager" }] : /* istanbul ignore next */ []));
|
|
11096
11726
|
this.pageItems = computed(() => {
|
|
11097
11727
|
const size = this.pageSize();
|
|
@@ -11107,39 +11737,44 @@ class KptDataView {
|
|
|
11107
11737
|
i0.ɵɵcontentQuerySignal(dirIndex, ctx.itemTpl, TemplateRef, 5);
|
|
11108
11738
|
} if (rf & 2) {
|
|
11109
11739
|
i0.ɵɵqueryAdvance();
|
|
11110
|
-
} }, hostAttrs: [1, "kpt-data-view-host"], inputs: { items: [1, "items"], layout: [1, "layout"], pageSize: [1, "pageSize"], paginated: [1, "paginated"], pageIndex: [1, "pageIndex"] }, outputs: { layout: "layoutChange", pageIndex: "pageIndexChange" }, decls:
|
|
11740
|
+
} }, hostAttrs: [1, "kpt-data-view-host"], inputs: { items: [1, "items"], layout: [1, "layout"], pageSize: [1, "pageSize"], pageSizeOptions: [1, "pageSizeOptions"], gridColumns: [1, "gridColumns"], gridColumnsOptions: [1, "gridColumnsOptions"], gridMinWidth: [1, "gridMinWidth"], paginated: [1, "paginated"], pageIndex: [1, "pageIndex"] }, outputs: { layout: "layoutChange", pageSize: "pageSizeChange", gridColumns: "gridColumnsChange", pageIndex: "pageIndexChange" }, decls: 16, vars: 20, consts: [[1, "kpt-data-view"], [1, "kpt-data-view__toolbar"], [1, "kpt-data-view__count"], [1, "kpt-data-view__controls"], ["role", "group", 1, "kpt-data-view__columns"], [1, "kpt-data-view__switch"], ["type", "button", 3, "click"], ["name", "list"], ["name", "layout-grid"], [1, "kpt-data-view__content"], [1, "kpt-data-view__item"], [1, "kpt-data-view__empty"], [3, "length", "pageIndex", "pageSize", "pageSizeOptions"], ["type", "button", 3, "is-active"], ["name", "grid-dots"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], [3, "pageIndexChange", "pageSizeChange", "length", "pageIndex", "pageSize", "pageSizeOptions"]], template: function KptDataView_Template(rf, ctx) { if (rf & 1) {
|
|
11111
11741
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2);
|
|
11112
11742
|
i0.ɵɵtext(3);
|
|
11113
11743
|
i0.ɵɵelementEnd();
|
|
11114
|
-
i0.ɵɵelementStart(4, "div", 3)
|
|
11115
|
-
i0.ɵɵ
|
|
11116
|
-
i0.ɵɵ
|
|
11744
|
+
i0.ɵɵelementStart(4, "div", 3);
|
|
11745
|
+
i0.ɵɵconditionalCreate(5, KptDataView_Conditional_5_Template, 3, 1, "div", 4);
|
|
11746
|
+
i0.ɵɵelementStart(6, "div", 5)(7, "button", 6);
|
|
11747
|
+
i0.ɵɵlistener("click", function KptDataView_Template_button_click_7_listener() { return ctx.layout.set("list"); });
|
|
11748
|
+
i0.ɵɵelement(8, "kpt-icon", 7);
|
|
11117
11749
|
i0.ɵɵelementEnd();
|
|
11118
|
-
i0.ɵɵelementStart(
|
|
11119
|
-
i0.ɵɵlistener("click", function
|
|
11120
|
-
i0.ɵɵelement(
|
|
11121
|
-
i0.ɵɵelementEnd()()();
|
|
11122
|
-
i0.ɵɵelementStart(
|
|
11123
|
-
i0.ɵɵrepeaterCreate(
|
|
11750
|
+
i0.ɵɵelementStart(9, "button", 6);
|
|
11751
|
+
i0.ɵɵlistener("click", function KptDataView_Template_button_click_9_listener() { return ctx.layout.set("grid"); });
|
|
11752
|
+
i0.ɵɵelement(10, "kpt-icon", 8);
|
|
11753
|
+
i0.ɵɵelementEnd()()()();
|
|
11754
|
+
i0.ɵɵelementStart(11, "div", 9);
|
|
11755
|
+
i0.ɵɵrepeaterCreate(12, KptDataView_For_13_Template, 2, 5, "div", 10, i0.ɵɵrepeaterTrackByIndex, false, KptDataView_ForEmpty_14_Template, 2, 1, "div", 11);
|
|
11124
11756
|
i0.ɵɵelementEnd();
|
|
11125
|
-
i0.ɵɵconditionalCreate(
|
|
11757
|
+
i0.ɵɵconditionalCreate(15, KptDataView_Conditional_15_Template, 1, 4, "kpt-paginator", 12);
|
|
11126
11758
|
i0.ɵɵelementEnd();
|
|
11127
11759
|
} if (rf & 2) {
|
|
11128
11760
|
i0.ɵɵadvance(3);
|
|
11129
|
-
i0.ɵɵtextInterpolate(ctx.i18n.t("dataView.count", i0.ɵɵpureFunction1(
|
|
11761
|
+
i0.ɵɵtextInterpolate(ctx.i18n.t("dataView.count", i0.ɵɵpureFunction1(18, _c0$d, ctx.items().length)));
|
|
11762
|
+
i0.ɵɵadvance(2);
|
|
11763
|
+
i0.ɵɵconditional(ctx.showColumns() ? 5 : -1);
|
|
11130
11764
|
i0.ɵɵadvance(2);
|
|
11131
11765
|
i0.ɵɵclassProp("is-active", ctx.layout() === "list");
|
|
11132
|
-
i0.ɵɵattribute("aria-label", ctx.i18n.t("dataView.list"));
|
|
11766
|
+
i0.ɵɵattribute("aria-pressed", ctx.layout() === "list")("aria-label", ctx.i18n.t("dataView.list"));
|
|
11133
11767
|
i0.ɵɵadvance(2);
|
|
11134
11768
|
i0.ɵɵclassProp("is-active", ctx.layout() === "grid");
|
|
11135
|
-
i0.ɵɵattribute("aria-label", ctx.i18n.t("dataView.grid"));
|
|
11769
|
+
i0.ɵɵattribute("aria-pressed", ctx.layout() === "grid")("aria-label", ctx.i18n.t("dataView.grid"));
|
|
11136
11770
|
i0.ɵɵadvance(2);
|
|
11137
|
-
i0.ɵɵ
|
|
11771
|
+
i0.ɵɵstyleProp("--%NS%_min", ctx.gridMinWidth())("--%NS%_cols", ctx.gridColumns() || null);
|
|
11772
|
+
i0.ɵɵattribute("data-layout", ctx.layout())("data-columns", ctx.gridColumns() ? "" : null);
|
|
11138
11773
|
i0.ɵɵadvance();
|
|
11139
11774
|
i0.ɵɵrepeater(ctx.pageItems());
|
|
11140
11775
|
i0.ɵɵadvance(3);
|
|
11141
|
-
i0.ɵɵconditional(ctx.showPager() ?
|
|
11142
|
-
} }, dependencies: [NgTemplateOutlet, KptIcon, KptPaginator], styles: ["@layer kpt.components{.kpt-data-view-host{display:block}.kpt-data-view__toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--%NS%kpt-space-3, .75rem)}.kpt-data-view__count{color:var(--%NS%kpt-color-on-surface-muted);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-data-view__switch{display:inline-flex;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);overflow:hidden}.kpt-data-view__switch button{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border:0;background:var(--%NS%kpt-color-surface-raised);color:var(--%NS%kpt-color-on-surface-muted);cursor:pointer}.kpt-data-view__switch button.is-active{background:var(--%NS%kpt-color-primary);color:var(--%NS%kpt-color-on-primary)}.kpt-data-view__content[data-layout=list]{display:flex;flex-direction:column;gap:var(--%NS%kpt-space-2, .5rem)}.kpt-data-view__content[data-layout=grid]{display:grid;grid-template-columns:repeat(auto-fill,minmax(10rem,1fr))
|
|
11776
|
+
i0.ɵɵconditional(ctx.showPager() ? 15 : -1);
|
|
11777
|
+
} }, dependencies: [NgTemplateOutlet, KptIcon, KptPaginator], styles: ["@layer kpt.components{.kpt-data-view-host{display:block}.kpt-data-view__toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--%NS%kpt-space-3, .75rem)}.kpt-data-view__count{color:var(--%NS%kpt-color-on-surface-muted);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-data-view__controls{display:inline-flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem)}.kpt-data-view__switch,.kpt-data-view__columns{display:inline-flex;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);overflow:hidden}.kpt-data-view__switch button,.kpt-data-view__columns button{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border:0;background:var(--%NS%kpt-color-surface-raised);color:var(--%NS%kpt-color-on-surface-muted);cursor:pointer}.kpt-data-view__switch button.is-active,.kpt-data-view__columns button.is-active{background:var(--%NS%kpt-color-primary);color:var(--%NS%kpt-color-on-primary)}.kpt-data-view__columns button{gap:var(--%NS%kpt-space-1, .25rem);width:auto;padding-inline:var(--%NS%kpt-space-2, .5rem);font-size:var(--%NS%kpt-font-size-sm, .875rem);font-weight:var(--%NS%kpt-font-weight-medium, 500)}.kpt-data-view__content{--%NS%_gap: var(--%NS%kpt-space-3, .75rem)}.kpt-data-view__content[data-layout=list]{display:flex;flex-direction:column;gap:var(--%NS%kpt-space-2, .5rem)}.kpt-data-view__content[data-layout=grid]{display:grid;gap:var(--%NS%_gap);grid-template-columns:repeat(auto-fill,minmax(var(--%NS%_min, 10rem),1fr))}.kpt-data-view__content[data-layout=grid][data-columns]{grid-template-columns:repeat(auto-fill,minmax(max(var(--%NS%_min, 10rem),(100% - (var(--%NS%_cols) - 1) * var(--%NS%_gap)) / var(--%NS%_cols)),1fr))}.kpt-data-view__item{border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);padding:var(--%NS%kpt-space-3, .75rem);background:var(--%NS%kpt-color-surface-raised)}.kpt-data-view__empty{padding:var(--%NS%kpt-space-6, 1.5rem);text-align:center;color:var(--%NS%kpt-color-on-surface-muted)}.kpt-data-view .kpt-paginator{margin-top:var(--%NS%kpt-space-3, .75rem);flex-wrap:wrap}}\n"], encapsulation: 2 }); }
|
|
11143
11778
|
}
|
|
11144
11779
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptDataView, [{
|
|
11145
11780
|
type: Component,
|
|
@@ -11147,13 +11782,28 @@ class KptDataView {
|
|
|
11147
11782
|
<div class="kpt-data-view">
|
|
11148
11783
|
<div class="kpt-data-view__toolbar">
|
|
11149
11784
|
<div class="kpt-data-view__count">{{ i18n.t('dataView.count', { count: items().length }) }}</div>
|
|
11150
|
-
<div class="kpt-data-
|
|
11151
|
-
|
|
11152
|
-
|
|
11785
|
+
<div class="kpt-data-view__controls">
|
|
11786
|
+
@if (showColumns()) {
|
|
11787
|
+
<div class="kpt-data-view__columns" role="group" [attr.aria-label]="i18n.t('dataView.columns')">
|
|
11788
|
+
@for (n of gridColumnsOptions(); track n) {
|
|
11789
|
+
<button type="button" [class.is-active]="gridColumns() === n" [attr.aria-pressed]="gridColumns() === n" (click)="gridColumns.set(n)"><kpt-icon name="grid-dots" />{{ n }}</button>
|
|
11790
|
+
}
|
|
11791
|
+
</div>
|
|
11792
|
+
}
|
|
11793
|
+
<div class="kpt-data-view__switch">
|
|
11794
|
+
<button type="button" [class.is-active]="layout() === 'list'" [attr.aria-pressed]="layout() === 'list'" (click)="layout.set('list')" [attr.aria-label]="i18n.t('dataView.list')"><kpt-icon name="list" /></button>
|
|
11795
|
+
<button type="button" [class.is-active]="layout() === 'grid'" [attr.aria-pressed]="layout() === 'grid'" (click)="layout.set('grid')" [attr.aria-label]="i18n.t('dataView.grid')"><kpt-icon name="layout-grid" /></button>
|
|
11796
|
+
</div>
|
|
11153
11797
|
</div>
|
|
11154
11798
|
</div>
|
|
11155
11799
|
|
|
11156
|
-
<div
|
|
11800
|
+
<div
|
|
11801
|
+
class="kpt-data-view__content"
|
|
11802
|
+
[attr.data-layout]="layout()"
|
|
11803
|
+
[attr.data-columns]="gridColumns() ? '' : null"
|
|
11804
|
+
[style.--_min]="gridMinWidth()"
|
|
11805
|
+
[style.--_cols]="gridColumns() || null"
|
|
11806
|
+
>
|
|
11157
11807
|
@for (item of pageItems(); track $index) {
|
|
11158
11808
|
<div class="kpt-data-view__item">
|
|
11159
11809
|
<ng-container [ngTemplateOutlet]="itemTpl()" [ngTemplateOutletContext]="{ $implicit: item, index: $index }" />
|
|
@@ -11164,46 +11814,59 @@ class KptDataView {
|
|
|
11164
11814
|
</div>
|
|
11165
11815
|
|
|
11166
11816
|
@if (showPager()) {
|
|
11167
|
-
<kpt-paginator [length]="items().length" [(pageIndex)]="pageIndex" [pageSize]="pageSize
|
|
11817
|
+
<kpt-paginator [length]="items().length" [(pageIndex)]="pageIndex" [(pageSize)]="pageSize" [pageSizeOptions]="pagerSizeOptions()" />
|
|
11168
11818
|
}
|
|
11169
11819
|
</div>
|
|
11170
|
-
`, host: { class: 'kpt-data-view-host' }, styles: ["@layer kpt.components{.kpt-data-view-host{display:block}.kpt-data-view__toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--kpt-space-3, .75rem)}.kpt-data-view__count{color:var(--kpt-color-on-surface-muted);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-data-view__switch{display:inline-flex;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);overflow:hidden}.kpt-data-view__switch button{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border:0;background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface-muted);cursor:pointer}.kpt-data-view__switch button.is-active{background:var(--kpt-color-primary);color:var(--kpt-color-on-primary)}.kpt-data-view__content[data-layout=list]{display:flex;flex-direction:column;gap:var(--kpt-space-2, .5rem)}.kpt-data-view__content[data-layout=grid]{display:grid;grid-template-columns:repeat(auto-fill,minmax(10rem,1fr))
|
|
11171
|
-
}], null, { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }, { type: i0.Output, args: ["layoutChange"] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], paginated: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginated", required: false }] }], itemTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], pageIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageIndex", required: false }] }, { type: i0.Output, args: ["pageIndexChange"] }] }); })();
|
|
11172
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDataView, { className: "KptDataView", filePath: "lib/data-view/data-view.component.ts", lineNumber:
|
|
11820
|
+
`, host: { class: 'kpt-data-view-host' }, styles: ["@layer kpt.components{.kpt-data-view-host{display:block}.kpt-data-view__toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--kpt-space-3, .75rem)}.kpt-data-view__count{color:var(--kpt-color-on-surface-muted);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-data-view__controls{display:inline-flex;align-items:center;gap:var(--kpt-space-2, .5rem)}.kpt-data-view__switch,.kpt-data-view__columns{display:inline-flex;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);overflow:hidden}.kpt-data-view__switch button,.kpt-data-view__columns button{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border:0;background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface-muted);cursor:pointer}.kpt-data-view__switch button.is-active,.kpt-data-view__columns button.is-active{background:var(--kpt-color-primary);color:var(--kpt-color-on-primary)}.kpt-data-view__columns button{gap:var(--kpt-space-1, .25rem);width:auto;padding-inline:var(--kpt-space-2, .5rem);font-size:var(--kpt-font-size-sm, .875rem);font-weight:var(--kpt-font-weight-medium, 500)}.kpt-data-view__content{--_gap: var(--kpt-space-3, .75rem)}.kpt-data-view__content[data-layout=list]{display:flex;flex-direction:column;gap:var(--kpt-space-2, .5rem)}.kpt-data-view__content[data-layout=grid]{display:grid;gap:var(--_gap);grid-template-columns:repeat(auto-fill,minmax(var(--_min, 10rem),1fr))}.kpt-data-view__content[data-layout=grid][data-columns]{grid-template-columns:repeat(auto-fill,minmax(max(var(--_min, 10rem),(100% - (var(--_cols) - 1) * var(--_gap)) / var(--_cols)),1fr))}.kpt-data-view__item{border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);padding:var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-raised)}.kpt-data-view__empty{padding:var(--kpt-space-6, 1.5rem);text-align:center;color:var(--kpt-color-on-surface-muted)}.kpt-data-view .kpt-paginator{margin-top:var(--kpt-space-3, .75rem);flex-wrap:wrap}}\n"] }]
|
|
11821
|
+
}], null, { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }, { type: i0.Output, args: ["layoutChange"] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], gridColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "gridColumns", required: false }] }, { type: i0.Output, args: ["gridColumnsChange"] }], gridColumnsOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "gridColumnsOptions", required: false }] }], gridMinWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "gridMinWidth", required: false }] }], paginated: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginated", required: false }] }], itemTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], pageIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageIndex", required: false }] }, { type: i0.Output, args: ["pageIndexChange"] }] }); })();
|
|
11822
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDataView, { className: "KptDataView", filePath: "lib/data-view/data-view.component.ts", lineNumber: 64 }); })();
|
|
11173
11823
|
|
|
11174
|
-
const _c0$
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
i0.ɵɵ
|
|
11824
|
+
const _c0$c = () => ({ side: "source" });
|
|
11825
|
+
const _c1$3 = () => ({ side: "target" });
|
|
11826
|
+
const _c2$2 = a0 => ({ $implicit: a0 });
|
|
11827
|
+
function KptPickList_ng_template_14_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
11828
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
11829
|
+
i0.ɵɵelementStart(0, "li", 11);
|
|
11830
|
+
i0.ɵɵlistener("click", function KptPickList_ng_template_14_For_5_Template_li_click_0_listener() { const item_r5 = i0.ɵɵrestoreView(_r4).$implicit; const side_r2 = i0.ɵɵnextContext().side; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggle(side_r2, item_r5)); })("dblclick", function KptPickList_ng_template_14_For_5_Template_li_dblclick_0_listener() { const item_r5 = i0.ɵɵrestoreView(_r4).$implicit; const side_r2 = i0.ɵɵnextContext().side; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.moveOne(side_r2, item_r5)); })("dragstart", function KptPickList_ng_template_14_For_5_Template_li_dragstart_0_listener($event) { const ɵ$index_38_r6 = i0.ɵɵrestoreView(_r4).$index; const side_r2 = i0.ɵɵnextContext().side; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDragStart(side_r2, ɵ$index_38_r6, $event)); })("dragover", function KptPickList_ng_template_14_For_5_Template_li_dragover_0_listener($event) { const ɵ$index_38_r6 = i0.ɵɵrestoreView(_r4).$index; const side_r2 = i0.ɵɵnextContext().side; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDragOver(side_r2, ɵ$index_38_r6, $event)); })("dragleave", function KptPickList_ng_template_14_For_5_Template_li_dragleave_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.over.set(null)); })("drop", function KptPickList_ng_template_14_For_5_Template_li_drop_0_listener($event) { const ɵ$index_38_r6 = i0.ɵɵrestoreView(_r4).$index; const side_r2 = i0.ɵɵnextContext().side; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDrop(side_r2, ɵ$index_38_r6, $event)); })("dragend", function KptPickList_ng_template_14_For_5_Template_li_dragend_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.clearDrag()); });
|
|
11831
|
+
i0.ɵɵelementContainer(1, 2);
|
|
11180
11832
|
i0.ɵɵelementEnd();
|
|
11181
11833
|
} if (rf & 2) {
|
|
11182
|
-
const
|
|
11834
|
+
const item_r5 = ctx.$implicit;
|
|
11835
|
+
const ɵ$index_38_r6 = ctx.$index;
|
|
11836
|
+
const side_r2 = i0.ɵɵnextContext().side;
|
|
11183
11837
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
11184
|
-
i0.ɵɵclassProp("is-selected", ctx_r2.
|
|
11838
|
+
i0.ɵɵclassProp("is-selected", ctx_r2.selectionOf(side_r2).has(item_r5))("is-dragging", ctx_r2.isDragging(side_r2, ɵ$index_38_r6))("kpt-pick-list__item--draggable", ctx_r2.dragdrop())("kpt-pick-list__item--dragover", ctx_r2.isOver(side_r2, ɵ$index_38_r6));
|
|
11839
|
+
i0.ɵɵattribute("draggable", ctx_r2.dragdrop() ? true : null);
|
|
11185
11840
|
i0.ɵɵadvance();
|
|
11186
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.itemTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction1(
|
|
11841
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.itemTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction1(11, _c2$2, item_r5));
|
|
11187
11842
|
} }
|
|
11188
|
-
function
|
|
11189
|
-
const
|
|
11190
|
-
i0.ɵɵelementStart(0, "
|
|
11191
|
-
i0.ɵɵ
|
|
11192
|
-
i0.ɵɵelementContainer(1, 10);
|
|
11843
|
+
function KptPickList_ng_template_14_Template(rf, ctx) { if (rf & 1) {
|
|
11844
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
11845
|
+
i0.ɵɵelementStart(0, "div", 7)(1, "div", 8);
|
|
11846
|
+
i0.ɵɵtext(2);
|
|
11193
11847
|
i0.ɵɵelementEnd();
|
|
11848
|
+
i0.ɵɵelementStart(3, "ul", 9);
|
|
11849
|
+
i0.ɵɵlistener("dragover", function KptPickList_ng_template_14_Template_ul_dragover_3_listener($event) { const side_r2 = i0.ɵɵrestoreView(_r1).side; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onListDragOver(side_r2, $event)); })("dragleave", function KptPickList_ng_template_14_Template_ul_dragleave_3_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.listOver.set(null)); })("drop", function KptPickList_ng_template_14_Template_ul_drop_3_listener($event) { const side_r2 = i0.ɵɵrestoreView(_r1).side; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onListDrop(side_r2, $event)); });
|
|
11850
|
+
i0.ɵɵrepeaterCreate(4, KptPickList_ng_template_14_For_5_Template, 2, 13, "li", 10, i0.ɵɵrepeaterTrackByIndex);
|
|
11851
|
+
i0.ɵɵelementEnd()();
|
|
11194
11852
|
} if (rf & 2) {
|
|
11195
|
-
const
|
|
11853
|
+
const side_r2 = ctx.side;
|
|
11196
11854
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
11197
|
-
i0.ɵɵ
|
|
11855
|
+
i0.ɵɵadvance(2);
|
|
11856
|
+
i0.ɵɵtextInterpolate(ctx_r2.headerOf(side_r2));
|
|
11857
|
+
i0.ɵɵadvance();
|
|
11858
|
+
i0.ɵɵclassProp("is-dragover", ctx_r2.listOver() === side_r2);
|
|
11198
11859
|
i0.ɵɵadvance();
|
|
11199
|
-
i0.ɵɵ
|
|
11860
|
+
i0.ɵɵrepeater(ctx_r2.listOf(side_r2));
|
|
11200
11861
|
} }
|
|
11201
11862
|
/**
|
|
11202
11863
|
* PickList — transfer elementów między dwiema listami (źródło ↔ cel).
|
|
11203
11864
|
* Szablon elementu przez projekcję `<ng-template let-item>`.
|
|
11865
|
+
* Dwuklik przerzuca pojedynczy element na drugą stronę; z `dragdrop` dochodzi przeciąganie
|
|
11866
|
+
* (porządkowanie wewnątrz panelu i przenoszenie na konkretną pozycję drugiego panelu).
|
|
11204
11867
|
*
|
|
11205
11868
|
* @example
|
|
11206
|
-
* <kpt-pick-list [(source)]="available" [(target)]="selected" sourceHeader="Dostępne" targetHeader="Wybrane">
|
|
11869
|
+
* <kpt-pick-list [(source)]="available" [(target)]="selected" sourceHeader="Dostępne" targetHeader="Wybrane" dragdrop>
|
|
11207
11870
|
* <ng-template let-item>{{ item.name }}</ng-template>
|
|
11208
11871
|
* </kpt-pick-list>
|
|
11209
11872
|
*/
|
|
@@ -11219,6 +11882,8 @@ class KptPickList {
|
|
|
11219
11882
|
/** Nagłówek listy docelowej; bez wartości używa i18n (`pickList.selected`). */
|
|
11220
11883
|
this.targetHeader = input(/* @ts-ignore */
|
|
11221
11884
|
...(ngDevMode ? [undefined, { debugName: "targetHeader" }] : /* istanbul ignore next */ []));
|
|
11885
|
+
/** Umożliwia porządkowanie i przenoszenie elementów metodą przeciągnij-i-upuść. */
|
|
11886
|
+
this.dragdrop = input(false, { ...(ngDevMode ? { debugName: "dragdrop" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
11222
11887
|
this.itemTpl = contentChild.required(TemplateRef, /* @ts-ignore */
|
|
11223
11888
|
...(ngDevMode ? [{ debugName: "itemTpl" }] : /* istanbul ignore next */ []));
|
|
11224
11889
|
this.i18n = inject(KptI18n);
|
|
@@ -11230,9 +11895,44 @@ class KptPickList {
|
|
|
11230
11895
|
...(ngDevMode ? [{ debugName: "selSource" }] : /* istanbul ignore next */ []));
|
|
11231
11896
|
this.selTarget = signal(new Set(), /* @ts-ignore */
|
|
11232
11897
|
...(ngDevMode ? [{ debugName: "selTarget" }] : /* istanbul ignore next */ []));
|
|
11898
|
+
/** Przeciągany element — strona i pozycja w jej tablicy. */
|
|
11899
|
+
this.drag = signal(null, /* @ts-ignore */
|
|
11900
|
+
...(ngDevMode ? [{ debugName: "drag" }] : /* istanbul ignore next */ []));
|
|
11901
|
+
/** Element pod kursorem — rysuje wskaźnik miejsca upuszczenia. */
|
|
11902
|
+
this.over = signal(null, /* @ts-ignore */
|
|
11903
|
+
...(ngDevMode ? [{ debugName: "over" }] : /* istanbul ignore next */ []));
|
|
11904
|
+
/** Panel, nad którego pustym obszarem jest kursor — upuszczenie tam dopina na koniec. */
|
|
11905
|
+
this.listOver = signal(null, /* @ts-ignore */
|
|
11906
|
+
...(ngDevMode ? [{ debugName: "listOver" }] : /* istanbul ignore next */ []));
|
|
11907
|
+
}
|
|
11908
|
+
listOf(side) {
|
|
11909
|
+
return side === 'source' ? this.source() : this.target();
|
|
11910
|
+
}
|
|
11911
|
+
selectionOf(side) {
|
|
11912
|
+
return side === 'source' ? this.selSource() : this.selTarget();
|
|
11913
|
+
}
|
|
11914
|
+
headerOf(side) {
|
|
11915
|
+
return side === 'source' ? this.effectiveSourceHeader() : this.effectiveTargetHeader();
|
|
11916
|
+
}
|
|
11917
|
+
isDragging(side, index) {
|
|
11918
|
+
const d = this.drag();
|
|
11919
|
+
return d !== null && d.side === side && d.index === index;
|
|
11920
|
+
}
|
|
11921
|
+
isOver(side, index) {
|
|
11922
|
+
const o = this.over();
|
|
11923
|
+
return o !== null && o.side === side && o.index === index && !this.isDragging(side, index);
|
|
11924
|
+
}
|
|
11925
|
+
modelOf(side) {
|
|
11926
|
+
return side === 'source' ? this.source : this.target;
|
|
11927
|
+
}
|
|
11928
|
+
selectionSignal(side) {
|
|
11929
|
+
return side === 'source' ? this.selSource : this.selTarget;
|
|
11930
|
+
}
|
|
11931
|
+
other(side) {
|
|
11932
|
+
return side === 'source' ? 'target' : 'source';
|
|
11233
11933
|
}
|
|
11234
11934
|
toggle(side, item) {
|
|
11235
|
-
const sig =
|
|
11935
|
+
const sig = this.selectionSignal(side);
|
|
11236
11936
|
const next = new Set(sig());
|
|
11237
11937
|
if (next.has(item))
|
|
11238
11938
|
next.delete(item);
|
|
@@ -11241,9 +11941,9 @@ class KptPickList {
|
|
|
11241
11941
|
sig.set(next);
|
|
11242
11942
|
}
|
|
11243
11943
|
move(from, all) {
|
|
11244
|
-
const fromModel =
|
|
11245
|
-
const toModel =
|
|
11246
|
-
const sel =
|
|
11944
|
+
const fromModel = this.modelOf(from);
|
|
11945
|
+
const toModel = this.modelOf(this.other(from));
|
|
11946
|
+
const sel = this.selectionSignal(from);
|
|
11247
11947
|
const moving = all ? fromModel() : fromModel().filter((i) => sel().has(i));
|
|
11248
11948
|
if (!moving.length)
|
|
11249
11949
|
return;
|
|
@@ -11251,46 +11951,128 @@ class KptPickList {
|
|
|
11251
11951
|
toModel.set([...toModel(), ...moving]);
|
|
11252
11952
|
sel.set(new Set());
|
|
11253
11953
|
}
|
|
11954
|
+
/** Dwuklik: przenosi wyłącznie klikniętą pozycję, niezależnie od zaznaczenia. */
|
|
11955
|
+
moveOne(from, item) {
|
|
11956
|
+
const index = this.listOf(from).indexOf(item);
|
|
11957
|
+
if (index === -1)
|
|
11958
|
+
return;
|
|
11959
|
+
const to = this.other(from);
|
|
11960
|
+
this.transfer(from, index, to, this.listOf(to).length);
|
|
11961
|
+
}
|
|
11962
|
+
onDragStart(side, index, event) {
|
|
11963
|
+
if (!this.dragdrop())
|
|
11964
|
+
return;
|
|
11965
|
+
this.drag.set({ side, index });
|
|
11966
|
+
event.dataTransfer?.setData('text/plain', String(index));
|
|
11967
|
+
if (event.dataTransfer)
|
|
11968
|
+
event.dataTransfer.effectAllowed = 'move';
|
|
11969
|
+
}
|
|
11970
|
+
onDragOver(side, index, event) {
|
|
11971
|
+
if (this.drag() === null)
|
|
11972
|
+
return;
|
|
11973
|
+
// Zatrzymujemy propagację, żeby `<ul>` nie uznał, że kursor jest nad pustym obszarem.
|
|
11974
|
+
event.preventDefault();
|
|
11975
|
+
event.stopPropagation();
|
|
11976
|
+
this.over.set({ side, index });
|
|
11977
|
+
this.listOver.set(null);
|
|
11978
|
+
}
|
|
11979
|
+
onDrop(side, index, event) {
|
|
11980
|
+
event.preventDefault();
|
|
11981
|
+
event.stopPropagation();
|
|
11982
|
+
const from = this.drag();
|
|
11983
|
+
this.clearDrag();
|
|
11984
|
+
if (from === null)
|
|
11985
|
+
return;
|
|
11986
|
+
if (from.side !== side) {
|
|
11987
|
+
this.transfer(from.side, from.index, side, index);
|
|
11988
|
+
return;
|
|
11989
|
+
}
|
|
11990
|
+
if (from.index === index)
|
|
11991
|
+
return;
|
|
11992
|
+
// Indeks celu liczony na tablicy sprzed usunięcia — element ląduje na pozycji tego,
|
|
11993
|
+
// na który go upuszczono (ten sam wzór co przestawianie kolumn w kpt-data-table).
|
|
11994
|
+
const arr = [...this.listOf(side)];
|
|
11995
|
+
const [moved] = arr.splice(from.index, 1);
|
|
11996
|
+
arr.splice(index, 0, moved);
|
|
11997
|
+
this.modelOf(side).set(arr);
|
|
11998
|
+
}
|
|
11999
|
+
onListDragOver(side, event) {
|
|
12000
|
+
if (this.drag() === null)
|
|
12001
|
+
return;
|
|
12002
|
+
event.preventDefault();
|
|
12003
|
+
this.listOver.set(side);
|
|
12004
|
+
this.over.set(null);
|
|
12005
|
+
}
|
|
12006
|
+
onListDrop(side, event) {
|
|
12007
|
+
event.preventDefault();
|
|
12008
|
+
const from = this.drag();
|
|
12009
|
+
this.clearDrag();
|
|
12010
|
+
if (from === null)
|
|
12011
|
+
return;
|
|
12012
|
+
if (from.side !== side) {
|
|
12013
|
+
this.transfer(from.side, from.index, side, this.listOf(side).length);
|
|
12014
|
+
return;
|
|
12015
|
+
}
|
|
12016
|
+
const arr = [...this.listOf(side)];
|
|
12017
|
+
const [moved] = arr.splice(from.index, 1);
|
|
12018
|
+
arr.push(moved);
|
|
12019
|
+
this.modelOf(side).set(arr);
|
|
12020
|
+
}
|
|
12021
|
+
clearDrag() {
|
|
12022
|
+
this.drag.set(null);
|
|
12023
|
+
this.over.set(null);
|
|
12024
|
+
this.listOver.set(null);
|
|
12025
|
+
}
|
|
12026
|
+
/** Przenosi jeden element między panelami, wstawiając go pod wskazanym indeksem. */
|
|
12027
|
+
transfer(fromSide, fromIndex, toSide, toIndex) {
|
|
12028
|
+
const fromArr = [...this.listOf(fromSide)];
|
|
12029
|
+
const [moved] = fromArr.splice(fromIndex, 1);
|
|
12030
|
+
if (moved === undefined)
|
|
12031
|
+
return;
|
|
12032
|
+
const toArr = [...this.listOf(toSide)];
|
|
12033
|
+
toArr.splice(toIndex, 0, moved);
|
|
12034
|
+
this.modelOf(fromSide).set(fromArr);
|
|
12035
|
+
this.modelOf(toSide).set(toArr);
|
|
12036
|
+
// Element opuszcza panel — jego zaznaczenie po tamtej stronie przestaje cokolwiek znaczyć.
|
|
12037
|
+
const sel = this.selectionSignal(fromSide);
|
|
12038
|
+
if (sel().has(moved)) {
|
|
12039
|
+
const next = new Set(sel());
|
|
12040
|
+
next.delete(moved);
|
|
12041
|
+
sel.set(next);
|
|
12042
|
+
}
|
|
12043
|
+
}
|
|
11254
12044
|
static { this.ɵfac = function KptPickList_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptPickList)(); }; }
|
|
11255
12045
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptPickList, selectors: [["kpt-pick-list"]], contentQueries: function KptPickList_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
11256
12046
|
i0.ɵɵcontentQuerySignal(dirIndex, ctx.itemTpl, TemplateRef, 5);
|
|
11257
12047
|
} if (rf & 2) {
|
|
11258
12048
|
i0.ɵɵqueryAdvance();
|
|
11259
|
-
} }, hostAttrs: [1, "kpt-pick-list-host"], inputs: { source: [1, "source"], target: [1, "target"], sourceHeader: [1, "sourceHeader"], targetHeader: [1, "targetHeader"] }, outputs: { source: "sourceChange", target: "targetChange" }, decls:
|
|
11260
|
-
i0.ɵɵelementStart(0, "div",
|
|
11261
|
-
i0.ɵɵ
|
|
11262
|
-
i0.ɵɵ
|
|
11263
|
-
i0.ɵɵ
|
|
11264
|
-
i0.ɵɵ
|
|
11265
|
-
i0.ɵɵelementEnd()();
|
|
11266
|
-
i0.ɵɵelementStart(7, "div", 5)(8, "button", 6);
|
|
11267
|
-
i0.ɵɵlistener("click", function KptPickList_Template_button_click_8_listener() { return ctx.move("source", true); });
|
|
11268
|
-
i0.ɵɵelement(9, "kpt-icon", 7)(10, "kpt-icon", 7);
|
|
12049
|
+
} }, hostAttrs: [1, "kpt-pick-list-host"], inputs: { source: [1, "source"], target: [1, "target"], sourceHeader: [1, "sourceHeader"], targetHeader: [1, "targetHeader"], dragdrop: [1, "dragdrop"] }, outputs: { source: "sourceChange", target: "targetChange" }, decls: 16, vars: 10, consts: [["col", ""], [1, "kpt-pick-list"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "kpt-pick-list__controls"], ["type", "button", 3, "click"], ["name", "chevron-right"], ["name", "chevron-left"], [1, "kpt-pick-list__col"], [1, "kpt-pick-list__header"], [1, "kpt-pick-list__items", 3, "dragover", "dragleave", "drop"], [1, "kpt-pick-list__item", 3, "is-selected", "is-dragging", "kpt-pick-list__item--draggable", "kpt-pick-list__item--dragover"], [1, "kpt-pick-list__item", 3, "click", "dblclick", "dragstart", "dragover", "dragleave", "drop", "dragend"]], template: function KptPickList_Template(rf, ctx) { if (rf & 1) {
|
|
12050
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
12051
|
+
i0.ɵɵelementContainer(1, 2);
|
|
12052
|
+
i0.ɵɵelementStart(2, "div", 3)(3, "button", 4);
|
|
12053
|
+
i0.ɵɵlistener("click", function KptPickList_Template_button_click_3_listener() { return ctx.move("source", true); });
|
|
12054
|
+
i0.ɵɵelement(4, "kpt-icon", 5)(5, "kpt-icon", 5);
|
|
11269
12055
|
i0.ɵɵelementEnd();
|
|
11270
|
-
i0.ɵɵelementStart(
|
|
11271
|
-
i0.ɵɵlistener("click", function
|
|
11272
|
-
i0.ɵɵelement(
|
|
12056
|
+
i0.ɵɵelementStart(6, "button", 4);
|
|
12057
|
+
i0.ɵɵlistener("click", function KptPickList_Template_button_click_6_listener() { return ctx.move("source", false); });
|
|
12058
|
+
i0.ɵɵelement(7, "kpt-icon", 5);
|
|
11273
12059
|
i0.ɵɵelementEnd();
|
|
11274
|
-
i0.ɵɵelementStart(
|
|
11275
|
-
i0.ɵɵlistener("click", function
|
|
11276
|
-
i0.ɵɵelement(
|
|
12060
|
+
i0.ɵɵelementStart(8, "button", 4);
|
|
12061
|
+
i0.ɵɵlistener("click", function KptPickList_Template_button_click_8_listener() { return ctx.move("target", false); });
|
|
12062
|
+
i0.ɵɵelement(9, "kpt-icon", 6);
|
|
11277
12063
|
i0.ɵɵelementEnd();
|
|
11278
|
-
i0.ɵɵelementStart(
|
|
11279
|
-
i0.ɵɵlistener("click", function
|
|
11280
|
-
i0.ɵɵelement(
|
|
12064
|
+
i0.ɵɵelementStart(10, "button", 4);
|
|
12065
|
+
i0.ɵɵlistener("click", function KptPickList_Template_button_click_10_listener() { return ctx.move("target", true); });
|
|
12066
|
+
i0.ɵɵelement(11, "kpt-icon", 6)(12, "kpt-icon", 6);
|
|
11281
12067
|
i0.ɵɵelementEnd()();
|
|
11282
|
-
i0.ɵɵ
|
|
11283
|
-
i0.ɵɵtext(20);
|
|
12068
|
+
i0.ɵɵelementContainer(13, 2);
|
|
11284
12069
|
i0.ɵɵelementEnd();
|
|
11285
|
-
i0.ɵɵ
|
|
11286
|
-
i0.ɵɵrepeaterCreate(22, KptPickList_For_23_Template, 2, 6, "li", 4, i0.ɵɵrepeaterTrackByIndex);
|
|
11287
|
-
i0.ɵɵelementEnd()()();
|
|
12070
|
+
i0.ɵɵtemplate(14, KptPickList_ng_template_14_Template, 6, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
11288
12071
|
} if (rf & 2) {
|
|
11289
|
-
i0.ɵɵ
|
|
11290
|
-
i0.ɵɵ
|
|
12072
|
+
const col_r7 = i0.ɵɵreference(15);
|
|
12073
|
+
i0.ɵɵadvance();
|
|
12074
|
+
i0.ɵɵproperty("ngTemplateOutlet", col_r7)("ngTemplateOutletContext", i0.ɵɵpureFunction0(8, _c0$c));
|
|
11291
12075
|
i0.ɵɵadvance(2);
|
|
11292
|
-
i0.ɵɵrepeater(ctx.source());
|
|
11293
|
-
i0.ɵɵadvance(3);
|
|
11294
12076
|
i0.ɵɵattribute("aria-label", ctx.i18n.t("pickList.moveAllRight"));
|
|
11295
12077
|
i0.ɵɵadvance(3);
|
|
11296
12078
|
i0.ɵɵattribute("aria-label", ctx.i18n.t("pickList.moveRight"));
|
|
@@ -11298,26 +12080,15 @@ class KptPickList {
|
|
|
11298
12080
|
i0.ɵɵattribute("aria-label", ctx.i18n.t("pickList.moveLeft"));
|
|
11299
12081
|
i0.ɵɵadvance(2);
|
|
11300
12082
|
i0.ɵɵattribute("aria-label", ctx.i18n.t("pickList.moveAllLeft"));
|
|
11301
|
-
i0.ɵɵadvance(
|
|
11302
|
-
i0.ɵɵ
|
|
11303
|
-
|
|
11304
|
-
i0.ɵɵrepeater(ctx.target());
|
|
11305
|
-
} }, dependencies: [NgTemplateOutlet, KptIcon], styles: ["@layer kpt.components{.kpt-pick-list-host{display:block}.kpt-pick-list{display:flex;align-items:stretch;gap:var(--%NS%kpt-space-3, .75rem)}.kpt-pick-list__col{flex:1;min-width:0;display:flex;flex-direction:column;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);overflow:hidden}.kpt-pick-list__header{padding:var(--%NS%kpt-space-2, .5rem) var(--%NS%kpt-space-3, .75rem);background:var(--%NS%kpt-color-surface-variant);border-bottom:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);font-weight:var(--%NS%kpt-font-weight-semibold, 600);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-pick-list__items{list-style:none;margin:0;padding:var(--%NS%kpt-space-1, .25rem);min-height:8rem;max-height:14rem;overflow-y:auto;flex:1}.kpt-pick-list__item{padding:var(--%NS%kpt-space-2, .5rem) var(--%NS%kpt-space-3, .75rem);border-radius:var(--%NS%kpt-radius-sm, .25rem);font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer}.kpt-pick-list__item:hover{background:var(--%NS%kpt-color-muted)}.kpt-pick-list__item.is-selected{background:color-mix(in oklch,var(--%NS%kpt-color-primary) 16%,transparent);color:var(--%NS%kpt-color-primary)}.kpt-pick-list__controls{display:flex;flex-direction:column;justify-content:center;gap:var(--%NS%kpt-space-2, .5rem)}.kpt-pick-list__controls button{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;padding:0;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);background:var(--%NS%kpt-color-surface-raised);color:var(--%NS%kpt-color-on-surface);cursor:pointer}.kpt-pick-list__controls button:hover{background:var(--%NS%kpt-color-muted)}.kpt-pick-list__controls button .kpt-icon-host+.kpt-icon-host{margin-left:-.5rem}}\n"], encapsulation: 2 }); }
|
|
12083
|
+
i0.ɵɵadvance(3);
|
|
12084
|
+
i0.ɵɵproperty("ngTemplateOutlet", col_r7)("ngTemplateOutletContext", i0.ɵɵpureFunction0(9, _c1$3));
|
|
12085
|
+
} }, dependencies: [NgTemplateOutlet, KptIcon], styles: ["@layer kpt.components{.kpt-pick-list-host{display:block}.kpt-pick-list{display:flex;align-items:stretch;gap:var(--%NS%kpt-space-3, .75rem)}.kpt-pick-list__col{flex:1;min-width:0;display:flex;flex-direction:column;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);overflow:hidden}.kpt-pick-list__header{padding:var(--%NS%kpt-space-2, .5rem) var(--%NS%kpt-space-3, .75rem);background:var(--%NS%kpt-color-surface-variant);border-bottom:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);font-weight:var(--%NS%kpt-font-weight-semibold, 600);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-pick-list__items{list-style:none;margin:0;padding:var(--%NS%kpt-space-1, .25rem);min-height:8rem;max-height:14rem;overflow-y:auto;flex:1}.kpt-pick-list__items.is-dragover{background:var(--%NS%kpt-color-muted)}.kpt-pick-list__item{padding:var(--%NS%kpt-space-2, .5rem) var(--%NS%kpt-space-3, .75rem);border-radius:var(--%NS%kpt-radius-sm, .25rem);font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer}.kpt-pick-list__item:hover{background:var(--%NS%kpt-color-muted)}.kpt-pick-list__item.is-selected{background:color-mix(in oklch,var(--%NS%kpt-color-primary) 16%,transparent);color:var(--%NS%kpt-color-primary)}.kpt-pick-list__item--draggable{cursor:grab;-webkit-user-select:none;user-select:none}.kpt-pick-list__item--%NS%draggable:active{cursor:grabbing}.kpt-pick-list__item--dragover{box-shadow:inset 0 2px 0 0 var(--%NS%kpt-color-primary)}.kpt-pick-list__item.is-dragging{opacity:.5}.kpt-pick-list__controls{display:flex;flex-direction:column;justify-content:center;gap:var(--%NS%kpt-space-2, .5rem)}.kpt-pick-list__controls button{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;padding:0;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);background:var(--%NS%kpt-color-surface-raised);color:var(--%NS%kpt-color-on-surface);cursor:pointer}.kpt-pick-list__controls button:hover{background:var(--%NS%kpt-color-muted)}.kpt-pick-list__controls button .kpt-icon-host+.kpt-icon-host{margin-left:-.5rem}}\n"], encapsulation: 2 }); }
|
|
11306
12086
|
}
|
|
11307
12087
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptPickList, [{
|
|
11308
12088
|
type: Component,
|
|
11309
12089
|
args: [{ selector: 'kpt-pick-list', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgTemplateOutlet, KptIcon], template: `
|
|
11310
12090
|
<div class="kpt-pick-list">
|
|
11311
|
-
<
|
|
11312
|
-
<div class="kpt-pick-list__header">{{ effectiveSourceHeader() }}</div>
|
|
11313
|
-
<ul class="kpt-pick-list__items">
|
|
11314
|
-
@for (item of source(); track $index) {
|
|
11315
|
-
<li class="kpt-pick-list__item" [class.is-selected]="selSource().has(item)" (click)="toggle('source', item)">
|
|
11316
|
-
<ng-container [ngTemplateOutlet]="itemTpl()" [ngTemplateOutletContext]="{ $implicit: item }" />
|
|
11317
|
-
</li>
|
|
11318
|
-
}
|
|
11319
|
-
</ul>
|
|
11320
|
-
</div>
|
|
12091
|
+
<ng-container [ngTemplateOutlet]="col" [ngTemplateOutletContext]="{ side: 'source' }" />
|
|
11321
12092
|
|
|
11322
12093
|
<div class="kpt-pick-list__controls">
|
|
11323
12094
|
<button type="button" (click)="move('source', true)" [attr.aria-label]="i18n.t('pickList.moveAllRight')"><kpt-icon name="chevron-right" /><kpt-icon name="chevron-right" /></button>
|
|
@@ -11326,22 +12097,46 @@ class KptPickList {
|
|
|
11326
12097
|
<button type="button" (click)="move('target', true)" [attr.aria-label]="i18n.t('pickList.moveAllLeft')"><kpt-icon name="chevron-left" /><kpt-icon name="chevron-left" /></button>
|
|
11327
12098
|
</div>
|
|
11328
12099
|
|
|
12100
|
+
<ng-container [ngTemplateOutlet]="col" [ngTemplateOutletContext]="{ side: 'target' }" />
|
|
12101
|
+
</div>
|
|
12102
|
+
|
|
12103
|
+
<ng-template #col let-side="side">
|
|
11329
12104
|
<div class="kpt-pick-list__col">
|
|
11330
|
-
<div class="kpt-pick-list__header">{{
|
|
11331
|
-
<ul
|
|
11332
|
-
|
|
11333
|
-
|
|
12105
|
+
<div class="kpt-pick-list__header">{{ headerOf(side) }}</div>
|
|
12106
|
+
<ul
|
|
12107
|
+
class="kpt-pick-list__items"
|
|
12108
|
+
[class.is-dragover]="listOver() === side"
|
|
12109
|
+
(dragover)="onListDragOver(side, $event)"
|
|
12110
|
+
(dragleave)="listOver.set(null)"
|
|
12111
|
+
(drop)="onListDrop(side, $event)"
|
|
12112
|
+
>
|
|
12113
|
+
@for (item of listOf(side); track $index; let i = $index) {
|
|
12114
|
+
<li
|
|
12115
|
+
class="kpt-pick-list__item"
|
|
12116
|
+
[class.is-selected]="selectionOf(side).has(item)"
|
|
12117
|
+
[class.is-dragging]="isDragging(side, i)"
|
|
12118
|
+
[class.kpt-pick-list__item--draggable]="dragdrop()"
|
|
12119
|
+
[class.kpt-pick-list__item--dragover]="isOver(side, i)"
|
|
12120
|
+
[attr.draggable]="dragdrop() ? true : null"
|
|
12121
|
+
(click)="toggle(side, item)"
|
|
12122
|
+
(dblclick)="moveOne(side, item)"
|
|
12123
|
+
(dragstart)="onDragStart(side, i, $event)"
|
|
12124
|
+
(dragover)="onDragOver(side, i, $event)"
|
|
12125
|
+
(dragleave)="over.set(null)"
|
|
12126
|
+
(drop)="onDrop(side, i, $event)"
|
|
12127
|
+
(dragend)="clearDrag()"
|
|
12128
|
+
>
|
|
11334
12129
|
<ng-container [ngTemplateOutlet]="itemTpl()" [ngTemplateOutletContext]="{ $implicit: item }" />
|
|
11335
12130
|
</li>
|
|
11336
12131
|
}
|
|
11337
12132
|
</ul>
|
|
11338
12133
|
</div>
|
|
11339
|
-
</
|
|
11340
|
-
`, host: { class: 'kpt-pick-list-host' }, styles: ["@layer kpt.components{.kpt-pick-list-host{display:block}.kpt-pick-list{display:flex;align-items:stretch;gap:var(--kpt-space-3, .75rem)}.kpt-pick-list__col{flex:1;min-width:0;display:flex;flex-direction:column;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);overflow:hidden}.kpt-pick-list__header{padding:var(--kpt-space-2, .5rem) var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-variant);border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);font-weight:var(--kpt-font-weight-semibold, 600);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-pick-list__items{list-style:none;margin:0;padding:var(--kpt-space-1, .25rem);min-height:8rem;max-height:14rem;overflow-y:auto;flex:1}.kpt-pick-list__item{padding:var(--kpt-space-2, .5rem) var(--kpt-space-3, .75rem);border-radius:var(--kpt-radius-sm, .25rem);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-pick-list__item:hover{background:var(--kpt-color-muted)}.kpt-pick-list__item.is-selected{background:color-mix(in oklch,var(--kpt-color-primary) 16%,transparent);color:var(--kpt-color-primary)}.kpt-pick-list__controls{display:flex;flex-direction:column;justify-content:center;gap:var(--kpt-space-2, .5rem)}.kpt-pick-list__controls button{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;padding:0;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface);cursor:pointer}.kpt-pick-list__controls button:hover{background:var(--kpt-color-muted)}.kpt-pick-list__controls button .kpt-icon-host+.kpt-icon-host{margin-left:-.5rem}}\n"] }]
|
|
11341
|
-
}], null, { source: [{ type: i0.Input, args: [{ isSignal: true, alias: "source", required: false }] }, { type: i0.Output, args: ["sourceChange"] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }, { type: i0.Output, args: ["targetChange"] }], sourceHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "sourceHeader", required: false }] }], targetHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "targetHeader", required: false }] }], itemTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] }); })();
|
|
11342
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptPickList, { className: "KptPickList", filePath: "lib/pick-list/pick-list.component.ts", lineNumber:
|
|
12134
|
+
</ng-template>
|
|
12135
|
+
`, host: { class: 'kpt-pick-list-host' }, styles: ["@layer kpt.components{.kpt-pick-list-host{display:block}.kpt-pick-list{display:flex;align-items:stretch;gap:var(--kpt-space-3, .75rem)}.kpt-pick-list__col{flex:1;min-width:0;display:flex;flex-direction:column;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);overflow:hidden}.kpt-pick-list__header{padding:var(--kpt-space-2, .5rem) var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-variant);border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);font-weight:var(--kpt-font-weight-semibold, 600);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-pick-list__items{list-style:none;margin:0;padding:var(--kpt-space-1, .25rem);min-height:8rem;max-height:14rem;overflow-y:auto;flex:1}.kpt-pick-list__items.is-dragover{background:var(--kpt-color-muted)}.kpt-pick-list__item{padding:var(--kpt-space-2, .5rem) var(--kpt-space-3, .75rem);border-radius:var(--kpt-radius-sm, .25rem);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-pick-list__item:hover{background:var(--kpt-color-muted)}.kpt-pick-list__item.is-selected{background:color-mix(in oklch,var(--kpt-color-primary) 16%,transparent);color:var(--kpt-color-primary)}.kpt-pick-list__item--draggable{cursor:grab;-webkit-user-select:none;user-select:none}.kpt-pick-list__item--draggable:active{cursor:grabbing}.kpt-pick-list__item--dragover{box-shadow:inset 0 2px 0 0 var(--kpt-color-primary)}.kpt-pick-list__item.is-dragging{opacity:.5}.kpt-pick-list__controls{display:flex;flex-direction:column;justify-content:center;gap:var(--kpt-space-2, .5rem)}.kpt-pick-list__controls button{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;padding:0;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface);cursor:pointer}.kpt-pick-list__controls button:hover{background:var(--kpt-color-muted)}.kpt-pick-list__controls button .kpt-icon-host+.kpt-icon-host{margin-left:-.5rem}}\n"] }]
|
|
12136
|
+
}], null, { source: [{ type: i0.Input, args: [{ isSignal: true, alias: "source", required: false }] }, { type: i0.Output, args: ["sourceChange"] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }, { type: i0.Output, args: ["targetChange"] }], sourceHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "sourceHeader", required: false }] }], targetHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "targetHeader", required: false }] }], dragdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragdrop", required: false }] }], itemTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] }); })();
|
|
12137
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptPickList, { className: "KptPickList", filePath: "lib/pick-list/pick-list.component.ts", lineNumber: 75 }); })();
|
|
11343
12138
|
|
|
11344
|
-
const _c0$
|
|
12139
|
+
const _c0$b = (a0, a1) => ({ $implicit: a0, index: a1 });
|
|
11345
12140
|
function KptOrderList_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
11346
12141
|
i0.ɵɵelementStart(0, "div", 6);
|
|
11347
12142
|
i0.ɵɵtext(1);
|
|
@@ -11354,23 +12149,25 @@ function KptOrderList_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
11354
12149
|
function KptOrderList_For_10_Template(rf, ctx) { if (rf & 1) {
|
|
11355
12150
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
11356
12151
|
i0.ɵɵelementStart(0, "li", 9);
|
|
11357
|
-
i0.ɵɵlistener("click", function KptOrderList_For_10_Template_li_click_0_listener() { const ɵ$index_21_r3 = i0.ɵɵrestoreView(_r2).$index; const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.selected.set(ɵ$index_21_r3)); });
|
|
12152
|
+
i0.ɵɵlistener("click", function KptOrderList_For_10_Template_li_click_0_listener() { const ɵ$index_21_r3 = i0.ɵɵrestoreView(_r2).$index; const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.selected.set(ɵ$index_21_r3)); })("dragstart", function KptOrderList_For_10_Template_li_dragstart_0_listener($event) { const ɵ$index_21_r3 = i0.ɵɵrestoreView(_r2).$index; const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onDragStart(ɵ$index_21_r3, $event)); })("dragover", function KptOrderList_For_10_Template_li_dragover_0_listener($event) { const ɵ$index_21_r3 = i0.ɵɵrestoreView(_r2).$index; const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onDragOver(ɵ$index_21_r3, $event)); })("dragleave", function KptOrderList_For_10_Template_li_dragleave_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.overIndex.set(null)); })("drop", function KptOrderList_For_10_Template_li_drop_0_listener($event) { const ɵ$index_21_r3 = i0.ɵɵrestoreView(_r2).$index; const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onDrop(ɵ$index_21_r3, $event)); })("dragend", function KptOrderList_For_10_Template_li_dragend_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.clearDrag()); });
|
|
11358
12153
|
i0.ɵɵelementContainer(1, 10);
|
|
11359
12154
|
i0.ɵɵelementEnd();
|
|
11360
12155
|
} if (rf & 2) {
|
|
11361
12156
|
const item_r4 = ctx.$implicit;
|
|
11362
12157
|
const ɵ$index_21_r3 = ctx.$index;
|
|
11363
12158
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
11364
|
-
i0.ɵɵclassProp("is-selected", ctx_r0.selected() === ɵ$index_21_r3);
|
|
12159
|
+
i0.ɵɵclassProp("is-selected", ctx_r0.selected() === ɵ$index_21_r3)("is-dragging", ctx_r0.dragIndex() === ɵ$index_21_r3)("kpt-order-list__item--draggable", ctx_r0.dragdrop())("kpt-order-list__item--dragover", ctx_r0.overIndex() === ɵ$index_21_r3 && ctx_r0.dragIndex() !== ɵ$index_21_r3);
|
|
12160
|
+
i0.ɵɵattribute("draggable", ctx_r0.dragdrop() ? true : null);
|
|
11365
12161
|
i0.ɵɵadvance();
|
|
11366
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.itemTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction2(
|
|
12162
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.itemTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction2(11, _c0$b, item_r4, ɵ$index_21_r3));
|
|
11367
12163
|
} }
|
|
11368
12164
|
/**
|
|
11369
12165
|
* OrderList — lista z ręcznym porządkowaniem elementów (w górę/dół).
|
|
11370
12166
|
* Szablon elementu przez projekcję `<ng-template let-item>`.
|
|
12167
|
+
* Z `dragdrop` pozycje przestawia się także przeciąganiem.
|
|
11371
12168
|
*
|
|
11372
12169
|
* @example
|
|
11373
|
-
* <kpt-order-list [(items)]="tasks" header="Kolejność">
|
|
12170
|
+
* <kpt-order-list [(items)]="tasks" header="Kolejność" dragdrop>
|
|
11374
12171
|
* <ng-template let-item>{{ item.name }}</ng-template>
|
|
11375
12172
|
* </kpt-order-list>
|
|
11376
12173
|
*/
|
|
@@ -11380,11 +12177,22 @@ class KptOrderList {
|
|
|
11380
12177
|
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
11381
12178
|
this.header = input('', /* @ts-ignore */
|
|
11382
12179
|
...(ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []));
|
|
12180
|
+
/** Umożliwia przestawianie pozycji metodą przeciągnij-i-upuść. */
|
|
12181
|
+
this.dragdrop = input(false, { ...(ngDevMode ? { debugName: "dragdrop" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
11383
12182
|
this.i18n = inject(KptI18n);
|
|
11384
12183
|
this.itemTpl = contentChild.required(TemplateRef, /* @ts-ignore */
|
|
11385
12184
|
...(ngDevMode ? [{ debugName: "itemTpl" }] : /* istanbul ignore next */ []));
|
|
11386
12185
|
this.selected = signal(null, /* @ts-ignore */
|
|
11387
12186
|
...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
12187
|
+
/** Indeks przeciąganej pozycji; `null` gdy nic nie jest przeciągane. */
|
|
12188
|
+
this.dragIndex = signal(null, /* @ts-ignore */
|
|
12189
|
+
...(ngDevMode ? [{ debugName: "dragIndex" }] : /* istanbul ignore next */ []));
|
|
12190
|
+
/** Indeks pozycji pod kursorem — rysuje wskaźnik miejsca upuszczenia. */
|
|
12191
|
+
this.overIndex = signal(null, /* @ts-ignore */
|
|
12192
|
+
...(ngDevMode ? [{ debugName: "overIndex" }] : /* istanbul ignore next */ []));
|
|
12193
|
+
/** Kursor nad pustym obszarem listy — upuszczenie tam dopina na koniec. */
|
|
12194
|
+
this.listOver = signal(false, /* @ts-ignore */
|
|
12195
|
+
...(ngDevMode ? [{ debugName: "listOver" }] : /* istanbul ignore next */ []));
|
|
11388
12196
|
}
|
|
11389
12197
|
moveSelected(dir) {
|
|
11390
12198
|
const i = this.selected();
|
|
@@ -11398,12 +12206,68 @@ class KptOrderList {
|
|
|
11398
12206
|
this.items.set(arr);
|
|
11399
12207
|
this.selected.set(j);
|
|
11400
12208
|
}
|
|
12209
|
+
onDragStart(index, event) {
|
|
12210
|
+
if (!this.dragdrop())
|
|
12211
|
+
return;
|
|
12212
|
+
this.dragIndex.set(index);
|
|
12213
|
+
event.dataTransfer?.setData('text/plain', String(index));
|
|
12214
|
+
if (event.dataTransfer)
|
|
12215
|
+
event.dataTransfer.effectAllowed = 'move';
|
|
12216
|
+
}
|
|
12217
|
+
onDragOver(index, event) {
|
|
12218
|
+
if (this.dragIndex() === null)
|
|
12219
|
+
return;
|
|
12220
|
+
// Zatrzymujemy propagację, żeby `<ul>` nie uznał, że kursor jest nad pustym obszarem.
|
|
12221
|
+
event.preventDefault();
|
|
12222
|
+
event.stopPropagation();
|
|
12223
|
+
this.overIndex.set(index);
|
|
12224
|
+
this.listOver.set(false);
|
|
12225
|
+
}
|
|
12226
|
+
onDrop(index, event) {
|
|
12227
|
+
event.preventDefault();
|
|
12228
|
+
event.stopPropagation();
|
|
12229
|
+
const from = this.dragIndex();
|
|
12230
|
+
this.clearDrag();
|
|
12231
|
+
if (from === null || from === index)
|
|
12232
|
+
return;
|
|
12233
|
+
// Indeks celu liczony na tablicy sprzed usunięcia — element ląduje na pozycji tego,
|
|
12234
|
+
// na który go upuszczono (ten sam wzór co przestawianie kolumn w kpt-data-table).
|
|
12235
|
+
const arr = [...this.items()];
|
|
12236
|
+
const [moved] = arr.splice(from, 1);
|
|
12237
|
+
arr.splice(index, 0, moved);
|
|
12238
|
+
this.items.set(arr);
|
|
12239
|
+
this.selected.set(index);
|
|
12240
|
+
}
|
|
12241
|
+
onListDragOver(event) {
|
|
12242
|
+
if (this.dragIndex() === null)
|
|
12243
|
+
return;
|
|
12244
|
+
event.preventDefault();
|
|
12245
|
+
this.listOver.set(true);
|
|
12246
|
+
this.overIndex.set(null);
|
|
12247
|
+
}
|
|
12248
|
+
onListDrop(event) {
|
|
12249
|
+
event.preventDefault();
|
|
12250
|
+
const from = this.dragIndex();
|
|
12251
|
+
this.clearDrag();
|
|
12252
|
+
if (from === null)
|
|
12253
|
+
return;
|
|
12254
|
+
const arr = [...this.items()];
|
|
12255
|
+
const [moved] = arr.splice(from, 1);
|
|
12256
|
+
arr.push(moved);
|
|
12257
|
+
this.items.set(arr);
|
|
12258
|
+
this.selected.set(arr.length - 1);
|
|
12259
|
+
}
|
|
12260
|
+
clearDrag() {
|
|
12261
|
+
this.dragIndex.set(null);
|
|
12262
|
+
this.overIndex.set(null);
|
|
12263
|
+
this.listOver.set(false);
|
|
12264
|
+
}
|
|
11401
12265
|
static { this.ɵfac = function KptOrderList_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptOrderList)(); }; }
|
|
11402
12266
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptOrderList, selectors: [["kpt-order-list"]], contentQueries: function KptOrderList_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
11403
12267
|
i0.ɵɵcontentQuerySignal(dirIndex, ctx.itemTpl, TemplateRef, 5);
|
|
11404
12268
|
} if (rf & 2) {
|
|
11405
12269
|
i0.ɵɵqueryAdvance();
|
|
11406
|
-
} }, hostAttrs: [1, "kpt-order-list-host"], inputs: { items: [1, "items"], header: [1, "header"] }, outputs: { items: "itemsChange" }, decls: 11, vars:
|
|
12270
|
+
} }, hostAttrs: [1, "kpt-order-list-host"], inputs: { items: [1, "items"], header: [1, "header"], dragdrop: [1, "dragdrop"] }, outputs: { items: "itemsChange" }, decls: 11, vars: 7, consts: [[1, "kpt-order-list"], [1, "kpt-order-list__controls"], ["type", "button", 3, "click", "disabled"], ["name", "arrow-up"], ["name", "arrow-down"], [1, "kpt-order-list__panel"], [1, "kpt-order-list__header"], [1, "kpt-order-list__items", 3, "dragover", "dragleave", "drop"], [1, "kpt-order-list__item", 3, "is-selected", "is-dragging", "kpt-order-list__item--draggable", "kpt-order-list__item--dragover"], [1, "kpt-order-list__item", 3, "click", "dragstart", "dragover", "dragleave", "drop", "dragend"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"]], template: function KptOrderList_Template(rf, ctx) { if (rf & 1) {
|
|
11407
12271
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "button", 2);
|
|
11408
12272
|
i0.ɵɵlistener("click", function KptOrderList_Template_button_click_2_listener() { return ctx.moveSelected(-1); });
|
|
11409
12273
|
i0.ɵɵelement(3, "kpt-icon", 3);
|
|
@@ -11415,7 +12279,8 @@ class KptOrderList {
|
|
|
11415
12279
|
i0.ɵɵelementStart(6, "div", 5);
|
|
11416
12280
|
i0.ɵɵconditionalCreate(7, KptOrderList_Conditional_7_Template, 2, 1, "div", 6);
|
|
11417
12281
|
i0.ɵɵelementStart(8, "ul", 7);
|
|
11418
|
-
i0.ɵɵ
|
|
12282
|
+
i0.ɵɵlistener("dragover", function KptOrderList_Template_ul_dragover_8_listener($event) { return ctx.onListDragOver($event); })("dragleave", function KptOrderList_Template_ul_dragleave_8_listener() { return ctx.listOver.set(false); })("drop", function KptOrderList_Template_ul_drop_8_listener($event) { return ctx.onListDrop($event); });
|
|
12283
|
+
i0.ɵɵrepeaterCreate(9, KptOrderList_For_10_Template, 2, 14, "li", 8, i0.ɵɵrepeaterTrackByIndex);
|
|
11419
12284
|
i0.ɵɵelementEnd()()();
|
|
11420
12285
|
} if (rf & 2) {
|
|
11421
12286
|
i0.ɵɵadvance(2);
|
|
@@ -11426,9 +12291,11 @@ class KptOrderList {
|
|
|
11426
12291
|
i0.ɵɵattribute("aria-label", ctx.i18n.t("orderList.down"));
|
|
11427
12292
|
i0.ɵɵadvance(3);
|
|
11428
12293
|
i0.ɵɵconditional(ctx.header() ? 7 : -1);
|
|
11429
|
-
i0.ɵɵadvance(
|
|
12294
|
+
i0.ɵɵadvance();
|
|
12295
|
+
i0.ɵɵclassProp("is-dragover", ctx.listOver());
|
|
12296
|
+
i0.ɵɵadvance();
|
|
11430
12297
|
i0.ɵɵrepeater(ctx.items());
|
|
11431
|
-
} }, dependencies: [NgTemplateOutlet, KptIcon], styles: ["@layer kpt.components{.kpt-order-list-host{display:block}.kpt-order-list{display:flex;align-items:center;gap:var(--%NS%kpt-space-3, .75rem)}.kpt-order-list__controls{display:flex;flex-direction:column;gap:var(--%NS%kpt-space-2, .5rem)}.kpt-order-list__controls button{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;padding:0;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);background:var(--%NS%kpt-color-surface-raised);color:var(--%NS%kpt-color-on-surface);cursor:pointer}.kpt-order-list__controls button:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-order-list__controls button:disabled{opacity:.5;cursor:not-allowed}.kpt-order-list__panel{flex:1;min-width:0;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);overflow:hidden}.kpt-order-list__header{padding:var(--%NS%kpt-space-2, .5rem) var(--%NS%kpt-space-3, .75rem);background:var(--%NS%kpt-color-surface-variant);border-bottom:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);font-weight:var(--%NS%kpt-font-weight-semibold, 600);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-order-list__items{list-style:none;margin:0;padding:var(--%NS%kpt-space-1, .25rem);max-height:16rem;overflow-y:auto}.kpt-order-list__item{padding:var(--%NS%kpt-space-2, .5rem) var(--%NS%kpt-space-3, .75rem);border-radius:var(--%NS%kpt-radius-sm, .25rem);font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer}.kpt-order-list__item:hover{background:var(--%NS%kpt-color-muted)}.kpt-order-list__item.is-selected{background:color-mix(in oklch,var(--%NS%kpt-color-primary) 16%,transparent);color:var(--%NS%kpt-color-primary)}}\n"], encapsulation: 2 }); }
|
|
12298
|
+
} }, dependencies: [NgTemplateOutlet, KptIcon], styles: ["@layer kpt.components{.kpt-order-list-host{display:block}.kpt-order-list{display:flex;align-items:center;gap:var(--%NS%kpt-space-3, .75rem)}.kpt-order-list__controls{display:flex;flex-direction:column;gap:var(--%NS%kpt-space-2, .5rem)}.kpt-order-list__controls button{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;padding:0;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);background:var(--%NS%kpt-color-surface-raised);color:var(--%NS%kpt-color-on-surface);cursor:pointer}.kpt-order-list__controls button:hover:not(:disabled){background:var(--%NS%kpt-color-muted)}.kpt-order-list__controls button:disabled{opacity:.5;cursor:not-allowed}.kpt-order-list__panel{flex:1;min-width:0;border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);overflow:hidden}.kpt-order-list__header{padding:var(--%NS%kpt-space-2, .5rem) var(--%NS%kpt-space-3, .75rem);background:var(--%NS%kpt-color-surface-variant);border-bottom:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);font-weight:var(--%NS%kpt-font-weight-semibold, 600);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-order-list__items{list-style:none;margin:0;padding:var(--%NS%kpt-space-1, .25rem);max-height:16rem;overflow-y:auto}.kpt-order-list__items.is-dragover{background:var(--%NS%kpt-color-muted)}.kpt-order-list__item{padding:var(--%NS%kpt-space-2, .5rem) var(--%NS%kpt-space-3, .75rem);border-radius:var(--%NS%kpt-radius-sm, .25rem);font-size:var(--%NS%kpt-font-size-sm, .875rem);cursor:pointer}.kpt-order-list__item:hover{background:var(--%NS%kpt-color-muted)}.kpt-order-list__item.is-selected{background:color-mix(in oklch,var(--%NS%kpt-color-primary) 16%,transparent);color:var(--%NS%kpt-color-primary)}.kpt-order-list__item--draggable{cursor:grab;-webkit-user-select:none;user-select:none}.kpt-order-list__item--%NS%draggable:active{cursor:grabbing}.kpt-order-list__item--dragover{box-shadow:inset 0 2px 0 0 var(--%NS%kpt-color-primary)}.kpt-order-list__item.is-dragging{opacity:.5}}\n"], encapsulation: 2 }); }
|
|
11432
12299
|
}
|
|
11433
12300
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptOrderList, [{
|
|
11434
12301
|
type: Component,
|
|
@@ -11440,20 +12307,39 @@ class KptOrderList {
|
|
|
11440
12307
|
</div>
|
|
11441
12308
|
<div class="kpt-order-list__panel">
|
|
11442
12309
|
@if (header()) { <div class="kpt-order-list__header">{{ header() }}</div> }
|
|
11443
|
-
<ul
|
|
12310
|
+
<ul
|
|
12311
|
+
class="kpt-order-list__items"
|
|
12312
|
+
[class.is-dragover]="listOver()"
|
|
12313
|
+
(dragover)="onListDragOver($event)"
|
|
12314
|
+
(dragleave)="listOver.set(false)"
|
|
12315
|
+
(drop)="onListDrop($event)"
|
|
12316
|
+
>
|
|
11444
12317
|
@for (item of items(); track $index; let i = $index) {
|
|
11445
|
-
<li
|
|
12318
|
+
<li
|
|
12319
|
+
class="kpt-order-list__item"
|
|
12320
|
+
[class.is-selected]="selected() === i"
|
|
12321
|
+
[class.is-dragging]="dragIndex() === i"
|
|
12322
|
+
[class.kpt-order-list__item--draggable]="dragdrop()"
|
|
12323
|
+
[class.kpt-order-list__item--dragover]="overIndex() === i && dragIndex() !== i"
|
|
12324
|
+
[attr.draggable]="dragdrop() ? true : null"
|
|
12325
|
+
(click)="selected.set(i)"
|
|
12326
|
+
(dragstart)="onDragStart(i, $event)"
|
|
12327
|
+
(dragover)="onDragOver(i, $event)"
|
|
12328
|
+
(dragleave)="overIndex.set(null)"
|
|
12329
|
+
(drop)="onDrop(i, $event)"
|
|
12330
|
+
(dragend)="clearDrag()"
|
|
12331
|
+
>
|
|
11446
12332
|
<ng-container [ngTemplateOutlet]="itemTpl()" [ngTemplateOutletContext]="{ $implicit: item, index: i }" />
|
|
11447
12333
|
</li>
|
|
11448
12334
|
}
|
|
11449
12335
|
</ul>
|
|
11450
12336
|
</div>
|
|
11451
12337
|
</div>
|
|
11452
|
-
`, host: { class: 'kpt-order-list-host' }, styles: ["@layer kpt.components{.kpt-order-list-host{display:block}.kpt-order-list{display:flex;align-items:center;gap:var(--kpt-space-3, .75rem)}.kpt-order-list__controls{display:flex;flex-direction:column;gap:var(--kpt-space-2, .5rem)}.kpt-order-list__controls button{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;padding:0;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface);cursor:pointer}.kpt-order-list__controls button:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-order-list__controls button:disabled{opacity:.5;cursor:not-allowed}.kpt-order-list__panel{flex:1;min-width:0;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);overflow:hidden}.kpt-order-list__header{padding:var(--kpt-space-2, .5rem) var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-variant);border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);font-weight:var(--kpt-font-weight-semibold, 600);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-order-list__items{list-style:none;margin:0;padding:var(--kpt-space-1, .25rem);max-height:16rem;overflow-y:auto}.kpt-order-list__item{padding:var(--kpt-space-2, .5rem) var(--kpt-space-3, .75rem);border-radius:var(--kpt-radius-sm, .25rem);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-order-list__item:hover{background:var(--kpt-color-muted)}.kpt-order-list__item.is-selected{background:color-mix(in oklch,var(--kpt-color-primary) 16%,transparent);color:var(--kpt-color-primary)}}\n"] }]
|
|
11453
|
-
}], null, { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }, { type: i0.Output, args: ["itemsChange"] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], itemTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] }); })();
|
|
11454
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptOrderList, { className: "KptOrderList", filePath: "lib/order-list/order-list.component.ts", lineNumber:
|
|
12338
|
+
`, host: { class: 'kpt-order-list-host' }, styles: ["@layer kpt.components{.kpt-order-list-host{display:block}.kpt-order-list{display:flex;align-items:center;gap:var(--kpt-space-3, .75rem)}.kpt-order-list__controls{display:flex;flex-direction:column;gap:var(--kpt-space-2, .5rem)}.kpt-order-list__controls button{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;padding:0;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface);cursor:pointer}.kpt-order-list__controls button:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-order-list__controls button:disabled{opacity:.5;cursor:not-allowed}.kpt-order-list__panel{flex:1;min-width:0;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);overflow:hidden}.kpt-order-list__header{padding:var(--kpt-space-2, .5rem) var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-variant);border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);font-weight:var(--kpt-font-weight-semibold, 600);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-order-list__items{list-style:none;margin:0;padding:var(--kpt-space-1, .25rem);max-height:16rem;overflow-y:auto}.kpt-order-list__items.is-dragover{background:var(--kpt-color-muted)}.kpt-order-list__item{padding:var(--kpt-space-2, .5rem) var(--kpt-space-3, .75rem);border-radius:var(--kpt-radius-sm, .25rem);font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-order-list__item:hover{background:var(--kpt-color-muted)}.kpt-order-list__item.is-selected{background:color-mix(in oklch,var(--kpt-color-primary) 16%,transparent);color:var(--kpt-color-primary)}.kpt-order-list__item--draggable{cursor:grab;-webkit-user-select:none;user-select:none}.kpt-order-list__item--draggable:active{cursor:grabbing}.kpt-order-list__item--dragover{box-shadow:inset 0 2px 0 0 var(--kpt-color-primary)}.kpt-order-list__item.is-dragging{opacity:.5}}\n"] }]
|
|
12339
|
+
}], null, { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }, { type: i0.Output, args: ["itemsChange"] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], dragdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragdrop", required: false }] }], itemTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] }); })();
|
|
12340
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptOrderList, { className: "KptOrderList", filePath: "lib/order-list/order-list.component.ts", lineNumber: 61 }); })();
|
|
11455
12341
|
|
|
11456
|
-
const _c0$
|
|
12342
|
+
const _c0$a = a0 => ({ index: a0 });
|
|
11457
12343
|
function KptGalleria_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
11458
12344
|
i0.ɵɵelement(0, "img", 4);
|
|
11459
12345
|
} if (rf & 2) {
|
|
@@ -11471,7 +12357,7 @@ function KptGalleria_Conditional_7_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
11471
12357
|
const ɵ$index_19_r3 = ctx.$index;
|
|
11472
12358
|
const ctx_r3 = i0.ɵɵnextContext(2);
|
|
11473
12359
|
i0.ɵɵclassProp("is-active", ɵ$index_19_r3 === ctx_r3.activeIndex());
|
|
11474
|
-
i0.ɵɵattribute("aria-label", ctx_r3.i18n.t("galleria.image", i0.ɵɵpureFunction1(5, _c0$
|
|
12360
|
+
i0.ɵɵattribute("aria-label", ctx_r3.i18n.t("galleria.image", i0.ɵɵpureFunction1(5, _c0$a, ɵ$index_19_r3 + 1)));
|
|
11475
12361
|
i0.ɵɵadvance();
|
|
11476
12362
|
i0.ɵɵproperty("src", item_r5.thumbnail || item_r5.src, i0.ɵɵsanitizeUrl)("alt", item_r5.alt || "");
|
|
11477
12363
|
} }
|
|
@@ -11560,9 +12446,9 @@ class KptGalleria {
|
|
|
11560
12446
|
}], null, { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], activeIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeIndex", required: false }] }, { type: i0.Output, args: ["activeIndexChange"] }], showThumbnails: [{ type: i0.Input, args: [{ isSignal: true, alias: "showThumbnails", required: false }] }] }); })();
|
|
11561
12447
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptGalleria, { className: "KptGalleria", filePath: "lib/galleria/galleria.component.ts", lineNumber: 46 }); })();
|
|
11562
12448
|
|
|
11563
|
-
const _c0$
|
|
11564
|
-
const _c1$
|
|
11565
|
-
const _c2 = ["*", "[kptDialogFooter]"];
|
|
12449
|
+
const _c0$9 = ["dlg"];
|
|
12450
|
+
const _c1$2 = ["*", [["", "kptDialogFooter", ""]]];
|
|
12451
|
+
const _c2$1 = ["*", "[kptDialogFooter]"];
|
|
11566
12452
|
function KptDialog_Conditional_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
11567
12453
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
11568
12454
|
i0.ɵɵelementStart(0, "button", 6);
|
|
@@ -11662,11 +12548,11 @@ class KptDialog {
|
|
|
11662
12548
|
}
|
|
11663
12549
|
static { this.ɵfac = function KptDialog_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptDialog)(); }; }
|
|
11664
12550
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptDialog, selectors: [["kpt-dialog"]], viewQuery: function KptDialog_Query(rf, ctx) { if (rf & 1) {
|
|
11665
|
-
i0.ɵɵviewQuerySignal(ctx.dialogRef, _c0$
|
|
12551
|
+
i0.ɵɵviewQuerySignal(ctx.dialogRef, _c0$9, 5);
|
|
11666
12552
|
} if (rf & 2) {
|
|
11667
12553
|
i0.ɵɵqueryAdvance();
|
|
11668
|
-
} }, hostAttrs: [1, "kpt-dialog-host"], inputs: { open: [1, "open"], header: [1, "header"], dismissible: [1, "dismissible"] }, outputs: { open: "openChange" }, ngContentSelectors: _c2, decls: 6, vars: 1, consts: [["dlg", ""], [1, "kpt-dialog", 3, "close", "cancel"], [1, "kpt-dialog__header"], [1, "kpt-dialog__body"], [1, "kpt-dialog__title"], ["type", "button", 1, "kpt-dialog__close"], ["type", "button", 1, "kpt-dialog__close", 3, "click"], ["name", "x"]], template: function KptDialog_Template(rf, ctx) { if (rf & 1) {
|
|
11669
|
-
i0.ɵɵprojectionDef(_c1$
|
|
12554
|
+
} }, hostAttrs: [1, "kpt-dialog-host"], inputs: { open: [1, "open"], header: [1, "header"], dismissible: [1, "dismissible"] }, outputs: { open: "openChange" }, ngContentSelectors: _c2$1, decls: 6, vars: 1, consts: [["dlg", ""], [1, "kpt-dialog", 3, "close", "cancel"], [1, "kpt-dialog__header"], [1, "kpt-dialog__body"], [1, "kpt-dialog__title"], ["type", "button", 1, "kpt-dialog__close"], ["type", "button", 1, "kpt-dialog__close", 3, "click"], ["name", "x"]], template: function KptDialog_Template(rf, ctx) { if (rf & 1) {
|
|
12555
|
+
i0.ɵɵprojectionDef(_c1$2);
|
|
11670
12556
|
i0.ɵɵelementStart(0, "dialog", 1, 0);
|
|
11671
12557
|
i0.ɵɵlistener("close", function KptDialog_Template_dialog_close_0_listener() { return ctx.open.set(false); })("cancel", function KptDialog_Template_dialog_cancel_0_listener($event) { return ctx.onCancel($event); });
|
|
11672
12558
|
i0.ɵɵconditionalCreate(2, KptDialog_Conditional_2_Template, 4, 2, "div", 2);
|
|
@@ -11828,7 +12714,7 @@ class KptToastContainer {
|
|
|
11828
12714
|
}], null, null); })();
|
|
11829
12715
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptToastContainer, { className: "KptToastContainer", filePath: "lib/toast/toast-container.component.ts", lineNumber: 36 }); })();
|
|
11830
12716
|
|
|
11831
|
-
const _c0$
|
|
12717
|
+
const _c0$8 = ["*"];
|
|
11832
12718
|
function KptMenu_ng_template_3_For_2_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
11833
12719
|
i0.ɵɵelement(0, "div", 4);
|
|
11834
12720
|
} }
|
|
@@ -11991,7 +12877,7 @@ class KptMenu {
|
|
|
11991
12877
|
this.close();
|
|
11992
12878
|
}
|
|
11993
12879
|
static { this.ɵfac = function KptMenu_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptMenu)(); }; }
|
|
11994
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptMenu, selectors: [["kpt-menu"]], hostAttrs: [1, "kpt-menu-host"], inputs: { items: [1, "items"], open: [1, "open"] }, outputs: { selected: "selected", open: "openChange" }, ngContentSelectors: _c0$
|
|
12880
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptMenu, selectors: [["kpt-menu"]], hostAttrs: [1, "kpt-menu-host"], inputs: { items: [1, "items"], open: [1, "open"] }, outputs: { selected: "selected", open: "openChange" }, ngContentSelectors: _c0$8, decls: 4, vars: 4, consts: [["origin", "cdkOverlayOrigin"], ["cdkOverlayOrigin", "", 1, "kpt-menu__trigger", 3, "click"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop"], ["role", "menu", 1, "kpt-menu__panel"], ["role", "separator", 1, "kpt-menu__separator"], ["role", "presentation", 1, "kpt-menu__header"], ["type", "button", "role", "menuitem", 1, "kpt-menu__item", 3, "kpt-menu__item--danger", "disabled"], ["size", "sm", 3, "src", "name", "icon"], [3, "name"], [1, "kpt-menu__text"], [1, "kpt-menu__label"], [1, "kpt-menu__description"], ["type", "button", "role", "menuitem", 1, "kpt-menu__item", 3, "click", "disabled"], [1, "kpt-menu__badge", 3, "value", "variant"]], template: function KptMenu_Template(rf, ctx) { if (rf & 1) {
|
|
11995
12881
|
i0.ɵɵprojectionDef();
|
|
11996
12882
|
i0.ɵɵelementStart(0, "span", 1, 0);
|
|
11997
12883
|
i0.ɵɵlistener("click", function KptMenu_Template_span_click_0_listener() { return ctx.toggle(); });
|
|
@@ -12069,8 +12955,8 @@ class KptMenu {
|
|
|
12069
12955
|
}], () => [], { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }] }); })();
|
|
12070
12956
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptMenu, { className: "KptMenu", filePath: "lib/menu/menu.component.ts", lineNumber: 126 }); })();
|
|
12071
12957
|
|
|
12072
|
-
const _c0$
|
|
12073
|
-
const _c1 = ["[kptPopoverTrigger]", "*"];
|
|
12958
|
+
const _c0$7 = [[["", "kptPopoverTrigger", ""]], "*"];
|
|
12959
|
+
const _c1$1 = ["[kptPopoverTrigger]", "*"];
|
|
12074
12960
|
function KptPopover_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
12075
12961
|
i0.ɵɵelementStart(0, "div", 3);
|
|
12076
12962
|
i0.ɵɵprojection(1, 1);
|
|
@@ -12105,8 +12991,8 @@ class KptPopover {
|
|
|
12105
12991
|
this.open.set(false);
|
|
12106
12992
|
}
|
|
12107
12993
|
static { this.ɵfac = function KptPopover_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptPopover)(); }; }
|
|
12108
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptPopover, selectors: [["kpt-popover"]], hostAttrs: [1, "kpt-popover-host"], inputs: { placement: [1, "placement"] }, ngContentSelectors: _c1, decls: 4, vars: 4, consts: [["origin", "cdkOverlayOrigin"], ["cdkOverlayOrigin", "", 1, "kpt-popover__trigger", 3, "click"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop"], ["role", "dialog", 1, "kpt-popover__panel"]], template: function KptPopover_Template(rf, ctx) { if (rf & 1) {
|
|
12109
|
-
i0.ɵɵprojectionDef(_c0$
|
|
12994
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptPopover, selectors: [["kpt-popover"]], hostAttrs: [1, "kpt-popover-host"], inputs: { placement: [1, "placement"] }, ngContentSelectors: _c1$1, decls: 4, vars: 4, consts: [["origin", "cdkOverlayOrigin"], ["cdkOverlayOrigin", "", 1, "kpt-popover__trigger", 3, "click"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "cdk-overlay-transparent-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop"], ["role", "dialog", 1, "kpt-popover__panel"]], template: function KptPopover_Template(rf, ctx) { if (rf & 1) {
|
|
12995
|
+
i0.ɵɵprojectionDef(_c0$7);
|
|
12110
12996
|
i0.ɵɵelementStart(0, "span", 1, 0);
|
|
12111
12997
|
i0.ɵɵlistener("click", function KptPopover_Template_span_click_0_listener() { return ctx.toggle(); });
|
|
12112
12998
|
i0.ɵɵprojection(2);
|
|
@@ -12144,6 +13030,477 @@ class KptPopover {
|
|
|
12144
13030
|
}], null, { placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }] }); })();
|
|
12145
13031
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptPopover, { className: "KptPopover", filePath: "lib/popover/popover.component.ts", lineNumber: 43 }); })();
|
|
12146
13032
|
|
|
13033
|
+
const _c0$6 = ["panel"];
|
|
13034
|
+
const _c1 = [[["", "kptPeekTrigger", ""]], "*"];
|
|
13035
|
+
const _c2 = ["[kptPeekTrigger]", "*"];
|
|
13036
|
+
function KptPeek_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
13037
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
13038
|
+
i0.ɵɵelementStart(0, "div", 4, 1);
|
|
13039
|
+
i0.ɵɵlistener("mouseenter", function KptPeek_ng_template_3_Template_div_mouseenter_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.hoverIn()); })("mouseleave", function KptPeek_ng_template_3_Template_div_mouseleave_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.hoverOut()); })("focusin", function KptPeek_ng_template_3_Template_div_focusin_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.focusIn()); })("focusout", function KptPeek_ng_template_3_Template_div_focusout_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.focusOut()); })("keydown.escape", function KptPeek_ng_template_3_Template_div_keydown_escape_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.dismiss()); });
|
|
13040
|
+
i0.ɵɵprojection(2, 1);
|
|
13041
|
+
i0.ɵɵelementEnd();
|
|
13042
|
+
} if (rf & 2) {
|
|
13043
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
13044
|
+
i0.ɵɵproperty("id", ctx_r1.panelId);
|
|
13045
|
+
i0.ɵɵattribute("aria-label", ctx_r1.label() || ctx_r1.triggerText())("data-pinned", ctx_r1.pinned() ? "" : null);
|
|
13046
|
+
} }
|
|
13047
|
+
/** Licznik identyfikatorów paneli — `aria-controls` musi wskazywać unikatowy element. */
|
|
13048
|
+
let nextId = 0;
|
|
13049
|
+
const BELOW = { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 8 };
|
|
13050
|
+
const ABOVE = { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -8 };
|
|
13051
|
+
/**
|
|
13052
|
+
* Trigger karty podglądu. Kładzie się na tym, co ma być zaczepieniem — najczęściej na wzmiance
|
|
13053
|
+
* w tekście, ale równie dobrze na awatarze, chipie czy zwykłym linku.
|
|
13054
|
+
*
|
|
13055
|
+
* Nasłuch siedzi tutaj, a nie na hoście `kpt-peek`: host obejmuje po otwarciu także panel,
|
|
13056
|
+
* więc opóźnienia liczyłyby się od złego elementu.
|
|
13057
|
+
*/
|
|
13058
|
+
class KptPeekTrigger {
|
|
13059
|
+
constructor() {
|
|
13060
|
+
this.element = inject(ElementRef);
|
|
13061
|
+
this.peek = inject(forwardRef(() => KptPeek));
|
|
13062
|
+
}
|
|
13063
|
+
static { this.ɵfac = function KptPeekTrigger_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptPeekTrigger)(); }; }
|
|
13064
|
+
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: KptPeekTrigger, selectors: [["", "kptPeekTrigger", ""]], hostAttrs: [1, "kpt-peek__trigger"], hostVars: 2, hostBindings: function KptPeekTrigger_HostBindings(rf, ctx) { if (rf & 1) {
|
|
13065
|
+
i0.ɵɵlistener("mouseenter", function KptPeekTrigger_mouseenter_HostBindingHandler() { return ctx.peek.hoverIn(); })("mouseleave", function KptPeekTrigger_mouseleave_HostBindingHandler() { return ctx.peek.hoverOut(); })("focus", function KptPeekTrigger_focus_HostBindingHandler() { return ctx.peek.focusIn(); })("blur", function KptPeekTrigger_blur_HostBindingHandler() { return ctx.peek.focusOut(); })("click", function KptPeekTrigger_click_HostBindingHandler() { return ctx.peek.pin(); });
|
|
13066
|
+
} if (rf & 2) {
|
|
13067
|
+
i0.ɵɵattribute("aria-expanded", ctx.peek.isOpen())("aria-controls", ctx.peek.isOpen() ? ctx.peek.panelId : null);
|
|
13068
|
+
} } }); }
|
|
13069
|
+
}
|
|
13070
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptPeekTrigger, [{
|
|
13071
|
+
type: Directive,
|
|
13072
|
+
args: [{
|
|
13073
|
+
selector: '[kptPeekTrigger]',
|
|
13074
|
+
host: {
|
|
13075
|
+
class: 'kpt-peek__trigger',
|
|
13076
|
+
'(mouseenter)': 'peek.hoverIn()',
|
|
13077
|
+
'(mouseleave)': 'peek.hoverOut()',
|
|
13078
|
+
'(focus)': 'peek.focusIn()',
|
|
13079
|
+
'(blur)': 'peek.focusOut()',
|
|
13080
|
+
'(click)': 'peek.pin()',
|
|
13081
|
+
'[attr.aria-expanded]': 'peek.isOpen()',
|
|
13082
|
+
'[attr.aria-controls]': 'peek.isOpen() ? peek.panelId : null',
|
|
13083
|
+
},
|
|
13084
|
+
}]
|
|
13085
|
+
}], null, null); })();
|
|
13086
|
+
/**
|
|
13087
|
+
* Karta podglądu pod kursorem — treść powiązana z tym, na co się patrzy, bez opuszczania tekstu.
|
|
13088
|
+
* Tym różni się od sąsiadów: `kptTooltip` niesie sam tekst i nie da się w nim kliknąć,
|
|
13089
|
+
* a `kpt-popover` otwiera dopiero klik i zasłania stronę backdropem.
|
|
13090
|
+
*
|
|
13091
|
+
* Hover pokazuje kartę po `openDelay`, zjazd kursora chowa ją po `closeDelay` — kursor musi mieć
|
|
13092
|
+
* czas przejechać z triggera na kartę, więc najazd na kartę anuluje zamknięcie. Fokus otwiera
|
|
13093
|
+
* kartę od razu (klawiatura nie przejeżdża po elementach przypadkiem), a klik, Enter albo dotyk
|
|
13094
|
+
* **przypina** ją: karta zostaje mimo zjazdu kursora, a fokus wchodzi do środka. To jedyna droga
|
|
13095
|
+
* do treści karty tam, gdzie hovera nie ma w ogóle.
|
|
13096
|
+
*
|
|
13097
|
+
* Wymaga stylów overlay CDK: `import '@angular/cdk/overlay-prebuilt.css';`
|
|
13098
|
+
*
|
|
13099
|
+
* @example
|
|
13100
|
+
* <kpt-peek>
|
|
13101
|
+
* <a kptPeekTrigger href="/ludzie/anna">@Anna Kowalska</a>
|
|
13102
|
+
* <kpt-card>Profil, projekty, kontakt…</kpt-card>
|
|
13103
|
+
* </kpt-peek>
|
|
13104
|
+
*/
|
|
13105
|
+
class KptPeek {
|
|
13106
|
+
constructor() {
|
|
13107
|
+
/** Z której strony wychodzi karta; przy braku miejsca CDK i tak ją odwróci. */
|
|
13108
|
+
this.placement = input('bottom', /* @ts-ignore */
|
|
13109
|
+
...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
13110
|
+
/** Zwłoka otwarcia po najechaniu (ms) — bez niej karty mrugają przy przejeżdżaniu przez tekst. */
|
|
13111
|
+
this.openDelay = input(300, { ...(ngDevMode ? { debugName: "openDelay" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
13112
|
+
/** Zwłoka zamknięcia po zjeździe kursora (ms) — tyle jest na przejazd z triggera na kartę. */
|
|
13113
|
+
this.closeDelay = input(200, { ...(ngDevMode ? { debugName: "closeDelay" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
13114
|
+
/** Wyłączona karta nie otwiera się wcale; trigger zostaje zwykłym linkiem czy przyciskiem. */
|
|
13115
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
13116
|
+
/** Nazwa karty dla czytnika ekranu; bez niej bierze się tekst triggera. */
|
|
13117
|
+
this.label = input('', /* @ts-ignore */
|
|
13118
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
13119
|
+
/** Otwarcie i zamknięcie karty — na `opened` aplikacja może dociągnąć dane. */
|
|
13120
|
+
this.opened = output();
|
|
13121
|
+
this.closed = output();
|
|
13122
|
+
this.panelId = `kpt-peek-${(nextId += 1)}`;
|
|
13123
|
+
this.panel = viewChild('panel', /* @ts-ignore */
|
|
13124
|
+
...(ngDevMode ? [{ debugName: "panel" }] : /* istanbul ignore next */ []));
|
|
13125
|
+
this.host = inject(ElementRef);
|
|
13126
|
+
this.open = signal(false, /* @ts-ignore */
|
|
13127
|
+
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
13128
|
+
/** Przypięta karta zostaje po zjeździe kursora — przypina ją klik, Enter albo dotyk. */
|
|
13129
|
+
this.pinnedState = signal(false, /* @ts-ignore */
|
|
13130
|
+
...(ngDevMode ? [{ debugName: "pinnedState" }] : /* istanbul ignore next */ []));
|
|
13131
|
+
this.isOpen = computed(() => this.open(), /* @ts-ignore */
|
|
13132
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
13133
|
+
this.pinned = computed(() => this.pinnedState(), /* @ts-ignore */
|
|
13134
|
+
...(ngDevMode ? [{ debugName: "pinned" }] : /* istanbul ignore next */ []));
|
|
13135
|
+
this.positions = computed(() => this.placement() === 'top' ? [ABOVE, BELOW] : [BELOW, ABOVE], /* @ts-ignore */
|
|
13136
|
+
...(ngDevMode ? [{ debugName: "positions" }] : /* istanbul ignore next */ []));
|
|
13137
|
+
inject(DestroyRef).onDestroy(() => this.stopTimer());
|
|
13138
|
+
}
|
|
13139
|
+
/** Najazd kursora — na trigger albo na samą kartę. */
|
|
13140
|
+
hoverIn() {
|
|
13141
|
+
if (this.disabled())
|
|
13142
|
+
return;
|
|
13143
|
+
this.schedule(() => this.show(), this.open() ? 0 : this.openDelay());
|
|
13144
|
+
}
|
|
13145
|
+
/** Zjazd kursora; przypiętej karty nie rusza, bo tę zamyka dopiero Escape albo klik obok. */
|
|
13146
|
+
hoverOut() {
|
|
13147
|
+
if (this.pinnedState())
|
|
13148
|
+
return;
|
|
13149
|
+
this.schedule(() => this.close(), this.closeDelay());
|
|
13150
|
+
}
|
|
13151
|
+
/** Fokus otwiera bez zwłoki — klawiatura nie przejeżdża po elementach przypadkiem. */
|
|
13152
|
+
focusIn() {
|
|
13153
|
+
if (this.disabled())
|
|
13154
|
+
return;
|
|
13155
|
+
this.schedule(() => this.show(), 0);
|
|
13156
|
+
}
|
|
13157
|
+
/** Wyjście fokusu poza kartę i trigger zamyka ją także wtedy, gdy była przypięta. */
|
|
13158
|
+
focusOut() {
|
|
13159
|
+
// Sprawdzenie po klatce: w chwili `blur` `document.activeElement` to jeszcze `body`,
|
|
13160
|
+
// więc przejście Tabem z triggera do karty wyglądałoby jak wyjście na zewnątrz.
|
|
13161
|
+
this.schedule(() => {
|
|
13162
|
+
const active = document.activeElement;
|
|
13163
|
+
if (this.host.nativeElement.contains(active))
|
|
13164
|
+
return;
|
|
13165
|
+
if (this.panel()?.nativeElement.contains(active))
|
|
13166
|
+
return;
|
|
13167
|
+
this.close();
|
|
13168
|
+
}, 0);
|
|
13169
|
+
}
|
|
13170
|
+
/** Klik, Enter albo dotyk: karta zostaje i przyjmuje fokus. */
|
|
13171
|
+
pin() {
|
|
13172
|
+
if (this.disabled())
|
|
13173
|
+
return;
|
|
13174
|
+
this.pinnedState.set(true);
|
|
13175
|
+
this.show();
|
|
13176
|
+
// Panel powstaje dopiero po przerysowaniu overlaya, więc fokus idzie w następnej klatce.
|
|
13177
|
+
setTimeout(() => this.panel()?.nativeElement.focus({ preventScroll: true }));
|
|
13178
|
+
}
|
|
13179
|
+
/** Escape: zamyka i oddaje fokus tam, skąd karta wyszła. */
|
|
13180
|
+
dismiss() {
|
|
13181
|
+
const trigger = this.host.nativeElement.querySelector('.kpt-peek__trigger');
|
|
13182
|
+
this.close();
|
|
13183
|
+
trigger?.focus({ preventScroll: true });
|
|
13184
|
+
}
|
|
13185
|
+
close() {
|
|
13186
|
+
this.stopTimer();
|
|
13187
|
+
this.pinnedState.set(false);
|
|
13188
|
+
if (!this.open())
|
|
13189
|
+
return;
|
|
13190
|
+
this.open.set(false);
|
|
13191
|
+
this.closed.emit();
|
|
13192
|
+
}
|
|
13193
|
+
/** Tekst triggera jako nazwa karty — `role="dialog"` bez nazwy nic czytnikowi nie mówi. */
|
|
13194
|
+
triggerText() {
|
|
13195
|
+
return this.host.nativeElement.querySelector('.kpt-peek__trigger')?.textContent?.trim() ?? '';
|
|
13196
|
+
}
|
|
13197
|
+
show() {
|
|
13198
|
+
if (this.open())
|
|
13199
|
+
return;
|
|
13200
|
+
this.open.set(true);
|
|
13201
|
+
this.opened.emit();
|
|
13202
|
+
}
|
|
13203
|
+
schedule(action, delay) {
|
|
13204
|
+
this.stopTimer();
|
|
13205
|
+
if (delay <= 0) {
|
|
13206
|
+
action();
|
|
13207
|
+
return;
|
|
13208
|
+
}
|
|
13209
|
+
this.timer = setTimeout(action, delay);
|
|
13210
|
+
}
|
|
13211
|
+
stopTimer() {
|
|
13212
|
+
if (this.timer)
|
|
13213
|
+
clearTimeout(this.timer);
|
|
13214
|
+
this.timer = undefined;
|
|
13215
|
+
}
|
|
13216
|
+
static { this.ɵfac = function KptPeek_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptPeek)(); }; }
|
|
13217
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptPeek, selectors: [["kpt-peek"]], viewQuery: function KptPeek_Query(rf, ctx) { if (rf & 1) {
|
|
13218
|
+
i0.ɵɵviewQuerySignal(ctx.panel, _c0$6, 5);
|
|
13219
|
+
} if (rf & 2) {
|
|
13220
|
+
i0.ɵɵqueryAdvance();
|
|
13221
|
+
} }, hostAttrs: [1, "kpt-peek-host"], inputs: { placement: [1, "placement"], openDelay: [1, "openDelay"], closeDelay: [1, "closeDelay"], disabled: [1, "disabled"], label: [1, "label"] }, outputs: { opened: "opened", closed: "closed" }, ngContentSelectors: _c2, decls: 4, vars: 3, consts: [["origin", "cdkOverlayOrigin"], ["panel", ""], ["cdkOverlayOrigin", "", 1, "kpt-peek__origin"], ["cdkConnectedOverlay", "", 3, "overlayOutsideClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions"], ["role", "dialog", "tabindex", "-1", 1, "kpt-peek__panel", 3, "mouseenter", "mouseleave", "focusin", "focusout", "keydown.escape", "id"]], template: function KptPeek_Template(rf, ctx) { if (rf & 1) {
|
|
13222
|
+
i0.ɵɵprojectionDef(_c1);
|
|
13223
|
+
i0.ɵɵelementStart(0, "span", 2, 0);
|
|
13224
|
+
i0.ɵɵprojection(2);
|
|
13225
|
+
i0.ɵɵelementEnd();
|
|
13226
|
+
i0.ɵɵtemplate(3, KptPeek_ng_template_3_Template, 3, 3, "ng-template", 3);
|
|
13227
|
+
i0.ɵɵlistener("overlayOutsideClick", function KptPeek_Template_ng_template_overlayOutsideClick_3_listener() { return ctx.close(); })("detach", function KptPeek_Template_ng_template_detach_3_listener() { return ctx.close(); });
|
|
13228
|
+
} if (rf & 2) {
|
|
13229
|
+
const origin_r3 = i0.ɵɵreference(1);
|
|
13230
|
+
i0.ɵɵadvance(3);
|
|
13231
|
+
i0.ɵɵproperty("cdkConnectedOverlayOrigin", origin_r3)("cdkConnectedOverlayOpen", ctx.isOpen())("cdkConnectedOverlayPositions", ctx.positions());
|
|
13232
|
+
} }, dependencies: [CdkOverlayOrigin, CdkConnectedOverlay], styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-peek-host,.kpt-peek__origin{display:inline}.kpt-peek__panel{max-inline-size:22rem;padding:var(--%NS%kpt-space-4, 1rem);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);background:var(--%NS%kpt-color-surface-raised);color:var(--%NS%kpt-color-on-surface);font-size:var(--%NS%kpt-font-size-sm, .875rem);box-shadow:var(--%NS%kpt-elevation-3)}.kpt-peek__panel:focus{outline:none}.kpt-peek__panel[data-pinned]:focus-visible{outline:2px solid var(--%NS%kpt-color-focus-ring);outline-offset:2px}}\n"], encapsulation: 2 }); }
|
|
13233
|
+
}
|
|
13234
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptPeek, [{
|
|
13235
|
+
type: Component,
|
|
13236
|
+
args: [{ selector: 'kpt-peek', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkOverlayOrigin, CdkConnectedOverlay], template: `
|
|
13237
|
+
<span class="kpt-peek__origin" cdkOverlayOrigin #origin="cdkOverlayOrigin">
|
|
13238
|
+
<ng-content select="[kptPeekTrigger]" />
|
|
13239
|
+
</span>
|
|
13240
|
+
|
|
13241
|
+
<ng-template
|
|
13242
|
+
cdkConnectedOverlay
|
|
13243
|
+
[cdkConnectedOverlayOrigin]="origin"
|
|
13244
|
+
[cdkConnectedOverlayOpen]="isOpen()"
|
|
13245
|
+
[cdkConnectedOverlayPositions]="positions()"
|
|
13246
|
+
(overlayOutsideClick)="close()"
|
|
13247
|
+
(detach)="close()"
|
|
13248
|
+
>
|
|
13249
|
+
<div
|
|
13250
|
+
#panel
|
|
13251
|
+
class="kpt-peek__panel"
|
|
13252
|
+
role="dialog"
|
|
13253
|
+
tabindex="-1"
|
|
13254
|
+
[id]="panelId"
|
|
13255
|
+
[attr.aria-label]="label() || triggerText()"
|
|
13256
|
+
[attr.data-pinned]="pinned() ? '' : null"
|
|
13257
|
+
(mouseenter)="hoverIn()"
|
|
13258
|
+
(mouseleave)="hoverOut()"
|
|
13259
|
+
(focusin)="focusIn()"
|
|
13260
|
+
(focusout)="focusOut()"
|
|
13261
|
+
(keydown.escape)="dismiss()"
|
|
13262
|
+
>
|
|
13263
|
+
<ng-content />
|
|
13264
|
+
</div>
|
|
13265
|
+
</ng-template>
|
|
13266
|
+
`, host: { class: 'kpt-peek-host' }, styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-peek-host,.kpt-peek__origin{display:inline}.kpt-peek__panel{max-inline-size:22rem;padding:var(--kpt-space-4, 1rem);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface);font-size:var(--kpt-font-size-sm, .875rem);box-shadow:var(--kpt-elevation-3)}.kpt-peek__panel:focus{outline:none}.kpt-peek__panel[data-pinned]:focus-visible{outline:2px solid var(--kpt-color-focus-ring);outline-offset:2px}}\n"] }]
|
|
13267
|
+
}], () => [], { placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], openDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "openDelay", required: false }] }], closeDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeDelay", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], panel: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] }); })();
|
|
13268
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptPeek, { className: "KptPeek", filePath: "lib/peek/peek.component.ts", lineNumber: 112 }); })();
|
|
13269
|
+
|
|
13270
|
+
const _c0$5 = ["*"];
|
|
13271
|
+
function KptMention_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
13272
|
+
i0.ɵɵelementStart(0, "span", 0);
|
|
13273
|
+
i0.ɵɵtext(1);
|
|
13274
|
+
i0.ɵɵelementEnd();
|
|
13275
|
+
} if (rf & 2) {
|
|
13276
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
13277
|
+
i0.ɵɵattribute("data-kind", ctx_r0.resolvedKind() || null);
|
|
13278
|
+
i0.ɵɵadvance();
|
|
13279
|
+
i0.ɵɵtextInterpolate(ctx_r0.display());
|
|
13280
|
+
} }
|
|
13281
|
+
function KptMention_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
13282
|
+
i0.ɵɵelementStart(0, "a", 2);
|
|
13283
|
+
i0.ɵɵtext(1);
|
|
13284
|
+
i0.ɵɵelementEnd();
|
|
13285
|
+
} if (rf & 2) {
|
|
13286
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
13287
|
+
i0.ɵɵattribute("href", ctx, i0.ɵɵsanitizeUrl)("data-kind", ctx_r0.resolvedKind() || null);
|
|
13288
|
+
i0.ɵɵadvance();
|
|
13289
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.display(), " ");
|
|
13290
|
+
} }
|
|
13291
|
+
function KptMention_Conditional_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
13292
|
+
i0.ɵɵelementStart(0, "button", 3);
|
|
13293
|
+
i0.ɵɵtext(1);
|
|
13294
|
+
i0.ɵɵelementEnd();
|
|
13295
|
+
} if (rf & 2) {
|
|
13296
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
13297
|
+
i0.ɵɵattribute("data-kind", ctx_r0.resolvedKind() || null);
|
|
13298
|
+
i0.ɵɵadvance();
|
|
13299
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.display(), " ");
|
|
13300
|
+
} }
|
|
13301
|
+
function KptMention_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
13302
|
+
i0.ɵɵelementStart(0, "kpt-peek", 1);
|
|
13303
|
+
i0.ɵɵconditionalCreate(1, KptMention_Conditional_1_Conditional_1_Template, 2, 3, "a", 2)(2, KptMention_Conditional_1_Conditional_2_Template, 2, 2, "button", 3);
|
|
13304
|
+
i0.ɵɵprojection(3);
|
|
13305
|
+
i0.ɵɵelementEnd();
|
|
13306
|
+
} if (rf & 2) {
|
|
13307
|
+
let tmp_4_0;
|
|
13308
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
13309
|
+
i0.ɵɵproperty("placement", ctx_r0.placement())("openDelay", ctx_r0.openDelay())("label", ctx_r0.display());
|
|
13310
|
+
i0.ɵɵadvance();
|
|
13311
|
+
i0.ɵɵconditional((tmp_4_0 = ctx_r0.href()) ? 1 : 2, tmp_4_0);
|
|
13312
|
+
} }
|
|
13313
|
+
/**
|
|
13314
|
+
* Wzmianka w tekście — `@ktoś` albo `@coś` jako element, na który da się najechać i zobaczyć
|
|
13315
|
+
* kartę podglądu z resztą powiązań. Treść karty daje aplikacja przez projekcję: biblioteka
|
|
13316
|
+
* nie wie, czym jest wzmiankowana rzecz, a osoba, zadanie i dokument wyglądają inaczej.
|
|
13317
|
+
*
|
|
13318
|
+
* Bez rzutowanej treści wzmianka zostaje samym napisem z podkreśleniem: nie ma czego pokazać,
|
|
13319
|
+
* więc trigger nie udaje, że coś się pod nim kryje.
|
|
13320
|
+
*
|
|
13321
|
+
* Trigger jest `<button>`, a nie `<span>`: karta otwiera się też z klawiatury i dotyku
|
|
13322
|
+
* (przypięcie), a to wymaga elementu, na który da się wejść Tabem. Z `href` staje się linkiem,
|
|
13323
|
+
* bo wtedy klik prowadzi gdzieś naprawdę.
|
|
13324
|
+
*
|
|
13325
|
+
* @example
|
|
13326
|
+
* <kpt-mention id="anna.k" label="Anna Kowalska">
|
|
13327
|
+
* <kpt-card>Profil, projekty, kontakt…</kpt-card>
|
|
13328
|
+
* </kpt-mention>
|
|
13329
|
+
*/
|
|
13330
|
+
class KptMention {
|
|
13331
|
+
constructor() {
|
|
13332
|
+
/** Cała pozycja naraz. Pojedyncze inputy poniżej mają nad nią priorytet. */
|
|
13333
|
+
this.item = input(null, /* @ts-ignore */
|
|
13334
|
+
...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
|
|
13335
|
+
/** Identyfikator zapisany w treści — nie zmienia się przy zmianie nazwy. */
|
|
13336
|
+
this.id = input('', /* @ts-ignore */
|
|
13337
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
13338
|
+
/** Nazwa do pokazania; bez niej bierze się ją z `item`, a w ostateczności z `id`. */
|
|
13339
|
+
this.label = input('', /* @ts-ignore */
|
|
13340
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
13341
|
+
/** Rodzaj (osoba, zadanie, dokument) — ląduje w `data-kind`, więc da się go ostylować. */
|
|
13342
|
+
this.kind = input('', /* @ts-ignore */
|
|
13343
|
+
...(ngDevMode ? [{ debugName: "kind" }] : /* istanbul ignore next */ []));
|
|
13344
|
+
/** Znak przed nazwą. Pusty łańcuch zostawia samą nazwę. */
|
|
13345
|
+
this.prefix = input('@', /* @ts-ignore */
|
|
13346
|
+
...(ngDevMode ? [{ debugName: "prefix" }] : /* istanbul ignore next */ []));
|
|
13347
|
+
/** Adres, pod który prowadzi klik. Bez niego wzmianka jest przyciskiem otwierającym kartę. */
|
|
13348
|
+
this.href = input(null, /* @ts-ignore */
|
|
13349
|
+
...(ngDevMode ? [{ debugName: "href" }] : /* istanbul ignore next */ []));
|
|
13350
|
+
this.placement = input('bottom', /* @ts-ignore */
|
|
13351
|
+
...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
13352
|
+
this.openDelay = input(300, /* @ts-ignore */
|
|
13353
|
+
...(ngDevMode ? [{ debugName: "openDelay" }] : /* istanbul ignore next */ []));
|
|
13354
|
+
/** Wyłączona wzmianka nie otwiera karty — zostaje samym napisem. */
|
|
13355
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
13356
|
+
this.resolvedKind = computed(() => this.kind() || this.item()?.kind || '', /* @ts-ignore */
|
|
13357
|
+
...(ngDevMode ? [{ debugName: "resolvedKind" }] : /* istanbul ignore next */ []));
|
|
13358
|
+
this.display = computed(() => this.prefix() + (this.label() || this.item()?.label || this.id() || this.item()?.id || ''), /* @ts-ignore */
|
|
13359
|
+
...(ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []));
|
|
13360
|
+
}
|
|
13361
|
+
static { this.ɵfac = function KptMention_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptMention)(); }; }
|
|
13362
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptMention, selectors: [["kpt-mention"]], hostAttrs: [1, "kpt-mention-host"], inputs: { item: [1, "item"], id: [1, "id"], label: [1, "label"], kind: [1, "kind"], prefix: [1, "prefix"], href: [1, "href"], placement: [1, "placement"], openDelay: [1, "openDelay"], disabled: [1, "disabled"] }, ngContentSelectors: _c0$5, decls: 2, vars: 1, consts: [["data-plain", "", 1, "kpt-mention"], [3, "placement", "openDelay", "label"], ["kptPeekTrigger", "", 1, "kpt-mention"], ["type", "button", "kptPeekTrigger", "", 1, "kpt-mention"]], template: function KptMention_Template(rf, ctx) { if (rf & 1) {
|
|
13363
|
+
i0.ɵɵprojectionDef();
|
|
13364
|
+
i0.ɵɵconditionalCreate(0, KptMention_Conditional_0_Template, 2, 2, "span", 0)(1, KptMention_Conditional_1_Template, 4, 4, "kpt-peek", 1);
|
|
13365
|
+
} if (rf & 2) {
|
|
13366
|
+
i0.ɵɵconditional(ctx.disabled() ? 0 : 1);
|
|
13367
|
+
} }, dependencies: [KptPeek, KptPeekTrigger], styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-mention-host,.kpt-mentions-host,.kpt-mentions__text{display:inline}.kpt-mention{display:inline;margin:0;padding:0;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:transparent;color:var(--%NS%kpt-color-primary);font:inherit;text-decoration:underline dotted var(--%NS%kpt-color-primary-border);text-decoration-thickness:1px;text-underline-offset:.2em;cursor:pointer;transition:text-decoration-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard, ease)}.kpt-mention:hover,.kpt-mention[aria-expanded=true]{text-decoration-color:var(--%NS%kpt-color-primary)}.kpt-mention:focus-visible{outline:2px solid var(--%NS%kpt-color-focus-ring);outline-offset:2px}@media(prefers-reduced-motion:reduce){.kpt-mention{transition:none}}.kpt-mention[data-plain]{color:var(--%NS%kpt-color-text);font-weight:var(--%NS%kpt-font-weight-medium, 500);text-decoration:none;cursor:inherit}}\n"], encapsulation: 2 }); }
|
|
13368
|
+
}
|
|
13369
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptMention, [{
|
|
13370
|
+
type: Component,
|
|
13371
|
+
args: [{ selector: 'kpt-mention', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [KptPeek, KptPeekTrigger], template: `
|
|
13372
|
+
@if (disabled()) {
|
|
13373
|
+
<!-- Bez karty wzmianka nie udaje kontrolki: zostaje wyróżnionym napisem, którego nie ma
|
|
13374
|
+
po co dotykać Tabem. -->
|
|
13375
|
+
<span class="kpt-mention" data-plain [attr.data-kind]="resolvedKind() || null">{{ display() }}</span>
|
|
13376
|
+
} @else {
|
|
13377
|
+
<kpt-peek [placement]="placement()" [openDelay]="openDelay()" [label]="display()">
|
|
13378
|
+
@if (href(); as url) {
|
|
13379
|
+
<a kptPeekTrigger class="kpt-mention" [attr.href]="url" [attr.data-kind]="resolvedKind() || null">
|
|
13380
|
+
{{ display() }}
|
|
13381
|
+
</a>
|
|
13382
|
+
} @else {
|
|
13383
|
+
<button type="button" kptPeekTrigger class="kpt-mention" [attr.data-kind]="resolvedKind() || null">
|
|
13384
|
+
{{ display() }}
|
|
13385
|
+
</button>
|
|
13386
|
+
}
|
|
13387
|
+
|
|
13388
|
+
<ng-content />
|
|
13389
|
+
</kpt-peek>
|
|
13390
|
+
}
|
|
13391
|
+
`, host: { class: 'kpt-mention-host' }, styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-mention-host,.kpt-mentions-host,.kpt-mentions__text{display:inline}.kpt-mention{display:inline;margin:0;padding:0;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:transparent;color:var(--kpt-color-primary);font:inherit;text-decoration:underline dotted var(--kpt-color-primary-border);text-decoration-thickness:1px;text-underline-offset:.2em;cursor:pointer;transition:text-decoration-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard, ease)}.kpt-mention:hover,.kpt-mention[aria-expanded=true]{text-decoration-color:var(--kpt-color-primary)}.kpt-mention:focus-visible{outline:2px solid var(--kpt-color-focus-ring);outline-offset:2px}@media(prefers-reduced-motion:reduce){.kpt-mention{transition:none}}.kpt-mention[data-plain]{color:var(--kpt-color-text);font-weight:var(--kpt-font-weight-medium, 500);text-decoration:none;cursor:inherit}}\n"] }]
|
|
13392
|
+
}], null, { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], kind: [{ type: i0.Input, args: [{ isSignal: true, alias: "kind", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], openDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "openDelay", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] }); })();
|
|
13393
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptMention, { className: "KptMention", filePath: "lib/mention/mention.component.ts", lineNumber: 51 }); })();
|
|
13394
|
+
|
|
13395
|
+
const _c0$4 = (a0, a1, a2) => ({ $implicit: a0, id: a1, label: a2 });
|
|
13396
|
+
function KptMentions_For_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
13397
|
+
i0.ɵɵelementStart(0, "span", 0);
|
|
13398
|
+
i0.ɵɵtext(1);
|
|
13399
|
+
i0.ɵɵelementEnd();
|
|
13400
|
+
} if (rf & 2) {
|
|
13401
|
+
const segment_r1 = i0.ɵɵnextContext().$implicit;
|
|
13402
|
+
i0.ɵɵadvance();
|
|
13403
|
+
i0.ɵɵtextInterpolate(segment_r1.text);
|
|
13404
|
+
} }
|
|
13405
|
+
function KptMentions_For_1_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
13406
|
+
i0.ɵɵelementContainer(0, 2);
|
|
13407
|
+
} if (rf & 2) {
|
|
13408
|
+
const segment_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
13409
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx)("ngTemplateOutletContext", i0.ɵɵpureFunction3(2, _c0$4, segment_r1.item, segment_r1.id, segment_r1.label));
|
|
13410
|
+
} }
|
|
13411
|
+
function KptMentions_For_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
13412
|
+
i0.ɵɵelementStart(0, "kpt-mention", 1);
|
|
13413
|
+
i0.ɵɵconditionalCreate(1, KptMentions_For_1_Conditional_1_Conditional_1_Template, 1, 6, "ng-container", 2);
|
|
13414
|
+
i0.ɵɵelementEnd();
|
|
13415
|
+
} if (rf & 2) {
|
|
13416
|
+
let tmp_17_0;
|
|
13417
|
+
const segment_r1 = i0.ɵɵnextContext().$implicit;
|
|
13418
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
13419
|
+
i0.ɵɵproperty("id", segment_r1.id)("label", segment_r1.label)("kind", segment_r1.item?.kind ?? "")("prefix", ctx_r1.prefix())("placement", ctx_r1.placement())("disabled", !ctx_r1.cardTpl());
|
|
13420
|
+
i0.ɵɵadvance();
|
|
13421
|
+
i0.ɵɵconditional((tmp_17_0 = ctx_r1.cardTpl()) ? 1 : -1, tmp_17_0);
|
|
13422
|
+
} }
|
|
13423
|
+
function KptMentions_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
13424
|
+
i0.ɵɵconditionalCreate(0, KptMentions_For_1_Conditional_0_Template, 2, 1, "span", 0)(1, KptMentions_For_1_Conditional_1_Template, 2, 7, "kpt-mention", 1);
|
|
13425
|
+
} if (rf & 2) {
|
|
13426
|
+
const segment_r1 = ctx.$implicit;
|
|
13427
|
+
i0.ɵɵconditional(segment_r1.kind === "text" ? 0 : 1);
|
|
13428
|
+
} }
|
|
13429
|
+
/**
|
|
13430
|
+
* Akapit ze wzmiankami — tekst wchodzi jako zwykły napis, a `@wzmianki` wychodzą z niego jako
|
|
13431
|
+
* elementy z kartą podglądu. Rozbiciem zajmuje się `parseMentionText()` z `@konce-pt/mention`
|
|
13432
|
+
* (czysty TS z testami), więc oba porty czytają tę samą treść tak samo.
|
|
13433
|
+
*
|
|
13434
|
+
* Wzmianek nie renderujemy z HTML-a: treść zostaje tekstem, a wzmianka jest elementem, który
|
|
13435
|
+
* biblioteka sama zbudowała. Aplikacja nie musi więc przepuszczać przez sanitizer czegoś,
|
|
13436
|
+
* co i tak pochodzi od jej użytkowników.
|
|
13437
|
+
*
|
|
13438
|
+
* Kartę daje szablon w środku — kontekst dostaje pozycję jako `$implicit` oraz `id` i `label`,
|
|
13439
|
+
* bo wzmianka do czegoś, czego nie ma już na liście, też musi się wyrenderować.
|
|
13440
|
+
*
|
|
13441
|
+
* @example
|
|
13442
|
+
* <kpt-mentions [text]="note" [items]="people">
|
|
13443
|
+
* <ng-template let-item let-label="label">
|
|
13444
|
+
* <kpt-card>{{ item?.data?.role ?? label }}</kpt-card>
|
|
13445
|
+
* </ng-template>
|
|
13446
|
+
* </kpt-mentions>
|
|
13447
|
+
*/
|
|
13448
|
+
class KptMentions {
|
|
13449
|
+
constructor() {
|
|
13450
|
+
/** Treść z wzmiankami: `@id` albo `@[Nazwa ze spacją](id)`. */
|
|
13451
|
+
this.text = input('', /* @ts-ignore */
|
|
13452
|
+
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
13453
|
+
/** Pozycje, po których rozwiązują się identyfikatory. Nieznane `id` zostaje etykietą. */
|
|
13454
|
+
this.items = input([], /* @ts-ignore */
|
|
13455
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
13456
|
+
/** Znak przed nazwą we wzmiance. */
|
|
13457
|
+
this.prefix = input('@', /* @ts-ignore */
|
|
13458
|
+
...(ngDevMode ? [{ debugName: "prefix" }] : /* istanbul ignore next */ []));
|
|
13459
|
+
this.placement = input('bottom', /* @ts-ignore */
|
|
13460
|
+
...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
13461
|
+
/** Szablon karty; bez niego wzmianki są samym napisem, bo nie ma czego pokazać. */
|
|
13462
|
+
this.cardTpl = contentChild(TemplateRef, /* @ts-ignore */
|
|
13463
|
+
...(ngDevMode ? [{ debugName: "cardTpl" }] : /* istanbul ignore next */ []));
|
|
13464
|
+
this.segments = computed(() => parseMentionText(this.text(), this.items()), /* @ts-ignore */
|
|
13465
|
+
...(ngDevMode ? [{ debugName: "segments" }] : /* istanbul ignore next */ []));
|
|
13466
|
+
}
|
|
13467
|
+
static { this.ɵfac = function KptMentions_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptMentions)(); }; }
|
|
13468
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptMentions, selectors: [["kpt-mentions"]], contentQueries: function KptMentions_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
13469
|
+
i0.ɵɵcontentQuerySignal(dirIndex, ctx.cardTpl, TemplateRef, 5);
|
|
13470
|
+
} if (rf & 2) {
|
|
13471
|
+
i0.ɵɵqueryAdvance();
|
|
13472
|
+
} }, hostAttrs: [1, "kpt-mentions-host"], inputs: { text: [1, "text"], items: [1, "items"], prefix: [1, "prefix"], placement: [1, "placement"] }, decls: 2, vars: 0, consts: [[1, "kpt-mentions__text"], [3, "id", "label", "kind", "prefix", "placement", "disabled"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"]], template: function KptMentions_Template(rf, ctx) { if (rf & 1) {
|
|
13473
|
+
i0.ɵɵrepeaterCreate(0, KptMentions_For_1_Template, 2, 1, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
13474
|
+
} if (rf & 2) {
|
|
13475
|
+
i0.ɵɵrepeater(ctx.segments());
|
|
13476
|
+
} }, dependencies: [NgTemplateOutlet, KptMention], styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-mention-host,.kpt-mentions-host,.kpt-mentions__text{display:inline}.kpt-mention{display:inline;margin:0;padding:0;border:0;border-radius:var(--%NS%kpt-radius-sm, .25rem);background:transparent;color:var(--%NS%kpt-color-primary);font:inherit;text-decoration:underline dotted var(--%NS%kpt-color-primary-border);text-decoration-thickness:1px;text-underline-offset:.2em;cursor:pointer;transition:text-decoration-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard, ease)}.kpt-mention:hover,.kpt-mention[aria-expanded=true]{text-decoration-color:var(--%NS%kpt-color-primary)}.kpt-mention:focus-visible{outline:2px solid var(--%NS%kpt-color-focus-ring);outline-offset:2px}@media(prefers-reduced-motion:reduce){.kpt-mention{transition:none}}.kpt-mention[data-plain]{color:var(--%NS%kpt-color-text);font-weight:var(--%NS%kpt-font-weight-medium, 500);text-decoration:none;cursor:inherit}}\n"], encapsulation: 2 }); }
|
|
13477
|
+
}
|
|
13478
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptMentions, [{
|
|
13479
|
+
type: Component,
|
|
13480
|
+
args: [{ selector: 'kpt-mentions', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgTemplateOutlet, KptMention], template: `@for (segment of segments(); track $index) {
|
|
13481
|
+
@if (segment.kind === 'text') {
|
|
13482
|
+
<span class="kpt-mentions__text">{{ segment.text }}</span>
|
|
13483
|
+
} @else {
|
|
13484
|
+
<kpt-mention
|
|
13485
|
+
[id]="segment.id"
|
|
13486
|
+
[label]="segment.label"
|
|
13487
|
+
[kind]="segment.item?.kind ?? ''"
|
|
13488
|
+
[prefix]="prefix()"
|
|
13489
|
+
[placement]="placement()"
|
|
13490
|
+
[disabled]="!cardTpl()"
|
|
13491
|
+
>
|
|
13492
|
+
@if (cardTpl(); as tpl) {
|
|
13493
|
+
<ng-container
|
|
13494
|
+
[ngTemplateOutlet]="tpl"
|
|
13495
|
+
[ngTemplateOutletContext]="{ $implicit: segment.item, id: segment.id, label: segment.label }"
|
|
13496
|
+
/>
|
|
13497
|
+
}
|
|
13498
|
+
</kpt-mention>
|
|
13499
|
+
}
|
|
13500
|
+
}`, host: { class: 'kpt-mentions-host' }, styles: ["@charset \"UTF-8\";@layer kpt.components{.kpt-mention-host,.kpt-mentions-host,.kpt-mentions__text{display:inline}.kpt-mention{display:inline;margin:0;padding:0;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:transparent;color:var(--kpt-color-primary);font:inherit;text-decoration:underline dotted var(--kpt-color-primary-border);text-decoration-thickness:1px;text-underline-offset:.2em;cursor:pointer;transition:text-decoration-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard, ease)}.kpt-mention:hover,.kpt-mention[aria-expanded=true]{text-decoration-color:var(--kpt-color-primary)}.kpt-mention:focus-visible{outline:2px solid var(--kpt-color-focus-ring);outline-offset:2px}@media(prefers-reduced-motion:reduce){.kpt-mention{transition:none}}.kpt-mention[data-plain]{color:var(--kpt-color-text);font-weight:var(--kpt-font-weight-medium, 500);text-decoration:none;cursor:inherit}}\n"] }]
|
|
13501
|
+
}], null, { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], cardTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] }); })();
|
|
13502
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptMentions, { className: "KptMentions", filePath: "lib/mention/mentions.component.ts", lineNumber: 55 }); })();
|
|
13503
|
+
|
|
12147
13504
|
function KptAutocomplete_ng_template_2_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
12148
13505
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
12149
13506
|
i0.ɵɵelementStart(0, "li", 5);
|
|
@@ -13300,5 +14657,5 @@ class KptSpeedDial {
|
|
|
13300
14657
|
* Generated bundle index. Do not edit.
|
|
13301
14658
|
*/
|
|
13302
14659
|
|
|
13303
|
-
export { KPT_BREAKPOINTS, KPT_FORM_FIELD_CONTROL, KPT_I18N_CONFIG, KptAccordion, KptAccordionPanel, KptAlert, KptAppShell, KptAuth, KptAuthProviderDef, 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, provideKptIcons };
|
|
14660
|
+
export { KPT_BREAKPOINTS, KPT_FORM_FIELD_CONTROL, KPT_I18N_CONFIG, KptAccordion, KptAccordionPanel, KptAlert, KptAppShell, KptAuth, KptAuthProviderDef, KptAutocomplete, KptAvatar, KptAvatarGroup, KptBackdrop, 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, KptMention, KptMentions, KptMenu, KptMenubar, KptMeterGroup, KptOrderList, KptPaginator, KptPanel, KptPassword, KptPeek, KptPeekTrigger, 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, provideKptIcons };
|
|
13304
14661
|
//# sourceMappingURL=konce-pt-angular.mjs.map
|