@keycloakify/angular 21.0.1 → 21.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/keycloakify-angular-account-directives-kc-class.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-account.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-applications.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-federatedIdentity.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-log.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-password.mjs +10 -10
- package/fesm2022/keycloakify-angular-account-pages-password.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-account-pages-sessions.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-totp.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-services-account-resource-injector.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-services-i18n.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-template.mjs +6 -6
- package/fesm2022/keycloakify-angular-account-template.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-lib-directives-attributes.mjs +4 -4
- package/fesm2022/keycloakify-angular-lib-directives-attributes.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-lib-pipes-input-type.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-is-array-with-empty-object.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-kc-sanitize.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-to-array.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-to-number.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-services-resource-injector.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-add-remove-buttons-multi-valued-attribute.mjs +8 -8
- package/fesm2022/keycloakify-angular-login-components-add-remove-buttons-multi-valued-attribute.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-components-field-errors.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-components-field-errors.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-components-group-label.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-components-group-label.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-components-input-field-by-type.mjs +7 -7
- package/fesm2022/keycloakify-angular-login-components-input-field-by-type.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-components-input-tag-selects.mjs +8 -8
- package/fesm2022/keycloakify-angular-login-components-input-tag-selects.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-components-input-tag.mjs +9 -9
- package/fesm2022/keycloakify-angular-login-components-input-tag.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-components-logout-other-sessions.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-password-wrapper.mjs +5 -5
- package/fesm2022/keycloakify-angular-login-components-password-wrapper.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-components-select-tag.mjs +8 -8
- package/fesm2022/keycloakify-angular-login-components-select-tag.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-components-textarea-tag.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-components-textarea-tag.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-components-user-profile-form-fields.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-directives-kc-class.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-code.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-code.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-delete-account-confirm.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-delete-account-confirm.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-delete-credential.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-delete-credential.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-error.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-error.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-frontchannel-logout.mjs +7 -7
- package/fesm2022/keycloakify-angular-login-pages-frontchannel-logout.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-idp-review-user-profile.mjs +7 -7
- package/fesm2022/keycloakify-angular-login-pages-idp-review-user-profile.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-info.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-info.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-config-totp.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-login-config-totp.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm-override.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm-override.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-email.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-email.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-oauth-grant.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-login-oauth-grant.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-oauth2-device-verify-user-code.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-login-oauth2-device-verify-user-code.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-otp.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-login-otp.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-page-expired.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-login-page-expired.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-passkeys-conditional-authenticate.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-login-passkeys-conditional-authenticate.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-password.mjs +7 -7
- package/fesm2022/keycloakify-angular-login-pages-login-password.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-config.mjs +7 -7
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-config.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-input.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-input.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-reset-otp.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-login-reset-otp.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-reset-password.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-login-reset-password.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-update-password.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-login-update-password.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-update-profile.mjs +7 -7
- package/fesm2022/keycloakify-angular-login-pages-login-update-profile.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-username.mjs +7 -7
- package/fesm2022/keycloakify-angular-login-pages-login-username.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-verify-email.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-login-verify-email.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login-x509-info.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-login-x509-info.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-login.mjs +7 -7
- package/fesm2022/keycloakify-angular-login-pages-login.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-logout-confirm.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-logout-confirm.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-register.mjs +8 -8
- package/fesm2022/keycloakify-angular-login-pages-register.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-saml-post-form.mjs +7 -7
- package/fesm2022/keycloakify-angular-login-pages-saml-post-form.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-select-authenticator.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-select-authenticator.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-terms.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-terms.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-update-email.mjs +7 -7
- package/fesm2022/keycloakify-angular-login-pages-update-email.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-webauthn-authenticate.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-webauthn-authenticate.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-webauthn-error.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-webauthn-error.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-pages-webauthn-register.mjs +6 -6
- package/fesm2022/keycloakify-angular-login-pages-webauthn-register.mjs.map +1 -1
- package/fesm2022/keycloakify-angular-login-services-i18n.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-services-login-resource-injector.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-services-user-profile-form.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-template.mjs +10 -10
- package/fesm2022/keycloakify-angular-login-template.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -20,10 +20,10 @@ class KcSanitizePipe {
|
|
|
20
20
|
throw new Error(`Invalid safe type specified: ${type}`);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
24
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KcSanitizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
24
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: KcSanitizePipe, isStandalone: true, name: "kcSanitize" }); }
|
|
25
25
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KcSanitizePipe, decorators: [{
|
|
27
27
|
type: Pipe,
|
|
28
28
|
args: [{ name: 'kcSanitize' }]
|
|
29
29
|
}] });
|
|
@@ -9,10 +9,10 @@ class ToArrayPipe {
|
|
|
9
9
|
}
|
|
10
10
|
return emptyWhenString ? [] : [value];
|
|
11
11
|
}
|
|
12
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
13
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.
|
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ToArrayPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
13
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: ToArrayPipe, isStandalone: true, name: "toArray" }); }
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ToArrayPipe, decorators: [{
|
|
16
16
|
type: Pipe,
|
|
17
17
|
args: [{
|
|
18
18
|
name: 'toArray'
|
|
@@ -8,10 +8,10 @@ class ToNumberPipe {
|
|
|
8
8
|
throw new Error('number is NaN');
|
|
9
9
|
return number;
|
|
10
10
|
}
|
|
11
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
12
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.
|
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ToNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
12
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: ToNumberPipe, isStandalone: true, name: "toNumber" }); }
|
|
13
13
|
}
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ToNumberPipe, decorators: [{
|
|
15
15
|
type: Pipe,
|
|
16
16
|
args: [{
|
|
17
17
|
name: 'toNumber'
|
|
@@ -45,10 +45,10 @@ class ResourceInjectorService {
|
|
|
45
45
|
script.id = id;
|
|
46
46
|
this.renderer.appendChild(document.head, script);
|
|
47
47
|
}
|
|
48
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
49
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
48
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ResourceInjectorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
49
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ResourceInjectorService, providedIn: 'root' }); }
|
|
50
50
|
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ResourceInjectorService, decorators: [{
|
|
52
52
|
type: Injectable,
|
|
53
53
|
args: [{
|
|
54
54
|
providedIn: 'root'
|
package/fesm2022/keycloakify-angular-login-components-add-remove-buttons-multi-valued-attribute.mjs
CHANGED
|
@@ -6,9 +6,9 @@ import { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';
|
|
|
6
6
|
class AddRemoveButtonsMultiValuedAttributeComponent {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.i18n = inject(LOGIN_I18N);
|
|
9
|
-
this.attribute = input(...(ngDevMode ? [undefined, { debugName: "attribute" }] : []));
|
|
10
|
-
this.values = input(...(ngDevMode ? [undefined, { debugName: "values" }] : []));
|
|
11
|
-
this.fieldIndex = input(...(ngDevMode ? [undefined, { debugName: "fieldIndex" }] : []));
|
|
9
|
+
this.attribute = input(...(ngDevMode ? [undefined, { debugName: "attribute" }] : /* istanbul ignore next */ []));
|
|
10
|
+
this.values = input(...(ngDevMode ? [undefined, { debugName: "values" }] : /* istanbul ignore next */ []));
|
|
11
|
+
this.fieldIndex = input(...(ngDevMode ? [undefined, { debugName: "fieldIndex" }] : /* istanbul ignore next */ []));
|
|
12
12
|
this.dispatchFormAction = output();
|
|
13
13
|
this.hasRemove = computed(() => {
|
|
14
14
|
const attribute = this.attribute();
|
|
@@ -22,7 +22,7 @@ class AddRemoveButtonsMultiValuedAttributeComponent {
|
|
|
22
22
|
}).hasRemove;
|
|
23
23
|
}
|
|
24
24
|
return false;
|
|
25
|
-
}, ...(ngDevMode ? [{ debugName: "hasRemove" }] : []));
|
|
25
|
+
}, ...(ngDevMode ? [{ debugName: "hasRemove" }] : /* istanbul ignore next */ []));
|
|
26
26
|
this.hasAdd = computed(() => {
|
|
27
27
|
const attribute = this.attribute();
|
|
28
28
|
const values = this.values();
|
|
@@ -35,7 +35,7 @@ class AddRemoveButtonsMultiValuedAttributeComponent {
|
|
|
35
35
|
}).hasAdd;
|
|
36
36
|
}
|
|
37
37
|
return false;
|
|
38
|
-
}, ...(ngDevMode ? [{ debugName: "hasAdd" }] : []));
|
|
38
|
+
}, ...(ngDevMode ? [{ debugName: "hasAdd" }] : /* istanbul ignore next */ []));
|
|
39
39
|
}
|
|
40
40
|
onAdd() {
|
|
41
41
|
this.dispatchFormAction.emit({
|
|
@@ -51,10 +51,10 @@ class AddRemoveButtonsMultiValuedAttributeComponent {
|
|
|
51
51
|
valueOrValues: (this.values() ?? []).filter((_, i) => i !== this.fieldIndex())
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
55
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
54
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: AddRemoveButtonsMultiValuedAttributeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
55
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: AddRemoveButtonsMultiValuedAttributeComponent, isStandalone: true, selector: "kc-add-remove-buttons-multi-valued-attribute", inputs: { attribute: { classPropertyName: "attribute", publicName: "attribute", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null }, fieldIndex: { classPropertyName: "fieldIndex", publicName: "fieldIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dispatchFormAction: "dispatchFormAction" }, ngImport: i0, template: "@let idPostfix = attribute()?.name ?? '' + '-' + (fieldIndex() ?? 0 + 1);\n@if (hasRemove()) {\n <button\n type=\"button\"\n class=\"pf-c-button pf-m-inline pf-m-link\"\n [id]=\"'kc-remove-' + idPostfix\"\n (click)=\"onRemove()\"\n >\n {{ i18n.msgStr('remove') }}\n </button>\n @if (hasAdd()) {\n | \n }\n}\n@if (hasAdd()) {\n <button\n type=\"button\"\n class=\"pf-c-button pf-m-inline pf-m-link\"\n [id]=\"'kc-add-' + idPostfix\"\n (click)=\"onAdd()\"\n >\n {{ i18n.msgStr('addValue') }}\n </button>\n}\n", styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
56
56
|
}
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: AddRemoveButtonsMultiValuedAttributeComponent, decorators: [{
|
|
58
58
|
type: Component,
|
|
59
59
|
args: [{ selector: 'kc-add-remove-buttons-multi-valued-attribute', changeDetection: ChangeDetectionStrategy.OnPush, template: "@let idPostfix = attribute()?.name ?? '' + '-' + (fieldIndex() ?? 0 + 1);\n@if (hasRemove()) {\n <button\n type=\"button\"\n class=\"pf-c-button pf-m-inline pf-m-link\"\n [id]=\"'kc-remove-' + idPostfix\"\n (click)=\"onRemove()\"\n >\n {{ i18n.msgStr('remove') }}\n </button>\n @if (hasAdd()) {\n | \n }\n}\n@if (hasAdd()) {\n <button\n type=\"button\"\n class=\"pf-c-button pf-m-inline pf-m-link\"\n [id]=\"'kc-add-' + idPostfix\"\n (click)=\"onAdd()\"\n >\n {{ i18n.msgStr('addValue') }}\n </button>\n}\n", styles: [":host{display:contents}\n"] }]
|
|
60
60
|
}], propDecorators: { attribute: [{ type: i0.Input, args: [{ isSignal: true, alias: "attribute", required: false }] }], values: [{ type: i0.Input, args: [{ isSignal: true, alias: "values", required: false }] }], fieldIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldIndex", required: false }] }], dispatchFormAction: [{ type: i0.Output, args: ["dispatchFormAction"] }] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keycloakify-angular-login-components-add-remove-buttons-multi-valued-attribute.mjs","sources":["../../src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.ts","../../src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.html","../../src/login/components/add-remove-buttons-multi-valued-attribute/keycloakify-angular-login-components-add-remove-buttons-multi-valued-attribute.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input, output } from '@angular/core';\nimport { getButtonToDisplayForMultivaluedAttributeField, type FormAction } from '@keycloakify/angular/login/services/user-profile-form';\nimport { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';\nimport type { Attribute } from 'keycloakify/login/KcContext';\nimport type { I18n } from '@keycloakify/angular/login/i18n';\n\n@Component({\n styles: [\n `\n :host {\n display: contents;\n }\n `\n ],\n selector: 'kc-add-remove-buttons-multi-valued-attribute',\n templateUrl: 'add-remove-buttons-multi-valued-attribute.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AddRemoveButtonsMultiValuedAttributeComponent {\n i18n = inject<I18n>(LOGIN_I18N);\n attribute = input<Attribute>();\n values = input<string[]>();\n fieldIndex = input<number>();\n dispatchFormAction = output<FormAction>();\n\n hasRemove = computed(() => {\n const attribute = this.attribute();\n const values = this.values();\n const fieldIndex = this.fieldIndex();\n if (attribute && values && fieldIndex) {\n return getButtonToDisplayForMultivaluedAttributeField({\n attribute,\n values,\n fieldIndex\n }).hasRemove;\n }\n return false;\n });\n hasAdd = computed(() => {\n const attribute = this.attribute();\n const values = this.values();\n const fieldIndex = this.fieldIndex();\n if (attribute && values && fieldIndex) {\n return getButtonToDisplayForMultivaluedAttributeField({\n attribute,\n values,\n fieldIndex\n }).hasAdd;\n }\n return false;\n });\n\n onAdd() {\n this.dispatchFormAction.emit({\n action: 'update',\n name: this.attribute()?.name ?? '',\n valueOrValues: [...(this.values() ?? []), '']\n });\n }\n\n onRemove() {\n this.dispatchFormAction.emit({\n action: 'update',\n name: this.attribute()?.name ?? '',\n valueOrValues: (this.values() ?? []).filter((_, i) => i !== this.fieldIndex())\n });\n }\n}\n","@let idPostfix = attribute()?.name ?? '' + '-' + (fieldIndex() ?? 0 + 1);\n@if (hasRemove()) {\n <button\n type=\"button\"\n class=\"pf-c-button pf-m-inline pf-m-link\"\n [id]=\"'kc-remove-' + idPostfix\"\n (click)=\"onRemove()\"\n >\n {{ i18n.msgStr('remove') }}\n </button>\n @if (hasAdd()) {\n | \n }\n}\n@if (hasAdd()) {\n <button\n type=\"button\"\n class=\"pf-c-button pf-m-inline pf-m-link\"\n [id]=\"'kc-add-' + idPostfix\"\n (click)=\"onAdd()\"\n >\n {{ i18n.msgStr('addValue') }}\n </button>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAkBa,6CAA6C,CAAA;AAZ1D,IAAA,WAAA,GAAA;AAaI,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAO,UAAU,CAAC;QAC/B,IAAA,CAAA,SAAS,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"keycloakify-angular-login-components-add-remove-buttons-multi-valued-attribute.mjs","sources":["../../src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.ts","../../src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.html","../../src/login/components/add-remove-buttons-multi-valued-attribute/keycloakify-angular-login-components-add-remove-buttons-multi-valued-attribute.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input, output } from '@angular/core';\nimport { getButtonToDisplayForMultivaluedAttributeField, type FormAction } from '@keycloakify/angular/login/services/user-profile-form';\nimport { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';\nimport type { Attribute } from 'keycloakify/login/KcContext';\nimport type { I18n } from '@keycloakify/angular/login/i18n';\n\n@Component({\n styles: [\n `\n :host {\n display: contents;\n }\n `\n ],\n selector: 'kc-add-remove-buttons-multi-valued-attribute',\n templateUrl: 'add-remove-buttons-multi-valued-attribute.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AddRemoveButtonsMultiValuedAttributeComponent {\n i18n = inject<I18n>(LOGIN_I18N);\n attribute = input<Attribute>();\n values = input<string[]>();\n fieldIndex = input<number>();\n dispatchFormAction = output<FormAction>();\n\n hasRemove = computed(() => {\n const attribute = this.attribute();\n const values = this.values();\n const fieldIndex = this.fieldIndex();\n if (attribute && values && fieldIndex) {\n return getButtonToDisplayForMultivaluedAttributeField({\n attribute,\n values,\n fieldIndex\n }).hasRemove;\n }\n return false;\n });\n hasAdd = computed(() => {\n const attribute = this.attribute();\n const values = this.values();\n const fieldIndex = this.fieldIndex();\n if (attribute && values && fieldIndex) {\n return getButtonToDisplayForMultivaluedAttributeField({\n attribute,\n values,\n fieldIndex\n }).hasAdd;\n }\n return false;\n });\n\n onAdd() {\n this.dispatchFormAction.emit({\n action: 'update',\n name: this.attribute()?.name ?? '',\n valueOrValues: [...(this.values() ?? []), '']\n });\n }\n\n onRemove() {\n this.dispatchFormAction.emit({\n action: 'update',\n name: this.attribute()?.name ?? '',\n valueOrValues: (this.values() ?? []).filter((_, i) => i !== this.fieldIndex())\n });\n }\n}\n","@let idPostfix = attribute()?.name ?? '' + '-' + (fieldIndex() ?? 0 + 1);\n@if (hasRemove()) {\n <button\n type=\"button\"\n class=\"pf-c-button pf-m-inline pf-m-link\"\n [id]=\"'kc-remove-' + idPostfix\"\n (click)=\"onRemove()\"\n >\n {{ i18n.msgStr('remove') }}\n </button>\n @if (hasAdd()) {\n | \n }\n}\n@if (hasAdd()) {\n <button\n type=\"button\"\n class=\"pf-c-button pf-m-inline pf-m-link\"\n [id]=\"'kc-add-' + idPostfix\"\n (click)=\"onAdd()\"\n >\n {{ i18n.msgStr('addValue') }}\n </button>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAkBa,6CAA6C,CAAA;AAZ1D,IAAA,WAAA,GAAA;AAaI,QAAA,IAA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AA,EAAA,4mBAAA,EAAA,MAAA,EAAA,CAAA,2BAAA,CAAA,EAAA;;;AEhBnD;;AAEG;;;;"}
|
|
@@ -8,21 +8,21 @@ import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';
|
|
|
8
8
|
class FieldErrorsComponent extends ComponentReference {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
|
-
this.attribute = input(...(ngDevMode ? [undefined, { debugName: "attribute" }] : []));
|
|
12
|
-
this.displayableErrors = input(...(ngDevMode ? [undefined, { debugName: "displayableErrors" }] : []));
|
|
13
|
-
this.fieldIndex = input(...(ngDevMode ? [undefined, { debugName: "fieldIndex" }] : []));
|
|
11
|
+
this.attribute = input(...(ngDevMode ? [undefined, { debugName: "attribute" }] : /* istanbul ignore next */ []));
|
|
12
|
+
this.displayableErrors = input(...(ngDevMode ? [undefined, { debugName: "displayableErrors" }] : /* istanbul ignore next */ []));
|
|
13
|
+
this.fieldIndex = input(...(ngDevMode ? [undefined, { debugName: "fieldIndex" }] : /* istanbul ignore next */ []));
|
|
14
14
|
this.doUseDefaultCss = inject(USE_DEFAULT_CSS);
|
|
15
15
|
this.classes = inject(LOGIN_CLASSES);
|
|
16
16
|
}
|
|
17
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
18
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: FieldErrorsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: FieldErrorsComponent, isStandalone: true, selector: "kc-field-errors", inputs: { attribute: { classPropertyName: "attribute", publicName: "attribute", isSignal: true, isRequired: false, transformFunction: null }, displayableErrors: { classPropertyName: "displayableErrors", publicName: "displayableErrors", isSignal: true, isRequired: false, transformFunction: null }, fieldIndex: { classPropertyName: "fieldIndex", publicName: "fieldIndex", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
19
19
|
{
|
|
20
20
|
provide: ComponentReference,
|
|
21
21
|
useExisting: forwardRef(() => FieldErrorsComponent)
|
|
22
22
|
}
|
|
23
23
|
], usesInheritance: true, ngImport: i0, template: "@let index = fieldIndex();\n<span\n aria-live=\"polite\"\n [id]=\"'input-error-' + attribute.name + (index === undefined ? '' : '-' + index)\"\n [kcClass]=\"'kcInputErrorMessageClass'\"\n>\n @for (error of displayableErrors(); track error; let i = $index) {\n @if (error.fieldIndex === index) {\n <span [innerHTML]=\"error.errorMessage\"></span>\n @if (displayableErrors()?.length ?? 0 - 1 !== i) {\n <br />\n }\n }\n }\n</span>\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: KcClassDirective, selector: "[kcClass]", inputs: ["class", "ngClass", "kcClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: FieldErrorsComponent, decorators: [{
|
|
26
26
|
type: Component,
|
|
27
27
|
args: [{ imports: [KcClassDirective], selector: 'kc-field-errors', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
28
28
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keycloakify-angular-login-components-field-errors.mjs","sources":["../../src/login/components/field-errors/field-errors.component.ts","../../src/login/components/field-errors/field-errors.component.html","../../src/login/components/field-errors/keycloakify-angular-login-components-field-errors.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, forwardRef, inject, input } from '@angular/core';\nimport { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';\nimport { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';\nimport { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';\nimport type { FormFieldError } from '@keycloakify/angular/login/services/user-profile-form';\nimport { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';\nimport type { Attribute } from 'keycloakify/login/KcContext';\nimport type { ClassKey } from 'keycloakify/login/lib/kcClsx';\n\n@Component({\n styles: [\n `\n :host {\n display: contents;\n }\n `\n ],\n imports: [KcClassDirective],\n selector: 'kc-field-errors',\n templateUrl: 'field-errors.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: ComponentReference,\n useExisting: forwardRef(() => FieldErrorsComponent)\n }\n ]\n})\nexport class FieldErrorsComponent extends ComponentReference {\n attribute = input<Attribute>();\n displayableErrors = input<FormFieldError[]>();\n fieldIndex = input<number>();\n override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);\n override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);\n}\n","@let index = fieldIndex();\n<span\n aria-live=\"polite\"\n [id]=\"'input-error-' + attribute.name + (index === undefined ? '' : '-' + index)\"\n [kcClass]=\"'kcInputErrorMessageClass'\"\n>\n @for (error of displayableErrors(); track error; let i = $index) {\n @if (error.fieldIndex === index) {\n <span [innerHTML]=\"error.errorMessage\"></span>\n @if (displayableErrors()?.length ?? 0 - 1 !== i) {\n <br />\n }\n }\n }\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AA4BM,MAAO,oBAAqB,SAAQ,kBAAkB,CAAA;AAnB5D,IAAA,WAAA,GAAA;;QAoBI,IAAA,CAAA,SAAS,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"keycloakify-angular-login-components-field-errors.mjs","sources":["../../src/login/components/field-errors/field-errors.component.ts","../../src/login/components/field-errors/field-errors.component.html","../../src/login/components/field-errors/keycloakify-angular-login-components-field-errors.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, forwardRef, inject, input } from '@angular/core';\nimport { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';\nimport { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';\nimport { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';\nimport type { FormFieldError } from '@keycloakify/angular/login/services/user-profile-form';\nimport { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';\nimport type { Attribute } from 'keycloakify/login/KcContext';\nimport type { ClassKey } from 'keycloakify/login/lib/kcClsx';\n\n@Component({\n styles: [\n `\n :host {\n display: contents;\n }\n `\n ],\n imports: [KcClassDirective],\n selector: 'kc-field-errors',\n templateUrl: 'field-errors.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: ComponentReference,\n useExisting: forwardRef(() => FieldErrorsComponent)\n }\n ]\n})\nexport class FieldErrorsComponent extends ComponentReference {\n attribute = input<Attribute>();\n displayableErrors = input<FormFieldError[]>();\n fieldIndex = input<number>();\n override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);\n override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);\n}\n","@let index = fieldIndex();\n<span\n aria-live=\"polite\"\n [id]=\"'input-error-' + attribute.name + (index === undefined ? '' : '-' + index)\"\n [kcClass]=\"'kcInputErrorMessageClass'\"\n>\n @for (error of displayableErrors(); track error; let i = $index) {\n @if (error.fieldIndex === index) {\n <span [innerHTML]=\"error.errorMessage\"></span>\n @if (displayableErrors()?.length ?? 0 - 1 !== i) {\n <br />\n }\n }\n }\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AA4BM,MAAO,oBAAqB,SAAQ,kBAAkB,CAAA;AAnB5D,IAAA,WAAA,GAAA;;QAoBI,IAAA,CAAA,SAAS,GAAG,KAAK,CAAA,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,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EAPlB;AACP,YAAA;AACI,gBAAA,OAAO,EAAE,kBAAkB;AAC3B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,oBAAoB;AACrD;SACJ,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC1BL,6fAeA,mFDEc,gBAAgB,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAWjB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAnBhC,SAAS;8BAQG,CAAC,gBAAgB,CAAC,EAAA,QAAA,EACjB,iBAAiB,mBAEV,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,kBAAkB;AAC3B,4BAAA,WAAW,EAAE,UAAU,CAAC,0BAA0B;AACrD;AACJ,qBAAA,EAAA,QAAA,EAAA,6fAAA,EAAA,MAAA,EAAA,CAAA,2BAAA,CAAA,EAAA;;;AE1BL;;AAEG;;;;"}
|
|
@@ -11,8 +11,8 @@ class GroupLabelComponent extends ComponentReference {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
13
13
|
this.i18n = inject(LOGIN_I18N);
|
|
14
|
-
this.attribute = input(...(ngDevMode ? [undefined, { debugName: "attribute" }] : []));
|
|
15
|
-
this.groupName = input(...(ngDevMode ? [undefined, { debugName: "groupName" }] : []));
|
|
14
|
+
this.attribute = input(...(ngDevMode ? [undefined, { debugName: "attribute" }] : /* istanbul ignore next */ []));
|
|
15
|
+
this.groupName = input(...(ngDevMode ? [undefined, { debugName: "groupName" }] : /* istanbul ignore next */ []));
|
|
16
16
|
this.doUseDefaultCss = inject(USE_DEFAULT_CSS);
|
|
17
17
|
this.classes = inject(LOGIN_CLASSES);
|
|
18
18
|
this.groupNameRef = computed(() => {
|
|
@@ -22,17 +22,17 @@ class GroupLabelComponent extends ComponentReference {
|
|
|
22
22
|
return attribute?.group?.name ?? '';
|
|
23
23
|
}
|
|
24
24
|
return '';
|
|
25
|
-
}, ...(ngDevMode ? [{ debugName: "groupNameRef" }] : []));
|
|
25
|
+
}, ...(ngDevMode ? [{ debugName: "groupNameRef" }] : /* istanbul ignore next */ []));
|
|
26
26
|
}
|
|
27
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
28
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
27
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: GroupLabelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
28
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: GroupLabelComponent, isStandalone: true, selector: "kc-group-label", inputs: { attribute: { classPropertyName: "attribute", publicName: "attribute", isSignal: true, isRequired: false, transformFunction: null }, groupName: { classPropertyName: "groupName", publicName: "groupName", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
29
29
|
{
|
|
30
30
|
provide: ComponentReference,
|
|
31
31
|
useExisting: forwardRef(() => GroupLabelComponent)
|
|
32
32
|
}
|
|
33
33
|
], usesInheritance: true, ngImport: i0, template: "@let attr = attribute();\n@let groupName = groupNameRef();\n@if (attr && groupName !== '') {\n <div\n [kcClass]=\"'kcFormGroupClass'\"\n [kcAttributes]=\"attr.group?.html5DataAnnotations\"\n >\n @let groupDisplayHeader = attr.group?.displayHeader ?? '';\n @let groupHeaderText = groupDisplayHeader !== '' ? groupDisplayHeader : (attr.group?.name ?? '');\n <div [kcClass]=\"'kcContentWrapperClass'\">\n <label\n [id]=\"'header-' + attr.group?.name\"\n [kcClass]=\"'kcFormGroupHeader'\"\n >\n {{ i18n.advancedMsgStr(groupHeaderText) }}\n </label>\n </div>\n @let groupDisplayDescription = attr.group?.displayDescription ?? '';\n @if (groupDisplayDescription !== '') {\n <div [kcClass]=\"'kcLabelWrapperClass'\">\n <label\n [id]=\"'description-' + attr.group?.name\"\n [kcClass]=\"'kcLabelClass'\"\n >\n {{ i18n.advancedMsgStr(groupDisplayDescription) }}\n </label>\n </div>\n }\n </div>\n}\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: KcClassDirective, selector: "[kcClass]", inputs: ["class", "ngClass", "kcClass"] }, { kind: "directive", type: AttributesDirective, selector: "[kcAttributes]", inputs: ["kcAttributes"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
34
34
|
}
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: GroupLabelComponent, decorators: [{
|
|
36
36
|
type: Component,
|
|
37
37
|
args: [{ imports: [KcClassDirective, AttributesDirective], selector: 'kc-group-label', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
38
38
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keycloakify-angular-login-components-group-label.mjs","sources":["../../src/login/components/group-label/group-label.component.ts","../../src/login/components/group-label/group-label.component.html","../../src/login/components/group-label/keycloakify-angular-login-components-group-label.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, forwardRef, inject, input } from '@angular/core';\nimport { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';\nimport { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';\nimport { AttributesDirective } from '@keycloakify/angular/lib/directives/attributes';\nimport { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';\nimport { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';\nimport { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';\nimport type { Attribute } from 'keycloakify/login/KcContext';\nimport type { ClassKey } from 'keycloakify/login/lib/kcClsx';\nimport type { I18n } from '@keycloakify/angular/login/i18n';\n\n@Component({\n styles: [\n `\n :host {\n display: contents;\n }\n `\n ],\n imports: [KcClassDirective, AttributesDirective],\n selector: 'kc-group-label',\n templateUrl: 'group-label.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: ComponentReference,\n useExisting: forwardRef(() => GroupLabelComponent)\n }\n ]\n})\nexport class GroupLabelComponent extends ComponentReference {\n i18n = inject<I18n>(LOGIN_I18N);\n attribute = input<Attribute>();\n groupName = input<string>();\n override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);\n override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);\n groupNameRef = computed(() => {\n const attribute = this.attribute();\n const groupName = this.groupName();\n if (attribute?.group?.name !== groupName) {\n return attribute?.group?.name ?? '';\n }\n return '';\n });\n}\n","@let attr = attribute();\n@let groupName = groupNameRef();\n@if (attr && groupName !== '') {\n <div\n [kcClass]=\"'kcFormGroupClass'\"\n [kcAttributes]=\"attr.group?.html5DataAnnotations\"\n >\n @let groupDisplayHeader = attr.group?.displayHeader ?? '';\n @let groupHeaderText = groupDisplayHeader !== '' ? groupDisplayHeader : (attr.group?.name ?? '');\n <div [kcClass]=\"'kcContentWrapperClass'\">\n <label\n [id]=\"'header-' + attr.group?.name\"\n [kcClass]=\"'kcFormGroupHeader'\"\n >\n {{ i18n.advancedMsgStr(groupHeaderText) }}\n </label>\n </div>\n @let groupDisplayDescription = attr.group?.displayDescription ?? '';\n @if (groupDisplayDescription !== '') {\n <div [kcClass]=\"'kcLabelWrapperClass'\">\n <label\n [id]=\"'description-' + attr.group?.name\"\n [kcClass]=\"'kcLabelClass'\"\n >\n {{ i18n.advancedMsgStr(groupDisplayDescription) }}\n </label>\n </div>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA8BM,MAAO,mBAAoB,SAAQ,kBAAkB,CAAA;AAnB3D,IAAA,WAAA,GAAA;;AAoBI,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAO,UAAU,CAAC;QAC/B,IAAA,CAAA,SAAS,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"keycloakify-angular-login-components-group-label.mjs","sources":["../../src/login/components/group-label/group-label.component.ts","../../src/login/components/group-label/group-label.component.html","../../src/login/components/group-label/keycloakify-angular-login-components-group-label.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, forwardRef, inject, input } from '@angular/core';\nimport { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';\nimport { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';\nimport { AttributesDirective } from '@keycloakify/angular/lib/directives/attributes';\nimport { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';\nimport { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';\nimport { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';\nimport type { Attribute } from 'keycloakify/login/KcContext';\nimport type { ClassKey } from 'keycloakify/login/lib/kcClsx';\nimport type { I18n } from '@keycloakify/angular/login/i18n';\n\n@Component({\n styles: [\n `\n :host {\n display: contents;\n }\n `\n ],\n imports: [KcClassDirective, AttributesDirective],\n selector: 'kc-group-label',\n templateUrl: 'group-label.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: ComponentReference,\n useExisting: forwardRef(() => GroupLabelComponent)\n }\n ]\n})\nexport class GroupLabelComponent extends ComponentReference {\n i18n = inject<I18n>(LOGIN_I18N);\n attribute = input<Attribute>();\n groupName = input<string>();\n override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);\n override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);\n groupNameRef = computed(() => {\n const attribute = this.attribute();\n const groupName = this.groupName();\n if (attribute?.group?.name !== groupName) {\n return attribute?.group?.name ?? '';\n }\n return '';\n });\n}\n","@let attr = attribute();\n@let groupName = groupNameRef();\n@if (attr && groupName !== '') {\n <div\n [kcClass]=\"'kcFormGroupClass'\"\n [kcAttributes]=\"attr.group?.html5DataAnnotations\"\n >\n @let groupDisplayHeader = attr.group?.displayHeader ?? '';\n @let groupHeaderText = groupDisplayHeader !== '' ? groupDisplayHeader : (attr.group?.name ?? '');\n <div [kcClass]=\"'kcContentWrapperClass'\">\n <label\n [id]=\"'header-' + attr.group?.name\"\n [kcClass]=\"'kcFormGroupHeader'\"\n >\n {{ i18n.advancedMsgStr(groupHeaderText) }}\n </label>\n </div>\n @let groupDisplayDescription = attr.group?.displayDescription ?? '';\n @if (groupDisplayDescription !== '') {\n <div [kcClass]=\"'kcLabelWrapperClass'\">\n <label\n [id]=\"'description-' + attr.group?.name\"\n [kcClass]=\"'kcLabelClass'\"\n >\n {{ i18n.advancedMsgStr(groupDisplayDescription) }}\n </label>\n </div>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA8BM,MAAO,mBAAoB,SAAQ,kBAAkB,CAAA;AAnB3D,IAAA,WAAA,GAAA;;AAoBI,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAO,UAAU,CAAC;QAC/B,IAAA,CAAA,SAAS,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAa;QAC9B,IAAA,CAAA,SAAS,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;AAClB,QAA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AA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC5BL,6oCA8BA,EAAA,MAAA,EAAA,CAAA,2BAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDXc,gBAAgB,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAWtC,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAnB/B,SAAS;8BAQG,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,EAAA,QAAA,EACtC,gBAAgB,EAAA,eAAA,EAET,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,kBAAkB;AAC3B,4BAAA,WAAW,EAAE,UAAU,CAAC,yBAAyB;AACpD;AACJ,qBAAA,EAAA,QAAA,EAAA,6oCAAA,EAAA,MAAA,EAAA,CAAA,2BAAA,CAAA,EAAA;;;AE5BL;;AAEG;;;;"}
|
|
@@ -14,9 +14,9 @@ import { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';
|
|
|
14
14
|
class InputFieldByTypeComponent extends ComponentReference {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
17
|
-
this.attribute = input(...(ngDevMode ? [undefined, { debugName: "attribute" }] : []));
|
|
18
|
-
this.valueOrValues = input(...(ngDevMode ? [undefined, { debugName: "valueOrValues" }] : []));
|
|
19
|
-
this.displayableErrors = input(...(ngDevMode ? [undefined, { debugName: "displayableErrors" }] : []));
|
|
17
|
+
this.attribute = input(...(ngDevMode ? [undefined, { debugName: "attribute" }] : /* istanbul ignore next */ []));
|
|
18
|
+
this.valueOrValues = input(...(ngDevMode ? [undefined, { debugName: "valueOrValues" }] : /* istanbul ignore next */ []));
|
|
19
|
+
this.displayableErrors = input(...(ngDevMode ? [undefined, { debugName: "displayableErrors" }] : /* istanbul ignore next */ []));
|
|
20
20
|
this.dispatchFormAction = output();
|
|
21
21
|
this.doUseDefaultCss = inject(USE_DEFAULT_CSS);
|
|
22
22
|
this.classes = inject(LOGIN_CLASSES);
|
|
@@ -26,17 +26,17 @@ class InputFieldByTypeComponent extends ComponentReference {
|
|
|
26
26
|
...attribute,
|
|
27
27
|
annotations: { ...(attribute.annotations ?? {}), inputType: 'password' }
|
|
28
28
|
};
|
|
29
|
-
}, ...(ngDevMode ? [{ debugName: "attributePassword" }] : []));
|
|
29
|
+
}, ...(ngDevMode ? [{ debugName: "attributePassword" }] : /* istanbul ignore next */ []));
|
|
30
30
|
}
|
|
31
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
32
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
31
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: InputFieldByTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
32
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: InputFieldByTypeComponent, isStandalone: true, selector: "kc-input-field-by-type", inputs: { attribute: { classPropertyName: "attribute", publicName: "attribute", isSignal: true, isRequired: false, transformFunction: null }, valueOrValues: { classPropertyName: "valueOrValues", publicName: "valueOrValues", isSignal: true, isRequired: false, transformFunction: null }, displayableErrors: { classPropertyName: "displayableErrors", publicName: "displayableErrors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dispatchFormAction: "dispatchFormAction" }, providers: [
|
|
33
33
|
{
|
|
34
34
|
provide: ComponentReference,
|
|
35
35
|
useExisting: forwardRef(() => InputFieldByTypeComponent)
|
|
36
36
|
}
|
|
37
37
|
], usesInheritance: true, ngImport: i0, template: "@let attr = attribute();\n@if (attr) {\n @let type = attr.annotations.inputType;\n @switch (type) {\n @case ('hidden') {\n <input\n type=\"hidden\"\n [name]=\"attr.name\"\n [value]=\"$any(valueOrValues())\"\n />\n }\n @case ('textarea') {\n <kc-textarea-tag\n [attribute]=\"attribute()\"\n [value]=\"$any(valueOrValues())\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n }\n @case (type === 'select' || type === 'multiselect' ? type : '') {\n <kc-select-tag\n [attribute]=\"attribute()\"\n [valueOrValues]=\"valueOrValues()\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n }\n @case (type === 'select-radiobuttons' || type === 'multiselect-checkboxes' ? type : '') {\n <kc-input-tag-selects\n [attribute]=\"attribute()\"\n [valueOrValues]=\"valueOrValues()\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n }\n @default {\n @let values = valueOrValues();\n <!-- if valueOrValues is string skip -->\n @if (values && (values | toArray: true).length) {\n @for (value of values; track value; let i = $index) {\n <kc-input-tag\n [attribute]=\"attribute()\"\n [valueOrValues]=\"valueOrValues()\"\n [fieldIndex]=\"i\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n }\n } @else {\n @if (attr.name === 'password' || attr.name === 'password-confirm') {\n <kc-password-wrapper [passwordInputId]=\"attr.name\">\n <kc-input-tag\n [attribute]=\"attributePassword()\"\n [valueOrValues]=\"valueOrValues()\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n </kc-password-wrapper>\n } @else {\n <kc-input-tag\n [attribute]=\"attribute()\"\n [valueOrValues]=\"valueOrValues()\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n }\n }\n }\n }\n}\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "component", type: TextareaTagComponent, selector: "kc-textarea-tag", inputs: ["attribute", "value", "displayableErrors"], outputs: ["dispatchFormAction"] }, { kind: "component", type: SelectTagComponent, selector: "kc-select-tag", inputs: ["attribute", "valueOrValues", "displayableErrors"], outputs: ["dispatchFormAction"] }, { kind: "component", type: InputTagSelectsComponent, selector: "kc-input-tag-selects", inputs: ["attribute", "valueOrValues", "displayableErrors"], outputs: ["dispatchFormAction"] }, { kind: "component", type: InputTagComponent, selector: "kc-input-tag", inputs: ["attribute", "valueOrValues", "fieldIndex", "values", "displayableErrors"], outputs: ["dispatchFormAction"] }, { kind: "component", type: PasswordWrapperComponent, selector: "kc-password-wrapper", inputs: ["passwordInputId"] }, { kind: "pipe", type: ToArrayPipe, name: "toArray" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
38
38
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: InputFieldByTypeComponent, decorators: [{
|
|
40
40
|
type: Component,
|
|
41
41
|
args: [{ imports: [ToArrayPipe, TextareaTagComponent, SelectTagComponent, InputTagSelectsComponent, InputTagComponent, PasswordWrapperComponent], selector: 'kc-input-field-by-type', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
42
42
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keycloakify-angular-login-components-input-field-by-type.mjs","sources":["../../src/login/components/input-field-by-type/input-field-by-type.component.ts","../../src/login/components/input-field-by-type/input-field-by-type.component.html","../../src/login/components/input-field-by-type/keycloakify-angular-login-components-input-field-by-type.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, forwardRef, inject, input, output } from '@angular/core';\nimport { ToArrayPipe } from '@keycloakify/angular/lib/pipes/to-array';\nimport { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';\nimport { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';\nimport { InputTagComponent } from '@keycloakify/angular/login/components/input-tag';\nimport { InputTagSelectsComponent } from '@keycloakify/angular/login/components/input-tag-selects';\nimport { PasswordWrapperComponent } from '@keycloakify/angular/login/components/password-wrapper';\nimport { SelectTagComponent } from '@keycloakify/angular/login/components/select-tag';\nimport { TextareaTagComponent } from '@keycloakify/angular/login/components/textarea-tag';\nimport { type FormAction, type FormFieldError } from '@keycloakify/angular/login/services/user-profile-form';\nimport { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';\nimport type { Attribute } from 'keycloakify/login/KcContext';\nimport type { ClassKey } from 'keycloakify/login/lib/kcClsx';\n\n@Component({\n styles: [\n `\n :host {\n display: contents;\n }\n `\n ],\n imports: [ToArrayPipe, TextareaTagComponent, SelectTagComponent, InputTagSelectsComponent, InputTagComponent, PasswordWrapperComponent],\n selector: 'kc-input-field-by-type',\n templateUrl: 'input-field-by-type.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: ComponentReference,\n useExisting: forwardRef(() => InputFieldByTypeComponent)\n }\n ]\n})\nexport class InputFieldByTypeComponent extends ComponentReference {\n attribute = input<Attribute>();\n valueOrValues = input<string | string[]>();\n displayableErrors = input<FormFieldError[]>();\n dispatchFormAction = output<FormAction>();\n override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);\n override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);\n\n attributePassword = computed<Attribute>(() => {\n const attribute: Attribute = this.attribute() ?? ({} as Attribute);\n return {\n ...attribute,\n annotations: { ...(attribute.annotations ?? {}), inputType: 'password' }\n };\n });\n}\n","@let attr = attribute();\n@if (attr) {\n @let type = attr.annotations.inputType;\n @switch (type) {\n @case ('hidden') {\n <input\n type=\"hidden\"\n [name]=\"attr.name\"\n [value]=\"$any(valueOrValues())\"\n />\n }\n @case ('textarea') {\n <kc-textarea-tag\n [attribute]=\"attribute()\"\n [value]=\"$any(valueOrValues())\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n }\n @case (type === 'select' || type === 'multiselect' ? type : '') {\n <kc-select-tag\n [attribute]=\"attribute()\"\n [valueOrValues]=\"valueOrValues()\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n }\n @case (type === 'select-radiobuttons' || type === 'multiselect-checkboxes' ? type : '') {\n <kc-input-tag-selects\n [attribute]=\"attribute()\"\n [valueOrValues]=\"valueOrValues()\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n }\n @default {\n @let values = valueOrValues();\n <!-- if valueOrValues is string skip -->\n @if (values && (values | toArray: true).length) {\n @for (value of values; track value; let i = $index) {\n <kc-input-tag\n [attribute]=\"attribute()\"\n [valueOrValues]=\"valueOrValues()\"\n [fieldIndex]=\"i\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n }\n } @else {\n @if (attr.name === 'password' || attr.name === 'password-confirm') {\n <kc-password-wrapper [passwordInputId]=\"attr.name\">\n <kc-input-tag\n [attribute]=\"attributePassword()\"\n [valueOrValues]=\"valueOrValues()\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n </kc-password-wrapper>\n } @else {\n <kc-input-tag\n [attribute]=\"attribute()\"\n [valueOrValues]=\"valueOrValues()\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n }\n }\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAiCM,MAAO,yBAA0B,SAAQ,kBAAkB,CAAA;AAnBjE,IAAA,WAAA,GAAA;;QAoBI,IAAA,CAAA,SAAS,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"keycloakify-angular-login-components-input-field-by-type.mjs","sources":["../../src/login/components/input-field-by-type/input-field-by-type.component.ts","../../src/login/components/input-field-by-type/input-field-by-type.component.html","../../src/login/components/input-field-by-type/keycloakify-angular-login-components-input-field-by-type.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, forwardRef, inject, input, output } from '@angular/core';\nimport { ToArrayPipe } from '@keycloakify/angular/lib/pipes/to-array';\nimport { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';\nimport { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';\nimport { InputTagComponent } from '@keycloakify/angular/login/components/input-tag';\nimport { InputTagSelectsComponent } from '@keycloakify/angular/login/components/input-tag-selects';\nimport { PasswordWrapperComponent } from '@keycloakify/angular/login/components/password-wrapper';\nimport { SelectTagComponent } from '@keycloakify/angular/login/components/select-tag';\nimport { TextareaTagComponent } from '@keycloakify/angular/login/components/textarea-tag';\nimport { type FormAction, type FormFieldError } from '@keycloakify/angular/login/services/user-profile-form';\nimport { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';\nimport type { Attribute } from 'keycloakify/login/KcContext';\nimport type { ClassKey } from 'keycloakify/login/lib/kcClsx';\n\n@Component({\n styles: [\n `\n :host {\n display: contents;\n }\n `\n ],\n imports: [ToArrayPipe, TextareaTagComponent, SelectTagComponent, InputTagSelectsComponent, InputTagComponent, PasswordWrapperComponent],\n selector: 'kc-input-field-by-type',\n templateUrl: 'input-field-by-type.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: ComponentReference,\n useExisting: forwardRef(() => InputFieldByTypeComponent)\n }\n ]\n})\nexport class InputFieldByTypeComponent extends ComponentReference {\n attribute = input<Attribute>();\n valueOrValues = input<string | string[]>();\n displayableErrors = input<FormFieldError[]>();\n dispatchFormAction = output<FormAction>();\n override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);\n override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);\n\n attributePassword = computed<Attribute>(() => {\n const attribute: Attribute = this.attribute() ?? ({} as Attribute);\n return {\n ...attribute,\n annotations: { ...(attribute.annotations ?? {}), inputType: 'password' }\n };\n });\n}\n","@let attr = attribute();\n@if (attr) {\n @let type = attr.annotations.inputType;\n @switch (type) {\n @case ('hidden') {\n <input\n type=\"hidden\"\n [name]=\"attr.name\"\n [value]=\"$any(valueOrValues())\"\n />\n }\n @case ('textarea') {\n <kc-textarea-tag\n [attribute]=\"attribute()\"\n [value]=\"$any(valueOrValues())\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n }\n @case (type === 'select' || type === 'multiselect' ? type : '') {\n <kc-select-tag\n [attribute]=\"attribute()\"\n [valueOrValues]=\"valueOrValues()\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n }\n @case (type === 'select-radiobuttons' || type === 'multiselect-checkboxes' ? type : '') {\n <kc-input-tag-selects\n [attribute]=\"attribute()\"\n [valueOrValues]=\"valueOrValues()\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n }\n @default {\n @let values = valueOrValues();\n <!-- if valueOrValues is string skip -->\n @if (values && (values | toArray: true).length) {\n @for (value of values; track value; let i = $index) {\n <kc-input-tag\n [attribute]=\"attribute()\"\n [valueOrValues]=\"valueOrValues()\"\n [fieldIndex]=\"i\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n }\n } @else {\n @if (attr.name === 'password' || attr.name === 'password-confirm') {\n <kc-password-wrapper [passwordInputId]=\"attr.name\">\n <kc-input-tag\n [attribute]=\"attributePassword()\"\n [valueOrValues]=\"valueOrValues()\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n </kc-password-wrapper>\n } @else {\n <kc-input-tag\n [attribute]=\"attribute()\"\n [valueOrValues]=\"valueOrValues()\"\n [displayableErrors]=\"displayableErrors()\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n }\n }\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAiCM,MAAO,yBAA0B,SAAQ,kBAAkB,CAAA;AAnBjE,IAAA,WAAA,GAAA;;QAoBI,IAAA,CAAA,SAAS,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAa;QAC9B,IAAA,CAAA,aAAa,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,eAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAqB;QAC1C,IAAA,CAAA,iBAAiB,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,mBAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAoB;QAC7C,IAAA,CAAA,kBAAkB,GAAG,MAAM,EAAc;AAChC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAU,eAAe,CAAC;AAClD,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAoC,aAAa,CAAC;AAE3E,QAAA,IAAA,CAAA,iBAAiB,GAAG,QAAQ,CAAY,MAAK;YACzC,MAAM,SAAS,GAAc,IAAI,CAAC,SAAS,EAAE,IAAK,EAAgB;YAClE,OAAO;AACH,gB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AiB,EAAE,wBAAwB,CAAC,EAAA,QAAA,EAC7H,wBAAwB,mBAEjB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,kBAAkB;AAC3B,4BAAA,WAAW,EAAE,UAAU,CAAC,+BAA+B;AAC1D;AACJ,qBAAA,EAAA,QAAA,EAAA,k8FAAA,EAAA,MAAA,EAAA,CAAA,2BAAA,CAAA,EAAA;;;AE/BL;;AAEG;;;;"}
|
|
@@ -10,10 +10,10 @@ class InputTagSelectsComponent extends ComponentReference {
|
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
12
12
|
this.i18n = inject(LOGIN_I18N);
|
|
13
|
-
this.attribute = input(...(ngDevMode ? [undefined, { debugName: "attribute" }] : []));
|
|
14
|
-
this.valueOrValues = input(...(ngDevMode ? [undefined, { debugName: "valueOrValues" }] : []));
|
|
13
|
+
this.attribute = input(...(ngDevMode ? [undefined, { debugName: "attribute" }] : /* istanbul ignore next */ []));
|
|
14
|
+
this.valueOrValues = input(...(ngDevMode ? [undefined, { debugName: "valueOrValues" }] : /* istanbul ignore next */ []));
|
|
15
15
|
this.dispatchFormAction = output();
|
|
16
|
-
this.displayableErrors = input(...(ngDevMode ? [undefined, { debugName: "displayableErrors" }] : []));
|
|
16
|
+
this.displayableErrors = input(...(ngDevMode ? [undefined, { debugName: "displayableErrors" }] : /* istanbul ignore next */ []));
|
|
17
17
|
this.doUseDefaultCss = inject(USE_DEFAULT_CSS);
|
|
18
18
|
this.classes = inject(LOGIN_CLASSES);
|
|
19
19
|
this.context = computed(() => {
|
|
@@ -38,7 +38,7 @@ class InputTagSelectsComponent extends ComponentReference {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
return null;
|
|
41
|
-
}, ...(ngDevMode ? [{ debugName: "context" }] : []));
|
|
41
|
+
}, ...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
|
|
42
42
|
this.options = computed(() => {
|
|
43
43
|
const attribute = this.attribute();
|
|
44
44
|
if (attribute) {
|
|
@@ -61,7 +61,7 @@ class InputTagSelectsComponent extends ComponentReference {
|
|
|
61
61
|
})();
|
|
62
62
|
}
|
|
63
63
|
return [];
|
|
64
|
-
}, ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
64
|
+
}, ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
65
65
|
}
|
|
66
66
|
checked(option) {
|
|
67
67
|
const valueOrValues = this.valueOrValues();
|
|
@@ -98,15 +98,15 @@ class InputTagSelectsComponent extends ComponentReference {
|
|
|
98
98
|
fieldIndex: undefined
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
102
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
101
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: InputTagSelectsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
102
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: InputTagSelectsComponent, isStandalone: true, selector: "kc-input-tag-selects", inputs: { attribute: { classPropertyName: "attribute", publicName: "attribute", isSignal: true, isRequired: false, transformFunction: null }, valueOrValues: { classPropertyName: "valueOrValues", publicName: "valueOrValues", isSignal: true, isRequired: false, transformFunction: null }, displayableErrors: { classPropertyName: "displayableErrors", publicName: "displayableErrors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dispatchFormAction: "dispatchFormAction" }, providers: [
|
|
103
103
|
{
|
|
104
104
|
provide: ComponentReference,
|
|
105
105
|
useExisting: forwardRef(() => InputTagSelectsComponent)
|
|
106
106
|
}
|
|
107
107
|
], usesInheritance: true, ngImport: i0, template: "@let inputType = context()?.inputType;\n@let classInput = context()?.classInput;\n@let classLabel = context()?.classLabel;\n@let classDiv = context()?.classDiv;\n@let attr = attribute();\n@if (attr) {\n @for (option of options(); track option) {\n <div [kcClass]=\"classDiv\">\n <input\n [type]=\"inputType\"\n [id]=\"attr.name + '-' + option\"\n [name]=\"attr.name\"\n [value]=\"option\"\n [kcClass]=\"classInput\"\n [attr.aria-invalid]=\"!!displayableErrors()?.length\"\n [disabled]=\"attr.readOnly\"\n [checked]=\"checked(option)\"\n (change)=\"onChange($event, option)\"\n (blur)=\"onBlur()\"\n />\n <label\n [for]=\"attr.name + '-' + option\"\n [kcClass]=\"[classLabel!, attr.readOnly ? 'kcInputClassRadioCheckboxLabelDisabled' : $any('')]\"\n >\n {{ i18n.advancedMsgStr(option) }}\n </label>\n </div>\n }\n}\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: KcClassDirective, selector: "[kcClass]", inputs: ["class", "ngClass", "kcClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
108
108
|
}
|
|
109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: InputTagSelectsComponent, decorators: [{
|
|
110
110
|
type: Component,
|
|
111
111
|
args: [{ imports: [KcClassDirective], selector: 'kc-input-tag-selects', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
112
112
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keycloakify-angular-login-components-input-tag-selects.mjs","sources":["../../src/login/components/input-tag-selects/input-tag-selects.component.ts","../../src/login/components/input-tag-selects/input-tag-selects.component.html","../../src/login/components/input-tag-selects/keycloakify-angular-login-components-input-tag-selects.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, forwardRef, inject, input, output, type Signal } from '@angular/core';\nimport { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';\nimport { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';\nimport { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';\nimport type { FormAction, FormFieldError } from '@keycloakify/angular/login/services/user-profile-form';\nimport { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';\nimport { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';\nimport type { Attribute } from 'keycloakify/login/KcContext';\nimport type { ClassKey } from 'keycloakify/login/lib/kcClsx';\nimport type { I18n } from '@keycloakify/angular/login/i18n';\n\n@Component({\n styles: [\n `\n :host {\n display: contents;\n }\n `\n ],\n imports: [KcClassDirective],\n selector: 'kc-input-tag-selects',\n templateUrl: 'input-tag-selects.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: ComponentReference,\n useExisting: forwardRef(() => InputTagSelectsComponent)\n }\n ]\n})\nexport class InputTagSelectsComponent extends ComponentReference {\n i18n = inject<I18n>(LOGIN_I18N);\n attribute = input<Attribute>();\n valueOrValues = input<string | string[]>();\n dispatchFormAction = output<FormAction>();\n displayableErrors = input<FormFieldError[]>();\n override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);\n override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);\n\n context: Signal<{\n inputType: 'radio' | 'checkbox';\n classDiv: ClassKey;\n classInput: ClassKey;\n classLabel: ClassKey;\n } | null> = computed(() => {\n const attribute = this.attribute();\n if (attribute) {\n const { inputType } = attribute.annotations;\n switch (inputType) {\n case 'select-radiobuttons':\n return {\n inputType: 'radio',\n classDiv: 'kcInputClassRadio',\n classInput: 'kcInputClassRadioInput',\n classLabel: 'kcInputClassRadioLabel'\n };\n case 'multiselect-checkboxes':\n return {\n inputType: 'checkbox',\n classDiv: 'kcInputClassCheckbox',\n classInput: 'kcInputClassCheckboxInput',\n classLabel: 'kcInputClassCheckboxLabel'\n };\n }\n }\n return null;\n });\n\n options = computed(() => {\n const attribute = this.attribute();\n if (attribute) {\n return (() => {\n walk: {\n const { inputOptionsFromValidation } = attribute.annotations;\n\n if (inputOptionsFromValidation === undefined) {\n break walk;\n }\n\n const validator = (attribute.validators as Record<string, { options?: string[] }>)[inputOptionsFromValidation];\n\n if (validator === undefined) {\n break walk;\n }\n\n if (validator.options === undefined) {\n break walk;\n }\n\n return validator.options;\n }\n\n return attribute.validators.options?.options ?? [];\n })();\n }\n return [];\n });\n\n checked(option: string) {\n const valueOrValues = this.valueOrValues();\n if (valueOrValues instanceof Array) {\n return valueOrValues.includes(option);\n }\n return valueOrValues === option;\n }\n\n onChange(event: Event, option: string) {\n const valueOrValues = this.valueOrValues();\n const isChecked = (event.target as HTMLInputElement).checked;\n this.dispatchFormAction.emit({\n action: 'update',\n name: this.attribute()?.name ?? '',\n valueOrValues: (() => {\n if (valueOrValues instanceof Array) {\n const newValues = [...valueOrValues];\n\n if (isChecked) {\n newValues.push(option);\n } else {\n newValues.splice(newValues.indexOf(option), 1);\n }\n\n return newValues;\n }\n\n return (event.target as HTMLInputElement)?.checked ? option : '';\n })()\n });\n }\n\n onBlur() {\n this.dispatchFormAction.emit({\n action: 'focus lost',\n name: this.attribute()?.name ?? '',\n fieldIndex: undefined\n });\n }\n}\n","@let inputType = context()?.inputType;\n@let classInput = context()?.classInput;\n@let classLabel = context()?.classLabel;\n@let classDiv = context()?.classDiv;\n@let attr = attribute();\n@if (attr) {\n @for (option of options(); track option) {\n <div [kcClass]=\"classDiv\">\n <input\n [type]=\"inputType\"\n [id]=\"attr.name + '-' + option\"\n [name]=\"attr.name\"\n [value]=\"option\"\n [kcClass]=\"classInput\"\n [attr.aria-invalid]=\"!!displayableErrors()?.length\"\n [disabled]=\"attr.readOnly\"\n [checked]=\"checked(option)\"\n (change)=\"onChange($event, option)\"\n (blur)=\"onBlur()\"\n />\n <label\n [for]=\"attr.name + '-' + option\"\n [kcClass]=\"[classLabel!, attr.readOnly ? 'kcInputClassRadioCheckboxLabelDisabled' : $any('')]\"\n >\n {{ i18n.advancedMsgStr(option) }}\n </label>\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G;;;;"}
|
|
1
|
+
{"version":3,"file":"keycloakify-angular-login-components-input-tag-selects.mjs","sources":["../../src/login/components/input-tag-selects/input-tag-selects.component.ts","../../src/login/components/input-tag-selects/input-tag-selects.component.html","../../src/login/components/input-tag-selects/keycloakify-angular-login-components-input-tag-selects.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, forwardRef, inject, input, output, type Signal } from '@angular/core';\nimport { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css';\nimport { ComponentReference } from '@keycloakify/angular/login/classes/component-reference';\nimport { KcClassDirective } from '@keycloakify/angular/login/directives/kc-class';\nimport type { FormAction, FormFieldError } from '@keycloakify/angular/login/services/user-profile-form';\nimport { LOGIN_CLASSES } from '@keycloakify/angular/login/tokens/classes';\nimport { LOGIN_I18N } from '@keycloakify/angular/login/tokens/i18n';\nimport type { Attribute } from 'keycloakify/login/KcContext';\nimport type { ClassKey } from 'keycloakify/login/lib/kcClsx';\nimport type { I18n } from '@keycloakify/angular/login/i18n';\n\n@Component({\n styles: [\n `\n :host {\n display: contents;\n }\n `\n ],\n imports: [KcClassDirective],\n selector: 'kc-input-tag-selects',\n templateUrl: 'input-tag-selects.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: ComponentReference,\n useExisting: forwardRef(() => InputTagSelectsComponent)\n }\n ]\n})\nexport class InputTagSelectsComponent extends ComponentReference {\n i18n = inject<I18n>(LOGIN_I18N);\n attribute = input<Attribute>();\n valueOrValues = input<string | string[]>();\n dispatchFormAction = output<FormAction>();\n displayableErrors = input<FormFieldError[]>();\n override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);\n override classes = inject<Partial<Record<ClassKey, string>>>(LOGIN_CLASSES);\n\n context: Signal<{\n inputType: 'radio' | 'checkbox';\n classDiv: ClassKey;\n classInput: ClassKey;\n classLabel: ClassKey;\n } | null> = computed(() => {\n const attribute = this.attribute();\n if (attribute) {\n const { inputType } = attribute.annotations;\n switch (inputType) {\n case 'select-radiobuttons':\n return {\n inputType: 'radio',\n classDiv: 'kcInputClassRadio',\n classInput: 'kcInputClassRadioInput',\n classLabel: 'kcInputClassRadioLabel'\n };\n case 'multiselect-checkboxes':\n return {\n inputType: 'checkbox',\n classDiv: 'kcInputClassCheckbox',\n classInput: 'kcInputClassCheckboxInput',\n classLabel: 'kcInputClassCheckboxLabel'\n };\n }\n }\n return null;\n });\n\n options = computed(() => {\n const attribute = this.attribute();\n if (attribute) {\n return (() => {\n walk: {\n const { inputOptionsFromValidation } = attribute.annotations;\n\n if (inputOptionsFromValidation === undefined) {\n break walk;\n }\n\n const validator = (attribute.validators as Record<string, { options?: string[] }>)[inputOptionsFromValidation];\n\n if (validator === undefined) {\n break walk;\n }\n\n if (validator.options === undefined) {\n break walk;\n }\n\n return validator.options;\n }\n\n return attribute.validators.options?.options ?? [];\n })();\n }\n return [];\n });\n\n checked(option: string) {\n const valueOrValues = this.valueOrValues();\n if (valueOrValues instanceof Array) {\n return valueOrValues.includes(option);\n }\n return valueOrValues === option;\n }\n\n onChange(event: Event, option: string) {\n const valueOrValues = this.valueOrValues();\n const isChecked = (event.target as HTMLInputElement).checked;\n this.dispatchFormAction.emit({\n action: 'update',\n name: this.attribute()?.name ?? '',\n valueOrValues: (() => {\n if (valueOrValues instanceof Array) {\n const newValues = [...valueOrValues];\n\n if (isChecked) {\n newValues.push(option);\n } else {\n newValues.splice(newValues.indexOf(option), 1);\n }\n\n return newValues;\n }\n\n return (event.target as HTMLInputElement)?.checked ? option : '';\n })()\n });\n }\n\n onBlur() {\n this.dispatchFormAction.emit({\n action: 'focus lost',\n name: this.attribute()?.name ?? '',\n fieldIndex: undefined\n });\n }\n}\n","@let inputType = context()?.inputType;\n@let classInput = context()?.classInput;\n@let classLabel = context()?.classLabel;\n@let classDiv = context()?.classDiv;\n@let attr = attribute();\n@if (attr) {\n @for (option of options(); track option) {\n <div [kcClass]=\"classDiv\">\n <input\n [type]=\"inputType\"\n [id]=\"attr.name + '-' + option\"\n [name]=\"attr.name\"\n [value]=\"option\"\n [kcClass]=\"classInput\"\n [attr.aria-invalid]=\"!!displayableErrors()?.length\"\n [disabled]=\"attr.readOnly\"\n [checked]=\"checked(option)\"\n (change)=\"onChange($event, option)\"\n (blur)=\"onBlur()\"\n />\n <label\n [for]=\"attr.name + '-' + option\"\n [kcClass]=\"[classLabel!, attr.readOnly ? 'kcInputClassRadioCheckboxLabelDisabled' : $any('')]\"\n >\n {{ i18n.advancedMsgStr(option) }}\n </label>\n </div>\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA8BM,MAAO,wBAAyB,SAAQ,kBAAkB,CAAA;AAnBhE,IAAA,WAAA,GAAA;;AAoBI,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAO,UAAU,CAAC;QAC/B,IAAA,CAAA,SAAS,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAa;QAC9B,IAAA,CAAA,aAAa,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,eAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAqB;QAC1C,IAAA,CAAA,kBAAkB,GAAG,MAAM,EAAc;QACzC,IAAA,CAAA,iBAAiB,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,mBAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAoB;AACpC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAU,eAAe,CAAC;AAClD,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAoC,aAAa,CAAC;AAE3E,QAAA,IAAA,CAAA,OAAO,GAKK,QAAQ,CAAC,MAAK;AACtB,YAAA,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,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EAAA,CAAA;kBAnBpC,SAAS;8BAQG,CAAC,gBAAgB,CAAC,EAAA,QAAA,EACjB,sBAAsB,mBAEf,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,kBAAkB;AAC3B,4BAAA,WAAW,EAAE,UAAU,CAAC,8BAA8B;AACzD;AACJ,qBAAA,EAAA,QAAA,EAAA,+jCAAA,EAAA,MAAA,EAAA,CAAA,2BAAA,CAAA,EAAA;;;AE5BL;;AAEG;;;;"}
|
|
@@ -17,11 +17,11 @@ class InputTagComponent extends ComponentReference {
|
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
19
19
|
this.i18n = inject(LOGIN_I18N);
|
|
20
|
-
this.attribute = input(...(ngDevMode ? [undefined, { debugName: "attribute" }] : []));
|
|
21
|
-
this.valueOrValues = input(...(ngDevMode ? [undefined, { debugName: "valueOrValues" }] : []));
|
|
22
|
-
this.fieldIndex = input(undefined, ...(ngDevMode ? [{ debugName: "fieldIndex" }] : []));
|
|
23
|
-
this.values = input(...(ngDevMode ? [undefined, { debugName: "values" }] : []));
|
|
24
|
-
this.displayableErrors = input(...(ngDevMode ? [undefined, { debugName: "displayableErrors" }] : []));
|
|
20
|
+
this.attribute = input(...(ngDevMode ? [undefined, { debugName: "attribute" }] : /* istanbul ignore next */ []));
|
|
21
|
+
this.valueOrValues = input(...(ngDevMode ? [undefined, { debugName: "valueOrValues" }] : /* istanbul ignore next */ []));
|
|
22
|
+
this.fieldIndex = input(undefined, ...(ngDevMode ? [{ debugName: "fieldIndex" }] : /* istanbul ignore next */ []));
|
|
23
|
+
this.values = input(...(ngDevMode ? [undefined, { debugName: "values" }] : /* istanbul ignore next */ []));
|
|
24
|
+
this.displayableErrors = input(...(ngDevMode ? [undefined, { debugName: "displayableErrors" }] : /* istanbul ignore next */ []));
|
|
25
25
|
this.dispatchFormAction = output();
|
|
26
26
|
this.doUseDefaultCss = inject(USE_DEFAULT_CSS);
|
|
27
27
|
this.classes = inject(LOGIN_CLASSES);
|
|
@@ -35,7 +35,7 @@ class InputTagComponent extends ComponentReference {
|
|
|
35
35
|
return null;
|
|
36
36
|
}
|
|
37
37
|
return valueOrValues ?? null;
|
|
38
|
-
}, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
38
|
+
}, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
39
39
|
}
|
|
40
40
|
onChange(event) {
|
|
41
41
|
const valueOrValues = this.valueOrValues();
|
|
@@ -64,15 +64,15 @@ class InputTagComponent extends ComponentReference {
|
|
|
64
64
|
fieldIndex: this.fieldIndex()
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
68
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
67
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: InputTagComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
68
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: InputTagComponent, isStandalone: true, selector: "kc-input-tag", inputs: { attribute: { classPropertyName: "attribute", publicName: "attribute", isSignal: true, isRequired: false, transformFunction: null }, valueOrValues: { classPropertyName: "valueOrValues", publicName: "valueOrValues", isSignal: true, isRequired: false, transformFunction: null }, fieldIndex: { classPropertyName: "fieldIndex", publicName: "fieldIndex", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null }, displayableErrors: { classPropertyName: "displayableErrors", publicName: "displayableErrors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dispatchFormAction: "dispatchFormAction" }, providers: [
|
|
69
69
|
{
|
|
70
70
|
provide: ComponentReference,
|
|
71
71
|
useExisting: forwardRef(() => InputTagComponent)
|
|
72
72
|
}
|
|
73
73
|
], usesInheritance: true, ngImport: i0, template: "@let attr = attribute();\n@let index = fieldIndex();\n@if (attr) {\n <input\n [type]=\"attr.annotations.inputType | inputType\"\n [id]=\"attr.name\"\n [name]=\"attr.name\"\n [value]=\"value()\"\n [kcClass]=\"'kcInputClass'\"\n [attr.aria-invalid]=\"index && displayableErrors()?.[index] !== undefined\"\n [disabled]=\"attr.readOnly\"\n [autocomplete]=\"attr.autocomplete\"\n [placeholder]=\"i18n.advancedMsgStr(attr.annotations.inputTypePlaceholder ?? '')\"\n [attr.pattern]=\"attr.annotations.inputTypePattern\"\n [attr.size]=\"\n !attr.annotations.inputTypeSize\n ? undefined\n : (attr.annotations.inputTypeSize | toNumber) === 0\n ? undefined\n : (attr.annotations.inputTypeSize | toNumber)\n \"\n [attr.maxlength]=\"!attr.annotations.inputTypeMaxlength ? undefined : (attr.annotations.inputTypeMaxlength | toNumber)\"\n [attr.minlength]=\"!attr.annotations.inputTypeMinlength ? undefined : (attr.annotations.inputTypeMinlength | toNumber)\"\n [attr.max]=\"attr.annotations.inputTypeMax\"\n [attr.min]=\"attr.annotations.inputTypeMin\"\n [attr.step]=\"attr.annotations.inputTypeStep\"\n [kcAttributes]=\"attr.html5DataAnnotations\"\n (change)=\"onChange($event)\"\n (blur)=\"onBlur()\"\n />\n @if (index !== undefined) {\n @let values = valueOrValues() ?? [] | toArray;\n <kc-field-errors\n [attribute]=\"attr\"\n [displayableErrors]=\"displayableErrors()\"\n [fieldIndex]=\"index\"\n />\n <kc-add-remove-buttons-multi-valued-attribute\n [attribute]=\"attr\"\n [values]=\"values\"\n [fieldIndex]=\"index\"\n (dispatchFormAction)=\"dispatchFormAction.emit($event)\"\n />\n }\n}\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: KcClassDirective, selector: "[kcClass]", inputs: ["class", "ngClass", "kcClass"] }, { kind: "directive", type: AttributesDirective, selector: "[kcAttributes]", inputs: ["kcAttributes"] }, { kind: "component", type: FieldErrorsComponent, selector: "kc-field-errors", inputs: ["attribute", "displayableErrors", "fieldIndex"] }, { kind: "component", type: AddRemoveButtonsMultiValuedAttributeComponent, selector: "kc-add-remove-buttons-multi-valued-attribute", inputs: ["attribute", "values", "fieldIndex"], outputs: ["dispatchFormAction"] }, { kind: "pipe", type: InputTypePipe, name: "inputType" }, { kind: "pipe", type: ToNumberPipe, name: "toNumber" }, { kind: "pipe", type: ToArrayPipe, name: "toArray" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
74
74
|
}
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: InputTagComponent, decorators: [{
|
|
76
76
|
type: Component,
|
|
77
77
|
args: [{ imports: [
|
|
78
78
|
InputTypePipe,
|