@keycloakify/login-ui 250004.1.2 → 250004.1.3

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.
@@ -54,7 +54,7 @@ function getUserProfileApi_noCache(params) {
54
54
  }
55
55
  function getInitialState(params) {
56
56
  var _a, _b;
57
- const { kcContext } = params;
57
+ const { kcContext, doMakeUserConfirmPassword } = params;
58
58
  const { getErrors } = createGetErrors({ kcContext });
59
59
  // NOTE: We don't use te kcContext.profile.attributes directly because
60
60
  // they don't includes the password and password confirm fields and we want to add them.
@@ -167,9 +167,6 @@ function getInitialState(params) {
167
167
  }
168
168
  attributes.forEach(attribute => {
169
169
  var _a, _b, _c;
170
- if (attribute.name === "password-confirm") {
171
- attribute.annotations.inputType = "hidden";
172
- }
173
170
  if (attribute.name === "locale") {
174
171
  assert(kcContext.locale !== undefined);
175
172
  attribute.annotations.inputType = "hidden";
@@ -244,7 +241,11 @@ function getInitialState(params) {
244
241
  required: true,
245
242
  readOnly: false,
246
243
  validators: {},
247
- annotations: {},
244
+ annotations: !doMakeUserConfirmPassword
245
+ ? {
246
+ inputType: "hidden"
247
+ }
248
+ : {},
248
249
  html5DataAnnotations: {},
249
250
  autocomplete: "new-password"
250
251
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keycloakify/login-ui",
3
- "version": "250004.1.2",
3
+ "version": "250004.1.3",
4
4
  "description": "React implementation of Keycloak Login v2 for Keycloakify",
5
5
  "repository": {
6
6
  "type": "git",
@@ -160,7 +160,7 @@ function getInitialState(params: {
160
160
  kcContext: KcContextLike;
161
161
  doMakeUserConfirmPassword: boolean;
162
162
  }): internal.State {
163
- const { kcContext } = params;
163
+ const { kcContext, doMakeUserConfirmPassword } = params;
164
164
 
165
165
  const { getErrors } = createGetErrors({ kcContext });
166
166
 
@@ -290,10 +290,6 @@ function getInitialState(params: {
290
290
  }
291
291
 
292
292
  attributes.forEach(attribute => {
293
- if (attribute.name === "password-confirm") {
294
- attribute.annotations.inputType = "hidden";
295
- }
296
-
297
293
  if (attribute.name === "locale") {
298
294
  assert(kcContext.locale !== undefined);
299
295
  attribute.annotations.inputType = "hidden";
@@ -392,7 +388,11 @@ function getInitialState(params: {
392
388
  required: true,
393
389
  readOnly: false,
394
390
  validators: {},
395
- annotations: {},
391
+ annotations: !doMakeUserConfirmPassword
392
+ ? {
393
+ inputType: "hidden"
394
+ }
395
+ : {},
396
396
  html5DataAnnotations: {},
397
397
  autocomplete: "new-password"
398
398
  }