@konce-pt/angular 0.7.10 → 0.7.11
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 +27 -0
- package/fesm2022/konce-pt-angular.mjs +1403 -368
- package/fesm2022/konce-pt-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/auth/llms.txt +104 -0
- package/src/lib/i18n/llms.txt +2 -2
- package/src/lib/input/llms.txt +2 -0
- package/src/lib/password/llms.txt +3 -0
- package/src/lib/rich-text/llms.txt +20 -1
- package/types/konce-pt-angular.d.ts +316 -7
- package/types/konce-pt-angular.d.ts.map +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, booleanAttribute, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, model, output, signal, Injectable, inject, ElementRef, effect, InjectionToken, PLATFORM_ID, DestroyRef, makeEnvironmentProviders, contentChild, afterNextRender, untracked, forwardRef, numberAttribute, viewChild, Directive, TemplateRef,
|
|
2
|
+
import { input, booleanAttribute, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, model, output, signal, Injectable, inject, ElementRef, effect, InjectionToken, PLATFORM_ID, DestroyRef, makeEnvironmentProviders, contentChild, afterNextRender, untracked, forwardRef, numberAttribute, viewChild, Directive, TemplateRef, Injector, viewChildren, contentChildren, afterRenderEffect, linkedSignal } from '@angular/core';
|
|
3
3
|
import { CdkOverlayOrigin, CdkConnectedOverlay, OverlayContainer } from '@angular/cdk/overlay';
|
|
4
4
|
import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
|
|
5
|
+
import { form, required, email, minLength, validateTree, submit, FormField, FormRoot } from '@angular/forms/signals';
|
|
5
6
|
|
|
6
|
-
const _c0$
|
|
7
|
+
const _c0$E = ["*"];
|
|
7
8
|
function KptButton_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
8
9
|
i0.ɵɵdomElement(0, "span", 1);
|
|
9
10
|
} }
|
|
@@ -38,7 +39,7 @@ class KptButton {
|
|
|
38
39
|
static { this.ɵfac = function KptButton_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptButton)(); }; }
|
|
39
40
|
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) {
|
|
40
41
|
i0.ɵɵclassProp("kpt-button-host--full", ctx.fullWidth());
|
|
41
|
-
} }, inputs: { variant: [1, "variant"], size: [1, "size"], type: [1, "type"], disabled: [1, "disabled"], loading: [1, "loading"], fullWidth: [1, "fullWidth"] }, ngContentSelectors: _c0$
|
|
42
|
+
} }, inputs: { variant: [1, "variant"], size: [1, "size"], type: [1, "type"], disabled: [1, "disabled"], loading: [1, "loading"], fullWidth: [1, "fullWidth"] }, ngContentSelectors: _c0$E, 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) {
|
|
42
43
|
i0.ɵɵprojectionDef();
|
|
43
44
|
i0.ɵɵdomElementStart(0, "button", 0);
|
|
44
45
|
i0.ɵɵconditionalCreate(1, KptButton_Conditional_1_Template, 1, 0, "span", 1);
|
|
@@ -62,7 +63,7 @@ class KptButton {
|
|
|
62
63
|
}], 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 }] }] }); })();
|
|
63
64
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptButton, { className: "KptButton", filePath: "lib/button/button.component.ts", lineNumber: 32 }); })();
|
|
64
65
|
|
|
65
|
-
const _c0$
|
|
66
|
+
const _c0$D = ["*"];
|
|
66
67
|
function KptIconButton_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
67
68
|
i0.ɵɵdomElement(0, "span", 1);
|
|
68
69
|
} }
|
|
@@ -95,7 +96,7 @@ class KptIconButton {
|
|
|
95
96
|
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
96
97
|
}
|
|
97
98
|
static { this.ɵfac = function KptIconButton_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptIconButton)(); }; }
|
|
98
|
-
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"] }, ngContentSelectors: _c0$
|
|
99
|
+
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"] }, ngContentSelectors: _c0$D, decls: 3, vars: 8, 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) {
|
|
99
100
|
i0.ɵɵprojectionDef();
|
|
100
101
|
i0.ɵɵdomElementStart(0, "button", 0);
|
|
101
102
|
i0.ɵɵconditionalCreate(1, KptIconButton_Conditional_1_Template, 1, 0, "span", 1)(2, KptIconButton_Conditional_2_Template, 1, 0);
|
|
@@ -130,7 +131,7 @@ class KptIconButton {
|
|
|
130
131
|
}], 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 }] }] }); })();
|
|
131
132
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptIconButton, { className: "KptIconButton", filePath: "lib/icon-button/icon-button.component.ts", lineNumber: 36 }); })();
|
|
132
133
|
|
|
133
|
-
const _forTrack0$
|
|
134
|
+
const _forTrack0$e = ($index, $item) => $item.value;
|
|
134
135
|
function KptButtonGroup_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
135
136
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
136
137
|
i0.ɵɵdomElementStart(0, "button", 2);
|
|
@@ -175,7 +176,7 @@ class KptButtonGroup {
|
|
|
175
176
|
static { this.ɵfac = function KptButtonGroup_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptButtonGroup)(); }; }
|
|
176
177
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptButtonGroup, selectors: [["kpt-button-group"]], hostAttrs: [1, "kpt-button-group-host"], inputs: { options: [1, "options"], value: [1, "value"], size: [1, "size"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 3, vars: 1, consts: [["role", "group", 1, "kpt-button-group"], ["type", "button", 1, "kpt-button-group__item", 3, "is-active", "disabled"], ["type", "button", 1, "kpt-button-group__item", 3, "click", "disabled"]], template: function KptButtonGroup_Template(rf, ctx) { if (rf & 1) {
|
|
177
178
|
i0.ɵɵdomElementStart(0, "div", 0);
|
|
178
|
-
i0.ɵɵrepeaterCreate(1, KptButtonGroup_For_2_Template, 2, 5, "button", 1, _forTrack0$
|
|
179
|
+
i0.ɵɵrepeaterCreate(1, KptButtonGroup_For_2_Template, 2, 5, "button", 1, _forTrack0$e);
|
|
179
180
|
i0.ɵɵdomElementEnd();
|
|
180
181
|
} if (rf & 2) {
|
|
181
182
|
i0.ɵɵattribute("data-size", ctx.size());
|
|
@@ -202,7 +203,7 @@ class KptButtonGroup {
|
|
|
202
203
|
}], 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"] }] }); })();
|
|
203
204
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptButtonGroup, { className: "KptButtonGroup", filePath: "lib/button-group/button-group.component.ts", lineNumber: 41 }); })();
|
|
204
205
|
|
|
205
|
-
const _c0$
|
|
206
|
+
const _c0$C = ["*"];
|
|
206
207
|
/**
|
|
207
208
|
* Floating Action Button (FAB) — okrągły, wyniesiony przycisk akcji. Wariant `extended` = pigułka z tekstem.
|
|
208
209
|
*
|
|
@@ -225,7 +226,7 @@ class KptFab {
|
|
|
225
226
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
226
227
|
}
|
|
227
228
|
static { this.ɵfac = function KptFab_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptFab)(); }; }
|
|
228
|
-
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$
|
|
229
|
+
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$C, decls: 2, vars: 7, consts: [[1, "kpt-fab", 3, "type", "disabled"]], template: function KptFab_Template(rf, ctx) { if (rf & 1) {
|
|
229
230
|
i0.ɵɵprojectionDef();
|
|
230
231
|
i0.ɵɵdomElementStart(0, "button", 0);
|
|
231
232
|
i0.ɵɵprojection(1);
|
|
@@ -276,6 +277,8 @@ const KPT_ICONS = {
|
|
|
276
277
|
'strikethrough': '<path d="M5 12l14 0" /> <path d="M16 6.5a4 2 0 0 0 -4 -1.5h-1a3.5 3.5 0 0 0 0 7h2a3.5 3.5 0 0 1 0 7h-1.5a4 2 0 0 1 -4 -1.5" />',
|
|
277
278
|
'list': '<path d="M9 6l11 0" /> <path d="M9 12l11 0" /> <path d="M9 18l11 0" /> <path d="M5 6l0 .01" /> <path d="M5 12l0 .01" /> <path d="M5 18l0 .01" />',
|
|
278
279
|
'list-numbers': '<path d="M11 6h9" /> <path d="M11 12h9" /> <path d="M12 18h8" /> <path d="M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4" /> <path d="M6 10v-6l-2 2" />',
|
|
280
|
+
'indent-increase': '<path d="M20 6l-11 0" /> <path d="M20 12l-7 0" /> <path d="M20 18l-11 0" /> <path d="M4 8l4 4l-4 4" />',
|
|
281
|
+
'indent-decrease': '<path d="M20 6l-7 0" /> <path d="M20 12l-9 0" /> <path d="M20 18l-7 0" /> <path d="M8 8l-4 4l4 4" />',
|
|
279
282
|
'clear-formatting': '<path d="M17 15l4 4m0 -4l-4 4" /> <path d="M7 6v-1h11v1" /> <path d="M7 19l4 0" /> <path d="M13 5l-4 14" />',
|
|
280
283
|
'star': '<path d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245" />',
|
|
281
284
|
'plus': '<path d="M12 5l0 14" /> <path d="M5 12l14 0" />',
|
|
@@ -536,7 +539,7 @@ class KptAvatar {
|
|
|
536
539
|
}], 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 }] }] }); })();
|
|
537
540
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptAvatar, { className: "KptAvatar", filePath: "lib/avatar/avatar.component.ts", lineNumber: 46 }); })();
|
|
538
541
|
|
|
539
|
-
const _c0$
|
|
542
|
+
const _c0$B = ["*"];
|
|
540
543
|
/**
|
|
541
544
|
* Znacznik (badge) — licznik lub kropka statusu. Standalone lub nałożony na treść (`overlay`).
|
|
542
545
|
*
|
|
@@ -568,7 +571,7 @@ class KptBadge {
|
|
|
568
571
|
...(ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []));
|
|
569
572
|
}
|
|
570
573
|
static { this.ɵfac = function KptBadge_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptBadge)(); }; }
|
|
571
|
-
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$
|
|
574
|
+
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$B, decls: 3, vars: 7, consts: [[1, "kpt-badge"]], template: function KptBadge_Template(rf, ctx) { if (rf & 1) {
|
|
572
575
|
i0.ɵɵprojectionDef();
|
|
573
576
|
i0.ɵɵprojection(0);
|
|
574
577
|
i0.ɵɵdomElementStart(1, "span", 0);
|
|
@@ -832,6 +835,8 @@ const KPT_MESSAGES_EN = {
|
|
|
832
835
|
strike: 'Strikethrough',
|
|
833
836
|
ul: 'Bulleted list',
|
|
834
837
|
ol: 'Numbered list',
|
|
838
|
+
indent: 'Increase indent',
|
|
839
|
+
outdent: 'Decrease indent',
|
|
835
840
|
foreColor: 'Text color',
|
|
836
841
|
backColor: 'Text background color',
|
|
837
842
|
alignLeft: 'Align left',
|
|
@@ -878,6 +883,44 @@ const KPT_MESSAGES_EN = {
|
|
|
878
883
|
customColor: 'Color…',
|
|
879
884
|
},
|
|
880
885
|
},
|
|
886
|
+
auth: {
|
|
887
|
+
signInTitle: 'Sign in',
|
|
888
|
+
signInSubtitle: 'Use your e-mail and password.',
|
|
889
|
+
signUpTitle: 'Create account',
|
|
890
|
+
signUpSubtitle: 'It takes less than a minute.',
|
|
891
|
+
forgotTitle: 'Reset password',
|
|
892
|
+
forgotSubtitle: 'We will send a reset link to your e-mail.',
|
|
893
|
+
name: 'Full name',
|
|
894
|
+
email: 'E-mail',
|
|
895
|
+
emailPlaceholder: 'you@company.com',
|
|
896
|
+
password: 'Password',
|
|
897
|
+
passwordHint: 'At least {min} characters.',
|
|
898
|
+
confirmPassword: 'Repeat password',
|
|
899
|
+
remember: 'Remember me',
|
|
900
|
+
terms: 'I accept the terms of service',
|
|
901
|
+
forgotLink: 'Forgot password?',
|
|
902
|
+
backToSignIn: 'Back to sign in',
|
|
903
|
+
signInSubmit: 'Sign in',
|
|
904
|
+
signUpSubmit: 'Create account',
|
|
905
|
+
resetSubmit: 'Send reset link',
|
|
906
|
+
orContinueWith: 'or continue with',
|
|
907
|
+
continueWith: 'Continue with {provider}',
|
|
908
|
+
noAccount: 'No account yet?',
|
|
909
|
+
haveAccount: 'Already have an account?',
|
|
910
|
+
signInSwitch: 'Sign in',
|
|
911
|
+
signUpSwitch: 'Sign up',
|
|
912
|
+
errorRequired: 'This field is required',
|
|
913
|
+
errorEmail: 'Enter a valid e-mail address',
|
|
914
|
+
errorMinLength: 'Use at least {min} characters',
|
|
915
|
+
errorMismatch: 'Passwords do not match',
|
|
916
|
+
errorInvalid: 'Invalid value',
|
|
917
|
+
promo: {
|
|
918
|
+
signInTitle: 'Welcome back',
|
|
919
|
+
signInText: 'Sign in to pick up where you left off.',
|
|
920
|
+
signUpTitle: 'New here?',
|
|
921
|
+
signUpText: 'Create an account and start in a minute.',
|
|
922
|
+
},
|
|
923
|
+
},
|
|
881
924
|
};
|
|
882
925
|
const KPT_MESSAGES_PL = {
|
|
883
926
|
common: {
|
|
@@ -1100,6 +1143,8 @@ const KPT_MESSAGES_PL = {
|
|
|
1100
1143
|
strike: 'Przekreślenie',
|
|
1101
1144
|
ul: 'Lista punktowana',
|
|
1102
1145
|
ol: 'Lista numerowana',
|
|
1146
|
+
indent: 'Dodaj wcięcie',
|
|
1147
|
+
outdent: 'Usuń wcięcie',
|
|
1103
1148
|
foreColor: 'Kolor tekstu',
|
|
1104
1149
|
backColor: 'Kolor tła tekstu',
|
|
1105
1150
|
alignLeft: 'Wyrównaj do lewej',
|
|
@@ -1146,6 +1191,44 @@ const KPT_MESSAGES_PL = {
|
|
|
1146
1191
|
customColor: 'Kolor…',
|
|
1147
1192
|
},
|
|
1148
1193
|
},
|
|
1194
|
+
auth: {
|
|
1195
|
+
signInTitle: 'Zaloguj się',
|
|
1196
|
+
signInSubtitle: 'Użyj adresu e-mail i hasła.',
|
|
1197
|
+
signUpTitle: 'Załóż konto',
|
|
1198
|
+
signUpSubtitle: 'Zajmie mniej niż minutę.',
|
|
1199
|
+
forgotTitle: 'Zresetuj hasło',
|
|
1200
|
+
forgotSubtitle: 'Wyślemy link do zmiany hasła na podany adres.',
|
|
1201
|
+
name: 'Imię i nazwisko',
|
|
1202
|
+
email: 'E-mail',
|
|
1203
|
+
emailPlaceholder: 'jan@firma.pl',
|
|
1204
|
+
password: 'Hasło',
|
|
1205
|
+
passwordHint: 'Co najmniej {min} znaków.',
|
|
1206
|
+
confirmPassword: 'Powtórz hasło',
|
|
1207
|
+
remember: 'Zapamiętaj mnie',
|
|
1208
|
+
terms: 'Akceptuję regulamin',
|
|
1209
|
+
forgotLink: 'Nie pamiętasz hasła?',
|
|
1210
|
+
backToSignIn: 'Wróć do logowania',
|
|
1211
|
+
signInSubmit: 'Zaloguj się',
|
|
1212
|
+
signUpSubmit: 'Załóż konto',
|
|
1213
|
+
resetSubmit: 'Wyślij link',
|
|
1214
|
+
orContinueWith: 'lub kontynuuj przez',
|
|
1215
|
+
continueWith: 'Kontynuuj przez {provider}',
|
|
1216
|
+
noAccount: 'Nie masz jeszcze konta?',
|
|
1217
|
+
haveAccount: 'Masz już konto?',
|
|
1218
|
+
signInSwitch: 'Zaloguj się',
|
|
1219
|
+
signUpSwitch: 'Załóż konto',
|
|
1220
|
+
errorRequired: 'To pole jest wymagane',
|
|
1221
|
+
errorEmail: 'Podaj poprawny adres e-mail',
|
|
1222
|
+
errorMinLength: 'Użyj co najmniej {min} znaków',
|
|
1223
|
+
errorMismatch: 'Hasła nie są takie same',
|
|
1224
|
+
errorInvalid: 'Nieprawidłowa wartość',
|
|
1225
|
+
promo: {
|
|
1226
|
+
signInTitle: 'Witaj ponownie',
|
|
1227
|
+
signInText: 'Zaloguj się, by wrócić do pracy.',
|
|
1228
|
+
signUpTitle: 'Pierwszy raz u nas?',
|
|
1229
|
+
signUpText: 'Załóż konto i zacznij w minutę.',
|
|
1230
|
+
},
|
|
1231
|
+
},
|
|
1149
1232
|
};
|
|
1150
1233
|
|
|
1151
1234
|
/** Deep-merge `patch` na kopię `base` (łączy tylko obiekty, wartości nadpisuje). */
|
|
@@ -1235,7 +1318,7 @@ class KptI18n {
|
|
|
1235
1318
|
args: [{ providedIn: 'root' }]
|
|
1236
1319
|
}], () => [], null); })();
|
|
1237
1320
|
|
|
1238
|
-
const _c0$
|
|
1321
|
+
const _c0$A = ["*"];
|
|
1239
1322
|
function KptSplitButton_ng_template_6_For_2_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
1240
1323
|
i0.ɵɵelement(0, "div", 7);
|
|
1241
1324
|
} }
|
|
@@ -1377,7 +1460,7 @@ class KptSplitButton {
|
|
|
1377
1460
|
this.open.set(false);
|
|
1378
1461
|
}
|
|
1379
1462
|
static { this.ɵfac = function KptSplitButton_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptSplitButton)(); }; }
|
|
1380
|
-
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$
|
|
1463
|
+
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$A, 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) {
|
|
1381
1464
|
i0.ɵɵprojectionDef();
|
|
1382
1465
|
i0.ɵɵelementStart(0, "div", 1)(1, "button", 2);
|
|
1383
1466
|
i0.ɵɵlistener("click", function KptSplitButton_Template_button_click_1_listener() { return ctx.primaryClick.emit(); });
|
|
@@ -1575,7 +1658,7 @@ function provideKptI18n(config = {}) {
|
|
|
1575
1658
|
return makeEnvironmentProviders([{ provide: KPT_I18N_CONFIG, useValue: config }]);
|
|
1576
1659
|
}
|
|
1577
1660
|
|
|
1578
|
-
const _c0$
|
|
1661
|
+
const _c0$z = ["*"];
|
|
1579
1662
|
function KptChip_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
1580
1663
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
1581
1664
|
i0.ɵɵelementStart(0, "button", 2);
|
|
@@ -1604,7 +1687,7 @@ class KptChip {
|
|
|
1604
1687
|
this.i18n = inject(KptI18n);
|
|
1605
1688
|
}
|
|
1606
1689
|
static { this.ɵfac = function KptChip_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptChip)(); }; }
|
|
1607
|
-
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$
|
|
1690
|
+
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$z, decls: 3, vars: 4, 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) {
|
|
1608
1691
|
i0.ɵɵprojectionDef();
|
|
1609
1692
|
i0.ɵɵelementStart(0, "span", 0);
|
|
1610
1693
|
i0.ɵɵprojection(1);
|
|
@@ -1825,7 +1908,7 @@ class KptSkeleton {
|
|
|
1825
1908
|
/** Token DI, przez który kontrolka zgłasza `kpt-form-field` swój stan wypełnienia. */
|
|
1826
1909
|
const KPT_FORM_FIELD_CONTROL = new InjectionToken('KPT_FORM_FIELD_CONTROL');
|
|
1827
1910
|
|
|
1828
|
-
const _c0$
|
|
1911
|
+
const _c0$y = ["*"];
|
|
1829
1912
|
function KptFormField_Conditional_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
1830
1913
|
i0.ɵɵdomElementStart(0, "span", 6);
|
|
1831
1914
|
i0.ɵɵtext(1, "*");
|
|
@@ -1934,7 +2017,7 @@ class KptFormField {
|
|
|
1934
2017
|
i0.ɵɵqueryAdvance();
|
|
1935
2018
|
} }, hostAttrs: [1, "kpt-form-field-host"], hostBindings: function KptFormField_HostBindings(rf, ctx) { if (rf & 1) {
|
|
1936
2019
|
i0.ɵɵlistener("input", function KptFormField_input_HostBindingHandler() { return ctx.updateFilled(); })("change", function KptFormField_change_HostBindingHandler() { return ctx.updateFilled(); });
|
|
1937
|
-
} }, inputs: { label: [1, "label"], hint: [1, "hint"], error: [1, "error"], required: [1, "required"], controlId: [1, "controlId"], labelType: [1, "labelType"] }, ngContentSelectors: _c0$
|
|
2020
|
+
} }, inputs: { label: [1, "label"], hint: [1, "hint"], error: [1, "error"], required: [1, "required"], controlId: [1, "controlId"], labelType: [1, "labelType"] }, ngContentSelectors: _c0$y, 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) {
|
|
1938
2021
|
i0.ɵɵprojectionDef();
|
|
1939
2022
|
i0.ɵɵdomElementStart(0, "div", 0)(1, "div", 1);
|
|
1940
2023
|
i0.ɵɵconditionalCreate(2, KptFormField_Conditional_2_Template, 3, 3, "label", 2);
|
|
@@ -1964,7 +2047,7 @@ class KptFormField {
|
|
|
1964
2047
|
}], () => [], { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], controlId: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlId", required: false }] }], labelType: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelType", required: false }] }], control: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KPT_FORM_FIELD_CONTROL), { ...{ descendants: true }, isSignal: true }] }] }); })();
|
|
1965
2048
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptFormField, { className: "KptFormField", filePath: "lib/form-field/form-field.component.ts", lineNumber: 50 }); })();
|
|
1966
2049
|
|
|
1967
|
-
let nextUniqueId = 0;
|
|
2050
|
+
let nextUniqueId$2 = 0;
|
|
1968
2051
|
/**
|
|
1969
2052
|
* Pole tekstowe Koncept UI zintegrowane z Angular Signal Forms.
|
|
1970
2053
|
* Implementuje `FormValueControl<string>` — wiąż je dyrektywą `FormField`:
|
|
@@ -2002,10 +2085,13 @@ class KptInput {
|
|
|
2002
2085
|
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
2003
2086
|
this.placeholder = input('', /* @ts-ignore */
|
|
2004
2087
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2005
|
-
this.id = input(`kpt-input-${++nextUniqueId}`, /* @ts-ignore */
|
|
2088
|
+
this.id = input(`kpt-input-${++nextUniqueId$2}`, /* @ts-ignore */
|
|
2006
2089
|
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
2007
2090
|
this.ariaLabel = input(null, /* @ts-ignore */
|
|
2008
2091
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
2092
|
+
/** Podpowiedź autouzupełniania dla przeglądarki i menedżera haseł (np. 'email', 'current-password'). */
|
|
2093
|
+
this.autocomplete = input(null, /* @ts-ignore */
|
|
2094
|
+
...(ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []));
|
|
2009
2095
|
}
|
|
2010
2096
|
onInput(event) {
|
|
2011
2097
|
this.value.set(event.target.value);
|
|
@@ -2013,13 +2099,13 @@ class KptInput {
|
|
|
2013
2099
|
static { this.ɵfac = function KptInput_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptInput)(); }; }
|
|
2014
2100
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptInput, selectors: [["kpt-input"]], hostAttrs: [1, "kpt-input-host"], hostVars: 1, hostBindings: function KptInput_HostBindings(rf, ctx) { if (rf & 2) {
|
|
2015
2101
|
i0.ɵɵattribute("id", null);
|
|
2016
|
-
} }, inputs: { value: [1, "value"], disabled: [1, "disabled"], readonly: [1, "readonly"], required: [1, "required"], invalid: [1, "invalid"], errors: [1, "errors"], touched: [1, "touched"], type: [1, "type"], placeholder: [1, "placeholder"], id: [1, "id"], ariaLabel: [1, "ariaLabel"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 1, vars:
|
|
2102
|
+
} }, inputs: { value: [1, "value"], disabled: [1, "disabled"], readonly: [1, "readonly"], required: [1, "required"], invalid: [1, "invalid"], errors: [1, "errors"], touched: [1, "touched"], type: [1, "type"], placeholder: [1, "placeholder"], id: [1, "id"], ariaLabel: [1, "ariaLabel"], autocomplete: [1, "autocomplete"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 1, vars: 10, consts: [[1, "kpt-input__field", 3, "input", "blur", "id", "type", "value", "placeholder", "disabled", "readOnly"]], template: function KptInput_Template(rf, ctx) { if (rf & 1) {
|
|
2017
2103
|
i0.ɵɵdomElementStart(0, "input", 0);
|
|
2018
2104
|
i0.ɵɵdomListener("input", function KptInput_Template_input_input_0_listener($event) { return ctx.onInput($event); })("blur", function KptInput_Template_input_blur_0_listener() { return ctx.touch.emit(); });
|
|
2019
2105
|
i0.ɵɵdomElementEnd();
|
|
2020
2106
|
} if (rf & 2) {
|
|
2021
2107
|
i0.ɵɵdomProperty("id", ctx.id())("type", ctx.type())("value", ctx.value())("placeholder", ctx.placeholder())("disabled", ctx.disabled())("readOnly", ctx.readonly());
|
|
2022
|
-
i0.ɵɵattribute("aria-required", ctx.required() ? "true" : null)("aria-label", ctx.ariaLabel())("aria-invalid", ctx.showInvalid() ? "true" : null);
|
|
2108
|
+
i0.ɵɵattribute("aria-required", ctx.required() ? "true" : null)("aria-label", ctx.ariaLabel())("autocomplete", ctx.autocomplete())("aria-invalid", ctx.showInvalid() ? "true" : null);
|
|
2023
2109
|
} }, styles: ["@layer kpt.components{.kpt-input-host{display:block}.kpt-input__field{display:block;width:100%;box-sizing:border-box;height:2.5rem;padding-inline:var(--%NS%kpt-space-3, .75rem);border:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-form-field-border);border-radius:var(--%NS%kpt-form-field-radius, .5rem);font-family:inherit;font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-form-field-text);background-color:var(--%NS%kpt-form-field-bg);transition:border-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard),box-shadow var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-input__field::placeholder{color:var(--%NS%kpt-form-field-placeholder)}.kpt-input__field:hover:not(:disabled):not([aria-invalid=true]){border-color:var(--%NS%kpt-form-field-border-hover)}.kpt-input__field:focus-visible{outline:none;border-color:var(--%NS%kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--%NS%kpt-form-field-border-focus) 30%,transparent)}.kpt-input__field[aria-invalid=true]{border-color:var(--%NS%kpt-form-field-border-error)}.kpt-input__field[aria-invalid=true]:focus-visible{box-shadow:0 0 0 2px color-mix(in oklch,var(--%NS%kpt-form-field-border-error) 30%,transparent)}.kpt-input__field:disabled{cursor:not-allowed;opacity:.6;background-color:var(--%NS%kpt-color-surface-variant)}}\n"], encapsulation: 2 }); }
|
|
2024
2110
|
}
|
|
2025
2111
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptInput, [{
|
|
@@ -2028,11 +2114,11 @@ class KptInput {
|
|
|
2028
2114
|
class: 'kpt-input-host',
|
|
2029
2115
|
// id należy wyłącznie do wewnętrznego <input> (powiązanie label[for]); host go nie nosi
|
|
2030
2116
|
'[attr.id]': 'null',
|
|
2031
|
-
}, template: "<input\n class=\"kpt-input__field\"\n [id]=\"id()\"\n [type]=\"type()\"\n [value]=\"value()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-invalid]=\"showInvalid() ? 'true' : null\"\n (input)=\"onInput($event)\"\n (blur)=\"touch.emit()\"\n/>\n", styles: ["@layer kpt.components{.kpt-input-host{display:block}.kpt-input__field{display:block;width:100%;box-sizing:border-box;height:2.5rem;padding-inline:var(--kpt-space-3, .75rem);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);font-family:inherit;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-form-field-text);background-color:var(--kpt-form-field-bg);transition:border-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard),box-shadow var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-input__field::placeholder{color:var(--kpt-form-field-placeholder)}.kpt-input__field:hover:not(:disabled):not([aria-invalid=true]){border-color:var(--kpt-form-field-border-hover)}.kpt-input__field:focus-visible{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-input__field[aria-invalid=true]{border-color:var(--kpt-form-field-border-error)}.kpt-input__field[aria-invalid=true]:focus-visible{box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-error) 30%,transparent)}.kpt-input__field:disabled{cursor:not-allowed;opacity:.6;background-color:var(--kpt-color-surface-variant)}}\n"] }]
|
|
2032
|
-
}], 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 }] }] }); })();
|
|
2117
|
+
}, template: "<input\n class=\"kpt-input__field\"\n [id]=\"id()\"\n [type]=\"type()\"\n [value]=\"value()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readOnly]=\"readonly()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.aria-invalid]=\"showInvalid() ? 'true' : null\"\n (input)=\"onInput($event)\"\n (blur)=\"touch.emit()\"\n/>\n", styles: ["@layer kpt.components{.kpt-input-host{display:block}.kpt-input__field{display:block;width:100%;box-sizing:border-box;height:2.5rem;padding-inline:var(--kpt-space-3, .75rem);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);font-family:inherit;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-form-field-text);background-color:var(--kpt-form-field-bg);transition:border-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard),box-shadow var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-input__field::placeholder{color:var(--kpt-form-field-placeholder)}.kpt-input__field:hover:not(:disabled):not([aria-invalid=true]){border-color:var(--kpt-form-field-border-hover)}.kpt-input__field:focus-visible{outline:none;border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-input__field[aria-invalid=true]{border-color:var(--kpt-form-field-border-error)}.kpt-input__field[aria-invalid=true]:focus-visible{box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-error) 30%,transparent)}.kpt-input__field:disabled{cursor:not-allowed;opacity:.6;background-color:var(--kpt-color-surface-variant)}}\n"] }]
|
|
2118
|
+
}], 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 }] }] }); })();
|
|
2033
2119
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptInput, { className: "KptInput", filePath: "lib/input/input.component.ts", lineNumber: 49 }); })();
|
|
2034
2120
|
|
|
2035
|
-
const _c0$
|
|
2121
|
+
const _c0$x = ["*"];
|
|
2036
2122
|
function KptCheckbox_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
2037
2123
|
i0.ɵɵdomElementStart(0, "span", 5);
|
|
2038
2124
|
i0.ɵɵtext(1);
|
|
@@ -2063,7 +2149,7 @@ class KptCheckbox {
|
|
|
2063
2149
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
2064
2150
|
}
|
|
2065
2151
|
static { this.ɵfac = function KptCheckbox_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptCheckbox)(); }; }
|
|
2066
|
-
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$
|
|
2152
|
+
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$x, 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) {
|
|
2067
2153
|
i0.ɵɵprojectionDef();
|
|
2068
2154
|
i0.ɵɵdomElementStart(0, "label", 0)(1, "input", 1);
|
|
2069
2155
|
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(); });
|
|
@@ -2110,7 +2196,7 @@ class KptCheckbox {
|
|
|
2110
2196
|
}], 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 }] }] }); })();
|
|
2111
2197
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptCheckbox, { className: "KptCheckbox", filePath: "lib/checkbox/checkbox.component.ts", lineNumber: 44 }); })();
|
|
2112
2198
|
|
|
2113
|
-
const _c0$
|
|
2199
|
+
const _c0$w = ["*"];
|
|
2114
2200
|
function KptSwitch_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
2115
2201
|
i0.ɵɵdomElementStart(0, "span", 1);
|
|
2116
2202
|
i0.ɵɵtext(1);
|
|
@@ -2176,7 +2262,7 @@ class KptSwitch {
|
|
|
2176
2262
|
...(ngDevMode ? [{ debugName: "stateLabel" }] : /* istanbul ignore next */ []));
|
|
2177
2263
|
}
|
|
2178
2264
|
static { this.ɵfac = function KptSwitch_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptSwitch)(); }; }
|
|
2179
|
-
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$
|
|
2265
|
+
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$w, 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) {
|
|
2180
2266
|
i0.ɵɵprojectionDef();
|
|
2181
2267
|
i0.ɵɵdomElementStart(0, "label", 0);
|
|
2182
2268
|
i0.ɵɵconditionalCreate(1, KptSwitch_Conditional_1_Template, 2, 1, "span", 1);
|
|
@@ -2233,7 +2319,7 @@ class KptSwitch {
|
|
|
2233
2319
|
}], 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 }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], onLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "onLabel", required: false }] }], offLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "offLabel", required: false }] }] }); })();
|
|
2234
2320
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptSwitch, { className: "KptSwitch", filePath: "lib/switch/switch.component.ts", lineNumber: 53 }); })();
|
|
2235
2321
|
|
|
2236
|
-
const _forTrack0$
|
|
2322
|
+
const _forTrack0$d = ($index, $item) => $item.value;
|
|
2237
2323
|
function KptSwitchGroup_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
2238
2324
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
2239
2325
|
i0.ɵɵelementStart(0, "kpt-switch", 2);
|
|
@@ -2321,7 +2407,7 @@ class KptSwitchGroup {
|
|
|
2321
2407
|
static { this.ɵfac = function KptSwitchGroup_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptSwitchGroup)(); }; }
|
|
2322
2408
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptSwitchGroup, selectors: [["kpt-switch-group"]], hostAttrs: [1, "kpt-switch-group-host"], inputs: { value: [1, "value"], options: [1, "options"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], orientation: [1, "orientation"], multiple: [1, "multiple"], allowDeselect: [1, "allowDeselect"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 3, vars: 3, consts: [["role", "group", 1, "kpt-switch-group"], [1, "kpt-switch-group__item", 3, "checked", "label", "disabled"], [1, "kpt-switch-group__item", 3, "checkedChange", "touch", "checked", "label", "disabled"]], template: function KptSwitchGroup_Template(rf, ctx) { if (rf & 1) {
|
|
2323
2409
|
i0.ɵɵelementStart(0, "div", 0);
|
|
2324
|
-
i0.ɵɵrepeaterCreate(1, KptSwitchGroup_For_2_Template, 1, 3, "kpt-switch", 1, _forTrack0$
|
|
2410
|
+
i0.ɵɵrepeaterCreate(1, KptSwitchGroup_For_2_Template, 1, 3, "kpt-switch", 1, _forTrack0$d);
|
|
2325
2411
|
i0.ɵɵelementEnd();
|
|
2326
2412
|
} if (rf & 2) {
|
|
2327
2413
|
i0.ɵɵclassProp("kpt-switch-group--horizontal", ctx.orientation() === "horizontal");
|
|
@@ -2354,7 +2440,7 @@ class KptSwitchGroup {
|
|
|
2354
2440
|
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", 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"] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], allowDeselect: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowDeselect", required: false }] }] }); })();
|
|
2355
2441
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptSwitchGroup, { className: "KptSwitchGroup", filePath: "lib/switch-group/switch-group.component.ts", lineNumber: 52 }); })();
|
|
2356
2442
|
|
|
2357
|
-
const _forTrack0$
|
|
2443
|
+
const _forTrack0$c = ($index, $item) => $item.value;
|
|
2358
2444
|
function KptRadioGroup_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
2359
2445
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
2360
2446
|
i0.ɵɵdomElementStart(0, "label", 2)(1, "input", 3);
|
|
@@ -2397,7 +2483,7 @@ class KptRadioGroup {
|
|
|
2397
2483
|
static { this.ɵfac = function KptRadioGroup_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptRadioGroup)(); }; }
|
|
2398
2484
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptRadioGroup, selectors: [["kpt-radio-group"]], hostAttrs: [1, "kpt-radio-group-host"], inputs: { value: [1, "value"], options: [1, "options"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"], name: [1, "name"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 3, vars: 1, consts: [["role", "radiogroup", 1, "kpt-radio-group"], [1, "kpt-radio", 3, "kpt-radio--disabled"], [1, "kpt-radio"], ["type", "radio", 1, "kpt-radio__input", 3, "change", "blur", "name", "checked", "disabled"], ["aria-hidden", "true", 1, "kpt-radio__dot"], [1, "kpt-radio__label"]], template: function KptRadioGroup_Template(rf, ctx) { if (rf & 1) {
|
|
2399
2485
|
i0.ɵɵdomElementStart(0, "div", 0);
|
|
2400
|
-
i0.ɵɵrepeaterCreate(1, KptRadioGroup_For_2_Template, 5, 6, "label", 1, _forTrack0$
|
|
2486
|
+
i0.ɵɵrepeaterCreate(1, KptRadioGroup_For_2_Template, 5, 6, "label", 1, _forTrack0$c);
|
|
2401
2487
|
i0.ɵɵdomElementEnd();
|
|
2402
2488
|
} if (rf & 2) {
|
|
2403
2489
|
i0.ɵɵattribute("aria-invalid", ctx.showInvalid() ? "true" : null);
|
|
@@ -2429,7 +2515,7 @@ class KptRadioGroup {
|
|
|
2429
2515
|
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", 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"] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }] }); })();
|
|
2430
2516
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptRadioGroup, { className: "KptRadioGroup", filePath: "lib/radio-group/radio-group.component.ts", lineNumber: 46 }); })();
|
|
2431
2517
|
|
|
2432
|
-
const _forTrack0$
|
|
2518
|
+
const _forTrack0$b = ($index, $item) => $item.value;
|
|
2433
2519
|
function KptSelect_Conditional_3_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
2434
2520
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
2435
2521
|
i0.ɵɵelementStart(0, "span", 7);
|
|
@@ -2447,7 +2533,7 @@ function KptSelect_Conditional_3_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
2447
2533
|
i0.ɵɵattribute("aria-label", ctx_r2.i18n.t("select.removeChip"));
|
|
2448
2534
|
} }
|
|
2449
2535
|
function KptSelect_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
2450
|
-
i0.ɵɵrepeaterCreate(0, KptSelect_Conditional_3_For_1_Template, 4, 2, "span", 7, _forTrack0$
|
|
2536
|
+
i0.ɵɵrepeaterCreate(0, KptSelect_Conditional_3_For_1_Template, 4, 2, "span", 7, _forTrack0$b);
|
|
2451
2537
|
} if (rf & 2) {
|
|
2452
2538
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
2453
2539
|
i0.ɵɵrepeater(ctx_r2.selectedOptions());
|
|
@@ -2533,7 +2619,7 @@ function KptSelect_ng_template_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
2533
2619
|
i0.ɵɵlistener("keydown", function KptSelect_ng_template_7_Template_div_keydown_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onPanelKeydown($event)); });
|
|
2534
2620
|
i0.ɵɵconditionalCreate(1, KptSelect_ng_template_7_Conditional_1_Template, 3, 2, "div", 11);
|
|
2535
2621
|
i0.ɵɵelementStart(2, "ul", 12);
|
|
2536
|
-
i0.ɵɵrepeaterCreate(3, KptSelect_ng_template_7_For_4_Template, 5, 10, "li", 13, _forTrack0$
|
|
2622
|
+
i0.ɵɵrepeaterCreate(3, KptSelect_ng_template_7_For_4_Template, 5, 10, "li", 13, _forTrack0$b, false, KptSelect_ng_template_7_ForEmpty_5_Template, 2, 1, "li", 14);
|
|
2537
2623
|
i0.ɵɵelementEnd()();
|
|
2538
2624
|
} if (rf & 2) {
|
|
2539
2625
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
@@ -2736,7 +2822,7 @@ function monthNames(locale) {
|
|
|
2736
2822
|
return Array.from({ length: 12 }, (_, i) => fmt.format(new Date(Date.UTC(2024, i, 1))));
|
|
2737
2823
|
}
|
|
2738
2824
|
|
|
2739
|
-
const _forTrack0$
|
|
2825
|
+
const _forTrack0$a = ($index, $item) => $item.hour24;
|
|
2740
2826
|
function KptClock_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
2741
2827
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
2742
2828
|
i0.ɵɵdomElementStart(0, "div", 5)(1, "button", 9);
|
|
@@ -2768,7 +2854,7 @@ function KptClock_Conditional_13_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
2768
2854
|
i0.ɵɵtextInterpolate(mark_r6.label);
|
|
2769
2855
|
} }
|
|
2770
2856
|
function KptClock_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
2771
|
-
i0.ɵɵrepeaterCreate(0, KptClock_Conditional_13_For_1_Template, 2, 9, "button", 10, _forTrack0$
|
|
2857
|
+
i0.ɵɵrepeaterCreate(0, KptClock_Conditional_13_For_1_Template, 2, 9, "button", 10, _forTrack0$a);
|
|
2772
2858
|
} if (rf & 2) {
|
|
2773
2859
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
2774
2860
|
i0.ɵɵrepeater(ctx_r2.hourMarks());
|
|
@@ -2787,7 +2873,7 @@ function KptClock_Conditional_14_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
2787
2873
|
i0.ɵɵtextInterpolate(mark_r8.label);
|
|
2788
2874
|
} }
|
|
2789
2875
|
function KptClock_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
2790
|
-
i0.ɵɵrepeaterCreate(0, KptClock_Conditional_14_For_1_Template, 2, 7, "button", 12, _forTrack0$
|
|
2876
|
+
i0.ɵɵrepeaterCreate(0, KptClock_Conditional_14_For_1_Template, 2, 7, "button", 12, _forTrack0$a);
|
|
2791
2877
|
} if (rf & 2) {
|
|
2792
2878
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
2793
2879
|
i0.ɵɵrepeater(ctx_r2.minuteMarks());
|
|
@@ -3044,7 +3130,7 @@ class KptClock {
|
|
|
3044
3130
|
}], () => [], { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }] }); })();
|
|
3045
3131
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptClock, { className: "KptClock", filePath: "lib/datepicker/clock.component.ts", lineNumber: 100 }); })();
|
|
3046
3132
|
|
|
3047
|
-
const _forTrack0$
|
|
3133
|
+
const _forTrack0$9 = ($index, $item) => $item.iso;
|
|
3048
3134
|
const _forTrack1$2 = ($index, $item) => $item.label;
|
|
3049
3135
|
function KptDatepicker_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
3050
3136
|
i0.ɵɵelementStart(0, "span", 2);
|
|
@@ -3217,7 +3303,7 @@ function KptDatepicker_ng_template_7_Conditional_2_Case_8_For_5_For_1_Template(r
|
|
|
3217
3303
|
i0.ɵɵtextInterpolate(cell_r13.day);
|
|
3218
3304
|
} }
|
|
3219
3305
|
function KptDatepicker_ng_template_7_Conditional_2_Case_8_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
3220
|
-
i0.ɵɵrepeaterCreate(0, KptDatepicker_ng_template_7_Conditional_2_Case_8_For_5_For_1_Template, 2, 9, "button", 28, _forTrack0$
|
|
3306
|
+
i0.ɵɵrepeaterCreate(0, KptDatepicker_ng_template_7_Conditional_2_Case_8_For_5_For_1_Template, 2, 9, "button", 28, _forTrack0$9);
|
|
3221
3307
|
} if (rf & 2) {
|
|
3222
3308
|
const week_r14 = ctx.$implicit;
|
|
3223
3309
|
i0.ɵɵrepeater(week_r14);
|
|
@@ -3923,7 +4009,7 @@ class KptDatepicker {
|
|
|
3923
4009
|
}], () => [], { 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"] }] }); })();
|
|
3924
4010
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDatepicker, { className: "KptDatepicker", filePath: "lib/datepicker/datepicker.component.ts", lineNumber: 81 }); })();
|
|
3925
4011
|
|
|
3926
|
-
const _c0$
|
|
4012
|
+
const _c0$v = ["ta"];
|
|
3927
4013
|
/**
|
|
3928
4014
|
* Pole wieloliniowe (textarea) na Signal Forms, z opcjonalnym auto-resize.
|
|
3929
4015
|
*
|
|
@@ -3968,7 +4054,7 @@ class KptTextarea {
|
|
|
3968
4054
|
}
|
|
3969
4055
|
static { this.ɵfac = function KptTextarea_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptTextarea)(); }; }
|
|
3970
4056
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptTextarea, selectors: [["kpt-textarea"]], viewQuery: function KptTextarea_Query(rf, ctx) { if (rf & 1) {
|
|
3971
|
-
i0.ɵɵviewQuerySignal(ctx.ta, _c0$
|
|
4057
|
+
i0.ɵɵviewQuerySignal(ctx.ta, _c0$v, 5);
|
|
3972
4058
|
} if (rf & 2) {
|
|
3973
4059
|
i0.ɵɵqueryAdvance();
|
|
3974
4060
|
} }, 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) {
|
|
@@ -4120,8 +4206,8 @@ class KptTooltip {
|
|
|
4120
4206
|
}]
|
|
4121
4207
|
}], 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 }] }] }); })();
|
|
4122
4208
|
|
|
4123
|
-
const _c0$
|
|
4124
|
-
const _forTrack0$
|
|
4209
|
+
const _c0$u = ["editor"];
|
|
4210
|
+
const _forTrack0$8 = ($index, $item) => $item.tag;
|
|
4125
4211
|
function KptRichText_For_3_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
4126
4212
|
i0.ɵɵelement(0, "span", 11);
|
|
4127
4213
|
} }
|
|
@@ -4142,7 +4228,7 @@ function KptRichText_For_3_For_2_Case_0_ng_template_5_For_2_Template(rf, ctx) {
|
|
|
4142
4228
|
} }
|
|
4143
4229
|
function KptRichText_For_3_For_2_Case_0_ng_template_5_Template(rf, ctx) { if (rf & 1) {
|
|
4144
4230
|
i0.ɵɵelementStart(0, "ul", 16);
|
|
4145
|
-
i0.ɵɵrepeaterCreate(1, KptRichText_For_3_For_2_Case_0_ng_template_5_For_2_Template, 2, 6, "li", 17, _forTrack0$
|
|
4231
|
+
i0.ɵɵrepeaterCreate(1, KptRichText_For_3_For_2_Case_0_ng_template_5_For_2_Template, 2, 6, "li", 17, _forTrack0$8);
|
|
4146
4232
|
i0.ɵɵelementEnd();
|
|
4147
4233
|
} if (rf & 2) {
|
|
4148
4234
|
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
@@ -4292,8 +4378,8 @@ function KptRichText_For_3_For_2_Case_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
4292
4378
|
const item_r6 = i0.ɵɵnextContext().$implicit;
|
|
4293
4379
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
4294
4380
|
i0.ɵɵclassProp("is-active", ctx_r1.isActive(item_r6));
|
|
4295
|
-
i0.ɵɵproperty("kptTooltip", ctx_r1.aria(item_r6))("disabled", ctx_r1.disabled());
|
|
4296
|
-
i0.ɵɵattribute("aria-label", ctx_r1.aria(item_r6))("aria-pressed", ctx_r1.
|
|
4381
|
+
i0.ɵɵproperty("kptTooltip", ctx_r1.aria(item_r6))("disabled", ctx_r1.disabled() || !ctx_r1.enabled(item_r6));
|
|
4382
|
+
i0.ɵɵattribute("aria-label", ctx_r1.aria(item_r6))("aria-pressed", ctx_r1.pressed(item_r6));
|
|
4297
4383
|
i0.ɵɵadvance();
|
|
4298
4384
|
i0.ɵɵproperty("name", ctx_r1.icon(item_r6));
|
|
4299
4385
|
} }
|
|
@@ -4327,7 +4413,7 @@ function KptRichText_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
4327
4413
|
function KptRichText_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
4328
4414
|
const _r22 = i0.ɵɵgetCurrentView();
|
|
4329
4415
|
i0.ɵɵelementStart(0, "div", 31, 5);
|
|
4330
|
-
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()); })("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()); });
|
|
4416
|
+
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()); });
|
|
4331
4417
|
i0.ɵɵelementEnd();
|
|
4332
4418
|
} if (rf & 2) {
|
|
4333
4419
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -4594,6 +4680,8 @@ const ICON = {
|
|
|
4594
4680
|
strike: 'strikethrough',
|
|
4595
4681
|
ul: 'list',
|
|
4596
4682
|
ol: 'list-numbers',
|
|
4683
|
+
indent: 'indent-increase',
|
|
4684
|
+
outdent: 'indent-decrease',
|
|
4597
4685
|
foreColor: 'palette',
|
|
4598
4686
|
backColor: 'highlight',
|
|
4599
4687
|
alignLeft: 'align-left',
|
|
@@ -4625,7 +4713,7 @@ const SWATCHES = [
|
|
|
4625
4713
|
];
|
|
4626
4714
|
const DEFAULT_TOOLBAR = [
|
|
4627
4715
|
['copy', 'paste', 'pasteText'],
|
|
4628
|
-
['heading', 'bold', 'italic', 'underline', 'strike', 'ul', 'ol'],
|
|
4716
|
+
['heading', 'bold', 'italic', 'underline', 'strike', 'ul', 'ol', 'indent', 'outdent'],
|
|
4629
4717
|
['foreColor', 'backColor'],
|
|
4630
4718
|
['alignLeft', 'alignCenter', 'alignRight', 'alignJustify'],
|
|
4631
4719
|
['link', 'table', 'clear', 'html'],
|
|
@@ -4663,6 +4751,8 @@ class KptRichText {
|
|
|
4663
4751
|
...(ngDevMode ? [{ debugName: "toolbar" }] : /* istanbul ignore next */ []));
|
|
4664
4752
|
this.placeholder = input('', /* @ts-ignore */
|
|
4665
4753
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
4754
|
+
/** Maksymalna głębokość zagnieżdżenia list (Tab / „Dodaj wcięcie"). */
|
|
4755
|
+
this.maxListLevel = input(6, { ...(ngDevMode ? { debugName: "maxListLevel" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
4666
4756
|
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4667
4757
|
this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
4668
4758
|
this.touched = input(false, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
@@ -4723,6 +4813,10 @@ class KptRichText {
|
|
|
4723
4813
|
...(ngDevMode ? [{ debugName: "styleLabel" }] : /* istanbul ignore next */ []));
|
|
4724
4814
|
this.activeCmds = signal(new Set(), /* @ts-ignore */
|
|
4725
4815
|
...(ngDevMode ? [{ debugName: "activeCmds" }] : /* istanbul ignore next */ []));
|
|
4816
|
+
this.canIndent = signal(false, /* @ts-ignore */
|
|
4817
|
+
...(ngDevMode ? [{ debugName: "canIndent" }] : /* istanbul ignore next */ []));
|
|
4818
|
+
this.canOutdent = signal(false, /* @ts-ignore */
|
|
4819
|
+
...(ngDevMode ? [{ debugName: "canOutdent" }] : /* istanbul ignore next */ []));
|
|
4726
4820
|
this.currentBlock = signal('p', /* @ts-ignore */
|
|
4727
4821
|
...(ngDevMode ? [{ debugName: "currentBlock" }] : /* istanbul ignore next */ []));
|
|
4728
4822
|
this.positions = [
|
|
@@ -4772,39 +4866,69 @@ class KptRichText {
|
|
|
4772
4866
|
const cmd = COMMAND[item];
|
|
4773
4867
|
return !!cmd && this.activeCmds().has(cmd);
|
|
4774
4868
|
}
|
|
4869
|
+
/** `aria-pressed` tylko dla przełączników — wcięcia są akcjami, nie stanem. */
|
|
4870
|
+
pressed(item) {
|
|
4871
|
+
return item === 'indent' || item === 'outdent' ? null : this.isActive(item);
|
|
4872
|
+
}
|
|
4873
|
+
/** Wcięcia są aktywne wyłącznie tam, gdzie faktycznie coś zrobią (kursor w liście). */
|
|
4874
|
+
enabled(item) {
|
|
4875
|
+
if (item === 'indent')
|
|
4876
|
+
return this.canIndent();
|
|
4877
|
+
if (item === 'outdent')
|
|
4878
|
+
return this.canOutdent();
|
|
4879
|
+
return true;
|
|
4880
|
+
}
|
|
4775
4881
|
inEditor() {
|
|
4776
4882
|
const el = this.editor()?.nativeElement;
|
|
4777
4883
|
const sel = window.getSelection();
|
|
4778
4884
|
return !!el && !!sel && sel.rangeCount > 0 && el.contains(sel.anchorNode);
|
|
4779
4885
|
}
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4886
|
+
/**
|
|
4887
|
+
* Jedyne wywołanie `document.execCommand` w komponencie. API jest formalnie deprecated, ale nie
|
|
4888
|
+
* ma zamiennika: to jedyny sposób formatowania, który trafia do natywnego stosu undo przeglądarki
|
|
4889
|
+
* (Ctrl+Z). Własna implementacja komend wymagałaby własnej historii — czyli przepisania edytora.
|
|
4890
|
+
*/
|
|
4891
|
+
legacyExec(cmd, value) {
|
|
4892
|
+
return document.execCommand(cmd, false, value); // NOSONAR: brak zamiennika, patrz JSDoc
|
|
4893
|
+
}
|
|
4894
|
+
/** Stan komendy dla podświetlenia narzędzi; nieobsługiwana komenda → `false`. */
|
|
4895
|
+
legacyState(cmd) {
|
|
4896
|
+
try {
|
|
4897
|
+
return document.queryCommandState(cmd); // NOSONAR: brak zamiennika, patrz `legacyExec`
|
|
4898
|
+
}
|
|
4899
|
+
catch {
|
|
4900
|
+
return false;
|
|
4901
|
+
}
|
|
4902
|
+
}
|
|
4903
|
+
/** Komendy aktywne dla bieżącego zaznaczenia (podświetlenie narzędzi). */
|
|
4904
|
+
activeCommands() {
|
|
4783
4905
|
const active = new Set();
|
|
4784
4906
|
for (const cmd of Object.values(COMMAND)) {
|
|
4785
|
-
if (cmd && cmd !== 'removeFormat')
|
|
4786
|
-
|
|
4787
|
-
if (document.queryCommandState(cmd))
|
|
4788
|
-
active.add(cmd);
|
|
4789
|
-
}
|
|
4790
|
-
catch {
|
|
4791
|
-
/* nieobsługiwana komenda */
|
|
4792
|
-
}
|
|
4793
|
-
}
|
|
4907
|
+
if (cmd && cmd !== 'removeFormat' && this.legacyState(cmd))
|
|
4908
|
+
active.add(cmd);
|
|
4794
4909
|
}
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4910
|
+
return active;
|
|
4911
|
+
}
|
|
4912
|
+
/** Tag bloku, w którym stoi kursor (dla selecta stylu); domyślnie paragraf. */
|
|
4913
|
+
blockTag() {
|
|
4914
|
+
let node = window.getSelection()?.anchorNode;
|
|
4799
4915
|
while (node && node !== this.editor()?.nativeElement) {
|
|
4800
4916
|
const tag = node.tagName?.toLowerCase();
|
|
4801
|
-
if (tag && /^(h[1-6]|p|blockquote)$/.test(tag))
|
|
4802
|
-
|
|
4803
|
-
return;
|
|
4804
|
-
}
|
|
4917
|
+
if (tag && /^(h[1-6]|p|blockquote)$/.test(tag))
|
|
4918
|
+
return tag;
|
|
4805
4919
|
node = node.parentElement;
|
|
4806
4920
|
}
|
|
4807
|
-
|
|
4921
|
+
return 'p';
|
|
4922
|
+
}
|
|
4923
|
+
refreshState() {
|
|
4924
|
+
if (this.disabled() || !this.inEditor())
|
|
4925
|
+
return;
|
|
4926
|
+
this.activeCmds.set(this.activeCommands());
|
|
4927
|
+
// Stan wcięć — te same warunki, których użyje sama operacja.
|
|
4928
|
+
const items = this.listItems();
|
|
4929
|
+
this.canIndent.set(items.some((li) => this.canIndentItem(li)));
|
|
4930
|
+
this.canOutdent.set(items.some((li) => this.canOutdentItem(li)));
|
|
4931
|
+
this.currentBlock.set(this.blockTag());
|
|
4808
4932
|
}
|
|
4809
4933
|
onInput() {
|
|
4810
4934
|
const el = this.editor()?.nativeElement;
|
|
@@ -4847,27 +4971,211 @@ class KptRichText {
|
|
|
4847
4971
|
if (url) {
|
|
4848
4972
|
const safe = this.sanitizeUrl(url);
|
|
4849
4973
|
if (safe)
|
|
4850
|
-
|
|
4974
|
+
this.legacyExec('createLink', safe);
|
|
4851
4975
|
}
|
|
4852
4976
|
break;
|
|
4853
4977
|
}
|
|
4854
4978
|
case 'copy':
|
|
4855
|
-
|
|
4856
|
-
|
|
4979
|
+
void this.copySelection();
|
|
4980
|
+
return;
|
|
4857
4981
|
case 'paste':
|
|
4858
4982
|
void this.pasteRich();
|
|
4859
4983
|
return;
|
|
4860
4984
|
case 'pasteText':
|
|
4861
4985
|
void this.pastePlain();
|
|
4862
4986
|
return;
|
|
4987
|
+
case 'indent':
|
|
4988
|
+
case 'outdent':
|
|
4989
|
+
this.shiftItems(item);
|
|
4990
|
+
return; // shiftItems sam odświeża wartość i stan
|
|
4863
4991
|
default: {
|
|
4864
4992
|
const cmd = COMMAND[item];
|
|
4865
4993
|
if (cmd)
|
|
4866
|
-
|
|
4994
|
+
this.legacyExec(cmd);
|
|
4995
|
+
}
|
|
4996
|
+
}
|
|
4997
|
+
this.onInput();
|
|
4998
|
+
this.refreshState();
|
|
4999
|
+
}
|
|
5000
|
+
// ── Listy: wcięcia (Tab / narzędzia „Dodaj/Usuń wcięcie") ──
|
|
5001
|
+
/** Najbliższy punkt listy zawierający węzeł (tylko wewnątrz edytora). */
|
|
5002
|
+
closestItem(node) {
|
|
5003
|
+
const editor = this.editor()?.nativeElement;
|
|
5004
|
+
const el = node instanceof Element ? node : (node?.parentElement ?? null);
|
|
5005
|
+
const li = el?.closest('li') ?? null;
|
|
5006
|
+
return li instanceof HTMLLIElement && editor?.contains(li) ? li : null;
|
|
5007
|
+
}
|
|
5008
|
+
/** Poziom punktu w obrębie edytora (1 = najwyższy). */
|
|
5009
|
+
level(li) {
|
|
5010
|
+
const editor = this.editor()?.nativeElement;
|
|
5011
|
+
let depth = 1;
|
|
5012
|
+
let parent = li.parentElement?.closest('li') ?? null;
|
|
5013
|
+
while (parent && editor?.contains(parent)) {
|
|
5014
|
+
depth++;
|
|
5015
|
+
parent = parent.parentElement?.closest('li') ?? null;
|
|
5016
|
+
}
|
|
5017
|
+
return depth;
|
|
5018
|
+
}
|
|
5019
|
+
/** Najgłębszy poziom w poddrzewie punktu — wcięcie przenosi podpunkty razem z rodzicem. */
|
|
5020
|
+
deepest(li) {
|
|
5021
|
+
const base = this.level(li);
|
|
5022
|
+
let max = base;
|
|
5023
|
+
for (const nested of li.querySelectorAll('li'))
|
|
5024
|
+
max = Math.max(max, this.level(nested));
|
|
5025
|
+
return max;
|
|
5026
|
+
}
|
|
5027
|
+
canIndentItem(li) {
|
|
5028
|
+
return li.previousElementSibling instanceof HTMLLIElement && this.deepest(li) < this.maxListLevel();
|
|
5029
|
+
}
|
|
5030
|
+
canOutdentItem(li) {
|
|
5031
|
+
return li.parentElement?.parentElement instanceof HTMLLIElement;
|
|
5032
|
+
}
|
|
5033
|
+
/**
|
|
5034
|
+
* Punkty listy objęte zaznaczeniem. Przy zaznaczeniu wielu punktów operujemy na ich wspólnym
|
|
5035
|
+
* poziomie zagnieżdżenia — inaczej podpunkt dostałby wcięcie dwa razy (raz sam, raz z rodzicem).
|
|
5036
|
+
*/
|
|
5037
|
+
listItems() {
|
|
5038
|
+
const editor = this.editor()?.nativeElement;
|
|
5039
|
+
const sel = window.getSelection();
|
|
5040
|
+
if (!editor || !sel || sel.rangeCount === 0)
|
|
5041
|
+
return [];
|
|
5042
|
+
const range = sel.getRangeAt(0);
|
|
5043
|
+
if (!editor.contains(range.commonAncestorContainer))
|
|
5044
|
+
return [];
|
|
5045
|
+
const start = this.closestItem(range.startContainer);
|
|
5046
|
+
const end = this.closestItem(range.endContainer);
|
|
5047
|
+
if (!start)
|
|
5048
|
+
return [];
|
|
5049
|
+
if (!end || start === end)
|
|
5050
|
+
return [start];
|
|
5051
|
+
// Podnieś głębszy koniec, aż oba będą rodzeństwem w tej samej liście.
|
|
5052
|
+
let a = start;
|
|
5053
|
+
let b = end;
|
|
5054
|
+
while (a && b && a.parentElement !== b.parentElement) {
|
|
5055
|
+
if (this.level(a) >= this.level(b))
|
|
5056
|
+
a = this.closestItem(a.parentElement);
|
|
5057
|
+
else
|
|
5058
|
+
b = this.closestItem(b.parentElement);
|
|
5059
|
+
}
|
|
5060
|
+
if (!a || !b || !a.parentElement)
|
|
5061
|
+
return [start];
|
|
5062
|
+
const siblings = [...a.parentElement.children].filter((el) => el instanceof HTMLLIElement);
|
|
5063
|
+
const from = siblings.indexOf(a);
|
|
5064
|
+
const to = siblings.indexOf(b);
|
|
5065
|
+
if (from < 0 || to < 0)
|
|
5066
|
+
return [start];
|
|
5067
|
+
return siblings.slice(Math.min(from, to), Math.max(from, to) + 1);
|
|
5068
|
+
}
|
|
5069
|
+
/** Zagnieżdża punkt w podliście poprzedniego punktu (poprawne `li > ul > li`). */
|
|
5070
|
+
indentItem(li) {
|
|
5071
|
+
if (!this.canIndentItem(li))
|
|
5072
|
+
return false;
|
|
5073
|
+
const prev = li.previousElementSibling;
|
|
5074
|
+
let sub = prev.lastElementChild;
|
|
5075
|
+
if (!(sub instanceof HTMLUListElement || sub instanceof HTMLOListElement)) {
|
|
5076
|
+
sub = document.createElement(li.parentElement?.tagName ?? 'UL'); // ta sama numeracja co poziom wyżej
|
|
5077
|
+
prev.append(sub);
|
|
5078
|
+
}
|
|
5079
|
+
sub.append(li);
|
|
5080
|
+
return true;
|
|
5081
|
+
}
|
|
5082
|
+
/** Wyciąga punkt poziom wyżej; rodzeństwo po nim trafia do jego podlisty (kolejność bez zmian). */
|
|
5083
|
+
outdentItem(li) {
|
|
5084
|
+
const list = li.parentElement;
|
|
5085
|
+
const host = list?.parentElement;
|
|
5086
|
+
if (!list || !(host instanceof HTMLLIElement))
|
|
5087
|
+
return false;
|
|
5088
|
+
const children = [...list.children];
|
|
5089
|
+
const after = children.slice(children.indexOf(li) + 1);
|
|
5090
|
+
if (after.length > 0) {
|
|
5091
|
+
let own = li.lastElementChild;
|
|
5092
|
+
if (!(own instanceof HTMLUListElement || own instanceof HTMLOListElement)) {
|
|
5093
|
+
own = document.createElement(list.tagName);
|
|
5094
|
+
li.append(own);
|
|
5095
|
+
}
|
|
5096
|
+
own.append(...after);
|
|
5097
|
+
}
|
|
5098
|
+
host.after(li);
|
|
5099
|
+
if (list.children.length === 0)
|
|
5100
|
+
list.remove();
|
|
5101
|
+
return true;
|
|
5102
|
+
}
|
|
5103
|
+
/** Zwraca `true`, gdy DOM faktycznie się zmienił — od tego zależy `preventDefault()` dla Taba. */
|
|
5104
|
+
shiftItems(dir) {
|
|
5105
|
+
if (this.disabled())
|
|
5106
|
+
return false;
|
|
5107
|
+
const items = this.listItems();
|
|
5108
|
+
if (items.length === 0)
|
|
5109
|
+
return false;
|
|
5110
|
+
// Migawka granic kursora: przy usunięciu węzła spec DOM przestawia *żywy* Range na starego
|
|
5111
|
+
// rodzica, więc `saveSelection()` wyprowadziłby kursor poza przenoszony punkt. Same węzły
|
|
5112
|
+
// jadą razem z `li`, więc odtwarzamy z nich zaznaczenie po mutacji.
|
|
5113
|
+
const sel = window.getSelection();
|
|
5114
|
+
const range = sel && sel.rangeCount > 0 ? sel.getRangeAt(0) : null;
|
|
5115
|
+
const caret = range
|
|
5116
|
+
? { sc: range.startContainer, so: range.startOffset, ec: range.endContainer, eo: range.endOffset }
|
|
5117
|
+
: null;
|
|
5118
|
+
// Outdent od końca — inaczej `host.after()` odwróciłby kolejność przenoszonych punktów.
|
|
5119
|
+
const order = dir === 'outdent' ? [...items].reverse() : items;
|
|
5120
|
+
let changed = false;
|
|
5121
|
+
for (const li of order) {
|
|
5122
|
+
const done = dir === 'indent' ? this.indentItem(li) : this.outdentItem(li);
|
|
5123
|
+
changed = done || changed;
|
|
5124
|
+
}
|
|
5125
|
+
if (!changed)
|
|
5126
|
+
return false;
|
|
5127
|
+
if (caret && sel && caret.sc.isConnected && caret.ec.isConnected) {
|
|
5128
|
+
try {
|
|
5129
|
+
const restored = document.createRange();
|
|
5130
|
+
restored.setStart(caret.sc, caret.so);
|
|
5131
|
+
restored.setEnd(caret.ec, caret.eo);
|
|
5132
|
+
sel.removeAllRanges();
|
|
5133
|
+
sel.addRange(restored);
|
|
5134
|
+
}
|
|
5135
|
+
catch {
|
|
5136
|
+
/* offset przestał pasować po przeniesieniu rodzeństwa — zostaw kursor tam, gdzie jest */
|
|
4867
5137
|
}
|
|
4868
5138
|
}
|
|
4869
5139
|
this.onInput();
|
|
4870
5140
|
this.refreshState();
|
|
5141
|
+
return true;
|
|
5142
|
+
}
|
|
5143
|
+
/**
|
|
5144
|
+
* Tab: wcięcie w liście, przeskok komórki w tabeli (lista w komórce ma pierwszeństwo; gdy nie da
|
|
5145
|
+
* się już wciąć — przechodzimy do sąsiedniej komórki). Poza nimi i na krawędziach zostawiamy Tab
|
|
5146
|
+
* natywny — inaczej edytor byłby pułapką klawiaturową (WCAG 2.1.2).
|
|
5147
|
+
*/
|
|
5148
|
+
onKeydown(event) {
|
|
5149
|
+
if (this.disabled() || event.key !== 'Tab' || event.ctrlKey || event.altKey || event.metaKey)
|
|
5150
|
+
return;
|
|
5151
|
+
if (this.shiftItems(event.shiftKey ? 'outdent' : 'indent')) {
|
|
5152
|
+
event.preventDefault();
|
|
5153
|
+
return;
|
|
5154
|
+
}
|
|
5155
|
+
const node = window.getSelection()?.anchorNode ?? null;
|
|
5156
|
+
const el = node instanceof Element ? node : (node?.parentElement ?? null);
|
|
5157
|
+
const cell = el?.closest('td, th');
|
|
5158
|
+
if (cell && this.editor()?.nativeElement.contains(cell) && this.moveCell(cell, event.shiftKey)) {
|
|
5159
|
+
event.preventDefault();
|
|
5160
|
+
}
|
|
5161
|
+
}
|
|
5162
|
+
/** Przeskok do sąsiedniej komórki z zaznaczeniem jej treści; `false` = koniec tabeli. */
|
|
5163
|
+
moveCell(cell, back) {
|
|
5164
|
+
const table = cell.closest('table');
|
|
5165
|
+
if (!table)
|
|
5166
|
+
return false;
|
|
5167
|
+
const cells = [...table.querySelectorAll('td, th')];
|
|
5168
|
+
const next = cells[cells.indexOf(cell) + (back ? -1 : 1)];
|
|
5169
|
+
if (!next)
|
|
5170
|
+
return false;
|
|
5171
|
+
const range = document.createRange();
|
|
5172
|
+
range.selectNodeContents(next);
|
|
5173
|
+
const sel = window.getSelection();
|
|
5174
|
+
sel?.removeAllRanges();
|
|
5175
|
+
sel?.addRange(range);
|
|
5176
|
+
this.clearSelection();
|
|
5177
|
+
this.refreshState();
|
|
5178
|
+
return true;
|
|
4871
5179
|
}
|
|
4872
5180
|
// ── Styl bloku (dropdown w stylu kpt-select, z podglądem wielkości) ──
|
|
4873
5181
|
openStyle() {
|
|
@@ -4883,7 +5191,7 @@ class KptRichText {
|
|
|
4883
5191
|
this.styleOpen.set(false);
|
|
4884
5192
|
this.focusEditor();
|
|
4885
5193
|
this.restoreSelection();
|
|
4886
|
-
|
|
5194
|
+
this.legacyExec('formatBlock', `<${tag}>`);
|
|
4887
5195
|
this.onInput();
|
|
4888
5196
|
this.refreshState();
|
|
4889
5197
|
}
|
|
@@ -4909,10 +5217,10 @@ class KptRichText {
|
|
|
4909
5217
|
this.focusEditor();
|
|
4910
5218
|
this.restoreSelection();
|
|
4911
5219
|
if (this.colorKind() === 'foreColor') {
|
|
4912
|
-
|
|
5220
|
+
this.legacyExec('foreColor', color);
|
|
4913
5221
|
}
|
|
4914
|
-
else if (!
|
|
4915
|
-
|
|
5222
|
+
else if (!this.legacyExec('hiliteColor', color)) {
|
|
5223
|
+
this.legacyExec('backColor', color);
|
|
4916
5224
|
}
|
|
4917
5225
|
this.onInput();
|
|
4918
5226
|
}
|
|
@@ -4920,6 +5228,25 @@ class KptRichText {
|
|
|
4920
5228
|
this.applyColor(event.target.value);
|
|
4921
5229
|
}
|
|
4922
5230
|
// ── Schowek ──
|
|
5231
|
+
/** Kopiowanie przez async Clipboard API (jak wklejanie); fallback na starą komendę. */
|
|
5232
|
+
async copySelection() {
|
|
5233
|
+
const sel = window.getSelection();
|
|
5234
|
+
if (!sel || sel.rangeCount === 0 || sel.isCollapsed)
|
|
5235
|
+
return;
|
|
5236
|
+
const holder = document.createElement('div');
|
|
5237
|
+
holder.append(sel.getRangeAt(0).cloneContents());
|
|
5238
|
+
try {
|
|
5239
|
+
await navigator.clipboard.write([
|
|
5240
|
+
new ClipboardItem({
|
|
5241
|
+
'text/html': new Blob([holder.innerHTML], { type: 'text/html' }),
|
|
5242
|
+
'text/plain': new Blob([sel.toString()], { type: 'text/plain' }),
|
|
5243
|
+
}),
|
|
5244
|
+
]);
|
|
5245
|
+
}
|
|
5246
|
+
catch {
|
|
5247
|
+
this.legacyExec('copy'); // brak uprawnień / starsza przeglądarka
|
|
5248
|
+
}
|
|
5249
|
+
}
|
|
4923
5250
|
async pasteRich() {
|
|
4924
5251
|
try {
|
|
4925
5252
|
const items = await navigator.clipboard.read();
|
|
@@ -4928,14 +5255,14 @@ class KptRichText {
|
|
|
4928
5255
|
const blob = await it.getType('text/html');
|
|
4929
5256
|
const html = this.sanitizeHtml(await blob.text());
|
|
4930
5257
|
this.focusEditor();
|
|
4931
|
-
|
|
5258
|
+
this.legacyExec('insertHTML', html);
|
|
4932
5259
|
this.onInput();
|
|
4933
5260
|
return;
|
|
4934
5261
|
}
|
|
4935
5262
|
}
|
|
4936
5263
|
const text = await navigator.clipboard.readText();
|
|
4937
5264
|
this.focusEditor();
|
|
4938
|
-
|
|
5265
|
+
this.legacyExec('insertText', text);
|
|
4939
5266
|
this.onInput();
|
|
4940
5267
|
}
|
|
4941
5268
|
catch {
|
|
@@ -4946,7 +5273,7 @@ class KptRichText {
|
|
|
4946
5273
|
try {
|
|
4947
5274
|
const text = await navigator.clipboard.readText();
|
|
4948
5275
|
this.focusEditor();
|
|
4949
|
-
|
|
5276
|
+
this.legacyExec('insertText', text);
|
|
4950
5277
|
this.onInput();
|
|
4951
5278
|
}
|
|
4952
5279
|
catch {
|
|
@@ -4961,10 +5288,10 @@ class KptRichText {
|
|
|
4961
5288
|
const text = event.clipboardData?.getData('text/plain') ?? '';
|
|
4962
5289
|
event.preventDefault();
|
|
4963
5290
|
if (html) {
|
|
4964
|
-
|
|
5291
|
+
this.legacyExec('insertHTML', this.sanitizeHtml(html));
|
|
4965
5292
|
}
|
|
4966
5293
|
else {
|
|
4967
|
-
|
|
5294
|
+
this.legacyExec('insertText', text);
|
|
4968
5295
|
}
|
|
4969
5296
|
this.onInput();
|
|
4970
5297
|
}
|
|
@@ -4983,11 +5310,13 @@ class KptRichText {
|
|
|
4983
5310
|
this.focusEditor();
|
|
4984
5311
|
this.restoreSelection();
|
|
4985
5312
|
const w = (100 / cols).toFixed(4);
|
|
4986
|
-
const
|
|
4987
|
-
const
|
|
4988
|
-
const
|
|
5313
|
+
const col = `<col style="width:${w}%">`;
|
|
5314
|
+
const cell = '<td><br></td>';
|
|
5315
|
+
const row = `<tr>${cell.repeat(cols)}</tr>`;
|
|
5316
|
+
const colgroup = `<colgroup>${col.repeat(cols)}</colgroup>`;
|
|
5317
|
+
const body = `<tbody>${row.repeat(rows)}</tbody>`;
|
|
4989
5318
|
const table = `<table class="kpt-rt-table">${colgroup}${body}</table>`;
|
|
4990
|
-
|
|
5319
|
+
this.legacyExec('insertHTML', `${table}<p><br></p>`);
|
|
4991
5320
|
this.onInput();
|
|
4992
5321
|
}
|
|
4993
5322
|
// ── Tabele: menu kontekstowe ──
|
|
@@ -5225,7 +5554,7 @@ class KptRichText {
|
|
|
5225
5554
|
if (!(target instanceof Element))
|
|
5226
5555
|
return;
|
|
5227
5556
|
const focus = target.closest('td, th');
|
|
5228
|
-
if (
|
|
5557
|
+
if (focus?.closest('table') !== this.selAnchor.closest('table'))
|
|
5229
5558
|
return;
|
|
5230
5559
|
if (focus === this.selAnchor && !this.selecting)
|
|
5231
5560
|
return;
|
|
@@ -5268,6 +5597,42 @@ class KptRichText {
|
|
|
5268
5597
|
});
|
|
5269
5598
|
return { grid, pos };
|
|
5270
5599
|
}
|
|
5600
|
+
/** Jeden przebieg rozszerzania granic o komórki wystające poza region; `true` = coś się zmieniło. */
|
|
5601
|
+
growBounds(grid, pos, b) {
|
|
5602
|
+
let changed = false;
|
|
5603
|
+
for (const cell of this.cellsInRegion(grid, b)) {
|
|
5604
|
+
const p = pos.get(cell);
|
|
5605
|
+
if (p.r < b.r0) {
|
|
5606
|
+
b.r0 = p.r;
|
|
5607
|
+
changed = true;
|
|
5608
|
+
}
|
|
5609
|
+
if (p.c < b.c0) {
|
|
5610
|
+
b.c0 = p.c;
|
|
5611
|
+
changed = true;
|
|
5612
|
+
}
|
|
5613
|
+
if (p.r + p.rowspan - 1 > b.r1) {
|
|
5614
|
+
b.r1 = p.r + p.rowspan - 1;
|
|
5615
|
+
changed = true;
|
|
5616
|
+
}
|
|
5617
|
+
if (p.c + p.colspan - 1 > b.c1) {
|
|
5618
|
+
b.c1 = p.c + p.colspan - 1;
|
|
5619
|
+
changed = true;
|
|
5620
|
+
}
|
|
5621
|
+
}
|
|
5622
|
+
return changed;
|
|
5623
|
+
}
|
|
5624
|
+
/** Komórki leżące w prostokącie siatki (scalone trafiają raz — to `Set`). */
|
|
5625
|
+
cellsInRegion(grid, b) {
|
|
5626
|
+
const set = new Set();
|
|
5627
|
+
for (let r = b.r0; r <= b.r1; r++) {
|
|
5628
|
+
for (let c = b.c0; c <= b.c1; c++) {
|
|
5629
|
+
const cell = grid[r]?.[c];
|
|
5630
|
+
if (cell)
|
|
5631
|
+
set.add(cell);
|
|
5632
|
+
}
|
|
5633
|
+
}
|
|
5634
|
+
return set;
|
|
5635
|
+
}
|
|
5271
5636
|
selectRegion(anchor, focus) {
|
|
5272
5637
|
const table = anchor.closest('table');
|
|
5273
5638
|
if (!table)
|
|
@@ -5277,46 +5642,17 @@ class KptRichText {
|
|
|
5277
5642
|
const f = pos.get(focus);
|
|
5278
5643
|
if (!a || !f)
|
|
5279
5644
|
return;
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
const cell = grid[r]?.[c];
|
|
5290
|
-
if (!cell)
|
|
5291
|
-
continue;
|
|
5292
|
-
const p = pos.get(cell);
|
|
5293
|
-
if (p.r < r0) {
|
|
5294
|
-
r0 = p.r;
|
|
5295
|
-
changed = true;
|
|
5296
|
-
}
|
|
5297
|
-
if (p.c < c0) {
|
|
5298
|
-
c0 = p.c;
|
|
5299
|
-
changed = true;
|
|
5300
|
-
}
|
|
5301
|
-
if (p.r + p.rowspan - 1 > r1) {
|
|
5302
|
-
r1 = p.r + p.rowspan - 1;
|
|
5303
|
-
changed = true;
|
|
5304
|
-
}
|
|
5305
|
-
if (p.c + p.colspan - 1 > c1) {
|
|
5306
|
-
c1 = p.c + p.colspan - 1;
|
|
5307
|
-
changed = true;
|
|
5308
|
-
}
|
|
5309
|
-
}
|
|
5310
|
-
}
|
|
5311
|
-
}
|
|
5312
|
-
const set = new Set();
|
|
5313
|
-
for (let r = r0; r <= r1; r++) {
|
|
5314
|
-
for (let c = c0; c <= c1; c++) {
|
|
5315
|
-
const cell = grid[r]?.[c];
|
|
5316
|
-
if (cell)
|
|
5317
|
-
set.add(cell);
|
|
5318
|
-
}
|
|
5645
|
+
const bounds = {
|
|
5646
|
+
r0: Math.min(a.r, f.r),
|
|
5647
|
+
c0: Math.min(a.c, f.c),
|
|
5648
|
+
r1: Math.max(a.r + a.rowspan - 1, f.r + f.rowspan - 1),
|
|
5649
|
+
c1: Math.max(a.c + a.colspan - 1, f.c + f.colspan - 1),
|
|
5650
|
+
};
|
|
5651
|
+
// Rozszerzaj, aż region w pełni obejmie scalone komórki na brzegach.
|
|
5652
|
+
while (this.growBounds(grid, pos, bounds)) {
|
|
5653
|
+
/* granice rosną do skutku */
|
|
5319
5654
|
}
|
|
5655
|
+
const set = this.cellsInRegion(grid, bounds);
|
|
5320
5656
|
this.clearSelection();
|
|
5321
5657
|
for (const cell of set)
|
|
5322
5658
|
cell.classList.add('kpt-rt-cell-sel');
|
|
@@ -5382,8 +5718,7 @@ class KptRichText {
|
|
|
5382
5718
|
cell.removeAttribute('rowspan');
|
|
5383
5719
|
// Uzupełnij brakujące pozycje siatki pustymi komórkami (dla każdego pokrytego wiersza).
|
|
5384
5720
|
for (let dr = 0; dr < p.rowspan; dr++) {
|
|
5385
|
-
const
|
|
5386
|
-
const count = dr === 0 ? p.colspan - 1 : p.colspan;
|
|
5721
|
+
const count = dr === 0 ? p.colspan - 1 : p.colspan; // origin zostaje w pierwszym wierszu
|
|
5387
5722
|
if (count <= 0)
|
|
5388
5723
|
continue;
|
|
5389
5724
|
const row = table.rows[p.r + dr];
|
|
@@ -5391,7 +5726,10 @@ class KptRichText {
|
|
|
5391
5726
|
for (let i = 0; i < count; i++) {
|
|
5392
5727
|
const el = document.createElement(tag);
|
|
5393
5728
|
el.innerHTML = '<br>';
|
|
5394
|
-
|
|
5729
|
+
if (before)
|
|
5730
|
+
before.before(el);
|
|
5731
|
+
else
|
|
5732
|
+
row.append(el); // brak komórki o większym origin-col → na koniec wiersza
|
|
5395
5733
|
}
|
|
5396
5734
|
}
|
|
5397
5735
|
this.menuOpen.set(false);
|
|
@@ -5431,48 +5769,55 @@ class KptRichText {
|
|
|
5431
5769
|
sanitizeHtml(html) {
|
|
5432
5770
|
const tpl = document.createElement('template');
|
|
5433
5771
|
tpl.innerHTML = html;
|
|
5434
|
-
const
|
|
5435
|
-
|
|
5436
|
-
if (!ALLOWED_TAGS.has(el.tagName)) {
|
|
5437
|
-
el.replaceWith(...Array.from(el.childNodes));
|
|
5438
|
-
continue;
|
|
5439
|
-
}
|
|
5440
|
-
for (const attr of Array.from(el.attributes)) {
|
|
5441
|
-
const name = attr.name.toLowerCase();
|
|
5442
|
-
if (name.startsWith('on')) {
|
|
5443
|
-
el.removeAttribute(attr.name);
|
|
5444
|
-
}
|
|
5445
|
-
else if (name === 'href' || name === 'src') {
|
|
5446
|
-
// Usuń znaki kontrolne przed testem schematu — przeglądarka i tak je ignoruje przy
|
|
5447
|
-
// parsowaniu URL-a (WHATWG URL spec), więc `jav\tascript:` obchodziłby sam blocklisting.
|
|
5448
|
-
if (/^\s*javascript:/i.test(attr.value.replace(/[\x00-\x1f]/g, '')))
|
|
5449
|
-
el.removeAttribute(attr.name);
|
|
5450
|
-
}
|
|
5451
|
-
else if (name === 'style') {
|
|
5452
|
-
const kept = attr.value
|
|
5453
|
-
.split(';')
|
|
5454
|
-
.map((s) => s.trim())
|
|
5455
|
-
.filter((s) => ALLOWED_STYLES.has(s.split(':')[0]?.trim().toLowerCase()));
|
|
5456
|
-
if (kept.length)
|
|
5457
|
-
el.setAttribute('style', kept.join('; '));
|
|
5458
|
-
else
|
|
5459
|
-
el.removeAttribute('style');
|
|
5460
|
-
}
|
|
5461
|
-
else if (!ALLOWED_ATTRS.has(name) && name !== 'color') {
|
|
5462
|
-
el.removeAttribute(attr.name);
|
|
5463
|
-
}
|
|
5464
|
-
}
|
|
5465
|
-
}
|
|
5466
|
-
};
|
|
5467
|
-
walk(tpl.content);
|
|
5772
|
+
for (const el of Array.from(tpl.content.querySelectorAll('*')))
|
|
5773
|
+
this.sanitizeElement(el);
|
|
5468
5774
|
return tpl.innerHTML;
|
|
5469
5775
|
}
|
|
5776
|
+
/** Tag spoza allowlisty rozwijamy do dzieci; atrybuty czyścimy po kolei. */
|
|
5777
|
+
sanitizeElement(el) {
|
|
5778
|
+
if (!ALLOWED_TAGS.has(el.tagName)) {
|
|
5779
|
+
el.replaceWith(...Array.from(el.childNodes));
|
|
5780
|
+
return;
|
|
5781
|
+
}
|
|
5782
|
+
for (const attr of Array.from(el.attributes))
|
|
5783
|
+
this.sanitizeAttribute(el, attr);
|
|
5784
|
+
}
|
|
5785
|
+
sanitizeAttribute(el, attr) {
|
|
5786
|
+
const name = attr.name.toLowerCase();
|
|
5787
|
+
if (name.startsWith('on')) {
|
|
5788
|
+
el.removeAttribute(attr.name);
|
|
5789
|
+
}
|
|
5790
|
+
else if (name === 'href' || name === 'src') {
|
|
5791
|
+
// Usuń znaki kontrolne przed testem schematu — przeglądarka i tak je ignoruje przy
|
|
5792
|
+
// parsowaniu URL-a (WHATWG URL spec), więc `jav\tascript:` obchodziłby sam blocklisting.
|
|
5793
|
+
if (/^\s*javascript:/i.test(attr.value.replace(/[\x00-\x1f]/g, '')))
|
|
5794
|
+
el.removeAttribute(attr.name);
|
|
5795
|
+
}
|
|
5796
|
+
else if (name === 'style') {
|
|
5797
|
+
const kept = this.sanitizeStyleAttr(attr.value);
|
|
5798
|
+
if (kept)
|
|
5799
|
+
el.setAttribute('style', kept);
|
|
5800
|
+
else
|
|
5801
|
+
el.removeAttribute('style');
|
|
5802
|
+
}
|
|
5803
|
+
else if (!ALLOWED_ATTRS.has(name) && name !== 'color') {
|
|
5804
|
+
el.removeAttribute(attr.name);
|
|
5805
|
+
}
|
|
5806
|
+
}
|
|
5807
|
+
/** Deklaracje `style` z allowlisty; `null`, gdy nie zostaje nic. */
|
|
5808
|
+
sanitizeStyleAttr(value) {
|
|
5809
|
+
const kept = value
|
|
5810
|
+
.split(';')
|
|
5811
|
+
.map((decl) => decl.trim())
|
|
5812
|
+
.filter((decl) => ALLOWED_STYLES.has(decl.split(':')[0]?.trim().toLowerCase()));
|
|
5813
|
+
return kept.length ? kept.join('; ') : null;
|
|
5814
|
+
}
|
|
5470
5815
|
static { this.ɵfac = function KptRichText_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptRichText)(); }; }
|
|
5471
5816
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptRichText, selectors: [["kpt-rich-text"]], viewQuery: function KptRichText_Query(rf, ctx) { if (rf & 1) {
|
|
5472
|
-
i0.ɵɵviewQuerySignal(ctx.editor, _c0$
|
|
5817
|
+
i0.ɵɵviewQuerySignal(ctx.editor, _c0$u, 5);
|
|
5473
5818
|
} if (rf & 2) {
|
|
5474
5819
|
i0.ɵɵqueryAdvance();
|
|
5475
|
-
} }, hostAttrs: [1, "kpt-rich-text-host"], inputs: { value: [1, "value"], toolbar: [1, "toolbar"], placeholder: [1, "placeholder"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 11, vars: 14, 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", "", "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", "paste", "contextmenu", "mousedown", "mousemove", "blur"], [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) {
|
|
5820
|
+
} }, 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: 11, vars: 14, 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", "", "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"], [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) {
|
|
5476
5821
|
i0.ɵɵelementStart(0, "div", 6)(1, "div", 7);
|
|
5477
5822
|
i0.ɵɵrepeaterCreate(2, KptRichText_For_3_Template, 3, 1, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
5478
5823
|
i0.ɵɵelementEnd();
|
|
@@ -5497,13 +5842,13 @@ class KptRichText {
|
|
|
5497
5842
|
i0.ɵɵproperty("cdkConnectedOverlayOrigin", ctx.menuPoint())("cdkConnectedOverlayOpen", ctx.borderOpen())("cdkConnectedOverlayHasBackdrop", true);
|
|
5498
5843
|
i0.ɵɵadvance();
|
|
5499
5844
|
i0.ɵɵproperty("cdkConnectedOverlayOrigin", ctx.menuPoint())("cdkConnectedOverlayOpen", ctx.colorOpen() && ctx.colorKind() === "cellBg")("cdkConnectedOverlayHasBackdrop", true);
|
|
5500
|
-
} }, 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 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{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-rt-menu__item--danger{color:var(--%NS%kpt-color-danger)}.kpt-rt-menu__item--danger kpt-icon{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 }); }
|
|
5845
|
+
} }, 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{color:var(--%NS%kpt-color-on-surface-muted)}.kpt-rt-menu__item--danger{color:var(--%NS%kpt-color-danger)}.kpt-rt-menu__item--danger kpt-icon{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 }); }
|
|
5501
5846
|
}
|
|
5502
5847
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptRichText, [{
|
|
5503
5848
|
type: Component,
|
|
5504
|
-
args: [{ selector: 'kpt-rich-text', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [KptIcon, CdkOverlayOrigin, CdkConnectedOverlay, NgTemplateOutlet, KptTooltip], host: { class: 'kpt-rich-text-host' }, template: "<div class=\"kpt-rich-text\" [class.kpt-rich-text--invalid]=\"showInvalid()\" [class.kpt-rich-text--disabled]=\"disabled()\">\n <div class=\"kpt-rich-text__toolbar\" role=\"toolbar\">\n @for (section of sections(); track $index; let firstSection = $first) {\n @if (!firstSection) {\n <span class=\"kpt-rich-text__divider\" aria-hidden=\"true\"></span>\n }\n @for (item of section; track item) {\n @switch (item) {\n @case ('heading') {\n <button\n type=\"button\"\n class=\"kpt-rich-text__style\"\n cdkOverlayOrigin\n #styleOrigin=\"cdkOverlayOrigin\"\n [class.is-open]=\"styleOpen()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"aria(item)\"\n [attr.aria-expanded]=\"styleOpen()\"\n [kptTooltip]=\"aria(item)\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"openStyle()\"\n >\n <span>{{ styleLabel() }}</span>\n <kpt-icon name=\"chevron-down\" class=\"kpt-rich-text__style-caret\" />\n </button>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"styleOrigin\"\n [cdkConnectedOverlayOpen]=\"styleOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeStyle()\"\n (detach)=\"closeStyle()\"\n >\n <ul class=\"kpt-rich-text__style-panel\" role=\"listbox\">\n @for (o of styleOptions(); track o.tag) {\n <li\n class=\"kpt-rich-text__style-opt\"\n [class]=\"'kpt-rich-text__style-opt kpt-rich-text__style-opt--' + o.tag\"\n role=\"option\"\n [attr.aria-selected]=\"currentBlock() === o.tag\"\n [class.is-selected]=\"currentBlock() === o.tag\"\n (click)=\"pickStyle(o.tag)\"\n >{{ o.label }}</li>\n }\n </ul>\n </ng-template>\n }\n @case ('foreColor') {\n <button\n type=\"button\"\n class=\"kpt-rich-text__tool kpt-rich-text__tool--color\"\n cdkOverlayOrigin\n #foreOrigin=\"cdkOverlayOrigin\"\n [attr.aria-label]=\"aria(item)\"\n [kptTooltip]=\"aria(item)\"\n [disabled]=\"disabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"openColor('foreColor')\"\n >\n <kpt-icon [name]=\"icon(item)\" />\n </button>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"foreOrigin\"\n [cdkConnectedOverlayOpen]=\"colorOpen() && colorKind() === 'foreColor'\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeColor()\"\n (detach)=\"closeColor()\"\n >\n <ng-container [ngTemplateOutlet]=\"paletteTpl\" />\n </ng-template>\n }\n @case ('backColor') {\n <button\n type=\"button\"\n class=\"kpt-rich-text__tool kpt-rich-text__tool--color\"\n cdkOverlayOrigin\n #backOrigin=\"cdkOverlayOrigin\"\n [attr.aria-label]=\"aria(item)\"\n [kptTooltip]=\"aria(item)\"\n [disabled]=\"disabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"openColor('backColor')\"\n >\n <kpt-icon [name]=\"icon(item)\" />\n </button>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"backOrigin\"\n [cdkConnectedOverlayOpen]=\"colorOpen() && colorKind() === 'backColor'\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeColor()\"\n (detach)=\"closeColor()\"\n >\n <ng-container [ngTemplateOutlet]=\"paletteTpl\" />\n </ng-template>\n }\n @case ('table') {\n <button\n type=\"button\"\n class=\"kpt-rich-text__tool\"\n cdkOverlayOrigin\n #tableOrigin=\"cdkOverlayOrigin\"\n [class.is-active]=\"tableOpen()\"\n [attr.aria-label]=\"aria(item)\"\n [kptTooltip]=\"aria(item)\"\n [disabled]=\"disabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"exec(item)\"\n >\n <kpt-icon [name]=\"icon(item)\" />\n </button>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"tableOrigin\"\n [cdkConnectedOverlayOpen]=\"tableOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeTable()\"\n (detach)=\"closeTable()\"\n >\n <div class=\"kpt-rt-grid-pop\" (mousedown)=\"$event.preventDefault()\">\n <div class=\"kpt-rt-grid\" (mouseleave)=\"gridHover(0, 0)\">\n @for (r of gridRows; track r) {\n <div class=\"kpt-rt-grid__row\">\n @for (c of gridCols; track c) {\n <span\n class=\"kpt-rt-grid__cell\"\n [class.is-on]=\"r <= gridR() && c <= gridC()\"\n (mouseenter)=\"gridHover(r, c)\"\n (click)=\"insertTable(r, c)\"\n ></span>\n }\n </div>\n }\n </div>\n <div class=\"kpt-rt-grid__label\">{{ gridR() }} \u00D7 {{ gridC() }}</div>\n </div>\n </ng-template>\n }\n @default {\n <button\n type=\"button\"\n class=\"kpt-rich-text__tool\"\n [class.is-active]=\"isActive(item)\"\n [attr.aria-label]=\"aria(item)\"\n [attr.aria-pressed]=\"isActive(item)\"\n [kptTooltip]=\"aria(item)\"\n [disabled]=\"disabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"exec(item)\"\n >\n <kpt-icon [name]=\"icon(item)\" />\n </button>\n }\n }\n }\n }\n </div>\n @if (sourceView()) {\n <textarea\n class=\"kpt-rich-text__source\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n spellcheck=\"false\"\n [attr.aria-label]=\"i18n.t('richText.htmlSource')\"\n (input)=\"onSource($event)\"\n (blur)=\"touch.emit()\"\n ></textarea>\n } @else {\n <div\n #editor\n class=\"kpt-rich-text__editor\"\n [attr.contenteditable]=\"disabled() ? 'false' : 'true'\"\n [attr.data-placeholder]=\"placeholder()\"\n [attr.aria-invalid]=\"showInvalid() ? 'true' : null\"\n role=\"textbox\"\n aria-multiline=\"true\"\n (input)=\"onInput()\"\n (paste)=\"onPaste($event)\"\n (contextmenu)=\"onContextMenu($event)\"\n (mousedown)=\"onEditorMouseDown($event)\"\n (mousemove)=\"onEditorMouseMove($event)\"\n (blur)=\"touch.emit()\"\n ></div>\n }\n\n <!-- Menu kontekstowe tabeli (origin punktowy = pozycja kursora) -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"menuPoint()\"\n [cdkConnectedOverlayOpen]=\"menuOpen()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeMenu()\"\n (detach)=\"closeMenu()\"\n >\n <div class=\"kpt-rt-menu\" (contextmenu)=\"$event.preventDefault()\">\n <div class=\"kpt-rt-menu__group\">{{ i18n.t('richText.menu.column') }}</div>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"insertColumn('left')\"><kpt-icon name=\"plus\" /> {{ i18n.t('richText.menu.insertLeft') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"insertColumn('right')\"><kpt-icon name=\"plus\" /> {{ i18n.t('richText.menu.insertRight') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"toggleHeaderColumn()\"><kpt-icon name=\"table\" /> {{ i18n.t('richText.menu.headerColumn') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"deleteColumn()\"><kpt-icon name=\"trash\" /> {{ i18n.t('richText.menu.deleteColumn') }}</button>\n <div class=\"kpt-rt-menu__sep\"></div>\n <div class=\"kpt-rt-menu__group\">{{ i18n.t('richText.menu.row') }}</div>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"insertRow('above')\"><kpt-icon name=\"plus\" /> {{ i18n.t('richText.menu.insertAbove') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"insertRow('below')\"><kpt-icon name=\"plus\" /> {{ i18n.t('richText.menu.insertBelow') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"toggleHeaderRow()\"><kpt-icon name=\"table\" /> {{ i18n.t('richText.menu.headerRow') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"deleteRow()\"><kpt-icon name=\"trash\" /> {{ i18n.t('richText.menu.deleteRow') }}</button>\n <div class=\"kpt-rt-menu__sep\"></div>\n <div class=\"kpt-rt-menu__group\">{{ i18n.t('richText.menu.cell') }}</div>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"openCellBg()\"><kpt-icon name=\"palette\" /> {{ i18n.t('richText.menu.cellBackground') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"alignCell('left')\"><kpt-icon name=\"align-left\" /> {{ i18n.t('richText.menu.alignLeft') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"alignCell('center')\"><kpt-icon name=\"align-center\" /> {{ i18n.t('richText.menu.alignCenter') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"alignCell('right')\"><kpt-icon name=\"align-right\" /> {{ i18n.t('richText.menu.alignRight') }}</button>\n <div class=\"kpt-rt-menu__sep\"></div>\n <button type=\"button\" class=\"kpt-rt-menu__item\" [class.is-disabled]=\"!canMerge()\" (click)=\"mergeCells()\"><kpt-icon name=\"table\" /> {{ i18n.t('richText.menu.mergeCells') }}</button>\n <button type=\"button\" class=\"kpt-rt-menu__item\" [class.is-disabled]=\"!canSplit()\" (click)=\"splitCell()\"><kpt-icon name=\"grip-vertical\" /> {{ i18n.t('richText.menu.splitCell') }}</button>\n <div class=\"kpt-rt-menu__sep\"></div>\n <button type=\"button\" class=\"kpt-rt-menu__item\" (click)=\"openBorder()\"><kpt-icon name=\"table\" /> {{ i18n.t('richText.menu.border') }}</button>\n <div class=\"kpt-rt-menu__sep\"></div>\n <button type=\"button\" class=\"kpt-rt-menu__item kpt-rt-menu__item--danger\" (click)=\"deleteTable()\"><kpt-icon name=\"trash\" /> {{ i18n.t('richText.menu.deleteTable') }}</button>\n </div>\n </ng-template>\n\n <!-- Popover obramowania (tabela / kom\u00F3rka) -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"menuPoint()\"\n [cdkConnectedOverlayOpen]=\"borderOpen()\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeBorder()\"\n (detach)=\"closeBorder()\"\n >\n <div class=\"kpt-rt-border\" (mousedown)=\"$event.preventDefault()\">\n <div class=\"kpt-rt-border__seg\">\n <button type=\"button\" [class.is-active]=\"borderTarget() === 'table'\" (click)=\"borderTarget.set('table')\">{{ i18n.t('richText.border.table') }}</button>\n <button type=\"button\" [class.is-active]=\"borderTarget() === 'cell'\" (click)=\"borderTarget.set('cell')\">{{ i18n.t('richText.border.cell') }}</button>\n </div>\n <div class=\"kpt-rt-border__widths\">\n <button type=\"button\" (click)=\"setBorderWidth('none')\">{{ i18n.t('richText.border.none') }}</button>\n <button type=\"button\" (click)=\"setBorderWidth('thin')\">{{ i18n.t('richText.border.thin') }}</button>\n <button type=\"button\" (click)=\"setBorderWidth('medium')\">{{ i18n.t('richText.border.medium') }}</button>\n <button type=\"button\" (click)=\"setBorderWidth('thick')\">{{ i18n.t('richText.border.thick') }}</button>\n </div>\n <div class=\"kpt-rich-text__swatches\">\n @for (c of swatches; track c) {\n <button type=\"button\" class=\"kpt-rich-text__swatch\" [style.background]=\"c\" [attr.aria-label]=\"c\" (click)=\"setBorderColor(c)\"></button>\n }\n </div>\n <label class=\"kpt-rich-text__picker\">\n <span>{{ i18n.t('richText.border.customColor') }}</span>\n <input type=\"color\" (input)=\"onBorderColorInput($event)\" />\n </label>\n </div>\n </ng-template>\n\n <!-- Popover koloru t\u0142a kom\u00F3rki (z menu kontekstowego) -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"menuPoint()\"\n [cdkConnectedOverlayOpen]=\"colorOpen() && colorKind() === 'cellBg'\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n (backdropClick)=\"closeColor()\"\n (detach)=\"closeColor()\"\n >\n <ng-container [ngTemplateOutlet]=\"paletteTpl\" />\n </ng-template>\n</div>\n\n<ng-template #paletteTpl>\n <div class=\"kpt-rich-text__palette\" (mousedown)=\"$event.preventDefault()\">\n <div class=\"kpt-rich-text__swatches\">\n @for (c of swatches; track c) {\n <button\n type=\"button\"\n class=\"kpt-rich-text__swatch\"\n [style.background]=\"c\"\n [attr.aria-label]=\"c\"\n (click)=\"applyColor(c)\"\n ></button>\n }\n </div>\n <label class=\"kpt-rich-text__picker\">\n <span>{{ i18n.t('richText.paletteCustom') }}</span>\n <input type=\"color\" (input)=\"onColorInput($event)\" />\n </label>\n </div>\n</ng-template>\n", styles: ["@layer kpt.components{.kpt-rich-text-host{display:block}.kpt-rich-text{border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);overflow:hidden;background:var(--kpt-form-field-bg)}.kpt-rich-text:focus-within{border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-rich-text--invalid{border-color:var(--kpt-form-field-border-error)}.kpt-rich-text--disabled{opacity:.6}.kpt-rich-text__toolbar{display:flex;flex-wrap:wrap;gap:.15rem;padding:.3rem;border-bottom:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);background:var(--kpt-color-surface-variant)}.kpt-rich-text__tool{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);cursor:pointer;font-size:1.05rem}.kpt-rich-text__tool:hover:not(:disabled){background:var(--kpt-color-muted)}.kpt-rich-text__tool:disabled{opacity:.5;cursor:not-allowed}.kpt-rich-text__tool.is-active{background:var(--kpt-color-muted);color:var(--kpt-color-primary)}.kpt-rich-text__divider{width:var(--kpt-border-width-thin, 1px);align-self:stretch;margin-inline:.2rem;background:var(--kpt-color-border)}.kpt-rich-text__style{display:inline-flex;align-items:center;gap:var(--kpt-space-1, .25rem);height:2rem;min-width:8rem;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-radius-sm, .25rem);background:var(--kpt-form-field-bg);color:var(--kpt-form-field-text);font:inherit;font-size:var(--kpt-font-size-sm, .875rem);padding-inline:.5rem;cursor:pointer}.kpt-rich-text__style span{flex:1;text-align:start}.kpt-rich-text__style:hover:not(:disabled){border-color:var(--kpt-form-field-border-hover)}.kpt-rich-text__style.is-open{border-color:var(--kpt-form-field-border-focus)}.kpt-rich-text__style:disabled{opacity:.5;cursor:not-allowed}.kpt-rich-text__style-caret{opacity:.6}.kpt-rich-text__editor{min-height:6rem;padding:var(--kpt-space-3, .75rem);font-size:var(--kpt-font-size-sm, .875rem);line-height:var(--kpt-font-line-height-normal, 1.5);color:var(--kpt-form-field-text);outline:none;overflow-y:auto}.kpt-rich-text__editor:empty:before{content:attr(data-placeholder);color:var(--kpt-form-field-placeholder)}.kpt-rich-text__editor a{color:var(--kpt-color-primary)}.kpt-rich-text__editor ul,.kpt-rich-text__editor ol{padding-inline-start:1.5rem}.kpt-rich-text__editor h1{font-size:1.6em;font-weight:700;margin:.4em 0}.kpt-rich-text__editor h2{font-size:1.4em;font-weight:700;margin:.4em 0}.kpt-rich-text__editor h3{font-size:1.2em;font-weight:600;margin:.4em 0}.kpt-rich-text__editor h4{font-size:1.05em;font-weight:600;margin:.4em 0}.kpt-rich-text__editor h5{font-size:.95em;font-weight:600;margin:.4em 0}.kpt-rich-text__editor h6{font-size:.85em;font-weight:600;margin:.4em 0;text-transform:uppercase}.kpt-rich-text__editor blockquote{margin:.4em 0;padding-inline-start:.75rem;border-inline-start:3px solid var(--kpt-color-border-strong);color:var(--kpt-color-on-surface-muted)}.kpt-rich-text__editor .kpt-rt-table{border-collapse:collapse;table-layout:fixed;width:100%;margin:.5em 0}.kpt-rich-text__editor .kpt-rt-table td,.kpt-rich-text__editor .kpt-rt-table th{border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);padding:.35rem .5rem;min-width:2rem;vertical-align:top;overflow-wrap:anywhere}.kpt-rich-text__editor .kpt-rt-table th{background:var(--kpt-color-surface-variant);font-weight:var(--kpt-font-weight-semibold, 600)}.kpt-rich-text__editor .kpt-rt-table .kpt-rt-cell-sel{box-shadow:inset 0 0 0 2px var(--kpt-color-primary);background:color-mix(in oklch,var(--kpt-color-primary) 12%,transparent)}.kpt-rich-text__editor.is-col-resize{cursor:col-resize}.kpt-rich-text__source{display:block;width:100%;box-sizing:border-box;min-height:6rem;padding:var(--kpt-space-3, .75rem);border:0;background:var(--kpt-color-surface-variant);color:var(--kpt-form-field-text);font-family:var(--kpt-font-family-mono, ui-monospace, monospace);font-size:var(--kpt-font-size-xs, .75rem);line-height:var(--kpt-font-line-height-normal, 1.5);resize:vertical;outline:none}.kpt-rich-text__style-panel{min-width:11rem;margin:0;padding:.25rem;list-style:none;background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3);max-height:20rem;overflow-y:auto}.kpt-rich-text__style-opt{padding:.35rem .6rem;border-radius:var(--kpt-radius-sm, .25rem);color:var(--kpt-color-on-surface);cursor:pointer;line-height:1.2}.kpt-rich-text__style-opt:hover{background:var(--kpt-color-muted)}.kpt-rich-text__style-opt.is-selected{background:var(--kpt-color-muted);color:var(--kpt-color-primary)}.kpt-rich-text__style-opt--p{font-size:.95rem}.kpt-rich-text__style-opt--h1{font-size:1.7rem;font-weight:700}.kpt-rich-text__style-opt--h2{font-size:1.45rem;font-weight:700}.kpt-rich-text__style-opt--h3{font-size:1.25rem;font-weight:600}.kpt-rich-text__style-opt--h4{font-size:1.1rem;font-weight:600}.kpt-rich-text__style-opt--h5{font-size:1rem;font-weight:600}.kpt-rich-text__style-opt--h6{font-size:.85rem;font-weight:600;text-transform:uppercase;letter-spacing:.03em}.kpt-rich-text__palette{padding:var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3)}.kpt-rich-text__swatches{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.kpt-rich-text__swatch{width:1.4rem;height:1.4rem;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-sm, .25rem);cursor:pointer}.kpt-rich-text__swatch:hover{transform:scale(1.1)}.kpt-rich-text__picker{display:flex;align-items:center;justify-content:space-between;gap:var(--kpt-space-2, .5rem);margin-top:var(--kpt-space-2, .5rem);font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface-muted)}.kpt-rich-text__picker input[type=color]{width:2rem;height:1.6rem;padding:0;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-sm, .25rem);background:none;cursor:pointer}.kpt-rt-grid-pop{padding:var(--kpt-space-2, .5rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3)}.kpt-rt-grid{display:flex;flex-direction:column;gap:3px}.kpt-rt-grid__row{display:flex;gap:3px}.kpt-rt-grid__cell{width:1rem;height:1rem;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:2px;cursor:pointer}.kpt-rt-grid__cell.is-on{background:var(--kpt-color-primary);border-color:var(--kpt-color-primary)}.kpt-rt-grid__label{margin-top:var(--kpt-space-2, .5rem);text-align:center;font-size:var(--kpt-font-size-xs, .75rem);color:var(--kpt-color-on-surface-muted)}.kpt-rt-menu{min-width:12rem;padding:.25rem;background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-rt-menu__group{padding:.3rem .6rem .15rem;font-size:var(--kpt-font-size-xs, .75rem);font-weight:var(--kpt-font-weight-semibold, 600);text-transform:uppercase;letter-spacing:.03em;color:var(--kpt-color-on-surface-muted)}.kpt-rt-menu__item{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);width:100%;padding:.4rem .6rem;border:0;border-radius:var(--kpt-radius-sm, .25rem);background:none;color:var(--kpt-color-on-surface);font:inherit;text-align:start;cursor:pointer}.kpt-rt-menu__item:hover{background:var(--kpt-color-muted)}.kpt-rt-menu__item kpt-icon{color:var(--kpt-color-on-surface-muted)}.kpt-rt-menu__item--danger{color:var(--kpt-color-danger)}.kpt-rt-menu__item--danger kpt-icon{color:var(--kpt-color-danger)}.kpt-rt-menu__item.is-disabled{opacity:.4;pointer-events:none}.kpt-rt-menu__sep{height:1px;margin:.25rem 0;background:var(--kpt-color-border)}.kpt-rt-border{display:flex;flex-direction:column;gap:var(--kpt-space-2, .5rem);padding:var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3)}.kpt-rt-border__seg{display:flex;gap:2px;padding:2px;background:var(--kpt-color-surface-variant);border-radius:var(--kpt-radius-md, .5rem)}.kpt-rt-border__seg button{flex:1;border:0;background:none;padding:.25rem .5rem;border-radius:var(--kpt-radius-sm, .25rem);color:var(--kpt-color-on-surface-muted);font:inherit;font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-rt-border__seg button.is-active{background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface);font-weight:var(--kpt-font-weight-medium, 500);box-shadow:var(--kpt-elevation-1)}.kpt-rt-border__widths{display:flex;gap:.25rem}.kpt-rt-border__widths button{flex:1;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);background:none;padding:.25rem .3rem;border-radius:var(--kpt-radius-sm, .25rem);color:var(--kpt-color-on-surface);font:inherit;font-size:var(--kpt-font-size-xs, .75rem);cursor:pointer}.kpt-rt-border__widths button:hover{background:var(--kpt-color-muted)}}\n"] }]
|
|
5505
|
-
}], () => [], { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], toolbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "toolbar", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], editor: [{ type: i0.ViewChild, args: ['editor', { isSignal: true }] }] }); })();
|
|
5506
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptRichText, { className: "KptRichText", filePath: "lib/rich-text/rich-text.component.ts", lineNumber:
|
|
5849
|
+
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{color:var(--kpt-color-on-surface-muted)}.kpt-rt-menu__item--danger{color:var(--kpt-color-danger)}.kpt-rt-menu__item--danger kpt-icon{color:var(--kpt-color-danger)}.kpt-rt-menu__item.is-disabled{opacity:.4;pointer-events:none}.kpt-rt-menu__sep{height:1px;margin:.25rem 0;background:var(--kpt-color-border)}.kpt-rt-border{display:flex;flex-direction:column;gap:var(--kpt-space-2, .5rem);padding:var(--kpt-space-3, .75rem);background:var(--kpt-color-surface-raised);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);box-shadow:var(--kpt-elevation-3)}.kpt-rt-border__seg{display:flex;gap:2px;padding:2px;background:var(--kpt-color-surface-variant);border-radius:var(--kpt-radius-md, .5rem)}.kpt-rt-border__seg button{flex:1;border:0;background:none;padding:.25rem .5rem;border-radius:var(--kpt-radius-sm, .25rem);color:var(--kpt-color-on-surface-muted);font:inherit;font-size:var(--kpt-font-size-sm, .875rem);cursor:pointer}.kpt-rt-border__seg button.is-active{background:var(--kpt-color-surface-raised);color:var(--kpt-color-on-surface);font-weight:var(--kpt-font-weight-medium, 500);box-shadow:var(--kpt-elevation-1)}.kpt-rt-border__widths{display:flex;gap:.25rem}.kpt-rt-border__widths button{flex:1;border:var(--kpt-border-width-thin, 1px) solid var(--kpt-color-border);background:none;padding:.25rem .3rem;border-radius:var(--kpt-radius-sm, .25rem);color:var(--kpt-color-on-surface);font:inherit;font-size:var(--kpt-font-size-xs, .75rem);cursor:pointer}.kpt-rt-border__widths button:hover{background:var(--kpt-color-muted)}}\n"] }]
|
|
5850
|
+
}], () => [], { 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 }] }] }); })();
|
|
5851
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptRichText, { className: "KptRichText", filePath: "lib/rich-text/rich-text.component.ts", lineNumber: 135 }); })();
|
|
5507
5852
|
|
|
5508
5853
|
function KptSlider_Conditional_0_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
5509
5854
|
i0.ɵɵdomElementStart(0, "span", 5);
|
|
@@ -5773,7 +6118,7 @@ class KptRating {
|
|
|
5773
6118
|
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }] }); })();
|
|
5774
6119
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptRating, { className: "KptRating", filePath: "lib/rating/rating.component.ts", lineNumber: 46 }); })();
|
|
5775
6120
|
|
|
5776
|
-
const _forTrack0$
|
|
6121
|
+
const _forTrack0$7 = ($index, $item) => $item.name;
|
|
5777
6122
|
function KptFileUpload_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
5778
6123
|
i0.ɵɵelementStart(0, "div", 5);
|
|
5779
6124
|
i0.ɵɵtext(1);
|
|
@@ -5809,7 +6154,7 @@ function KptFileUpload_Conditional_6_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
5809
6154
|
} }
|
|
5810
6155
|
function KptFileUpload_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
5811
6156
|
i0.ɵɵelementStart(0, "ul", 6);
|
|
5812
|
-
i0.ɵɵrepeaterCreate(1, KptFileUpload_Conditional_6_For_2_Template, 8, 3, "li", 7, _forTrack0$
|
|
6157
|
+
i0.ɵɵrepeaterCreate(1, KptFileUpload_Conditional_6_For_2_Template, 8, 3, "li", 7, _forTrack0$7);
|
|
5813
6158
|
i0.ɵɵelementEnd();
|
|
5814
6159
|
} if (rf & 2) {
|
|
5815
6160
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
@@ -6023,7 +6368,7 @@ class KptColorPicker {
|
|
|
6023
6368
|
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], presets: [{ type: i0.Input, args: [{ isSignal: true, alias: "presets", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }] }); })();
|
|
6024
6369
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptColorPicker, { className: "KptColorPicker", filePath: "lib/color-picker/color-picker.component.ts", lineNumber: 52 }); })();
|
|
6025
6370
|
|
|
6026
|
-
const _forTrack0$
|
|
6371
|
+
const _forTrack0$6 = ($index, $item) => $item.key;
|
|
6027
6372
|
const _forTrack1$1 = ($index, $item) => $item.iso;
|
|
6028
6373
|
function KptDateRange_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
6029
6374
|
i0.ɵɵelementStart(0, "span", 2);
|
|
@@ -6243,7 +6588,7 @@ function KptDateRange_ng_template_7_Conditional_2_Conditional_3_Template(rf, ctx
|
|
|
6243
6588
|
} }
|
|
6244
6589
|
function KptDateRange_ng_template_7_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
6245
6590
|
i0.ɵɵelementStart(0, "div", 17);
|
|
6246
|
-
i0.ɵɵrepeaterCreate(1, KptDateRange_ng_template_7_Conditional_2_For_2_Template, 14, 3, "div", 18, _forTrack0$
|
|
6591
|
+
i0.ɵɵrepeaterCreate(1, KptDateRange_ng_template_7_Conditional_2_For_2_Template, 14, 3, "div", 18, _forTrack0$6);
|
|
6247
6592
|
i0.ɵɵelementEnd();
|
|
6248
6593
|
i0.ɵɵconditionalCreate(3, KptDateRange_ng_template_7_Conditional_2_Conditional_3_Template, 10, 8);
|
|
6249
6594
|
} if (rf & 2) {
|
|
@@ -6706,7 +7051,7 @@ class KptInputNumber {
|
|
|
6706
7051
|
}], 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"] }] }); })();
|
|
6707
7052
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptInputNumber, { className: "KptInputNumber", filePath: "lib/input-number/input-number.component.ts", lineNumber: 53 }); })();
|
|
6708
7053
|
|
|
6709
|
-
const _c0$
|
|
7054
|
+
const _c0$t = () => [0, 1, 2, 3];
|
|
6710
7055
|
function KptPassword_Conditional_4_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
6711
7056
|
i0.ɵɵelement(0, "span", 8);
|
|
6712
7057
|
} if (rf & 2) {
|
|
@@ -6725,10 +7070,11 @@ function KptPassword_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
6725
7070
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
6726
7071
|
i0.ɵɵattribute("data-score", ctx_r1.strength().score);
|
|
6727
7072
|
i0.ɵɵadvance(2);
|
|
6728
|
-
i0.ɵɵrepeater(i0.ɵɵpureFunction0(2, _c0$
|
|
7073
|
+
i0.ɵɵrepeater(i0.ɵɵpureFunction0(2, _c0$t));
|
|
6729
7074
|
i0.ɵɵadvance(3);
|
|
6730
7075
|
i0.ɵɵtextInterpolate(ctx_r1.strength().label);
|
|
6731
7076
|
} }
|
|
7077
|
+
let nextUniqueId$1 = 0;
|
|
6732
7078
|
/**
|
|
6733
7079
|
* Pole hasła z przełącznikiem widoczności i opcjonalnym miernikiem siły. Signal Forms.
|
|
6734
7080
|
*
|
|
@@ -6741,6 +7087,15 @@ class KptPassword {
|
|
|
6741
7087
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
6742
7088
|
this.placeholder = input('', /* @ts-ignore */
|
|
6743
7089
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
7090
|
+
/** Id natywnego pola — pozwala związać etykietę przez `kpt-form-field [controlId]`. */
|
|
7091
|
+
this.id = input(`kpt-password-${++nextUniqueId$1}`, /* @ts-ignore */
|
|
7092
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
7093
|
+
/**
|
|
7094
|
+
* Podpowiedź autouzupełniania. Rejestracja i reset hasła wymagają `new-password` — inaczej
|
|
7095
|
+
* menedżer haseł podstawia stare hasło zamiast zaproponować nowe.
|
|
7096
|
+
*/
|
|
7097
|
+
this.autocomplete = input('current-password', /* @ts-ignore */
|
|
7098
|
+
...(ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []));
|
|
6744
7099
|
this.feedback = input(false, { ...(ngDevMode ? { debugName: "feedback" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
6745
7100
|
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
6746
7101
|
this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
@@ -6769,7 +7124,7 @@ class KptPassword {
|
|
|
6769
7124
|
...(ngDevMode ? [{ debugName: "strength" }] : /* istanbul ignore next */ []));
|
|
6770
7125
|
}
|
|
6771
7126
|
static { this.ɵfac = function KptPassword_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptPassword)(); }; }
|
|
6772
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptPassword, selectors: [["kpt-password"]], hostAttrs: [1, "kpt-password-host"], inputs: { value: [1, "value"], placeholder: [1, "placeholder"], feedback: [1, "feedback"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 5, vars:
|
|
7127
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptPassword, selectors: [["kpt-password"]], hostAttrs: [1, "kpt-password-host"], inputs: { value: [1, "value"], placeholder: [1, "placeholder"], id: [1, "id"], autocomplete: [1, "autocomplete"], feedback: [1, "feedback"], disabled: [1, "disabled"], invalid: [1, "invalid"], touched: [1, "touched"] }, outputs: { value: "valueChange", touch: "touch" }, decls: 5, vars: 14, consts: [[1, "kpt-password"], [1, "kpt-password__input", 3, "input", "blur", "id", "type", "value", "disabled", "placeholder"], ["type", "button", 1, "kpt-password__toggle", 3, "click", "disabled"], [3, "name"], [1, "kpt-password__meter"], [1, "kpt-password__bars"], [1, "kpt-password__bar", 3, "is-on"], [1, "kpt-password__hint"], [1, "kpt-password__bar"]], template: function KptPassword_Template(rf, ctx) { if (rf & 1) {
|
|
6773
7128
|
i0.ɵɵelementStart(0, "div", 0)(1, "input", 1);
|
|
6774
7129
|
i0.ɵɵlistener("input", function KptPassword_Template_input_input_1_listener($event) { return ctx.value.set($event.target.value); })("blur", function KptPassword_Template_input_blur_1_listener() { return ctx.touch.emit(); });
|
|
6775
7130
|
i0.ɵɵelementEnd();
|
|
@@ -6781,7 +7136,8 @@ class KptPassword {
|
|
|
6781
7136
|
} if (rf & 2) {
|
|
6782
7137
|
i0.ɵɵclassProp("kpt-password--disabled", ctx.disabled())("kpt-password--invalid", ctx.showInvalid());
|
|
6783
7138
|
i0.ɵɵadvance();
|
|
6784
|
-
i0.ɵɵproperty("type", ctx.visible() ? "text" : "password")("value", ctx.value())("disabled", ctx.disabled())("placeholder", ctx.placeholder());
|
|
7139
|
+
i0.ɵɵproperty("id", ctx.id())("type", ctx.visible() ? "text" : "password")("value", ctx.value())("disabled", ctx.disabled())("placeholder", ctx.placeholder());
|
|
7140
|
+
i0.ɵɵattribute("autocomplete", ctx.autocomplete());
|
|
6785
7141
|
i0.ɵɵadvance();
|
|
6786
7142
|
i0.ɵɵproperty("disabled", ctx.disabled());
|
|
6787
7143
|
i0.ɵɵattribute("aria-label", ctx.visible() ? ctx.i18n.t("password.hide") : ctx.i18n.t("password.show"));
|
|
@@ -6797,11 +7153,12 @@ class KptPassword {
|
|
|
6797
7153
|
<div class="kpt-password" [class.kpt-password--disabled]="disabled()" [class.kpt-password--invalid]="showInvalid()">
|
|
6798
7154
|
<input
|
|
6799
7155
|
class="kpt-password__input"
|
|
7156
|
+
[id]="id()"
|
|
6800
7157
|
[type]="visible() ? 'text' : 'password'"
|
|
6801
7158
|
[value]="value()"
|
|
6802
7159
|
[disabled]="disabled()"
|
|
6803
7160
|
[placeholder]="placeholder()"
|
|
6804
|
-
autocomplete="
|
|
7161
|
+
[attr.autocomplete]="autocomplete()"
|
|
6805
7162
|
(input)="value.set($any($event.target).value)"
|
|
6806
7163
|
(blur)="touch.emit()"
|
|
6807
7164
|
/>
|
|
@@ -6820,8 +7177,8 @@ class KptPassword {
|
|
|
6820
7177
|
</div>
|
|
6821
7178
|
}
|
|
6822
7179
|
`, host: { class: 'kpt-password-host' }, styles: ["@layer kpt.components{.kpt-password-host{display:block}.kpt-password{display:flex;align-items:center;width:100%;height:2.5rem;box-sizing:border-box;padding-inline:var(--kpt-space-3, .75rem);gap:var(--kpt-space-2, .5rem);border:var(--kpt-border-width-thin, 1px) solid var(--kpt-form-field-border);border-radius:var(--kpt-form-field-radius, .5rem);background:var(--kpt-form-field-bg)}.kpt-password:focus-within:not(.kpt-password--disabled){border-color:var(--kpt-form-field-border-focus);box-shadow:0 0 0 2px color-mix(in oklch,var(--kpt-form-field-border-focus) 30%,transparent)}.kpt-password--invalid{border-color:var(--kpt-form-field-border-error)}.kpt-password--disabled{opacity:.6;background:var(--kpt-color-surface-variant)}.kpt-password__input{flex:1;min-width:0;border:0;background:none;color:var(--kpt-form-field-text);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-password__input:focus{outline:none}.kpt-password__input::placeholder{color:var(--kpt-form-field-placeholder)}.kpt-password__toggle{display:inline-flex;border:0;background:none;padding:0;cursor:pointer;color:var(--kpt-color-on-surface-muted)}.kpt-password__toggle:hover:not(:disabled){color:var(--kpt-color-on-surface)}.kpt-password__meter{margin-top:var(--kpt-space-2, .5rem);display:flex;align-items:center;gap:var(--kpt-space-2, .5rem)}.kpt-password__bars{display:flex;gap:4px;flex:1}.kpt-password__bar{height:4px;flex:1;border-radius:2px;background:var(--kpt-color-border);transition:background .15s}.kpt-password__hint{font-size:var(--kpt-font-size-xs, .75rem);color:var(--kpt-color-on-surface-muted)}.kpt-password__meter[data-score=\"1\"] .kpt-password__bar.is-on{background:var(--kpt-color-danger)}.kpt-password__meter[data-score=\"2\"] .kpt-password__bar.is-on{background:var(--kpt-color-warning)}.kpt-password__meter[data-score=\"3\"] .kpt-password__bar.is-on{background:var(--kpt-color-info)}.kpt-password__meter[data-score=\"4\"] .kpt-password__bar.is-on{background:var(--kpt-color-success)}}\n"] }]
|
|
6823
|
-
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], feedback: [{ type: i0.Input, args: [{ isSignal: true, alias: "feedback", 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"] }] }); })();
|
|
6824
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptPassword, { className: "KptPassword", filePath: "lib/password/password.component.ts", lineNumber:
|
|
7180
|
+
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], feedback: [{ type: i0.Input, args: [{ isSignal: true, alias: "feedback", 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"] }] }); })();
|
|
7181
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptPassword, { className: "KptPassword", filePath: "lib/password/password.component.ts", lineNumber: 55 }); })();
|
|
6825
7182
|
|
|
6826
7183
|
function KptInputOtp_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
6827
7184
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
@@ -7120,7 +7477,7 @@ class KptInputMask {
|
|
|
7120
7477
|
}], null, { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], mask: [{ type: i0.Input, args: [{ isSignal: true, alias: "mask", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }] }); })();
|
|
7121
7478
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptInputMask, { className: "KptInputMask", filePath: "lib/input-mask/input-mask.component.ts", lineNumber: 36 }); })();
|
|
7122
7479
|
|
|
7123
|
-
const _forTrack0$
|
|
7480
|
+
const _forTrack0$5 = ($index, $item) => $item.value;
|
|
7124
7481
|
function KptListbox_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
7125
7482
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
7126
7483
|
i0.ɵɵelementStart(0, "div", 1);
|
|
@@ -7217,7 +7574,7 @@ class KptListbox {
|
|
|
7217
7574
|
i0.ɵɵelementStart(0, "div", 0);
|
|
7218
7575
|
i0.ɵɵconditionalCreate(1, KptListbox_Conditional_1_Template, 3, 2, "div", 1);
|
|
7219
7576
|
i0.ɵɵelementStart(2, "div", 2);
|
|
7220
|
-
i0.ɵɵrepeaterCreate(3, KptListbox_For_4_Template, 4, 6, "button", 3, _forTrack0$
|
|
7577
|
+
i0.ɵɵrepeaterCreate(3, KptListbox_For_4_Template, 4, 6, "button", 3, _forTrack0$5, false, KptListbox_ForEmpty_5_Template, 2, 1, "div", 4);
|
|
7221
7578
|
i0.ɵɵelementEnd()();
|
|
7222
7579
|
} if (rf & 2) {
|
|
7223
7580
|
i0.ɵɵclassProp("kpt-listbox--invalid", ctx.showInvalid());
|
|
@@ -7436,8 +7793,8 @@ class KptKnob {
|
|
|
7436
7793
|
}], 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"] }] }); })();
|
|
7437
7794
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptKnob, { className: "KptKnob", filePath: "lib/knob/knob.component.ts", lineNumber: 45 }); })();
|
|
7438
7795
|
|
|
7439
|
-
const _c0$
|
|
7440
|
-
const _c1$
|
|
7796
|
+
const _c0$s = ["*", [["", "kptCardFooter", ""]]];
|
|
7797
|
+
const _c1$b = ["*", "[kptCardFooter]"];
|
|
7441
7798
|
function KptCard_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
7442
7799
|
i0.ɵɵdomElementStart(0, "div", 0);
|
|
7443
7800
|
i0.ɵɵtext(1);
|
|
@@ -7474,8 +7831,8 @@ class KptCard {
|
|
|
7474
7831
|
static { this.ɵfac = function KptCard_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptCard)(); }; }
|
|
7475
7832
|
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) {
|
|
7476
7833
|
i0.ɵɵattribute("data-variant", ctx.variant());
|
|
7477
|
-
} }, inputs: { variant: [1, "variant"], header: [1, "header"], flush: [1, "flush"] }, ngContentSelectors: _c1$
|
|
7478
|
-
i0.ɵɵprojectionDef(_c0$
|
|
7834
|
+
} }, inputs: { variant: [1, "variant"], header: [1, "header"], flush: [1, "flush"] }, ngContentSelectors: _c1$b, decls: 4, vars: 3, consts: [[1, "kpt-card__header"], [1, "kpt-card__body"]], template: function KptCard_Template(rf, ctx) { if (rf & 1) {
|
|
7835
|
+
i0.ɵɵprojectionDef(_c0$s);
|
|
7479
7836
|
i0.ɵɵconditionalCreate(0, KptCard_Conditional_0_Template, 2, 1, "div", 0);
|
|
7480
7837
|
i0.ɵɵdomElementStart(1, "div", 1);
|
|
7481
7838
|
i0.ɵɵprojection(2);
|
|
@@ -7530,7 +7887,7 @@ class KptDivider {
|
|
|
7530
7887
|
}], null, { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }] }); })();
|
|
7531
7888
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDivider, { className: "KptDivider", filePath: "lib/divider/divider.component.ts", lineNumber: 27 }); })();
|
|
7532
7889
|
|
|
7533
|
-
const _c0$
|
|
7890
|
+
const _c0$r = ["*"];
|
|
7534
7891
|
/**
|
|
7535
7892
|
* Górny pasek (toolbar) — pozioma belka na treść aplikacji (logo, akcje).
|
|
7536
7893
|
* Elementowi z atrybutem `kptToolbarSpacer` nadaj elastyczny odstęp, aby rozepchnąć zawartość.
|
|
@@ -7558,7 +7915,7 @@ class KptToolbar {
|
|
|
7558
7915
|
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) {
|
|
7559
7916
|
i0.ɵɵattribute("data-wrap", ctx.wrap() ? "" : null);
|
|
7560
7917
|
i0.ɵɵclassProp("kpt-toolbar--elevated", ctx.elevated());
|
|
7561
|
-
} }, inputs: { elevated: [1, "elevated"], wrap: [1, "wrap"] }, ngContentSelectors: _c0$
|
|
7918
|
+
} }, inputs: { elevated: [1, "elevated"], wrap: [1, "wrap"] }, ngContentSelectors: _c0$r, decls: 1, vars: 0, template: function KptToolbar_Template(rf, ctx) { if (rf & 1) {
|
|
7562
7919
|
i0.ɵɵprojectionDef();
|
|
7563
7920
|
i0.ɵɵprojection(0);
|
|
7564
7921
|
} }, 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 }); }
|
|
@@ -7573,8 +7930,8 @@ class KptToolbar {
|
|
|
7573
7930
|
}], null, { elevated: [{ type: i0.Input, args: [{ isSignal: true, alias: "elevated", required: false }] }], wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrap", required: false }] }] }); })();
|
|
7574
7931
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptToolbar, { className: "KptToolbar", filePath: "lib/toolbar/toolbar.component.ts", lineNumber: 27 }); })();
|
|
7575
7932
|
|
|
7576
|
-
const _c0$
|
|
7577
|
-
const _c1$
|
|
7933
|
+
const _c0$q = ["*", [["", "kptSidenavFooter", ""]]];
|
|
7934
|
+
const _c1$a = ["*", "[kptSidenavFooter]"];
|
|
7578
7935
|
/**
|
|
7579
7936
|
* Panel boczny (sidenav) — stylowany kontener nawigacji, zwykle umieszczany w slocie
|
|
7580
7937
|
* `kptShellSidenav` komponentu `kpt-app-shell`.
|
|
@@ -7594,8 +7951,8 @@ const _c1$9 = ["*", "[kptSidenavFooter]"];
|
|
|
7594
7951
|
*/
|
|
7595
7952
|
class KptSidenav {
|
|
7596
7953
|
static { this.ɵfac = function KptSidenav_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptSidenav)(); }; }
|
|
7597
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptSidenav, selectors: [["kpt-sidenav"]], hostAttrs: [1, "kpt-sidenav"], ngContentSelectors: _c1$
|
|
7598
|
-
i0.ɵɵprojectionDef(_c0$
|
|
7954
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptSidenav, selectors: [["kpt-sidenav"]], hostAttrs: [1, "kpt-sidenav"], ngContentSelectors: _c1$a, decls: 3, vars: 0, consts: [[1, "kpt-sidenav__scroll"]], template: function KptSidenav_Template(rf, ctx) { if (rf & 1) {
|
|
7955
|
+
i0.ɵɵprojectionDef(_c0$q);
|
|
7599
7956
|
i0.ɵɵdomElementStart(0, "div", 0);
|
|
7600
7957
|
i0.ɵɵprojection(1);
|
|
7601
7958
|
i0.ɵɵdomElementEnd();
|
|
@@ -7608,8 +7965,8 @@ class KptSidenav {
|
|
|
7608
7965
|
}], null, null); })();
|
|
7609
7966
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptSidenav, { className: "KptSidenav", filePath: "lib/sidenav/sidenav.component.ts", lineNumber: 30 }); })();
|
|
7610
7967
|
|
|
7611
|
-
const _c0$
|
|
7612
|
-
const _c1$
|
|
7968
|
+
const _c0$p = [[["", "kptShellToolbar", ""]], [["", "kptShellSidenav", ""]], "*"];
|
|
7969
|
+
const _c1$9 = ["[kptShellToolbar]", "[kptShellSidenav]", "*"];
|
|
7613
7970
|
/**
|
|
7614
7971
|
* Szkielet aplikacji: pasek u góry, panel boczny i treść. Sloty projekcji:
|
|
7615
7972
|
* `[kptShellToolbar]`, `[kptShellSidenav]` oraz treść domyślna.
|
|
@@ -7729,8 +8086,8 @@ class KptAppShell {
|
|
|
7729
8086
|
} if (rf & 2) {
|
|
7730
8087
|
i0.ɵɵattribute("data-sidenav-mode", ctx.sidenavMode())("data-sidenav-breakpoint", ctx.sidenavBreakpoint())("data-sidenav-rail", ctx.sidenavRailBreakpoint());
|
|
7731
8088
|
i0.ɵɵclassProp("kpt-app-shell--nav-open", ctx.sidenavOpen())("kpt-app-shell--nav-compact-open", ctx.sidenavCompactOpen());
|
|
7732
|
-
} }, 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$
|
|
7733
|
-
i0.ɵɵprojectionDef(_c0$
|
|
8089
|
+
} }, 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$9, 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) {
|
|
8090
|
+
i0.ɵɵprojectionDef(_c0$p);
|
|
7734
8091
|
i0.ɵɵprojection(0);
|
|
7735
8092
|
i0.ɵɵdomElementStart(1, "div", 0)(2, "aside", 1);
|
|
7736
8093
|
i0.ɵɵprojection(3, 1);
|
|
@@ -7813,75 +8170,841 @@ class KptShellNavToggle {
|
|
|
7813
8170
|
}]
|
|
7814
8171
|
}], null, { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptShellNavToggle", required: false }] }] }); })();
|
|
7815
8172
|
|
|
7816
|
-
const _c0$
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
i0.ɵɵelementStart(0, "button", 8);
|
|
7821
|
-
i0.ɵɵlistener("click", function KptPanel_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.collapsed.set(!ctx_r1.collapsed())); });
|
|
7822
|
-
i0.ɵɵelement(1, "kpt-icon", 9);
|
|
8173
|
+
const _c0$o = ["*"];
|
|
8174
|
+
function KptAlert_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
8175
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
8176
|
+
i0.ɵɵtext(1);
|
|
7823
8177
|
i0.ɵɵelementEnd();
|
|
7824
8178
|
} if (rf & 2) {
|
|
7825
|
-
const
|
|
7826
|
-
i0.ɵɵattribute("aria-expanded", !ctx_r1.collapsed())("aria-label", ctx_r1.i18n.t("panel.toggle"));
|
|
8179
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
7827
8180
|
i0.ɵɵadvance();
|
|
7828
|
-
i0.ɵɵ
|
|
8181
|
+
i0.ɵɵtextInterpolate(ctx_r0.title());
|
|
8182
|
+
} }
|
|
8183
|
+
function KptAlert_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
8184
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
8185
|
+
i0.ɵɵelementStart(0, "button", 6);
|
|
8186
|
+
i0.ɵɵlistener("click", function KptAlert_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.dismiss()); });
|
|
8187
|
+
i0.ɵɵelement(1, "kpt-icon", 7);
|
|
8188
|
+
i0.ɵɵelementEnd();
|
|
8189
|
+
} if (rf & 2) {
|
|
8190
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
8191
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("common.close"));
|
|
7829
8192
|
} }
|
|
7830
8193
|
/**
|
|
7831
|
-
*
|
|
8194
|
+
* Komunikat inline (alert). Warianty info/success/warning/danger, opcjonalny tytuł i zamykanie.
|
|
7832
8195
|
*
|
|
7833
8196
|
* @example
|
|
7834
|
-
* <kpt-
|
|
8197
|
+
* <kpt-alert variant="success" title="Zapisano">Zmiany zostały zapisane.</kpt-alert>
|
|
7835
8198
|
*/
|
|
7836
|
-
class
|
|
8199
|
+
class KptAlert {
|
|
7837
8200
|
constructor() {
|
|
7838
|
-
this.
|
|
7839
|
-
...(ngDevMode ? [{ debugName: "
|
|
7840
|
-
this.
|
|
7841
|
-
|
|
7842
|
-
...(ngDevMode ?
|
|
7843
|
-
this.
|
|
7844
|
-
this.animationDuration = input(500, /* @ts-ignore */
|
|
7845
|
-
...(ngDevMode ? [{ debugName: "animationDuration" }] : /* istanbul ignore next */ []));
|
|
8201
|
+
this.variant = input('info', /* @ts-ignore */
|
|
8202
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
8203
|
+
this.title = input('', /* @ts-ignore */
|
|
8204
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
8205
|
+
this.dismissible = input(false, { ...(ngDevMode ? { debugName: "dismissible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
8206
|
+
this.closed = output();
|
|
7846
8207
|
this.i18n = inject(KptI18n);
|
|
8208
|
+
this.visible = signal(true, /* @ts-ignore */
|
|
8209
|
+
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
7847
8210
|
}
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
8211
|
+
iconName() {
|
|
8212
|
+
return { info: 'info', success: 'circle-check', warning: 'alert-triangle', danger: 'circle-x' }[this.variant()];
|
|
8213
|
+
}
|
|
8214
|
+
dismiss() {
|
|
8215
|
+
this.visible.set(false);
|
|
8216
|
+
this.closed.emit();
|
|
8217
|
+
}
|
|
8218
|
+
static { this.ɵfac = function KptAlert_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptAlert)(); }; }
|
|
8219
|
+
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) {
|
|
8220
|
+
i0.ɵɵdomProperty("hidden", !ctx.visible());
|
|
8221
|
+
} }, inputs: { variant: [1, "variant"], title: [1, "title"], dismissible: [1, "dismissible"] }, outputs: { closed: "closed" }, ngContentSelectors: _c0$o, 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) {
|
|
8222
|
+
i0.ɵɵprojectionDef();
|
|
8223
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
8224
|
+
i0.ɵɵelement(1, "kpt-icon", 1);
|
|
8225
|
+
i0.ɵɵelementStart(2, "div", 2);
|
|
8226
|
+
i0.ɵɵconditionalCreate(3, KptAlert_Conditional_3_Template, 2, 1, "div", 3);
|
|
8227
|
+
i0.ɵɵelementStart(4, "div", 4);
|
|
7857
8228
|
i0.ɵɵprojection(5);
|
|
8229
|
+
i0.ɵɵelementEnd()();
|
|
8230
|
+
i0.ɵɵconditionalCreate(6, KptAlert_Conditional_6_Template, 2, 1, "button", 5);
|
|
7858
8231
|
i0.ɵɵelementEnd();
|
|
7859
|
-
i0.ɵɵconditionalCreate(6, KptPanel_Conditional_6_Template, 2, 3, "button", 4);
|
|
7860
|
-
i0.ɵɵelementEnd();
|
|
7861
|
-
i0.ɵɵelementStart(7, "div", 5)(8, "div", 6)(9, "div", 7);
|
|
7862
|
-
i0.ɵɵprojection(10, 1);
|
|
7863
|
-
i0.ɵɵelementEnd()()()();
|
|
7864
8232
|
} if (rf & 2) {
|
|
7865
|
-
i0.ɵɵ
|
|
7866
|
-
i0.ɵɵtextInterpolate(ctx.header());
|
|
7867
|
-
i0.ɵɵadvance(3);
|
|
7868
|
-
i0.ɵɵconditional(ctx.toggleable() ? 6 : -1);
|
|
8233
|
+
i0.ɵɵattribute("data-variant", ctx.variant());
|
|
7869
8234
|
i0.ɵɵadvance();
|
|
7870
|
-
i0.ɵɵ
|
|
7871
|
-
i0.ɵɵ
|
|
7872
|
-
|
|
8235
|
+
i0.ɵɵproperty("name", ctx.iconName());
|
|
8236
|
+
i0.ɵɵadvance(2);
|
|
8237
|
+
i0.ɵɵconditional(ctx.title() ? 3 : -1);
|
|
8238
|
+
i0.ɵɵadvance(3);
|
|
8239
|
+
i0.ɵɵconditional(ctx.dismissible() ? 6 : -1);
|
|
8240
|
+
} }, dependencies: [KptIcon], styles: ["@layer kpt.components{.kpt-alert{--%NS%_accent: var(--%NS%kpt-color-info);display:flex;align-items:flex-start;gap:var(--%NS%kpt-space-3, .75rem);padding:var(--%NS%kpt-space-3, .75rem) var(--%NS%kpt-space-4, 1rem);border:var(--%NS%kpt-border-width-thin, 1px) solid color-mix(in oklch,var(--%NS%_accent) 35%,transparent);border-inline-start:3px solid var(--%NS%_accent);border-radius:var(--%NS%kpt-radius-md, .5rem);background:color-mix(in oklch,var(--%NS%_accent) 10%,var(--%NS%kpt-color-surface));color:var(--%NS%kpt-color-on-surface);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-alert[data-variant=success]{--%NS%_accent: var(--%NS%kpt-color-success)}.kpt-alert[data-variant=warning]{--%NS%_accent: var(--%NS%kpt-color-warning)}.kpt-alert[data-variant=danger]{--%NS%_accent: var(--%NS%kpt-color-danger)}.kpt-alert__icon{color:var(--%NS%_accent);font-weight:700;line-height:1.5}.kpt-alert__content{flex:1;min-width:0}.kpt-alert__title{font-weight:var(--%NS%kpt-font-weight-semibold, 600);margin-bottom:.15rem}.kpt-alert__close{background:none;border:0;cursor:pointer;color:var(--%NS%kpt-color-on-surface-muted);font-size:1.15rem;line-height:1;padding:0}.kpt-alert__close:hover{color:var(--%NS%kpt-color-on-surface)}}\n"], encapsulation: 2 }); }
|
|
7873
8241
|
}
|
|
7874
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
8242
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptAlert, [{
|
|
7875
8243
|
type: Component,
|
|
7876
|
-
args: [{ selector: 'kpt-
|
|
7877
|
-
<div class="kpt-
|
|
7878
|
-
<
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
8244
|
+
args: [{ selector: 'kpt-alert', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [KptIcon], template: `
|
|
8245
|
+
<div class="kpt-alert" [attr.data-variant]="variant()" role="alert">
|
|
8246
|
+
<kpt-icon class="kpt-alert__icon" [name]="iconName()" />
|
|
8247
|
+
<div class="kpt-alert__content">
|
|
8248
|
+
@if (title()) {
|
|
8249
|
+
<div class="kpt-alert__title">{{ title() }}</div>
|
|
8250
|
+
}
|
|
8251
|
+
<div class="kpt-alert__message"><ng-content /></div>
|
|
8252
|
+
</div>
|
|
8253
|
+
@if (dismissible()) {
|
|
8254
|
+
<button class="kpt-alert__close" type="button" (click)="dismiss()" [attr.aria-label]="i18n.t('common.close')"><kpt-icon name="x" /></button>
|
|
8255
|
+
}
|
|
8256
|
+
</div>
|
|
8257
|
+
`, host: { class: 'kpt-alert-host', '[hidden]': '!visible()' }, styles: ["@layer kpt.components{.kpt-alert{--_accent: var(--kpt-color-info);display:flex;align-items:flex-start;gap:var(--kpt-space-3, .75rem);padding:var(--kpt-space-3, .75rem) var(--kpt-space-4, 1rem);border:var(--kpt-border-width-thin, 1px) solid color-mix(in oklch,var(--_accent) 35%,transparent);border-inline-start:3px solid var(--_accent);border-radius:var(--kpt-radius-md, .5rem);background:color-mix(in oklch,var(--_accent) 10%,var(--kpt-color-surface));color:var(--kpt-color-on-surface);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-alert[data-variant=success]{--_accent: var(--kpt-color-success)}.kpt-alert[data-variant=warning]{--_accent: var(--kpt-color-warning)}.kpt-alert[data-variant=danger]{--_accent: var(--kpt-color-danger)}.kpt-alert__icon{color:var(--_accent);font-weight:700;line-height:1.5}.kpt-alert__content{flex:1;min-width:0}.kpt-alert__title{font-weight:var(--kpt-font-weight-semibold, 600);margin-bottom:.15rem}.kpt-alert__close{background:none;border:0;cursor:pointer;color:var(--kpt-color-on-surface-muted);font-size:1.15rem;line-height:1;padding:0}.kpt-alert__close:hover{color:var(--kpt-color-on-surface)}}\n"] }]
|
|
8258
|
+
}], null, { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] }); })();
|
|
8259
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptAlert, { className: "KptAlert", filePath: "lib/alert/alert.component.ts", lineNumber: 45 }); })();
|
|
8260
|
+
|
|
8261
|
+
/**
|
|
8262
|
+
* Własny szablon przycisku jednego dostawcy logowania w `kpt-auth`. Kontekst: `$implicit` =
|
|
8263
|
+
* obiekt dostawcy, `select` = funkcja zgłaszająca wybór (emituje `providerSelect`).
|
|
8264
|
+
*
|
|
8265
|
+
* Przydatne, gdy logo marki nie przechodzi przez rejestr ikon (gradienty i `fill-rule` są
|
|
8266
|
+
* wycinane przy sanityzacji) albo gdy przycisk ma mieć inny układ niż wbudowany.
|
|
8267
|
+
*
|
|
8268
|
+
* @example
|
|
8269
|
+
* <kpt-auth [providers]="providers">
|
|
8270
|
+
* <ng-template kptAuthProvider="google" let-p let-select="select">
|
|
8271
|
+
* <button type="button" class="my-google" (click)="select()">
|
|
8272
|
+
* <img src="/google.svg" alt="" /> {{ p.label }}
|
|
8273
|
+
* </button>
|
|
8274
|
+
* </ng-template>
|
|
8275
|
+
* </kpt-auth>
|
|
8276
|
+
*/
|
|
8277
|
+
class KptAuthProviderDef {
|
|
8278
|
+
constructor() {
|
|
8279
|
+
/** Identyfikator dostawcy, dla którego obowiązuje szablon. */
|
|
8280
|
+
this.kptAuthProvider = input.required(/* @ts-ignore */
|
|
8281
|
+
...(ngDevMode ? [{ debugName: "kptAuthProvider" }] : /* istanbul ignore next */ []));
|
|
8282
|
+
this.template = inject(TemplateRef);
|
|
8283
|
+
}
|
|
8284
|
+
static { this.ɵfac = function KptAuthProviderDef_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptAuthProviderDef)(); }; }
|
|
8285
|
+
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: KptAuthProviderDef, selectors: [["ng-template", "kptAuthProvider", ""]], inputs: { kptAuthProvider: [1, "kptAuthProvider"] } }); }
|
|
8286
|
+
}
|
|
8287
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptAuthProviderDef, [{
|
|
8288
|
+
type: Directive,
|
|
8289
|
+
args: [{
|
|
8290
|
+
selector: 'ng-template[kptAuthProvider]',
|
|
8291
|
+
}]
|
|
8292
|
+
}], null, { kptAuthProvider: [{ type: i0.Input, args: [{ isSignal: true, alias: "kptAuthProvider", required: true }] }] }); })();
|
|
8293
|
+
|
|
8294
|
+
const _c0$n = ["heading"];
|
|
8295
|
+
const _c1$8 = [[["", "kptAuthBrand", ""]], [["", "kptAuthFooter", ""]], [["", "kptAuthPromo", ""]], [["", "kptAuthFields", ""]], [["", "kptAuthFields", ""]], [["", "kptAuthSso", ""]]];
|
|
8296
|
+
const _c2$3 = ["[kptAuthBrand]", "[kptAuthFooter]", "[kptAuthPromo]", "[kptAuthFields]", "[kptAuthFields]", "[kptAuthSso]"];
|
|
8297
|
+
const _c3$1 = () => ({ min: 8 });
|
|
8298
|
+
const _c4$1 = a0 => ({ provider: a0 });
|
|
8299
|
+
const _forTrack0$4 = ($index, $item) => $item.id;
|
|
8300
|
+
function KptAuth_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
8301
|
+
i0.ɵɵelementStart(0, "kpt-alert", 8);
|
|
8302
|
+
i0.ɵɵtext(1);
|
|
8303
|
+
i0.ɵɵelementEnd();
|
|
8304
|
+
} if (rf & 2) {
|
|
8305
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
8306
|
+
i0.ɵɵadvance();
|
|
8307
|
+
i0.ɵɵtextInterpolate(ctx_r0.error());
|
|
8308
|
+
} }
|
|
8309
|
+
function KptAuth_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
8310
|
+
i0.ɵɵelementStart(0, "kpt-alert", 9);
|
|
8311
|
+
i0.ɵɵtext(1);
|
|
8312
|
+
i0.ɵɵelementEnd();
|
|
8313
|
+
} if (rf & 2) {
|
|
8314
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
8315
|
+
i0.ɵɵadvance();
|
|
8316
|
+
i0.ɵɵtextInterpolate(ctx_r0.notice());
|
|
8317
|
+
} }
|
|
8318
|
+
function KptAuth_Case_13_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
8319
|
+
i0.ɵɵelement(0, "kpt-checkbox", 22);
|
|
8320
|
+
i0.ɵɵcontrolCreate();
|
|
8321
|
+
} if (rf & 2) {
|
|
8322
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
8323
|
+
i0.ɵɵproperty("formField", ctx_r0.signInForm.remember)("label", ctx_r0.i18n.t("auth.remember"));
|
|
8324
|
+
i0.ɵɵcontrol();
|
|
8325
|
+
} }
|
|
8326
|
+
function KptAuth_Case_13_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
8327
|
+
i0.ɵɵelement(0, "span");
|
|
8328
|
+
} }
|
|
8329
|
+
function KptAuth_Case_13_Template(rf, ctx) { if (rf & 1) {
|
|
8330
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
8331
|
+
i0.ɵɵelementStart(0, "form", 17);
|
|
8332
|
+
i0.ɵɵlistener("submit", function KptAuth_Case_13_Template_form_submit_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onSignIn()); });
|
|
8333
|
+
i0.ɵɵelementStart(1, "kpt-form-field", 18);
|
|
8334
|
+
i0.ɵɵelement(2, "kpt-input", 19);
|
|
8335
|
+
i0.ɵɵcontrolCreate();
|
|
8336
|
+
i0.ɵɵelementEnd();
|
|
8337
|
+
i0.ɵɵelementStart(3, "kpt-form-field", 18);
|
|
8338
|
+
i0.ɵɵelement(4, "kpt-password", 20);
|
|
8339
|
+
i0.ɵɵcontrolCreate();
|
|
8340
|
+
i0.ɵɵelementEnd();
|
|
8341
|
+
i0.ɵɵprojection(5, 3);
|
|
8342
|
+
i0.ɵɵelementStart(6, "div", 21);
|
|
8343
|
+
i0.ɵɵconditionalCreate(7, KptAuth_Case_13_Conditional_7_Template, 1, 2, "kpt-checkbox", 22)(8, KptAuth_Case_13_Conditional_8_Template, 1, 0, "span");
|
|
8344
|
+
i0.ɵɵelementStart(9, "button", 23);
|
|
8345
|
+
i0.ɵɵlistener("click", function KptAuth_Case_13_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.setMode("forgot")); });
|
|
8346
|
+
i0.ɵɵtext(10);
|
|
8347
|
+
i0.ɵɵelementEnd()();
|
|
8348
|
+
i0.ɵɵelementStart(11, "kpt-button", 24);
|
|
8349
|
+
i0.ɵɵtext(12);
|
|
8350
|
+
i0.ɵɵelementEnd()();
|
|
8351
|
+
} if (rf & 2) {
|
|
8352
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
8353
|
+
i0.ɵɵproperty("formRoot", ctx_r0.signInForm);
|
|
8354
|
+
i0.ɵɵattribute("aria-labelledby", ctx_r0.ids.signIn);
|
|
8355
|
+
i0.ɵɵadvance();
|
|
8356
|
+
i0.ɵɵproperty("label", ctx_r0.i18n.t("auth.email"))("error", ctx_r0.signInEmailError())("controlId", ctx_r0.ids.email);
|
|
8357
|
+
i0.ɵɵadvance();
|
|
8358
|
+
i0.ɵɵproperty("formField", ctx_r0.signInForm.email)("id", ctx_r0.ids.email)("placeholder", ctx_r0.i18n.t("auth.emailPlaceholder"));
|
|
8359
|
+
i0.ɵɵcontrol();
|
|
8360
|
+
i0.ɵɵadvance();
|
|
8361
|
+
i0.ɵɵproperty("label", ctx_r0.i18n.t("auth.password"))("error", ctx_r0.signInPasswordError())("controlId", ctx_r0.ids.password);
|
|
8362
|
+
i0.ɵɵadvance();
|
|
8363
|
+
i0.ɵɵproperty("formField", ctx_r0.signInForm.password)("id", ctx_r0.ids.password);
|
|
8364
|
+
i0.ɵɵcontrol();
|
|
8365
|
+
i0.ɵɵadvance(3);
|
|
8366
|
+
i0.ɵɵconditional(ctx_r0.showRemember() ? 7 : 8);
|
|
8367
|
+
i0.ɵɵadvance(3);
|
|
8368
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.i18n.t("auth.forgotLink"), " ");
|
|
8369
|
+
i0.ɵɵadvance();
|
|
8370
|
+
i0.ɵɵproperty("loading", ctx_r0.busy())("disabled", ctx_r0.signInInvalid());
|
|
8371
|
+
i0.ɵɵadvance();
|
|
8372
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.i18n.t("auth.signInSubmit"), " ");
|
|
8373
|
+
} }
|
|
8374
|
+
function KptAuth_Case_14_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
8375
|
+
i0.ɵɵelementStart(0, "kpt-form-field", 18);
|
|
8376
|
+
i0.ɵɵelement(1, "kpt-input", 29);
|
|
8377
|
+
i0.ɵɵcontrolCreate();
|
|
8378
|
+
i0.ɵɵelementEnd();
|
|
8379
|
+
} if (rf & 2) {
|
|
8380
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
8381
|
+
i0.ɵɵproperty("label", ctx_r0.i18n.t("auth.name"))("error", ctx_r0.signUpNameError())("controlId", ctx_r0.ids.name);
|
|
8382
|
+
i0.ɵɵadvance();
|
|
8383
|
+
i0.ɵɵproperty("formField", ctx_r0.signUpForm.name)("id", ctx_r0.ids.name);
|
|
8384
|
+
i0.ɵɵcontrol();
|
|
8385
|
+
} }
|
|
8386
|
+
function KptAuth_Case_14_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
8387
|
+
i0.ɵɵelementStart(0, "kpt-form-field", 28);
|
|
8388
|
+
i0.ɵɵelement(1, "kpt-checkbox", 22);
|
|
8389
|
+
i0.ɵɵcontrolCreate();
|
|
8390
|
+
i0.ɵɵelementEnd();
|
|
8391
|
+
} if (rf & 2) {
|
|
8392
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
8393
|
+
i0.ɵɵproperty("error", ctx_r0.signUpTermsError());
|
|
8394
|
+
i0.ɵɵadvance();
|
|
8395
|
+
i0.ɵɵproperty("formField", ctx_r0.signUpForm.terms)("label", ctx_r0.i18n.t("auth.terms"));
|
|
8396
|
+
i0.ɵɵcontrol();
|
|
8397
|
+
} }
|
|
8398
|
+
function KptAuth_Case_14_Template(rf, ctx) { if (rf & 1) {
|
|
8399
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
8400
|
+
i0.ɵɵelementStart(0, "form", 17);
|
|
8401
|
+
i0.ɵɵlistener("submit", function KptAuth_Case_14_Template_form_submit_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onSignUp()); });
|
|
8402
|
+
i0.ɵɵconditionalCreate(1, KptAuth_Case_14_Conditional_1_Template, 2, 5, "kpt-form-field", 18);
|
|
8403
|
+
i0.ɵɵelementStart(2, "kpt-form-field", 18);
|
|
8404
|
+
i0.ɵɵelement(3, "kpt-input", 19);
|
|
8405
|
+
i0.ɵɵcontrolCreate();
|
|
8406
|
+
i0.ɵɵelementEnd();
|
|
8407
|
+
i0.ɵɵelementStart(4, "kpt-form-field", 25);
|
|
8408
|
+
i0.ɵɵelement(5, "kpt-password", 26);
|
|
8409
|
+
i0.ɵɵcontrolCreate();
|
|
8410
|
+
i0.ɵɵelementEnd();
|
|
8411
|
+
i0.ɵɵelementStart(6, "kpt-form-field", 18);
|
|
8412
|
+
i0.ɵɵelement(7, "kpt-password", 27);
|
|
8413
|
+
i0.ɵɵcontrolCreate();
|
|
8414
|
+
i0.ɵɵelementEnd();
|
|
8415
|
+
i0.ɵɵprojection(8, 4);
|
|
8416
|
+
i0.ɵɵconditionalCreate(9, KptAuth_Case_14_Conditional_9_Template, 2, 3, "kpt-form-field", 28);
|
|
8417
|
+
i0.ɵɵelementStart(10, "kpt-button", 24);
|
|
8418
|
+
i0.ɵɵtext(11);
|
|
8419
|
+
i0.ɵɵelementEnd()();
|
|
8420
|
+
} if (rf & 2) {
|
|
8421
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
8422
|
+
i0.ɵɵproperty("formRoot", ctx_r0.signUpForm);
|
|
8423
|
+
i0.ɵɵattribute("aria-labelledby", ctx_r0.ids.signUp);
|
|
8424
|
+
i0.ɵɵadvance();
|
|
8425
|
+
i0.ɵɵconditional(ctx_r0.showName() ? 1 : -1);
|
|
8426
|
+
i0.ɵɵadvance();
|
|
8427
|
+
i0.ɵɵproperty("label", ctx_r0.i18n.t("auth.email"))("error", ctx_r0.signUpEmailError())("controlId", ctx_r0.ids.regEmail);
|
|
8428
|
+
i0.ɵɵadvance();
|
|
8429
|
+
i0.ɵɵproperty("formField", ctx_r0.signUpForm.email)("id", ctx_r0.ids.regEmail)("placeholder", ctx_r0.i18n.t("auth.emailPlaceholder"));
|
|
8430
|
+
i0.ɵɵcontrol();
|
|
8431
|
+
i0.ɵɵadvance();
|
|
8432
|
+
i0.ɵɵproperty("label", ctx_r0.i18n.t("auth.password"))("error", ctx_r0.signUpPasswordError())("hint", ctx_r0.i18n.t("auth.passwordHint", i0.ɵɵpureFunction0(24, _c3$1)))("controlId", ctx_r0.ids.regPassword);
|
|
8433
|
+
i0.ɵɵadvance();
|
|
8434
|
+
i0.ɵɵproperty("formField", ctx_r0.signUpForm.password)("id", ctx_r0.ids.regPassword);
|
|
8435
|
+
i0.ɵɵcontrol();
|
|
8436
|
+
i0.ɵɵadvance();
|
|
8437
|
+
i0.ɵɵproperty("label", ctx_r0.i18n.t("auth.confirmPassword"))("error", ctx_r0.signUpConfirmError())("controlId", ctx_r0.ids.regConfirm);
|
|
8438
|
+
i0.ɵɵadvance();
|
|
8439
|
+
i0.ɵɵproperty("formField", ctx_r0.signUpForm.confirm)("id", ctx_r0.ids.regConfirm);
|
|
8440
|
+
i0.ɵɵcontrol();
|
|
8441
|
+
i0.ɵɵadvance(2);
|
|
8442
|
+
i0.ɵɵconditional(ctx_r0.requireTerms() ? 9 : -1);
|
|
8443
|
+
i0.ɵɵadvance();
|
|
8444
|
+
i0.ɵɵproperty("loading", ctx_r0.busy())("disabled", ctx_r0.signUpInvalid());
|
|
8445
|
+
i0.ɵɵadvance();
|
|
8446
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.i18n.t("auth.signUpSubmit"), " ");
|
|
8447
|
+
} }
|
|
8448
|
+
function KptAuth_Case_15_Template(rf, ctx) { if (rf & 1) {
|
|
8449
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
8450
|
+
i0.ɵɵelementStart(0, "form", 17);
|
|
8451
|
+
i0.ɵɵlistener("submit", function KptAuth_Case_15_Template_form_submit_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onReset()); });
|
|
8452
|
+
i0.ɵɵelementStart(1, "kpt-form-field", 18);
|
|
8453
|
+
i0.ɵɵelement(2, "kpt-input", 19);
|
|
8454
|
+
i0.ɵɵcontrolCreate();
|
|
8455
|
+
i0.ɵɵelementEnd();
|
|
8456
|
+
i0.ɵɵelementStart(3, "kpt-button", 24);
|
|
8457
|
+
i0.ɵɵtext(4);
|
|
8458
|
+
i0.ɵɵelementEnd();
|
|
8459
|
+
i0.ɵɵelementStart(5, "button", 30);
|
|
8460
|
+
i0.ɵɵlistener("click", function KptAuth_Case_15_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.setMode("signIn")); });
|
|
8461
|
+
i0.ɵɵtext(6);
|
|
8462
|
+
i0.ɵɵelementEnd()();
|
|
8463
|
+
} if (rf & 2) {
|
|
8464
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
8465
|
+
i0.ɵɵproperty("formRoot", ctx_r0.resetForm);
|
|
8466
|
+
i0.ɵɵattribute("aria-labelledby", ctx_r0.ids.forgot);
|
|
8467
|
+
i0.ɵɵadvance();
|
|
8468
|
+
i0.ɵɵproperty("label", ctx_r0.i18n.t("auth.email"))("error", ctx_r0.resetEmailError())("controlId", ctx_r0.ids.resetEmail);
|
|
8469
|
+
i0.ɵɵadvance();
|
|
8470
|
+
i0.ɵɵproperty("formField", ctx_r0.resetForm.email)("id", ctx_r0.ids.resetEmail)("placeholder", ctx_r0.i18n.t("auth.emailPlaceholder"));
|
|
8471
|
+
i0.ɵɵcontrol();
|
|
8472
|
+
i0.ɵɵadvance();
|
|
8473
|
+
i0.ɵɵproperty("loading", ctx_r0.busy())("disabled", ctx_r0.resetInvalid());
|
|
8474
|
+
i0.ɵɵadvance();
|
|
8475
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.i18n.t("auth.resetSubmit"), " ");
|
|
8476
|
+
i0.ɵɵadvance(2);
|
|
8477
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.i18n.t("auth.backToSignIn"), " ");
|
|
8478
|
+
} }
|
|
8479
|
+
function KptAuth_Conditional_16_Conditional_2_For_5_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
8480
|
+
i0.ɵɵelementContainer(0, 36);
|
|
8481
|
+
} if (rf & 2) {
|
|
8482
|
+
const provider_r6 = i0.ɵɵnextContext().$implicit;
|
|
8483
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
8484
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx)("ngTemplateOutletContext", ctx_r0.providerContext(provider_r6));
|
|
8485
|
+
} }
|
|
8486
|
+
function KptAuth_Conditional_16_Conditional_2_For_5_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
8487
|
+
i0.ɵɵelement(0, "img", 39);
|
|
8488
|
+
} if (rf & 2) {
|
|
8489
|
+
const provider_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
8490
|
+
i0.ɵɵproperty("src", provider_r6.iconUrl, i0.ɵɵsanitizeUrl);
|
|
8491
|
+
} }
|
|
8492
|
+
function KptAuth_Conditional_16_Conditional_2_For_5_Conditional_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
8493
|
+
i0.ɵɵelement(0, "kpt-icon", 40);
|
|
8494
|
+
} if (rf & 2) {
|
|
8495
|
+
const provider_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
8496
|
+
i0.ɵɵproperty("name", provider_r6.icon);
|
|
8497
|
+
} }
|
|
8498
|
+
function KptAuth_Conditional_16_Conditional_2_For_5_Conditional_1_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
8499
|
+
i0.ɵɵelementStart(0, "span", 42);
|
|
8500
|
+
i0.ɵɵtext(1);
|
|
8501
|
+
i0.ɵɵelementEnd();
|
|
8502
|
+
} if (rf & 2) {
|
|
8503
|
+
const provider_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
8504
|
+
i0.ɵɵadvance();
|
|
8505
|
+
i0.ɵɵtextInterpolate(provider_r6.description);
|
|
8506
|
+
} }
|
|
8507
|
+
function KptAuth_Conditional_16_Conditional_2_For_5_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
8508
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
8509
|
+
i0.ɵɵelementStart(0, "button", 38);
|
|
8510
|
+
i0.ɵɵlistener("click", function KptAuth_Conditional_16_Conditional_2_For_5_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const provider_r6 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.selectProvider(provider_r6)); });
|
|
8511
|
+
i0.ɵɵconditionalCreate(1, KptAuth_Conditional_16_Conditional_2_For_5_Conditional_1_Conditional_1_Template, 1, 1, "img", 39)(2, KptAuth_Conditional_16_Conditional_2_For_5_Conditional_1_Conditional_2_Template, 1, 1, "kpt-icon", 40);
|
|
8512
|
+
i0.ɵɵelementStart(3, "span", 41);
|
|
8513
|
+
i0.ɵɵtext(4);
|
|
8514
|
+
i0.ɵɵelementEnd();
|
|
8515
|
+
i0.ɵɵconditionalCreate(5, KptAuth_Conditional_16_Conditional_2_For_5_Conditional_1_Conditional_5_Template, 2, 1, "span", 42);
|
|
8516
|
+
i0.ɵɵelementEnd();
|
|
8517
|
+
} if (rf & 2) {
|
|
8518
|
+
const provider_r6 = i0.ɵɵnextContext().$implicit;
|
|
8519
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
8520
|
+
i0.ɵɵproperty("disabled", ctx_r0.busy());
|
|
8521
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("auth.continueWith", i0.ɵɵpureFunction1(5, _c4$1, provider_r6.label)));
|
|
8522
|
+
i0.ɵɵadvance();
|
|
8523
|
+
i0.ɵɵconditional(provider_r6.iconUrl ? 1 : provider_r6.icon ? 2 : -1);
|
|
8524
|
+
i0.ɵɵadvance(3);
|
|
8525
|
+
i0.ɵɵtextInterpolate(provider_r6.label);
|
|
8526
|
+
i0.ɵɵadvance();
|
|
8527
|
+
i0.ɵɵconditional(provider_r6.description && ctx_r0.providerLayout() === "list" ? 5 : -1);
|
|
8528
|
+
} }
|
|
8529
|
+
function KptAuth_Conditional_16_Conditional_2_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
8530
|
+
i0.ɵɵconditionalCreate(0, KptAuth_Conditional_16_Conditional_2_For_5_Conditional_0_Template, 1, 2, "ng-container", 36)(1, KptAuth_Conditional_16_Conditional_2_For_5_Conditional_1_Template, 6, 7, "button", 37);
|
|
8531
|
+
} if (rf & 2) {
|
|
8532
|
+
let tmp_13_0;
|
|
8533
|
+
const provider_r6 = ctx.$implicit;
|
|
8534
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
8535
|
+
i0.ɵɵconditional((tmp_13_0 = ctx_r0.templateFor(provider_r6)) ? 0 : 1, tmp_13_0);
|
|
8536
|
+
} }
|
|
8537
|
+
function KptAuth_Conditional_16_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
8538
|
+
i0.ɵɵelementStart(0, "div", 33)(1, "span", 34);
|
|
8539
|
+
i0.ɵɵtext(2);
|
|
8540
|
+
i0.ɵɵelementEnd()();
|
|
8541
|
+
i0.ɵɵelementStart(3, "div", 35);
|
|
8542
|
+
i0.ɵɵrepeaterCreate(4, KptAuth_Conditional_16_Conditional_2_For_5_Template, 2, 1, null, null, _forTrack0$4);
|
|
8543
|
+
i0.ɵɵelementEnd();
|
|
8544
|
+
} if (rf & 2) {
|
|
8545
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
8546
|
+
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("auth.orContinueWith"));
|
|
8547
|
+
i0.ɵɵadvance(2);
|
|
8548
|
+
i0.ɵɵtextInterpolate(ctx_r0.i18n.t("auth.orContinueWith"));
|
|
8549
|
+
i0.ɵɵadvance();
|
|
8550
|
+
i0.ɵɵattribute("data-layout", ctx_r0.providerLayout());
|
|
8551
|
+
i0.ɵɵadvance();
|
|
8552
|
+
i0.ɵɵrepeater(ctx_r0.providers());
|
|
8553
|
+
} }
|
|
8554
|
+
function KptAuth_Conditional_16_Template(rf, ctx) { if (rf & 1) {
|
|
8555
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
8556
|
+
i0.ɵɵelementStart(0, "div", 31);
|
|
8557
|
+
i0.ɵɵprojection(1, 5);
|
|
8558
|
+
i0.ɵɵelementEnd();
|
|
8559
|
+
i0.ɵɵconditionalCreate(2, KptAuth_Conditional_16_Conditional_2_Template, 6, 3);
|
|
8560
|
+
i0.ɵɵelementStart(3, "p", 32);
|
|
8561
|
+
i0.ɵɵtext(4);
|
|
8562
|
+
i0.ɵɵelementStart(5, "button", 23);
|
|
8563
|
+
i0.ɵɵlistener("click", function KptAuth_Conditional_16_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.setMode(ctx_r0.signUpActive() ? "signIn" : "signUp")); });
|
|
8564
|
+
i0.ɵɵtext(6);
|
|
8565
|
+
i0.ɵɵelementEnd()();
|
|
8566
|
+
} if (rf & 2) {
|
|
8567
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
8568
|
+
i0.ɵɵadvance(2);
|
|
8569
|
+
i0.ɵɵconditional(ctx_r0.providers().length > 0 ? 2 : -1);
|
|
8570
|
+
i0.ɵɵadvance(2);
|
|
8571
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.signUpActive() ? ctx_r0.i18n.t("auth.haveAccount") : ctx_r0.i18n.t("auth.noAccount"), " ");
|
|
8572
|
+
i0.ɵɵadvance(2);
|
|
8573
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.signUpActive() ? ctx_r0.i18n.t("auth.signInSwitch") : ctx_r0.i18n.t("auth.signUpSwitch"), " ");
|
|
8574
|
+
} }
|
|
8575
|
+
function KptAuth_Conditional_21_Template(rf, ctx) { if (rf & 1) {
|
|
8576
|
+
i0.ɵɵelementStart(0, "p", 14);
|
|
8577
|
+
i0.ɵɵtext(1);
|
|
8578
|
+
i0.ɵɵelementEnd();
|
|
8579
|
+
} if (rf & 2) {
|
|
8580
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
8581
|
+
i0.ɵɵadvance();
|
|
8582
|
+
i0.ɵɵtextInterpolate(ctx_r0.promoHeading());
|
|
8583
|
+
} }
|
|
8584
|
+
function KptAuth_Conditional_22_Template(rf, ctx) { if (rf & 1) {
|
|
8585
|
+
i0.ɵɵelementStart(0, "p", 15);
|
|
8586
|
+
i0.ɵɵtext(1);
|
|
8587
|
+
i0.ɵɵelementEnd();
|
|
8588
|
+
} if (rf & 2) {
|
|
8589
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
8590
|
+
i0.ɵɵadvance();
|
|
8591
|
+
i0.ɵɵtextInterpolate(ctx_r0.promoBody());
|
|
8592
|
+
} }
|
|
8593
|
+
function KptAuth_Conditional_24_Template(rf, ctx) { if (rf & 1) {
|
|
8594
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
8595
|
+
i0.ɵɵelementStart(0, "kpt-button", 43);
|
|
8596
|
+
i0.ɵɵlistener("click", function KptAuth_Conditional_24_Template_kpt_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.setMode(ctx_r0.promoMode())); });
|
|
8597
|
+
i0.ɵɵtext(1);
|
|
8598
|
+
i0.ɵɵelementEnd();
|
|
8599
|
+
} if (rf & 2) {
|
|
8600
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
8601
|
+
i0.ɵɵadvance();
|
|
8602
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.promoMode() === "signUp" ? ctx_r0.i18n.t("auth.signUpSwitch") : ctx_r0.i18n.t("auth.signInSwitch"), " ");
|
|
8603
|
+
} }
|
|
8604
|
+
/** Minimalna długość hasła w rejestracji. */
|
|
8605
|
+
const MIN_PASSWORD = 8;
|
|
8606
|
+
let nextUniqueId = 0;
|
|
8607
|
+
/**
|
|
8608
|
+
* Ekran uwierzytelniania: logowanie, rejestracja i odzyskiwanie hasła w jednym komponencie,
|
|
8609
|
+
* z panelem promocyjnym i listą dostawców zewnętrznych (OAuth/SSO).
|
|
8610
|
+
*
|
|
8611
|
+
* Komponent jest prezentacyjny — nie woła API ani nie nawiguje. Wywołania backendu podpina
|
|
8612
|
+
* aplikacja pod `signIn` / `signUp` / `resetPassword` / `providerSelect`, a stan operacji
|
|
8613
|
+
* podaje z powrotem przez `busy`, `error` i `notice`.
|
|
8614
|
+
*
|
|
8615
|
+
* Układ `slider` przesuwa panel promocyjny nad formularzami przy zmianie trybu; `split`
|
|
8616
|
+
* zostawia go nieruchomo i przełącza sam formularz. Poniżej breakpointu `md` oba układy
|
|
8617
|
+
* schodzą do jednej kolumny.
|
|
8618
|
+
*
|
|
8619
|
+
* @example
|
|
8620
|
+
* <kpt-auth
|
|
8621
|
+
* [providers]="[{ id: 'google', label: 'Google', icon: 'brand-google' }]"
|
|
8622
|
+
* [busy]="loading()"
|
|
8623
|
+
* [error]="serverError()"
|
|
8624
|
+
* (signIn)="login($event)"
|
|
8625
|
+
* (providerSelect)="oauth($event.id)"
|
|
8626
|
+
* >
|
|
8627
|
+
* <img kptAuthBrand src="/logo.svg" alt="Konce" />
|
|
8628
|
+
* <div kptAuthPromo><h3>Witaj ponownie</h3><p>Zaloguj się, by wrócić do pracy.</p></div>
|
|
8629
|
+
* </kpt-auth>
|
|
8630
|
+
*/
|
|
8631
|
+
class KptAuth {
|
|
8632
|
+
constructor() {
|
|
8633
|
+
/** Aktywny tryb ekranu (dwukierunkowy — aplikacja może go wymusić po nawigacji). */
|
|
8634
|
+
this.mode = model('signIn', /* @ts-ignore */
|
|
8635
|
+
...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
8636
|
+
/** Układ: przesuwany panel promocyjny albo nieruchomy split-screen. */
|
|
8637
|
+
this.layout = input('slider', /* @ts-ignore */
|
|
8638
|
+
...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
8639
|
+
/** Dostawcy logowania zewnętrznego. */
|
|
8640
|
+
this.providers = input([], /* @ts-ignore */
|
|
8641
|
+
...(ngDevMode ? [{ debugName: "providers" }] : /* istanbul ignore next */ []));
|
|
8642
|
+
/** Układ przycisków dostawców: lista pełnej szerokości albo siatka ikon. */
|
|
8643
|
+
this.providerLayout = input('list', /* @ts-ignore */
|
|
8644
|
+
...(ngDevMode ? [{ debugName: "providerLayout" }] : /* istanbul ignore next */ []));
|
|
8645
|
+
/** Pole „imię i nazwisko" w rejestracji. */
|
|
8646
|
+
this.showName = input(true, { ...(ngDevMode ? { debugName: "showName" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
8647
|
+
/** Wymagana zgoda na regulamin w rejestracji. */
|
|
8648
|
+
this.requireTerms = input(true, { ...(ngDevMode ? { debugName: "requireTerms" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
8649
|
+
/** Przełącznik „zapamiętaj mnie" przy logowaniu. */
|
|
8650
|
+
this.showRemember = input(true, { ...(ngDevMode ? { debugName: "showRemember" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
8651
|
+
/** Operacja w toku — przyciski w stanie ładowania, pola zablokowane. */
|
|
8652
|
+
this.busy = input(false, { ...(ngDevMode ? { debugName: "busy" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
8653
|
+
/** Komunikat błędu z serwera (np. „nieprawidłowe dane logowania"). */
|
|
8654
|
+
this.error = input(null, /* @ts-ignore */
|
|
8655
|
+
...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
8656
|
+
/** Komunikat powodzenia (np. „wysłaliśmy link na podany adres"). */
|
|
8657
|
+
this.notice = input(null, /* @ts-ignore */
|
|
8658
|
+
...(ngDevMode ? [{ debugName: "notice" }] : /* istanbul ignore next */ []));
|
|
8659
|
+
/**
|
|
8660
|
+
* Tytuł panelu promocyjnego. `null` (domyślnie) = tekst z i18n zależny od trybu,
|
|
8661
|
+
* `''` = brak tytułu (miejsce dla slotu `[kptAuthPromo]`).
|
|
8662
|
+
*/
|
|
8663
|
+
this.promoTitle = input(null, /* @ts-ignore */
|
|
8664
|
+
...(ngDevMode ? [{ debugName: "promoTitle" }] : /* istanbul ignore next */ []));
|
|
8665
|
+
/** Tekst panelu promocyjnego; zasady jak w `promoTitle`. */
|
|
8666
|
+
this.promoText = input(null, /* @ts-ignore */
|
|
8667
|
+
...(ngDevMode ? [{ debugName: "promoText" }] : /* istanbul ignore next */ []));
|
|
8668
|
+
/** Animacja przejścia między trybami. */
|
|
8669
|
+
this.animated = input(true, { ...(ngDevMode ? { debugName: "animated" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
8670
|
+
/** Czas animacji w ms. */
|
|
8671
|
+
this.animationDuration = input(320, { ...(ngDevMode ? { debugName: "animationDuration" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
8672
|
+
this.signIn = output();
|
|
8673
|
+
this.signUp = output();
|
|
8674
|
+
this.resetPassword = output();
|
|
8675
|
+
this.providerSelect = output();
|
|
8676
|
+
this.i18n = inject(KptI18n);
|
|
8677
|
+
this.injector = inject(Injector);
|
|
8678
|
+
this.uid = ++nextUniqueId;
|
|
8679
|
+
/** Nagłówek panelu dostaje fokus po zmianie trybu — inaczej zmiana nie zostaje ogłoszona. */
|
|
8680
|
+
this.headings = viewChildren('heading', /* @ts-ignore */
|
|
8681
|
+
...(ngDevMode ? [{ debugName: "headings" }] : /* istanbul ignore next */ []));
|
|
8682
|
+
this.providerDefs = contentChildren(KptAuthProviderDef, /* @ts-ignore */
|
|
8683
|
+
...(ngDevMode ? [{ debugName: "providerDefs" }] : /* istanbul ignore next */ []));
|
|
8684
|
+
this.ids = {
|
|
8685
|
+
signIn: `kpt-auth-${this.uid}-signin`,
|
|
8686
|
+
signUp: `kpt-auth-${this.uid}-signup`,
|
|
8687
|
+
forgot: `kpt-auth-${this.uid}-forgot`,
|
|
8688
|
+
email: `kpt-auth-${this.uid}-email`,
|
|
8689
|
+
password: `kpt-auth-${this.uid}-password`,
|
|
8690
|
+
name: `kpt-auth-${this.uid}-name`,
|
|
8691
|
+
regEmail: `kpt-auth-${this.uid}-reg-email`,
|
|
8692
|
+
regPassword: `kpt-auth-${this.uid}-reg-password`,
|
|
8693
|
+
regConfirm: `kpt-auth-${this.uid}-reg-confirm`,
|
|
8694
|
+
resetEmail: `kpt-auth-${this.uid}-reset-email`,
|
|
8695
|
+
};
|
|
8696
|
+
/** W trybie `signUp` formularz i panel promocyjny zamieniają się stronami. */
|
|
8697
|
+
this.signUpActive = computed(() => this.mode() === 'signUp', /* @ts-ignore */
|
|
8698
|
+
...(ngDevMode ? [{ debugName: "signUpActive" }] : /* istanbul ignore next */ []));
|
|
8699
|
+
this.headingId = computed(() => this.ids[this.mode()], /* @ts-ignore */
|
|
8700
|
+
...(ngDevMode ? [{ debugName: "headingId" }] : /* istanbul ignore next */ []));
|
|
8701
|
+
this.title = computed(() => this.i18n.t(`auth.${this.mode()}Title`), /* @ts-ignore */
|
|
8702
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
8703
|
+
this.subtitle = computed(() => this.i18n.t(`auth.${this.mode()}Subtitle`), /* @ts-ignore */
|
|
8704
|
+
...(ngDevMode ? [{ debugName: "subtitle" }] : /* istanbul ignore next */ []));
|
|
8705
|
+
/** Panel promocyjny zachęca do trybu przeciwnego do bieżącego. */
|
|
8706
|
+
this.promoMode = computed(() => (this.signUpActive() ? 'signIn' : 'signUp'), /* @ts-ignore */
|
|
8707
|
+
...(ngDevMode ? [{ debugName: "promoMode" }] : /* istanbul ignore next */ []));
|
|
8708
|
+
this.promoHeading = computed(() => {
|
|
8709
|
+
const custom = this.promoTitle();
|
|
8710
|
+
return custom === null ? this.i18n.t(`auth.promo.${this.promoMode()}Title`) : custom;
|
|
8711
|
+
}, /* @ts-ignore */
|
|
8712
|
+
...(ngDevMode ? [{ debugName: "promoHeading" }] : /* istanbul ignore next */ []));
|
|
8713
|
+
this.promoBody = computed(() => {
|
|
8714
|
+
const custom = this.promoText();
|
|
8715
|
+
return custom === null ? this.i18n.t(`auth.promo.${this.promoMode()}Text`) : custom;
|
|
8716
|
+
}, /* @ts-ignore */
|
|
8717
|
+
...(ngDevMode ? [{ debugName: "promoBody" }] : /* istanbul ignore next */ []));
|
|
8718
|
+
// ── Formularze (po jednym na tryb; walidatory bezwarunkowe) ──
|
|
8719
|
+
this.signInModel = signal({ email: '', password: '', remember: false }, /* @ts-ignore */
|
|
8720
|
+
...(ngDevMode ? [{ debugName: "signInModel" }] : /* istanbul ignore next */ []));
|
|
8721
|
+
this.signInForm = form(this.signInModel, (p) => {
|
|
8722
|
+
required(p.email);
|
|
8723
|
+
email(p.email);
|
|
8724
|
+
required(p.password);
|
|
8725
|
+
});
|
|
8726
|
+
this.signUpModel = signal({ name: '', email: '', password: '', confirm: '', terms: false }, /* @ts-ignore */
|
|
8727
|
+
...(ngDevMode ? [{ debugName: "signUpModel" }] : /* istanbul ignore next */ []));
|
|
8728
|
+
this.signUpForm = form(this.signUpModel, (p) => {
|
|
8729
|
+
// `when` zależy od konfiguracji komponentu (czy pole w ogóle istnieje), nie od stanu UI —
|
|
8730
|
+
// ukryte pole nie może blokować formularza, a `valid()` nadal mówi prawdę.
|
|
8731
|
+
required(p.name, { when: () => this.showName() });
|
|
8732
|
+
required(p.email);
|
|
8733
|
+
email(p.email);
|
|
8734
|
+
required(p.password);
|
|
8735
|
+
minLength(p.password, MIN_PASSWORD);
|
|
8736
|
+
required(p.terms, { when: () => this.requireTerms() });
|
|
8737
|
+
// Zgodność haseł jako błąd pola „powtórz hasło" — walidacja par idzie przez validateTree.
|
|
8738
|
+
validateTree(p, (ctx) => {
|
|
8739
|
+
const pass = ctx.valueOf(p.password);
|
|
8740
|
+
const confirm = ctx.valueOf(p.confirm);
|
|
8741
|
+
if (!confirm || pass === confirm)
|
|
8742
|
+
return null;
|
|
8743
|
+
return { kind: 'mismatch', fieldTree: ctx.fieldTreeOf(p.confirm) };
|
|
8744
|
+
});
|
|
8745
|
+
});
|
|
8746
|
+
this.resetModel = signal({ email: '' }, /* @ts-ignore */
|
|
8747
|
+
...(ngDevMode ? [{ debugName: "resetModel" }] : /* istanbul ignore next */ []));
|
|
8748
|
+
this.resetForm = form(this.resetModel, (p) => {
|
|
8749
|
+
required(p.email);
|
|
8750
|
+
email(p.email);
|
|
8751
|
+
});
|
|
8752
|
+
this.signInInvalid = computed(() => this.signInForm().invalid(), /* @ts-ignore */
|
|
8753
|
+
...(ngDevMode ? [{ debugName: "signInInvalid" }] : /* istanbul ignore next */ []));
|
|
8754
|
+
this.signUpInvalid = computed(() => this.signUpForm().invalid(), /* @ts-ignore */
|
|
8755
|
+
...(ngDevMode ? [{ debugName: "signUpInvalid" }] : /* istanbul ignore next */ []));
|
|
8756
|
+
this.resetInvalid = computed(() => this.resetForm().invalid(), /* @ts-ignore */
|
|
8757
|
+
...(ngDevMode ? [{ debugName: "resetInvalid" }] : /* istanbul ignore next */ []));
|
|
8758
|
+
this.signInEmailError = computed(() => this.errorText(this.signInForm.email().errors(), this.signInForm.email().touched()), /* @ts-ignore */
|
|
8759
|
+
...(ngDevMode ? [{ debugName: "signInEmailError" }] : /* istanbul ignore next */ []));
|
|
8760
|
+
this.signInPasswordError = computed(() => this.errorText(this.signInForm.password().errors(), this.signInForm.password().touched()), /* @ts-ignore */
|
|
8761
|
+
...(ngDevMode ? [{ debugName: "signInPasswordError" }] : /* istanbul ignore next */ []));
|
|
8762
|
+
this.signUpNameError = computed(() => this.errorText(this.signUpForm.name().errors(), this.signUpForm.name().touched()), /* @ts-ignore */
|
|
8763
|
+
...(ngDevMode ? [{ debugName: "signUpNameError" }] : /* istanbul ignore next */ []));
|
|
8764
|
+
this.signUpEmailError = computed(() => this.errorText(this.signUpForm.email().errors(), this.signUpForm.email().touched()), /* @ts-ignore */
|
|
8765
|
+
...(ngDevMode ? [{ debugName: "signUpEmailError" }] : /* istanbul ignore next */ []));
|
|
8766
|
+
this.signUpPasswordError = computed(() => this.errorText(this.signUpForm.password().errors(), this.signUpForm.password().touched()), /* @ts-ignore */
|
|
8767
|
+
...(ngDevMode ? [{ debugName: "signUpPasswordError" }] : /* istanbul ignore next */ []));
|
|
8768
|
+
this.signUpConfirmError = computed(() => this.errorText(this.signUpForm.confirm().errors(), this.signUpForm.confirm().touched()), /* @ts-ignore */
|
|
8769
|
+
...(ngDevMode ? [{ debugName: "signUpConfirmError" }] : /* istanbul ignore next */ []));
|
|
8770
|
+
this.signUpTermsError = computed(() => this.errorText(this.signUpForm.terms().errors(), this.signUpForm.terms().touched()), /* @ts-ignore */
|
|
8771
|
+
...(ngDevMode ? [{ debugName: "signUpTermsError" }] : /* istanbul ignore next */ []));
|
|
8772
|
+
this.resetEmailError = computed(() => this.errorText(this.resetForm.email().errors(), this.resetForm.email().touched()), /* @ts-ignore */
|
|
8773
|
+
...(ngDevMode ? [{ debugName: "resetEmailError" }] : /* istanbul ignore next */ []));
|
|
8774
|
+
}
|
|
8775
|
+
/**
|
|
8776
|
+
* Komunikat błędu składamy z `kind` w chwili renderowania, a nie w walidatorze — dzięki temu
|
|
8777
|
+
* zmiana języka w runtime przerysowuje komunikaty (walidatory tworzą się raz, przy starcie).
|
|
8778
|
+
* Bramka „nie strasz czerwienią świeżego pola" żyje tu, w prezentacji.
|
|
8779
|
+
*/
|
|
8780
|
+
errorText(errors, touched) {
|
|
8781
|
+
if (!touched || errors.length === 0)
|
|
8782
|
+
return null;
|
|
8783
|
+
switch (errors[0].kind) {
|
|
8784
|
+
case 'required':
|
|
8785
|
+
return this.i18n.t('auth.errorRequired');
|
|
8786
|
+
case 'email':
|
|
8787
|
+
return this.i18n.t('auth.errorEmail');
|
|
8788
|
+
case 'minLength':
|
|
8789
|
+
return this.i18n.t('auth.errorMinLength', { min: MIN_PASSWORD });
|
|
8790
|
+
case 'mismatch':
|
|
8791
|
+
return this.i18n.t('auth.errorMismatch');
|
|
8792
|
+
default:
|
|
8793
|
+
return this.i18n.t('auth.errorInvalid');
|
|
8794
|
+
}
|
|
8795
|
+
}
|
|
8796
|
+
// ── Tryby ──
|
|
8797
|
+
setMode(mode) {
|
|
8798
|
+
if (mode === this.mode())
|
|
8799
|
+
return;
|
|
8800
|
+
this.mode.set(mode);
|
|
8801
|
+
// Fokus na nagłówku nowego trybu: bez tego czytnik nie ogłosi zmiany, a fokus zostaje
|
|
8802
|
+
// na przycisku, który właśnie zjechał z ekranu. Musi to być `afterNextRender` —
|
|
8803
|
+
// mikrozadanie wykonałoby się jeszcze przed przerysowaniem, na starym nagłówku.
|
|
8804
|
+
afterNextRender(() => {
|
|
8805
|
+
const heading = this.headings().find((h) => h.nativeElement.dataset['mode'] === mode);
|
|
8806
|
+
heading?.nativeElement.focus();
|
|
8807
|
+
}, { injector: this.injector });
|
|
8808
|
+
}
|
|
8809
|
+
// ── Submit ──
|
|
8810
|
+
onSignIn() {
|
|
8811
|
+
void submit(this.signInForm, {
|
|
8812
|
+
action: async () => {
|
|
8813
|
+
this.signIn.emit({ ...this.signInModel() });
|
|
8814
|
+
},
|
|
8815
|
+
});
|
|
8816
|
+
}
|
|
8817
|
+
onSignUp() {
|
|
8818
|
+
void submit(this.signUpForm, {
|
|
8819
|
+
action: async () => {
|
|
8820
|
+
const { name, email: mail, password, terms } = this.signUpModel();
|
|
8821
|
+
this.signUp.emit({ name, email: mail, password, terms });
|
|
8822
|
+
},
|
|
8823
|
+
});
|
|
8824
|
+
}
|
|
8825
|
+
onReset() {
|
|
8826
|
+
void submit(this.resetForm, {
|
|
8827
|
+
action: async () => {
|
|
8828
|
+
this.resetPassword.emit({ ...this.resetModel() });
|
|
8829
|
+
},
|
|
8830
|
+
});
|
|
8831
|
+
}
|
|
8832
|
+
// ── Dostawcy ──
|
|
8833
|
+
templateFor(provider) {
|
|
8834
|
+
return this.providerDefs().find((def) => def.kptAuthProvider() === provider.id)?.template ?? null;
|
|
8835
|
+
}
|
|
8836
|
+
selectProvider(provider) {
|
|
8837
|
+
if (this.busy())
|
|
8838
|
+
return;
|
|
8839
|
+
this.providerSelect.emit(provider);
|
|
8840
|
+
}
|
|
8841
|
+
/** Kontekst szablonu własnego dostawcy: `$implicit` = dostawca, `select` = zgłoszenie wyboru. */
|
|
8842
|
+
providerContext(provider) {
|
|
8843
|
+
return { $implicit: provider, select: () => this.selectProvider(provider) };
|
|
8844
|
+
}
|
|
8845
|
+
static { this.ɵfac = function KptAuth_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptAuth)(); }; }
|
|
8846
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: KptAuth, selectors: [["kpt-auth"]], contentQueries: function KptAuth_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
8847
|
+
i0.ɵɵcontentQuerySignal(dirIndex, ctx.providerDefs, KptAuthProviderDef, 4);
|
|
8848
|
+
} if (rf & 2) {
|
|
8849
|
+
i0.ɵɵqueryAdvance();
|
|
8850
|
+
} }, viewQuery: function KptAuth_Query(rf, ctx) { if (rf & 1) {
|
|
8851
|
+
i0.ɵɵviewQuerySignal(ctx.headings, _c0$n, 5);
|
|
8852
|
+
} if (rf & 2) {
|
|
8853
|
+
i0.ɵɵqueryAdvance();
|
|
8854
|
+
} }, hostAttrs: [1, "kpt-auth-host"], hostVars: 4, hostBindings: function KptAuth_HostBindings(rf, ctx) { if (rf & 2) {
|
|
8855
|
+
i0.ɵɵattribute("data-layout", ctx.layout())("data-mode", ctx.mode());
|
|
8856
|
+
i0.ɵɵstyleProp("--%NS%kpt-anim-duration", (ctx.animated() ? ctx.animationDuration() : 0) + "ms");
|
|
8857
|
+
} }, 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$3, 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) {
|
|
8858
|
+
i0.ɵɵprojectionDef(_c1$8);
|
|
8859
|
+
i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "div", 3)(3, "div", 4)(4, "div", 5);
|
|
8860
|
+
i0.ɵɵprojection(5);
|
|
8861
|
+
i0.ɵɵelementEnd();
|
|
8862
|
+
i0.ɵɵelementStart(6, "h2", 6, 0);
|
|
8863
|
+
i0.ɵɵtext(8);
|
|
8864
|
+
i0.ɵɵelementEnd();
|
|
8865
|
+
i0.ɵɵelementStart(9, "p", 7);
|
|
8866
|
+
i0.ɵɵtext(10);
|
|
8867
|
+
i0.ɵɵelementEnd();
|
|
8868
|
+
i0.ɵɵconditionalCreate(11, KptAuth_Conditional_11_Template, 2, 1, "kpt-alert", 8);
|
|
8869
|
+
i0.ɵɵconditionalCreate(12, KptAuth_Conditional_12_Template, 2, 1, "kpt-alert", 9);
|
|
8870
|
+
i0.ɵɵconditionalCreate(13, KptAuth_Case_13_Template, 13, 18, "form", 10)(14, KptAuth_Case_14_Template, 12, 25, "form", 10)(15, KptAuth_Case_15_Template, 7, 12, "form", 10);
|
|
8871
|
+
i0.ɵɵconditionalCreate(16, KptAuth_Conditional_16_Template, 7, 3);
|
|
8872
|
+
i0.ɵɵelementStart(17, "div", 11);
|
|
8873
|
+
i0.ɵɵprojection(18, 1);
|
|
8874
|
+
i0.ɵɵelementEnd()()();
|
|
8875
|
+
i0.ɵɵelementStart(19, "aside", 12)(20, "div", 13);
|
|
8876
|
+
i0.ɵɵconditionalCreate(21, KptAuth_Conditional_21_Template, 2, 1, "p", 14);
|
|
8877
|
+
i0.ɵɵconditionalCreate(22, KptAuth_Conditional_22_Template, 2, 1, "p", 15);
|
|
8878
|
+
i0.ɵɵprojection(23, 2);
|
|
8879
|
+
i0.ɵɵconditionalCreate(24, KptAuth_Conditional_24_Template, 2, 1, "kpt-button", 16);
|
|
8880
|
+
i0.ɵɵelementEnd()()()();
|
|
8881
|
+
} if (rf & 2) {
|
|
8882
|
+
let tmp_8_0;
|
|
8883
|
+
i0.ɵɵadvance(3);
|
|
8884
|
+
i0.ɵɵattribute("data-mode", ctx.mode());
|
|
8885
|
+
i0.ɵɵadvance(3);
|
|
8886
|
+
i0.ɵɵproperty("id", ctx.headingId());
|
|
8887
|
+
i0.ɵɵattribute("data-mode", ctx.mode());
|
|
8888
|
+
i0.ɵɵadvance(2);
|
|
8889
|
+
i0.ɵɵtextInterpolate1(" ", ctx.title(), " ");
|
|
8890
|
+
i0.ɵɵadvance(2);
|
|
8891
|
+
i0.ɵɵtextInterpolate(ctx.subtitle());
|
|
8892
|
+
i0.ɵɵadvance();
|
|
8893
|
+
i0.ɵɵconditional(ctx.error() ? 11 : -1);
|
|
8894
|
+
i0.ɵɵadvance();
|
|
8895
|
+
i0.ɵɵconditional(ctx.notice() ? 12 : -1);
|
|
8896
|
+
i0.ɵɵadvance();
|
|
8897
|
+
i0.ɵɵconditional((tmp_8_0 = ctx.mode()) === "signIn" ? 13 : tmp_8_0 === "signUp" ? 14 : tmp_8_0 === "forgot" ? 15 : -1);
|
|
8898
|
+
i0.ɵɵadvance(3);
|
|
8899
|
+
i0.ɵɵconditional(ctx.mode() !== "forgot" ? 16 : -1);
|
|
8900
|
+
i0.ɵɵadvance(5);
|
|
8901
|
+
i0.ɵɵconditional(ctx.promoHeading() ? 21 : -1);
|
|
8902
|
+
i0.ɵɵadvance();
|
|
8903
|
+
i0.ɵɵconditional(ctx.promoBody() ? 22 : -1);
|
|
8904
|
+
i0.ɵɵadvance(2);
|
|
8905
|
+
i0.ɵɵconditional(ctx.mode() !== "forgot" ? 24 : -1);
|
|
8906
|
+
} }, dependencies: [FormField,
|
|
8907
|
+
FormRoot,
|
|
8908
|
+
KptAlert,
|
|
8909
|
+
KptButton,
|
|
8910
|
+
KptCheckbox,
|
|
8911
|
+
KptFormField,
|
|
8912
|
+
KptIcon,
|
|
8913
|
+
KptInput,
|
|
8914
|
+
KptPassword,
|
|
8915
|
+
NgTemplateOutlet], styles: ["@layer kpt.components{.kpt-auth-host{display:block;--%NS%_kpt-auth-duration: var(--%NS%kpt-anim-duration, var(--%NS%kpt-motion-duration-slow, .32s));--%NS%_kpt-auth-easing: var(--%NS%kpt-motion-easing-emphasized, cubic-bezier(.3, 0, 0, 1));--%NS%_kpt-auth-dir: 1}[dir=rtl] .kpt-auth-host{--%NS%_kpt-auth-dir: -1}.kpt-auth{display:flex;align-items:center;justify-content:center;min-block-size:var(--%NS%kpt-auth-min-height, 100vh);min-block-size:var(--%NS%kpt-auth-min-height, 100dvh);padding:var(--%NS%kpt-auth-padding, var(--%NS%kpt-space-4, 1rem));background:var(--%NS%kpt-color-surface)}.kpt-auth__card{position:relative;display:grid;inline-size:min(var(--%NS%kpt-auth-width, 64rem),100%);min-block-size:var(--%NS%kpt-auth-card-height, 34rem);overflow:hidden;background:var(--%NS%kpt-color-surface-raised);border:var(--%NS%kpt-auth-card-border, 1px solid var(--%NS%kpt-color-border));border-radius:var(--%NS%kpt-auth-card-radius, var(--%NS%kpt-radius-lg, .75rem));box-shadow:var(--%NS%kpt-auth-card-shadow, var(--%NS%kpt-elevation-3));grid-template-columns:1fr 1fr;grid-template-areas:\"form promo\"}.kpt-auth__form-side{grid-area:form;display:flex;align-items:center;justify-content:center;padding:var(--%NS%kpt-space-6, 1.5rem);overflow-y:auto}.kpt-auth__inner{inline-size:min(24rem,100%);display:flex;flex-direction:column;gap:var(--%NS%kpt-space-3, .75rem)}.kpt-auth__brand:empty,.kpt-auth__sso:empty,.kpt-auth__footer:empty{display:none}.kpt-auth__title{margin:0;font-size:var(--%NS%kpt-font-size-xl, 1.5rem);font-weight:var(--%NS%kpt-font-weight-bold, 700);color:var(--%NS%kpt-color-on-surface);outline:none}.kpt-auth__subtitle{margin:0;font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface-muted)}.kpt-auth__form{display:flex;flex-direction:column;gap:var(--%NS%kpt-space-3, .75rem);margin-block-start:var(--%NS%kpt-space-2, .5rem)}.kpt-auth__row{display:flex;align-items:center;justify-content:space-between;gap:var(--%NS%kpt-space-2, .5rem);flex-wrap:wrap}.kpt-auth__link{padding:0;font:inherit;font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-primary);background:none;border:0;text-decoration:underline;text-underline-offset:.15em;cursor:pointer}.kpt-auth__link:hover{color:var(--%NS%kpt-color-primary-hover)}.kpt-auth__link--center{align-self:center}.kpt-auth__separator{display:flex;align-items:center;gap:var(--%NS%kpt-space-3, .75rem);margin-block:var(--%NS%kpt-space-2, .5rem);font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface-muted)}.kpt-auth__separator:before,.kpt-auth__separator:after{content:\"\";flex:1;block-size:1px;background:var(--%NS%kpt-color-border)}.kpt-auth__providers{display:grid;gap:var(--%NS%kpt-space-2, .5rem)}.kpt-auth__providers[data-layout=grid]{grid-template-columns:repeat(auto-fit,minmax(4.5rem,1fr))}.kpt-auth__provider{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);padding:var(--%NS%kpt-space-3, .75rem);font:inherit;font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface);background:var(--%NS%kpt-color-surface-raised);border:1px solid var(--%NS%kpt-color-border);border-radius:var(--%NS%kpt-radius-md, .5rem);cursor:pointer;transition:background-color var(--%NS%kpt-motion-duration-fast, .12s) var(--%NS%kpt-motion-easing-standard)}.kpt-auth__provider:hover:not(:disabled){background:var(--%NS%kpt-color-surface-hover)}.kpt-auth__provider:disabled{opacity:.6;cursor:not-allowed}.kpt-auth__provider-logo{font-size:1.25rem;inline-size:1.25rem;block-size:1.25rem;flex-shrink:0}.kpt-auth__provider-desc{margin-inline-start:auto;font-size:var(--%NS%kpt-font-size-xs, .75rem);color:var(--%NS%kpt-color-on-surface-muted)}.kpt-auth__providers[data-layout=grid] .kpt-auth__provider{flex-direction:column;gap:var(--%NS%kpt-space-1, .25rem);text-align:center}.kpt-auth__switch{margin:0;font-size:var(--%NS%kpt-font-size-sm, .875rem);color:var(--%NS%kpt-color-on-surface-muted);text-align:center}.kpt-auth__promo{grid-area:promo;display:flex;align-items:center;justify-content:center;padding:var(--%NS%kpt-space-8, 2rem);color:var(--%NS%kpt-color-primary-contrast);background:var(--%NS%kpt-auth-promo-bg, linear-gradient(135deg, var(--%NS%kpt-color-primary), var(--%NS%kpt-color-primary-hover)))}.kpt-auth__promo-inner{display:flex;flex-direction:column;align-items:center;gap:var(--%NS%kpt-space-3, .75rem);text-align:center}.kpt-auth__promo-title{margin:0;font-size:var(--%NS%kpt-font-size-lg, 1.25rem);font-weight:var(--%NS%kpt-font-weight-bold, 700)}.kpt-auth__promo-text{margin:0;font-size:var(--%NS%kpt-font-size-sm, .875rem);opacity:.85}.kpt-auth__promo-cta .kpt-button{color:var(--%NS%kpt-color-primary-contrast);border-color:color-mix(in oklch,var(--%NS%kpt-color-primary-contrast) 60%,transparent);background:transparent}.kpt-auth__promo-cta .kpt-button:hover:not(:disabled){background:color-mix(in oklch,var(--%NS%kpt-color-primary-contrast) 12%,transparent)}.kpt-auth-host[data-layout=slider] .kpt-auth__promo,.kpt-auth-host[data-layout=slider] .kpt-auth__form-side{transition:transform var(--%NS%_kpt-auth-duration) var(--%NS%_kpt-auth-easing)}.kpt-auth-host[data-layout=slider][data-mode=signUp] .kpt-auth__promo{transform:translate(calc(var(--%NS%_kpt-auth-dir) * -100%))}.kpt-auth-host[data-layout=slider][data-mode=signUp] .kpt-auth__form-side{transform:translate(calc(var(--%NS%_kpt-auth-dir) * 100%))}.kpt-auth-host[data-layout=slider][data-mode=signIn] .kpt-auth__promo-inner{animation:kpt-auth-promo-start var(--%NS%_kpt-auth-duration) var(--%NS%_kpt-auth-easing)}.kpt-auth-host[data-layout=slider][data-mode=signUp] .kpt-auth__promo-inner{animation:kpt-auth-promo-end var(--%NS%_kpt-auth-duration) var(--%NS%_kpt-auth-easing)}@keyframes kpt-auth-promo-start{0%{transform:translate(calc(var(--%NS%_kpt-auth-dir) * -14%))}to{transform:none}}@keyframes kpt-auth-promo-end{0%{transform:translate(calc(var(--%NS%_kpt-auth-dir) * 14%))}to{transform:none}}@keyframes kpt-auth-enter{0%{opacity:0;transform:translate(calc(var(--%NS%_kpt-auth-dir) * 1.25rem))}to{opacity:1;transform:none}}.kpt-auth__inner{animation:kpt-auth-enter var(--%NS%_kpt-auth-duration) var(--%NS%kpt-motion-easing-standard, cubic-bezier(.2, 0, 0, 1))}.kpt-auth__card{grid-template-columns:1fr;grid-template-areas:\"promo\" \"form\";min-block-size:0}.kpt-auth__promo{padding:var(--%NS%kpt-space-6, 1.5rem)}@media(min-width:768px){.kpt-auth__card{grid-template-columns:1fr 1fr;grid-template-areas:\"form promo\";min-block-size:var(--%NS%kpt-auth-card-height, 34rem)}.kpt-auth__promo{padding:var(--%NS%kpt-space-8, 2rem)}}@media(max-width:767px){.kpt-auth-host[data-layout=slider][data-mode] .kpt-auth__promo,.kpt-auth-host[data-layout=slider][data-mode] .kpt-auth__form-side{transform:none}.kpt-auth-host[data-layout=slider][data-mode] .kpt-auth__promo-inner{animation:none;transform:none}}@media(prefers-reduced-motion:reduce){.kpt-auth-host[data-layout][data-mode] .kpt-auth__promo,.kpt-auth-host[data-layout][data-mode] .kpt-auth__form-side,.kpt-auth-host[data-layout][data-mode] .kpt-auth__promo-inner,.kpt-auth-host[data-layout][data-mode] .kpt-auth__provider{transition:none}.kpt-auth-host[data-layout][data-mode] .kpt-auth__inner,.kpt-auth-host[data-layout][data-mode] .kpt-auth__promo-inner{animation:none}}}\n"], encapsulation: 2 }); }
|
|
8916
|
+
}
|
|
8917
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptAuth, [{
|
|
8918
|
+
type: Component,
|
|
8919
|
+
args: [{ selector: 'kpt-auth', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
|
|
8920
|
+
FormField,
|
|
8921
|
+
FormRoot,
|
|
8922
|
+
KptAlert,
|
|
8923
|
+
KptButton,
|
|
8924
|
+
KptCheckbox,
|
|
8925
|
+
KptFormField,
|
|
8926
|
+
KptIcon,
|
|
8927
|
+
KptInput,
|
|
8928
|
+
KptPassword,
|
|
8929
|
+
NgTemplateOutlet,
|
|
8930
|
+
], host: {
|
|
8931
|
+
class: 'kpt-auth-host',
|
|
8932
|
+
'[attr.data-layout]': 'layout()',
|
|
8933
|
+
'[attr.data-mode]': 'mode()',
|
|
8934
|
+
'[style.--kpt-anim-duration]': "(animated() ? animationDuration() : 0) + 'ms'",
|
|
8935
|
+
}, template: "<div class=\"kpt-auth\">\n <div class=\"kpt-auth__card\">\n <!--\n W drzewie \u017Cyje wy\u0142\u0105cznie formularz aktywnego trybu. Dzi\u0119ki temu nie ma element\u00F3w\n niewidocznych, ale wci\u0105\u017C fokusowalnych \u2014 najcz\u0119stsza wada ekran\u00F3w logowania z animacj\u0105,\n w kt\u00F3rych oba formularze zostaj\u0105 w DOM i wygasza si\u0119 je sam\u0105 przezroczysto\u015Bci\u0105.\n -->\n <div class=\"kpt-auth__form-side\">\n <div class=\"kpt-auth__inner\" [attr.data-mode]=\"mode()\">\n <div class=\"kpt-auth__brand\"><ng-content select=\"[kptAuthBrand]\" /></div>\n\n <h2 #heading class=\"kpt-auth__title\" [id]=\"headingId()\" [attr.data-mode]=\"mode()\" tabindex=\"-1\">\n {{ title() }}\n </h2>\n <p class=\"kpt-auth__subtitle\">{{ subtitle() }}</p>\n\n @if (error()) {\n <kpt-alert variant=\"danger\">{{ error() }}</kpt-alert>\n }\n @if (notice()) {\n <kpt-alert variant=\"success\">{{ notice() }}</kpt-alert>\n }\n\n @switch (mode()) {\n @case ('signIn') {\n <form class=\"kpt-auth__form\" [formRoot]=\"signInForm\" (submit)=\"onSignIn()\" [attr.aria-labelledby]=\"ids.signIn\">\n <kpt-form-field [label]=\"i18n.t('auth.email')\" [error]=\"signInEmailError()\" required [controlId]=\"ids.email\">\n <kpt-input\n [formField]=\"signInForm.email\"\n type=\"email\"\n autocomplete=\"email\"\n [id]=\"ids.email\"\n [placeholder]=\"i18n.t('auth.emailPlaceholder')\"\n />\n </kpt-form-field>\n\n <kpt-form-field [label]=\"i18n.t('auth.password')\" [error]=\"signInPasswordError()\" required [controlId]=\"ids.password\">\n <kpt-password [formField]=\"signInForm.password\" autocomplete=\"current-password\" [id]=\"ids.password\" />\n </kpt-form-field>\n\n <ng-content select=\"[kptAuthFields]\" />\n\n <div class=\"kpt-auth__row\">\n @if (showRemember()) {\n <kpt-checkbox [formField]=\"signInForm.remember\" [label]=\"i18n.t('auth.remember')\" />\n } @else {\n <span></span>\n }\n <button type=\"button\" class=\"kpt-auth__link\" (click)=\"setMode('forgot')\">\n {{ i18n.t('auth.forgotLink') }}\n </button>\n </div>\n\n <kpt-button type=\"submit\" fullWidth [loading]=\"busy()\" [disabled]=\"signInInvalid()\">\n {{ i18n.t('auth.signInSubmit') }}\n </kpt-button>\n </form>\n }\n\n @case ('signUp') {\n <form class=\"kpt-auth__form\" [formRoot]=\"signUpForm\" (submit)=\"onSignUp()\" [attr.aria-labelledby]=\"ids.signUp\">\n @if (showName()) {\n <kpt-form-field [label]=\"i18n.t('auth.name')\" [error]=\"signUpNameError()\" required [controlId]=\"ids.name\">\n <kpt-input [formField]=\"signUpForm.name\" autocomplete=\"name\" [id]=\"ids.name\" />\n </kpt-form-field>\n }\n\n <kpt-form-field [label]=\"i18n.t('auth.email')\" [error]=\"signUpEmailError()\" required [controlId]=\"ids.regEmail\">\n <kpt-input\n [formField]=\"signUpForm.email\"\n type=\"email\"\n autocomplete=\"email\"\n [id]=\"ids.regEmail\"\n [placeholder]=\"i18n.t('auth.emailPlaceholder')\"\n />\n </kpt-form-field>\n\n <kpt-form-field\n [label]=\"i18n.t('auth.password')\"\n [error]=\"signUpPasswordError()\"\n [hint]=\"i18n.t('auth.passwordHint', { min: 8 })\"\n required\n [controlId]=\"ids.regPassword\"\n >\n <kpt-password [formField]=\"signUpForm.password\" autocomplete=\"new-password\" feedback [id]=\"ids.regPassword\" />\n </kpt-form-field>\n\n <kpt-form-field [label]=\"i18n.t('auth.confirmPassword')\" [error]=\"signUpConfirmError()\" required [controlId]=\"ids.regConfirm\">\n <kpt-password [formField]=\"signUpForm.confirm\" autocomplete=\"new-password\" [id]=\"ids.regConfirm\" />\n </kpt-form-field>\n\n <ng-content select=\"[kptAuthFields]\" />\n\n @if (requireTerms()) {\n <kpt-form-field [error]=\"signUpTermsError()\">\n <kpt-checkbox [formField]=\"signUpForm.terms\" [label]=\"i18n.t('auth.terms')\" />\n </kpt-form-field>\n }\n\n <kpt-button type=\"submit\" fullWidth [loading]=\"busy()\" [disabled]=\"signUpInvalid()\">\n {{ i18n.t('auth.signUpSubmit') }}\n </kpt-button>\n </form>\n }\n\n @case ('forgot') {\n <form class=\"kpt-auth__form\" [formRoot]=\"resetForm\" (submit)=\"onReset()\" [attr.aria-labelledby]=\"ids.forgot\">\n <kpt-form-field [label]=\"i18n.t('auth.email')\" [error]=\"resetEmailError()\" required [controlId]=\"ids.resetEmail\">\n <kpt-input\n [formField]=\"resetForm.email\"\n type=\"email\"\n autocomplete=\"email\"\n [id]=\"ids.resetEmail\"\n [placeholder]=\"i18n.t('auth.emailPlaceholder')\"\n />\n </kpt-form-field>\n\n <kpt-button type=\"submit\" fullWidth [loading]=\"busy()\" [disabled]=\"resetInvalid()\">\n {{ i18n.t('auth.resetSubmit') }}\n </kpt-button>\n <button type=\"button\" class=\"kpt-auth__link kpt-auth__link--center\" (click)=\"setMode('signIn')\">\n {{ i18n.t('auth.backToSignIn') }}\n </button>\n </form>\n }\n }\n\n @if (mode() !== 'forgot') {\n <div class=\"kpt-auth__sso\"><ng-content select=\"[kptAuthSso]\" /></div>\n\n @if (providers().length > 0) {\n <div class=\"kpt-auth__separator\" role=\"separator\" [attr.aria-label]=\"i18n.t('auth.orContinueWith')\">\n <span class=\"kpt-auth__separator-text\">{{ i18n.t('auth.orContinueWith') }}</span>\n </div>\n\n <div class=\"kpt-auth__providers\" [attr.data-layout]=\"providerLayout()\">\n @for (provider of providers(); track provider.id) {\n @if (templateFor(provider); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"providerContext(provider)\" />\n } @else {\n <button\n type=\"button\"\n class=\"kpt-auth__provider\"\n [disabled]=\"busy()\"\n [attr.aria-label]=\"i18n.t('auth.continueWith', { provider: provider.label })\"\n (click)=\"selectProvider(provider)\"\n >\n @if (provider.iconUrl) {\n <img class=\"kpt-auth__provider-logo\" [src]=\"provider.iconUrl\" alt=\"\" />\n } @else if (provider.icon) {\n <kpt-icon class=\"kpt-auth__provider-logo\" [name]=\"provider.icon\" />\n }\n <span class=\"kpt-auth__provider-label\">{{ provider.label }}</span>\n @if (provider.description && providerLayout() === 'list') {\n <span class=\"kpt-auth__provider-desc\">{{ provider.description }}</span>\n }\n </button>\n }\n }\n </div>\n }\n\n <p class=\"kpt-auth__switch\">\n {{ signUpActive() ? i18n.t('auth.haveAccount') : i18n.t('auth.noAccount') }}\n <button type=\"button\" class=\"kpt-auth__link\" (click)=\"setMode(signUpActive() ? 'signIn' : 'signUp')\">\n {{ signUpActive() ? i18n.t('auth.signInSwitch') : i18n.t('auth.signUpSwitch') }}\n </button>\n </p>\n }\n\n <div class=\"kpt-auth__footer\"><ng-content select=\"[kptAuthFooter]\" /></div>\n </div>\n </div>\n\n <aside class=\"kpt-auth__promo\">\n <div class=\"kpt-auth__promo-inner\">\n @if (promoHeading()) {\n <p class=\"kpt-auth__promo-title\">{{ promoHeading() }}</p>\n }\n @if (promoBody()) {\n <p class=\"kpt-auth__promo-text\">{{ promoBody() }}</p>\n }\n <ng-content select=\"[kptAuthPromo]\" />\n @if (mode() !== 'forgot') {\n <kpt-button class=\"kpt-auth__promo-cta\" variant=\"outline\" (click)=\"setMode(promoMode())\">\n {{ promoMode() === 'signUp' ? i18n.t('auth.signUpSwitch') : i18n.t('auth.signInSwitch') }}\n </kpt-button>\n }\n </div>\n </aside>\n </div>\n</div>\n", styles: ["@layer kpt.components{.kpt-auth-host{display:block;--_kpt-auth-duration: var(--kpt-anim-duration, var(--kpt-motion-duration-slow, .32s));--_kpt-auth-easing: var(--kpt-motion-easing-emphasized, cubic-bezier(.3, 0, 0, 1));--_kpt-auth-dir: 1}[dir=rtl] .kpt-auth-host{--_kpt-auth-dir: -1}.kpt-auth{display:flex;align-items:center;justify-content:center;min-block-size:var(--kpt-auth-min-height, 100vh);min-block-size:var(--kpt-auth-min-height, 100dvh);padding:var(--kpt-auth-padding, var(--kpt-space-4, 1rem));background:var(--kpt-color-surface)}.kpt-auth__card{position:relative;display:grid;inline-size:min(var(--kpt-auth-width, 64rem),100%);min-block-size:var(--kpt-auth-card-height, 34rem);overflow:hidden;background:var(--kpt-color-surface-raised);border:var(--kpt-auth-card-border, 1px solid var(--kpt-color-border));border-radius:var(--kpt-auth-card-radius, var(--kpt-radius-lg, .75rem));box-shadow:var(--kpt-auth-card-shadow, var(--kpt-elevation-3));grid-template-columns:1fr 1fr;grid-template-areas:\"form promo\"}.kpt-auth__form-side{grid-area:form;display:flex;align-items:center;justify-content:center;padding:var(--kpt-space-6, 1.5rem);overflow-y:auto}.kpt-auth__inner{inline-size:min(24rem,100%);display:flex;flex-direction:column;gap:var(--kpt-space-3, .75rem)}.kpt-auth__brand:empty,.kpt-auth__sso:empty,.kpt-auth__footer:empty{display:none}.kpt-auth__title{margin:0;font-size:var(--kpt-font-size-xl, 1.5rem);font-weight:var(--kpt-font-weight-bold, 700);color:var(--kpt-color-on-surface);outline:none}.kpt-auth__subtitle{margin:0;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface-muted)}.kpt-auth__form{display:flex;flex-direction:column;gap:var(--kpt-space-3, .75rem);margin-block-start:var(--kpt-space-2, .5rem)}.kpt-auth__row{display:flex;align-items:center;justify-content:space-between;gap:var(--kpt-space-2, .5rem);flex-wrap:wrap}.kpt-auth__link{padding:0;font:inherit;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-primary);background:none;border:0;text-decoration:underline;text-underline-offset:.15em;cursor:pointer}.kpt-auth__link:hover{color:var(--kpt-color-primary-hover)}.kpt-auth__link--center{align-self:center}.kpt-auth__separator{display:flex;align-items:center;gap:var(--kpt-space-3, .75rem);margin-block:var(--kpt-space-2, .5rem);font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface-muted)}.kpt-auth__separator:before,.kpt-auth__separator:after{content:\"\";flex:1;block-size:1px;background:var(--kpt-color-border)}.kpt-auth__providers{display:grid;gap:var(--kpt-space-2, .5rem)}.kpt-auth__providers[data-layout=grid]{grid-template-columns:repeat(auto-fit,minmax(4.5rem,1fr))}.kpt-auth__provider{display:flex;align-items:center;gap:var(--kpt-space-2, .5rem);padding:var(--kpt-space-3, .75rem);font:inherit;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface);background:var(--kpt-color-surface-raised);border:1px solid var(--kpt-color-border);border-radius:var(--kpt-radius-md, .5rem);cursor:pointer;transition:background-color var(--kpt-motion-duration-fast, .12s) var(--kpt-motion-easing-standard)}.kpt-auth__provider:hover:not(:disabled){background:var(--kpt-color-surface-hover)}.kpt-auth__provider:disabled{opacity:.6;cursor:not-allowed}.kpt-auth__provider-logo{font-size:1.25rem;inline-size:1.25rem;block-size:1.25rem;flex-shrink:0}.kpt-auth__provider-desc{margin-inline-start:auto;font-size:var(--kpt-font-size-xs, .75rem);color:var(--kpt-color-on-surface-muted)}.kpt-auth__providers[data-layout=grid] .kpt-auth__provider{flex-direction:column;gap:var(--kpt-space-1, .25rem);text-align:center}.kpt-auth__switch{margin:0;font-size:var(--kpt-font-size-sm, .875rem);color:var(--kpt-color-on-surface-muted);text-align:center}.kpt-auth__promo{grid-area:promo;display:flex;align-items:center;justify-content:center;padding:var(--kpt-space-8, 2rem);color:var(--kpt-color-primary-contrast);background:var(--kpt-auth-promo-bg, linear-gradient(135deg, var(--kpt-color-primary), var(--kpt-color-primary-hover)))}.kpt-auth__promo-inner{display:flex;flex-direction:column;align-items:center;gap:var(--kpt-space-3, .75rem);text-align:center}.kpt-auth__promo-title{margin:0;font-size:var(--kpt-font-size-lg, 1.25rem);font-weight:var(--kpt-font-weight-bold, 700)}.kpt-auth__promo-text{margin:0;font-size:var(--kpt-font-size-sm, .875rem);opacity:.85}.kpt-auth__promo-cta .kpt-button{color:var(--kpt-color-primary-contrast);border-color:color-mix(in oklch,var(--kpt-color-primary-contrast) 60%,transparent);background:transparent}.kpt-auth__promo-cta .kpt-button:hover:not(:disabled){background:color-mix(in oklch,var(--kpt-color-primary-contrast) 12%,transparent)}.kpt-auth-host[data-layout=slider] .kpt-auth__promo,.kpt-auth-host[data-layout=slider] .kpt-auth__form-side{transition:transform var(--_kpt-auth-duration) var(--_kpt-auth-easing)}.kpt-auth-host[data-layout=slider][data-mode=signUp] .kpt-auth__promo{transform:translate(calc(var(--_kpt-auth-dir) * -100%))}.kpt-auth-host[data-layout=slider][data-mode=signUp] .kpt-auth__form-side{transform:translate(calc(var(--_kpt-auth-dir) * 100%))}.kpt-auth-host[data-layout=slider][data-mode=signIn] .kpt-auth__promo-inner{animation:kpt-auth-promo-start var(--_kpt-auth-duration) var(--_kpt-auth-easing)}.kpt-auth-host[data-layout=slider][data-mode=signUp] .kpt-auth__promo-inner{animation:kpt-auth-promo-end var(--_kpt-auth-duration) var(--_kpt-auth-easing)}@keyframes kpt-auth-promo-start{0%{transform:translate(calc(var(--_kpt-auth-dir) * -14%))}to{transform:none}}@keyframes kpt-auth-promo-end{0%{transform:translate(calc(var(--_kpt-auth-dir) * 14%))}to{transform:none}}@keyframes kpt-auth-enter{0%{opacity:0;transform:translate(calc(var(--_kpt-auth-dir) * 1.25rem))}to{opacity:1;transform:none}}.kpt-auth__inner{animation:kpt-auth-enter var(--_kpt-auth-duration) var(--kpt-motion-easing-standard, cubic-bezier(.2, 0, 0, 1))}.kpt-auth__card{grid-template-columns:1fr;grid-template-areas:\"promo\" \"form\";min-block-size:0}.kpt-auth__promo{padding:var(--kpt-space-6, 1.5rem)}@media(min-width:768px){.kpt-auth__card{grid-template-columns:1fr 1fr;grid-template-areas:\"form promo\";min-block-size:var(--kpt-auth-card-height, 34rem)}.kpt-auth__promo{padding:var(--kpt-space-8, 2rem)}}@media(max-width:767px){.kpt-auth-host[data-layout=slider][data-mode] .kpt-auth__promo,.kpt-auth-host[data-layout=slider][data-mode] .kpt-auth__form-side{transform:none}.kpt-auth-host[data-layout=slider][data-mode] .kpt-auth__promo-inner{animation:none;transform:none}}@media(prefers-reduced-motion:reduce){.kpt-auth-host[data-layout][data-mode] .kpt-auth__promo,.kpt-auth-host[data-layout][data-mode] .kpt-auth__form-side,.kpt-auth-host[data-layout][data-mode] .kpt-auth__promo-inner,.kpt-auth-host[data-layout][data-mode] .kpt-auth__provider{transition:none}.kpt-auth-host[data-layout][data-mode] .kpt-auth__inner,.kpt-auth-host[data-layout][data-mode] .kpt-auth__promo-inner{animation:none}}}\n"] }]
|
|
8936
|
+
}], 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 }] }] }); })();
|
|
8937
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptAuth, { className: "KptAuth", filePath: "lib/auth/auth.component.ts", lineNumber: 94 }); })();
|
|
8938
|
+
|
|
8939
|
+
const _c0$m = [[["", "kptPanelActions", ""]], "*"];
|
|
8940
|
+
const _c1$7 = ["[kptPanelActions]", "*"];
|
|
8941
|
+
function KptPanel_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
8942
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
8943
|
+
i0.ɵɵelementStart(0, "button", 8);
|
|
8944
|
+
i0.ɵɵlistener("click", function KptPanel_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.collapsed.set(!ctx_r1.collapsed())); });
|
|
8945
|
+
i0.ɵɵelement(1, "kpt-icon", 9);
|
|
8946
|
+
i0.ɵɵelementEnd();
|
|
8947
|
+
} if (rf & 2) {
|
|
8948
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
8949
|
+
i0.ɵɵattribute("aria-expanded", !ctx_r1.collapsed())("aria-label", ctx_r1.i18n.t("panel.toggle"));
|
|
8950
|
+
i0.ɵɵadvance();
|
|
8951
|
+
i0.ɵɵproperty("name", ctx_r1.collapsed() ? "chevron-down" : "chevron-up");
|
|
8952
|
+
} }
|
|
8953
|
+
/**
|
|
8954
|
+
* Panel z nagłówkiem i opcjonalnym zwijaniem. Akcje nagłówka: atrybut `kptPanelActions`.
|
|
8955
|
+
*
|
|
8956
|
+
* @example
|
|
8957
|
+
* <kpt-panel header="Ustawienia" toggleable>Treść…</kpt-panel>
|
|
8958
|
+
*/
|
|
8959
|
+
class KptPanel {
|
|
8960
|
+
constructor() {
|
|
8961
|
+
this.header = input('', /* @ts-ignore */
|
|
8962
|
+
...(ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []));
|
|
8963
|
+
this.toggleable = input(false, { ...(ngDevMode ? { debugName: "toggleable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
8964
|
+
this.collapsed = model(false, /* @ts-ignore */
|
|
8965
|
+
...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
|
|
8966
|
+
this.animated = input(true, { ...(ngDevMode ? { debugName: "animated" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
8967
|
+
this.animationDuration = input(500, /* @ts-ignore */
|
|
8968
|
+
...(ngDevMode ? [{ debugName: "animationDuration" }] : /* istanbul ignore next */ []));
|
|
8969
|
+
this.i18n = inject(KptI18n);
|
|
8970
|
+
}
|
|
8971
|
+
static { this.ɵfac = function KptPanel_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptPanel)(); }; }
|
|
8972
|
+
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) {
|
|
8973
|
+
i0.ɵɵstyleProp("--%NS%kpt-anim-duration", (ctx.animated() ? ctx.animationDuration() : 0) + "ms");
|
|
8974
|
+
} }, inputs: { header: [1, "header"], toggleable: [1, "toggleable"], collapsed: [1, "collapsed"], animated: [1, "animated"], animationDuration: [1, "animationDuration"] }, outputs: { collapsed: "collapsedChange" }, ngContentSelectors: _c1$7, 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) {
|
|
8975
|
+
i0.ɵɵprojectionDef(_c0$m);
|
|
8976
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "span", 2);
|
|
8977
|
+
i0.ɵɵtext(3);
|
|
8978
|
+
i0.ɵɵelementEnd();
|
|
8979
|
+
i0.ɵɵelementStart(4, "span", 3);
|
|
8980
|
+
i0.ɵɵprojection(5);
|
|
8981
|
+
i0.ɵɵelementEnd();
|
|
8982
|
+
i0.ɵɵconditionalCreate(6, KptPanel_Conditional_6_Template, 2, 3, "button", 4);
|
|
8983
|
+
i0.ɵɵelementEnd();
|
|
8984
|
+
i0.ɵɵelementStart(7, "div", 5)(8, "div", 6)(9, "div", 7);
|
|
8985
|
+
i0.ɵɵprojection(10, 1);
|
|
8986
|
+
i0.ɵɵelementEnd()()()();
|
|
8987
|
+
} if (rf & 2) {
|
|
8988
|
+
i0.ɵɵadvance(3);
|
|
8989
|
+
i0.ɵɵtextInterpolate(ctx.header());
|
|
8990
|
+
i0.ɵɵadvance(3);
|
|
8991
|
+
i0.ɵɵconditional(ctx.toggleable() ? 6 : -1);
|
|
8992
|
+
i0.ɵɵadvance();
|
|
8993
|
+
i0.ɵɵclassProp("is-open", !ctx.collapsed());
|
|
8994
|
+
i0.ɵɵattribute("inert", ctx.collapsed() ? "" : null)("aria-hidden", ctx.collapsed());
|
|
8995
|
+
} }, dependencies: [KptIcon], styles: ["@layer kpt.components{.kpt-panel-host{display:block}.kpt-panel{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);overflow:hidden}.kpt-panel__header{display:flex;align-items:center;gap:var(--%NS%kpt-space-2, .5rem);padding:var(--%NS%kpt-space-3, .75rem) var(--%NS%kpt-space-4, 1rem);background:var(--%NS%kpt-color-surface-variant);border-bottom:var(--%NS%kpt-border-width-thin, 1px) solid var(--%NS%kpt-color-border)}.kpt-panel__title{font-weight:var(--%NS%kpt-font-weight-semibold, 600)}.kpt-panel__actions{margin-left:auto;display:inline-flex;align-items:center;gap:var(--%NS%kpt-space-1, .25rem)}.kpt-panel__toggle{display:inline-flex;border:0;background:none;padding:0;cursor:pointer;color:var(--%NS%kpt-color-on-surface-muted)}.kpt-panel__toggle:hover{color:var(--%NS%kpt-color-on-surface)}.kpt-panel__collapse{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--%NS%kpt-anim-duration, .5s) var(--%NS%kpt-motion-easing-standard)}.kpt-panel__collapse.is-open{grid-template-rows:1fr}.kpt-panel__collapse-inner{overflow:hidden;min-height:0}.kpt-panel__body{padding:var(--%NS%kpt-space-4, 1rem)}@media(prefers-reduced-motion:reduce){.kpt-panel__collapse{transition:none}}}\n"], encapsulation: 2 }); }
|
|
8996
|
+
}
|
|
8997
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptPanel, [{
|
|
8998
|
+
type: Component,
|
|
8999
|
+
args: [{ selector: 'kpt-panel', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [KptIcon], template: `
|
|
9000
|
+
<div class="kpt-panel">
|
|
9001
|
+
<div class="kpt-panel__header">
|
|
9002
|
+
<span class="kpt-panel__title">{{ header() }}</span>
|
|
9003
|
+
<span class="kpt-panel__actions"><ng-content select="[kptPanelActions]" /></span>
|
|
9004
|
+
@if (toggleable()) {
|
|
9005
|
+
<button type="button" class="kpt-panel__toggle" (click)="collapsed.set(!collapsed())" [attr.aria-expanded]="!collapsed()" [attr.aria-label]="i18n.t('panel.toggle')">
|
|
9006
|
+
<kpt-icon [name]="collapsed() ? 'chevron-down' : 'chevron-up'" />
|
|
9007
|
+
</button>
|
|
7885
9008
|
}
|
|
7886
9009
|
</div>
|
|
7887
9010
|
<div
|
|
@@ -7902,7 +9025,7 @@ class KptPanel {
|
|
|
7902
9025
|
}], 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 }] }] }); })();
|
|
7903
9026
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptPanel, { className: "KptPanel", filePath: "lib/panel/panel.component.ts", lineNumber: 45 }); })();
|
|
7904
9027
|
|
|
7905
|
-
const _c0$
|
|
9028
|
+
const _c0$l = ["*"];
|
|
7906
9029
|
function KptFieldset_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
7907
9030
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
7908
9031
|
i0.ɵɵelementStart(0, "button", 6);
|
|
@@ -7948,7 +9071,7 @@ class KptFieldset {
|
|
|
7948
9071
|
static { this.ɵfac = function KptFieldset_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptFieldset)(); }; }
|
|
7949
9072
|
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) {
|
|
7950
9073
|
i0.ɵɵstyleProp("--%NS%kpt-anim-duration", (ctx.animated() ? ctx.animationDuration() : 0) + "ms");
|
|
7951
|
-
} }, inputs: { legend: [1, "legend"], toggleable: [1, "toggleable"], collapsed: [1, "collapsed"], animated: [1, "animated"], animationDuration: [1, "animationDuration"] }, outputs: { collapsed: "collapsedChange" }, ngContentSelectors: _c0$
|
|
9074
|
+
} }, inputs: { legend: [1, "legend"], toggleable: [1, "toggleable"], collapsed: [1, "collapsed"], animated: [1, "animated"], animationDuration: [1, "animationDuration"] }, outputs: { collapsed: "collapsedChange" }, ngContentSelectors: _c0$l, 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) {
|
|
7952
9075
|
i0.ɵɵprojectionDef();
|
|
7953
9076
|
i0.ɵɵelementStart(0, "fieldset", 0)(1, "legend", 1);
|
|
7954
9077
|
i0.ɵɵconditionalCreate(2, KptFieldset_Conditional_2_Template, 4, 3, "button", 2)(3, KptFieldset_Conditional_3_Template, 2, 1, "span");
|
|
@@ -7996,7 +9119,7 @@ class KptFieldset {
|
|
|
7996
9119
|
}], 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 }] }] }); })();
|
|
7997
9120
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptFieldset, { className: "KptFieldset", filePath: "lib/fieldset/fieldset.component.ts", lineNumber: 45 }); })();
|
|
7998
9121
|
|
|
7999
|
-
const _c0$
|
|
9122
|
+
const _c0$k = [[["", "kptSplitStart", ""]], [["", "kptSplitEnd", ""]]];
|
|
8000
9123
|
const _c1$6 = ["[kptSplitStart]", "[kptSplitEnd]"];
|
|
8001
9124
|
/**
|
|
8002
9125
|
* Splitter — dwa panele z przeciąganym uchwytem. Panele przez sloty `[kptSplitStart]` i `[kptSplitEnd]`.
|
|
@@ -8051,7 +9174,7 @@ class KptSplitter {
|
|
|
8051
9174
|
}
|
|
8052
9175
|
static { this.ɵfac = function KptSplitter_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptSplitter)(); }; }
|
|
8053
9176
|
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$6, 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) {
|
|
8054
|
-
i0.ɵɵprojectionDef(_c0$
|
|
9177
|
+
i0.ɵɵprojectionDef(_c0$k);
|
|
8055
9178
|
i0.ɵɵdomElementStart(0, "div", 0)(1, "div", 1);
|
|
8056
9179
|
i0.ɵɵprojection(2);
|
|
8057
9180
|
i0.ɵɵdomElementEnd();
|
|
@@ -8423,7 +9546,7 @@ class KptAvatarGroup {
|
|
|
8423
9546
|
}], 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 }] }] }); })();
|
|
8424
9547
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptAvatarGroup, { className: "KptAvatarGroup", filePath: "lib/avatar-group/avatar-group.component.ts", lineNumber: 36 }); })();
|
|
8425
9548
|
|
|
8426
|
-
const _c0$
|
|
9549
|
+
const _c0$j = ["*"];
|
|
8427
9550
|
function KptEmpty_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
8428
9551
|
i0.ɵɵelementStart(0, "div", 1);
|
|
8429
9552
|
i0.ɵɵelement(1, "kpt-icon", 5);
|
|
@@ -8469,7 +9592,7 @@ class KptEmpty {
|
|
|
8469
9592
|
...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
8470
9593
|
}
|
|
8471
9594
|
static { this.ɵfac = function KptEmpty_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptEmpty)(); }; }
|
|
8472
|
-
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$
|
|
9595
|
+
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$j, 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) {
|
|
8473
9596
|
i0.ɵɵprojectionDef();
|
|
8474
9597
|
i0.ɵɵelementStart(0, "div", 0);
|
|
8475
9598
|
i0.ɵɵconditionalCreate(1, KptEmpty_Conditional_1_Template, 2, 1, "div", 1);
|
|
@@ -8500,7 +9623,7 @@ class KptEmpty {
|
|
|
8500
9623
|
}], 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 }] }] }); })();
|
|
8501
9624
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptEmpty, { className: "KptEmpty", filePath: "lib/empty/empty.component.ts", lineNumber: 28 }); })();
|
|
8502
9625
|
|
|
8503
|
-
const _c0$
|
|
9626
|
+
const _c0$i = ["*"];
|
|
8504
9627
|
function KptTab_ng_template_0_Template(rf, ctx) { if (rf & 1) {
|
|
8505
9628
|
i0.ɵɵprojection(0);
|
|
8506
9629
|
} }
|
|
@@ -8523,7 +9646,7 @@ class KptTab {
|
|
|
8523
9646
|
i0.ɵɵviewQuerySignal(ctx.content, TemplateRef, 5);
|
|
8524
9647
|
} if (rf & 2) {
|
|
8525
9648
|
i0.ɵɵqueryAdvance();
|
|
8526
|
-
} }, inputs: { label: [1, "label"], disabled: [1, "disabled"] }, ngContentSelectors: _c0$
|
|
9649
|
+
} }, inputs: { label: [1, "label"], disabled: [1, "disabled"] }, ngContentSelectors: _c0$i, decls: 1, vars: 0, template: function KptTab_Template(rf, ctx) { if (rf & 1) {
|
|
8527
9650
|
i0.ɵɵprojectionDef();
|
|
8528
9651
|
i0.ɵɵdomTemplate(0, KptTab_ng_template_0_Template, 1, 0, "ng-template");
|
|
8529
9652
|
} }, encapsulation: 2 }); }
|
|
@@ -8538,7 +9661,7 @@ class KptTab {
|
|
|
8538
9661
|
}], 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 }] }] }); })();
|
|
8539
9662
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptTab, { className: "KptTab", filePath: "lib/tabs/tab.component.ts", lineNumber: 14 }); })();
|
|
8540
9663
|
|
|
8541
|
-
const _c0$
|
|
9664
|
+
const _c0$h = ["tabBtn"];
|
|
8542
9665
|
function _forTrack0$3($index, $item) { /* @ts-ignore */
|
|
8543
9666
|
return this.activeIndex(); }
|
|
8544
9667
|
function KptTabs_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -8620,7 +9743,7 @@ class KptTabs {
|
|
|
8620
9743
|
} if (rf & 2) {
|
|
8621
9744
|
i0.ɵɵqueryAdvance();
|
|
8622
9745
|
} }, viewQuery: function KptTabs_Query(rf, ctx) { if (rf & 1) {
|
|
8623
|
-
i0.ɵɵviewQuerySignal(ctx.tabBtns, _c0$
|
|
9746
|
+
i0.ɵɵviewQuerySignal(ctx.tabBtns, _c0$h, 5);
|
|
8624
9747
|
} if (rf & 2) {
|
|
8625
9748
|
i0.ɵɵqueryAdvance();
|
|
8626
9749
|
} }, hostAttrs: [1, "kpt-tabs-host"], hostVars: 4, hostBindings: function KptTabs_HostBindings(rf, ctx) { if (rf & 1) {
|
|
@@ -8676,7 +9799,7 @@ class KptTabs {
|
|
|
8676
9799
|
}], () => [], { 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 }] }] }); })();
|
|
8677
9800
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptTabs, { className: "KptTabs", filePath: "lib/tabs/tabs.component.ts", lineNumber: 62 }); })();
|
|
8678
9801
|
|
|
8679
|
-
const _c0$
|
|
9802
|
+
const _c0$g = ["*"];
|
|
8680
9803
|
/**
|
|
8681
9804
|
* Panel akordeonu. Umieszczaj w `kpt-accordion`. Stan `expanded` jest dwukierunkowy.
|
|
8682
9805
|
*/
|
|
@@ -8706,7 +9829,7 @@ class KptAccordionPanel {
|
|
|
8706
9829
|
static { this.ɵfac = function KptAccordionPanel_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptAccordionPanel)(); }; }
|
|
8707
9830
|
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) {
|
|
8708
9831
|
i0.ɵɵstyleProp("--%NS%kpt-anim-duration", ctx.animMs());
|
|
8709
|
-
} }, inputs: { title: [1, "title"], disabled: [1, "disabled"], expanded: [1, "expanded"] }, outputs: { expanded: "expandedChange" }, ngContentSelectors: _c0$
|
|
9832
|
+
} }, inputs: { title: [1, "title"], disabled: [1, "disabled"], expanded: [1, "expanded"] }, outputs: { expanded: "expandedChange" }, ngContentSelectors: _c0$g, 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) {
|
|
8710
9833
|
i0.ɵɵprojectionDef();
|
|
8711
9834
|
i0.ɵɵelementStart(0, "div", 0)(1, "button", 1);
|
|
8712
9835
|
i0.ɵɵlistener("click", function KptAccordionPanel_Template_button_click_1_listener() { return ctx.toggle(); });
|
|
@@ -8764,7 +9887,7 @@ class KptAccordionPanel {
|
|
|
8764
9887
|
}], 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"] }] }); })();
|
|
8765
9888
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptAccordionPanel, { className: "KptAccordionPanel", filePath: "lib/accordion/accordion-panel.component.ts", lineNumber: 52 }); })();
|
|
8766
9889
|
|
|
8767
|
-
const _c0$
|
|
9890
|
+
const _c0$f = ["*"];
|
|
8768
9891
|
/**
|
|
8769
9892
|
* Akordeon — grupa rozwijanych paneli. `multi` pozwala otworzyć wiele naraz.
|
|
8770
9893
|
*
|
|
@@ -8797,7 +9920,7 @@ class KptAccordion {
|
|
|
8797
9920
|
i0.ɵɵcontentQuerySignal(dirIndex, ctx.panels, KptAccordionPanel, 4);
|
|
8798
9921
|
} if (rf & 2) {
|
|
8799
9922
|
i0.ɵɵqueryAdvance();
|
|
8800
|
-
} }, hostAttrs: [1, "kpt-accordion-host"], inputs: { multi: [1, "multi"], animated: [1, "animated"], animationDuration: [1, "animationDuration"] }, ngContentSelectors: _c0$
|
|
9923
|
+
} }, hostAttrs: [1, "kpt-accordion-host"], inputs: { multi: [1, "multi"], animated: [1, "animated"], animationDuration: [1, "animationDuration"] }, ngContentSelectors: _c0$f, decls: 1, vars: 0, template: function KptAccordion_Template(rf, ctx) { if (rf & 1) {
|
|
8801
9924
|
i0.ɵɵprojectionDef();
|
|
8802
9925
|
i0.ɵɵprojection(0);
|
|
8803
9926
|
} }, 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 }); }
|
|
@@ -8887,7 +10010,7 @@ class KptBreadcrumb {
|
|
|
8887
10010
|
}], null, { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }] }); })();
|
|
8888
10011
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptBreadcrumb, { className: "KptBreadcrumb", filePath: "lib/breadcrumb/breadcrumb.component.ts", lineNumber: 38 }); })();
|
|
8889
10012
|
|
|
8890
|
-
const _c0$
|
|
10013
|
+
const _c0$e = ["*"];
|
|
8891
10014
|
function KptStep_ng_template_0_Template(rf, ctx) { if (rf & 1) {
|
|
8892
10015
|
i0.ɵɵprojection(0);
|
|
8893
10016
|
} }
|
|
@@ -8909,7 +10032,7 @@ class KptStep {
|
|
|
8909
10032
|
i0.ɵɵviewQuerySignal(ctx.content, TemplateRef, 5);
|
|
8910
10033
|
} if (rf & 2) {
|
|
8911
10034
|
i0.ɵɵqueryAdvance();
|
|
8912
|
-
} }, inputs: { label: [1, "label"] }, ngContentSelectors: _c0$
|
|
10035
|
+
} }, inputs: { label: [1, "label"] }, ngContentSelectors: _c0$e, decls: 1, vars: 0, template: function KptStep_Template(rf, ctx) { if (rf & 1) {
|
|
8913
10036
|
i0.ɵɵprojectionDef();
|
|
8914
10037
|
i0.ɵɵdomTemplate(0, KptStep_ng_template_0_Template, 1, 0, "ng-template");
|
|
8915
10038
|
} }, encapsulation: 2 }); }
|
|
@@ -9435,7 +10558,7 @@ class KptRowDetailDef {
|
|
|
9435
10558
|
}]
|
|
9436
10559
|
}], null, null); })();
|
|
9437
10560
|
|
|
9438
|
-
const _c0$
|
|
10561
|
+
const _c0$d = ["scrollEl"];
|
|
9439
10562
|
const _c1$5 = ["theadEl"];
|
|
9440
10563
|
const _c2$2 = ["editorHost"];
|
|
9441
10564
|
const _c3 = [[["", "kptPaginatorActions", ""]]];
|
|
@@ -10673,7 +11796,7 @@ class KptDataTable {
|
|
|
10673
11796
|
} if (rf & 2) {
|
|
10674
11797
|
i0.ɵɵqueryAdvance(3);
|
|
10675
11798
|
} }, viewQuery: function KptDataTable_Query(rf, ctx) { if (rf & 1) {
|
|
10676
|
-
i0.ɵɵviewQuerySignal(ctx.scrollEl, _c0$
|
|
11799
|
+
i0.ɵɵviewQuerySignal(ctx.scrollEl, _c0$d, 5)(ctx.theadEl, _c1$5, 5)(ctx.editorHost, _c2$2, 5);
|
|
10677
11800
|
} if (rf & 2) {
|
|
10678
11801
|
i0.ɵɵqueryAdvance(3);
|
|
10679
11802
|
} }, hostAttrs: [1, "kpt-data-table"], hostVars: 2, hostBindings: function KptDataTable_HostBindings(rf, ctx) { if (rf & 2) {
|
|
@@ -10752,7 +11875,7 @@ class KptDataTable {
|
|
|
10752
11875
|
}], () => [], { 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 }] }] }); })();
|
|
10753
11876
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDataTable, { className: "KptDataTable", filePath: "lib/data-table/data-table.component.ts", lineNumber: 157 }); })();
|
|
10754
11877
|
|
|
10755
|
-
const _c0$
|
|
11878
|
+
const _c0$c = a0 => ({ $implicit: a0, level: 0 });
|
|
10756
11879
|
const _c1$4 = (a0, a1) => ({ $implicit: a0, level: a1 });
|
|
10757
11880
|
function KptTree_ng_template_2_For_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
10758
11881
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
@@ -10874,7 +11997,7 @@ class KptTree {
|
|
|
10874
11997
|
} if (rf & 2) {
|
|
10875
11998
|
const nodeTpl_r6 = i0.ɵɵreference(3);
|
|
10876
11999
|
i0.ɵɵadvance();
|
|
10877
|
-
i0.ɵɵproperty("ngTemplateOutlet", nodeTpl_r6)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0$
|
|
12000
|
+
i0.ɵɵproperty("ngTemplateOutlet", nodeTpl_r6)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0$c, ctx.nodes()));
|
|
10878
12001
|
} }, 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 }); }
|
|
10879
12002
|
}
|
|
10880
12003
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptTree, [{
|
|
@@ -11008,7 +12131,7 @@ class KptTimeline {
|
|
|
11008
12131
|
}], null, { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }] }); })();
|
|
11009
12132
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptTimeline, { className: "KptTimeline", filePath: "lib/timeline/timeline.component.ts", lineNumber: 44 }); })();
|
|
11010
12133
|
|
|
11011
|
-
const _c0$
|
|
12134
|
+
const _c0$b = (a0, a1) => ({ $implicit: a0, index: a1 });
|
|
11012
12135
|
const _c1$3 = a0 => ({ index: a0 });
|
|
11013
12136
|
function KptCarousel_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
11014
12137
|
i0.ɵɵelementStart(0, "div", 3);
|
|
@@ -11019,7 +12142,7 @@ function KptCarousel_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
11019
12142
|
const $index_r2 = ctx.$index;
|
|
11020
12143
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
11021
12144
|
i0.ɵɵadvance();
|
|
11022
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.slideTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c0$
|
|
12145
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.slideTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c0$b, item_r1, $index_r2));
|
|
11023
12146
|
} }
|
|
11024
12147
|
function KptCarousel_For_11_Template(rf, ctx) { if (rf & 1) {
|
|
11025
12148
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
@@ -11131,7 +12254,7 @@ class KptCarousel {
|
|
|
11131
12254
|
}], 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 }] }] }); })();
|
|
11132
12255
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptCarousel, { className: "KptCarousel", filePath: "lib/carousel/carousel.component.ts", lineNumber: 54 }); })();
|
|
11133
12256
|
|
|
11134
|
-
const _c0$
|
|
12257
|
+
const _c0$a = a0 => ({ count: a0 });
|
|
11135
12258
|
const _c1$2 = (a0, a1) => ({ $implicit: a0, index: a1 });
|
|
11136
12259
|
const _c2$1 = a0 => [a0];
|
|
11137
12260
|
function KptDataView_For_11_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -11223,7 +12346,7 @@ class KptDataView {
|
|
|
11223
12346
|
i0.ɵɵelementEnd();
|
|
11224
12347
|
} if (rf & 2) {
|
|
11225
12348
|
i0.ɵɵadvance(3);
|
|
11226
|
-
i0.ɵɵtextInterpolate(ctx.i18n.t("dataView.count", i0.ɵɵpureFunction1(10, _c0$
|
|
12349
|
+
i0.ɵɵtextInterpolate(ctx.i18n.t("dataView.count", i0.ɵɵpureFunction1(10, _c0$a, ctx.items().length)));
|
|
11227
12350
|
i0.ɵɵadvance(2);
|
|
11228
12351
|
i0.ɵɵclassProp("is-active", ctx.layout() === "list");
|
|
11229
12352
|
i0.ɵɵattribute("aria-label", ctx.i18n.t("dataView.list"));
|
|
@@ -11268,7 +12391,7 @@ class KptDataView {
|
|
|
11268
12391
|
}], 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"] }] }); })();
|
|
11269
12392
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptDataView, { className: "KptDataView", filePath: "lib/data-view/data-view.component.ts", lineNumber: 49 }); })();
|
|
11270
12393
|
|
|
11271
|
-
const _c0$
|
|
12394
|
+
const _c0$9 = a0 => ({ $implicit: a0 });
|
|
11272
12395
|
function KptPickList_For_6_Template(rf, ctx) { if (rf & 1) {
|
|
11273
12396
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
11274
12397
|
i0.ɵɵelementStart(0, "li", 9);
|
|
@@ -11280,7 +12403,7 @@ function KptPickList_For_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
11280
12403
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
11281
12404
|
i0.ɵɵclassProp("is-selected", ctx_r2.selSource().has(item_r2));
|
|
11282
12405
|
i0.ɵɵadvance();
|
|
11283
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.itemTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction1(4, _c0$
|
|
12406
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.itemTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction1(4, _c0$9, item_r2));
|
|
11284
12407
|
} }
|
|
11285
12408
|
function KptPickList_For_23_Template(rf, ctx) { if (rf & 1) {
|
|
11286
12409
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
@@ -11293,7 +12416,7 @@ function KptPickList_For_23_Template(rf, ctx) { if (rf & 1) {
|
|
|
11293
12416
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
11294
12417
|
i0.ɵɵclassProp("is-selected", ctx_r2.selTarget().has(item_r5));
|
|
11295
12418
|
i0.ɵɵadvance();
|
|
11296
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.itemTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction1(4, _c0$
|
|
12419
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.itemTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction1(4, _c0$9, item_r5));
|
|
11297
12420
|
} }
|
|
11298
12421
|
/**
|
|
11299
12422
|
* PickList — transfer elementów między dwiema listami (źródło ↔ cel).
|
|
@@ -11438,7 +12561,7 @@ class KptPickList {
|
|
|
11438
12561
|
}], 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 }] }] }); })();
|
|
11439
12562
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptPickList, { className: "KptPickList", filePath: "lib/pick-list/pick-list.component.ts", lineNumber: 55 }); })();
|
|
11440
12563
|
|
|
11441
|
-
const _c0$
|
|
12564
|
+
const _c0$8 = (a0, a1) => ({ $implicit: a0, index: a1 });
|
|
11442
12565
|
function KptOrderList_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
11443
12566
|
i0.ɵɵelementStart(0, "div", 6);
|
|
11444
12567
|
i0.ɵɵtext(1);
|
|
@@ -11460,7 +12583,7 @@ function KptOrderList_For_10_Template(rf, ctx) { if (rf & 1) {
|
|
|
11460
12583
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
11461
12584
|
i0.ɵɵclassProp("is-selected", ctx_r0.selected() === ɵ$index_21_r3);
|
|
11462
12585
|
i0.ɵɵadvance();
|
|
11463
|
-
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.itemTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction2(4, _c0$
|
|
12586
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.itemTpl())("ngTemplateOutletContext", i0.ɵɵpureFunction2(4, _c0$8, item_r4, ɵ$index_21_r3));
|
|
11464
12587
|
} }
|
|
11465
12588
|
/**
|
|
11466
12589
|
* OrderList — lista z ręcznym porządkowaniem elementów (w górę/dół).
|
|
@@ -11550,7 +12673,7 @@ class KptOrderList {
|
|
|
11550
12673
|
}], 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 }] }] }); })();
|
|
11551
12674
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptOrderList, { className: "KptOrderList", filePath: "lib/order-list/order-list.component.ts", lineNumber: 41 }); })();
|
|
11552
12675
|
|
|
11553
|
-
const _c0$
|
|
12676
|
+
const _c0$7 = a0 => ({ index: a0 });
|
|
11554
12677
|
function KptGalleria_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
11555
12678
|
i0.ɵɵelement(0, "img", 4);
|
|
11556
12679
|
} if (rf & 2) {
|
|
@@ -11568,7 +12691,7 @@ function KptGalleria_Conditional_7_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
11568
12691
|
const ɵ$index_19_r3 = ctx.$index;
|
|
11569
12692
|
const ctx_r3 = i0.ɵɵnextContext(2);
|
|
11570
12693
|
i0.ɵɵclassProp("is-active", ɵ$index_19_r3 === ctx_r3.activeIndex());
|
|
11571
|
-
i0.ɵɵattribute("aria-label", ctx_r3.i18n.t("galleria.image", i0.ɵɵpureFunction1(5, _c0$
|
|
12694
|
+
i0.ɵɵattribute("aria-label", ctx_r3.i18n.t("galleria.image", i0.ɵɵpureFunction1(5, _c0$7, ɵ$index_19_r3 + 1)));
|
|
11572
12695
|
i0.ɵɵadvance();
|
|
11573
12696
|
i0.ɵɵproperty("src", item_r5.thumbnail || item_r5.src, i0.ɵɵsanitizeUrl)("alt", item_r5.alt || "");
|
|
11574
12697
|
} }
|
|
@@ -11657,94 +12780,6 @@ class KptGalleria {
|
|
|
11657
12780
|
}], 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 }] }] }); })();
|
|
11658
12781
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptGalleria, { className: "KptGalleria", filePath: "lib/galleria/galleria.component.ts", lineNumber: 46 }); })();
|
|
11659
12782
|
|
|
11660
|
-
const _c0$7 = ["*"];
|
|
11661
|
-
function KptAlert_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
11662
|
-
i0.ɵɵelementStart(0, "div", 3);
|
|
11663
|
-
i0.ɵɵtext(1);
|
|
11664
|
-
i0.ɵɵelementEnd();
|
|
11665
|
-
} if (rf & 2) {
|
|
11666
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
11667
|
-
i0.ɵɵadvance();
|
|
11668
|
-
i0.ɵɵtextInterpolate(ctx_r0.title());
|
|
11669
|
-
} }
|
|
11670
|
-
function KptAlert_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
11671
|
-
const _r2 = i0.ɵɵgetCurrentView();
|
|
11672
|
-
i0.ɵɵelementStart(0, "button", 6);
|
|
11673
|
-
i0.ɵɵlistener("click", function KptAlert_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.dismiss()); });
|
|
11674
|
-
i0.ɵɵelement(1, "kpt-icon", 7);
|
|
11675
|
-
i0.ɵɵelementEnd();
|
|
11676
|
-
} if (rf & 2) {
|
|
11677
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
11678
|
-
i0.ɵɵattribute("aria-label", ctx_r0.i18n.t("common.close"));
|
|
11679
|
-
} }
|
|
11680
|
-
/**
|
|
11681
|
-
* Komunikat inline (alert). Warianty info/success/warning/danger, opcjonalny tytuł i zamykanie.
|
|
11682
|
-
*
|
|
11683
|
-
* @example
|
|
11684
|
-
* <kpt-alert variant="success" title="Zapisano">Zmiany zostały zapisane.</kpt-alert>
|
|
11685
|
-
*/
|
|
11686
|
-
class KptAlert {
|
|
11687
|
-
constructor() {
|
|
11688
|
-
this.variant = input('info', /* @ts-ignore */
|
|
11689
|
-
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
11690
|
-
this.title = input('', /* @ts-ignore */
|
|
11691
|
-
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
11692
|
-
this.dismissible = input(false, { ...(ngDevMode ? { debugName: "dismissible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
11693
|
-
this.closed = output();
|
|
11694
|
-
this.i18n = inject(KptI18n);
|
|
11695
|
-
this.visible = signal(true, /* @ts-ignore */
|
|
11696
|
-
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
11697
|
-
}
|
|
11698
|
-
iconName() {
|
|
11699
|
-
return { info: 'info', success: 'circle-check', warning: 'alert-triangle', danger: 'circle-x' }[this.variant()];
|
|
11700
|
-
}
|
|
11701
|
-
dismiss() {
|
|
11702
|
-
this.visible.set(false);
|
|
11703
|
-
this.closed.emit();
|
|
11704
|
-
}
|
|
11705
|
-
static { this.ɵfac = function KptAlert_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || KptAlert)(); }; }
|
|
11706
|
-
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) {
|
|
11707
|
-
i0.ɵɵdomProperty("hidden", !ctx.visible());
|
|
11708
|
-
} }, inputs: { variant: [1, "variant"], title: [1, "title"], dismissible: [1, "dismissible"] }, outputs: { closed: "closed" }, ngContentSelectors: _c0$7, 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) {
|
|
11709
|
-
i0.ɵɵprojectionDef();
|
|
11710
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
11711
|
-
i0.ɵɵelement(1, "kpt-icon", 1);
|
|
11712
|
-
i0.ɵɵelementStart(2, "div", 2);
|
|
11713
|
-
i0.ɵɵconditionalCreate(3, KptAlert_Conditional_3_Template, 2, 1, "div", 3);
|
|
11714
|
-
i0.ɵɵelementStart(4, "div", 4);
|
|
11715
|
-
i0.ɵɵprojection(5);
|
|
11716
|
-
i0.ɵɵelementEnd()();
|
|
11717
|
-
i0.ɵɵconditionalCreate(6, KptAlert_Conditional_6_Template, 2, 1, "button", 5);
|
|
11718
|
-
i0.ɵɵelementEnd();
|
|
11719
|
-
} if (rf & 2) {
|
|
11720
|
-
i0.ɵɵattribute("data-variant", ctx.variant());
|
|
11721
|
-
i0.ɵɵadvance();
|
|
11722
|
-
i0.ɵɵproperty("name", ctx.iconName());
|
|
11723
|
-
i0.ɵɵadvance(2);
|
|
11724
|
-
i0.ɵɵconditional(ctx.title() ? 3 : -1);
|
|
11725
|
-
i0.ɵɵadvance(3);
|
|
11726
|
-
i0.ɵɵconditional(ctx.dismissible() ? 6 : -1);
|
|
11727
|
-
} }, dependencies: [KptIcon], styles: ["@layer kpt.components{.kpt-alert{--%NS%_accent: var(--%NS%kpt-color-info);display:flex;align-items:flex-start;gap:var(--%NS%kpt-space-3, .75rem);padding:var(--%NS%kpt-space-3, .75rem) var(--%NS%kpt-space-4, 1rem);border:var(--%NS%kpt-border-width-thin, 1px) solid color-mix(in oklch,var(--%NS%_accent) 35%,transparent);border-inline-start:3px solid var(--%NS%_accent);border-radius:var(--%NS%kpt-radius-md, .5rem);background:color-mix(in oklch,var(--%NS%_accent) 10%,var(--%NS%kpt-color-surface));color:var(--%NS%kpt-color-on-surface);font-size:var(--%NS%kpt-font-size-sm, .875rem)}.kpt-alert[data-variant=success]{--%NS%_accent: var(--%NS%kpt-color-success)}.kpt-alert[data-variant=warning]{--%NS%_accent: var(--%NS%kpt-color-warning)}.kpt-alert[data-variant=danger]{--%NS%_accent: var(--%NS%kpt-color-danger)}.kpt-alert__icon{color:var(--%NS%_accent);font-weight:700;line-height:1.5}.kpt-alert__content{flex:1;min-width:0}.kpt-alert__title{font-weight:var(--%NS%kpt-font-weight-semibold, 600);margin-bottom:.15rem}.kpt-alert__close{background:none;border:0;cursor:pointer;color:var(--%NS%kpt-color-on-surface-muted);font-size:1.15rem;line-height:1;padding:0}.kpt-alert__close:hover{color:var(--%NS%kpt-color-on-surface)}}\n"], encapsulation: 2 }); }
|
|
11728
|
-
}
|
|
11729
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(KptAlert, [{
|
|
11730
|
-
type: Component,
|
|
11731
|
-
args: [{ selector: 'kpt-alert', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [KptIcon], template: `
|
|
11732
|
-
<div class="kpt-alert" [attr.data-variant]="variant()" role="alert">
|
|
11733
|
-
<kpt-icon class="kpt-alert__icon" [name]="iconName()" />
|
|
11734
|
-
<div class="kpt-alert__content">
|
|
11735
|
-
@if (title()) {
|
|
11736
|
-
<div class="kpt-alert__title">{{ title() }}</div>
|
|
11737
|
-
}
|
|
11738
|
-
<div class="kpt-alert__message"><ng-content /></div>
|
|
11739
|
-
</div>
|
|
11740
|
-
@if (dismissible()) {
|
|
11741
|
-
<button class="kpt-alert__close" type="button" (click)="dismiss()" [attr.aria-label]="i18n.t('common.close')"><kpt-icon name="x" /></button>
|
|
11742
|
-
}
|
|
11743
|
-
</div>
|
|
11744
|
-
`, host: { class: 'kpt-alert-host', '[hidden]': '!visible()' }, styles: ["@layer kpt.components{.kpt-alert{--_accent: var(--kpt-color-info);display:flex;align-items:flex-start;gap:var(--kpt-space-3, .75rem);padding:var(--kpt-space-3, .75rem) var(--kpt-space-4, 1rem);border:var(--kpt-border-width-thin, 1px) solid color-mix(in oklch,var(--_accent) 35%,transparent);border-inline-start:3px solid var(--_accent);border-radius:var(--kpt-radius-md, .5rem);background:color-mix(in oklch,var(--_accent) 10%,var(--kpt-color-surface));color:var(--kpt-color-on-surface);font-size:var(--kpt-font-size-sm, .875rem)}.kpt-alert[data-variant=success]{--_accent: var(--kpt-color-success)}.kpt-alert[data-variant=warning]{--_accent: var(--kpt-color-warning)}.kpt-alert[data-variant=danger]{--_accent: var(--kpt-color-danger)}.kpt-alert__icon{color:var(--_accent);font-weight:700;line-height:1.5}.kpt-alert__content{flex:1;min-width:0}.kpt-alert__title{font-weight:var(--kpt-font-weight-semibold, 600);margin-bottom:.15rem}.kpt-alert__close{background:none;border:0;cursor:pointer;color:var(--kpt-color-on-surface-muted);font-size:1.15rem;line-height:1;padding:0}.kpt-alert__close:hover{color:var(--kpt-color-on-surface)}}\n"] }]
|
|
11745
|
-
}], null, { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] }); })();
|
|
11746
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(KptAlert, { className: "KptAlert", filePath: "lib/alert/alert.component.ts", lineNumber: 45 }); })();
|
|
11747
|
-
|
|
11748
12783
|
const _c0$6 = ["dlg"];
|
|
11749
12784
|
const _c1$1 = ["*", [["", "kptDialogFooter", ""]]];
|
|
11750
12785
|
const _c2 = ["*", "[kptDialogFooter]"];
|
|
@@ -13468,5 +14503,5 @@ class KptSpeedDial {
|
|
|
13468
14503
|
* Generated bundle index. Do not edit.
|
|
13469
14504
|
*/
|
|
13470
14505
|
|
|
13471
|
-
export { KPT_BREAKPOINTS, KPT_FORM_FIELD_CONTROL, KPT_I18N_CONFIG, KPT_MESSAGES_EN, KPT_MESSAGES_PL, KptAccordion, KptAccordionPanel, KptAlert, KptAppShell, KptAutocomplete, KptAvatar, KptAvatarGroup, KptBadge, KptBottomSheet, KptBreadcrumb, KptBreakpointObserver, KptButton, KptButtonGroup, KptCard, KptCarousel, KptCellDef, KptCellEditDef, KptCheckbox, KptChip, KptChipsInput, KptClock, KptColorPicker, KptConfirmContainer, KptConfirmService, KptContextMenu, KptDataTable, KptDataView, KptDateRange, KptDatepicker, KptDialog, KptDivider, KptDrawer, KptEmpty, KptFab, KptFieldset, KptFileUpload, KptFormField, KptGalleria, KptI18n, KptIcon, KptIconButton, KptIconRegistry, KptImage, KptInput, KptInputMask, KptInputNumber, KptInputOtp, KptKnob, KptListbox, KptMegamenu, KptMenu, KptMenubar, KptMeterGroup, KptOrderList, KptPaginator, KptPanel, KptPassword, KptPickList, KptPopover, KptProgress, KptRadioGroup, KptRating, KptRichText, KptRowDetailDef, KptScrollTop, KptSelect, KptShellNavToggle, KptSidenav, KptSkeleton, KptSlider, KptSpeedDial, KptSpinner, KptSplitButton, KptSplitter, KptStep, KptStepper, KptSwitch, KptSwitchGroup, KptTab, KptTabs, KptTextarea, KptTimeline, KptToastContainer, KptToastService, KptToolbar, KptTooltip, KptTree, provideKptI18n, renderKptIconSvg };
|
|
14506
|
+
export { KPT_BREAKPOINTS, KPT_FORM_FIELD_CONTROL, KPT_I18N_CONFIG, KPT_MESSAGES_EN, KPT_MESSAGES_PL, 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, renderKptIconSvg };
|
|
13472
14507
|
//# sourceMappingURL=konce-pt-angular.mjs.map
|