keycloakify 6.0.0-beta.7 → 6.0.0

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.
Files changed (78) hide show
  1. package/README.md +6 -2
  2. package/bin/keycloakify/replacers/replaceImportsFromStaticInJsCode.js +5 -5
  3. package/bin/keycloakify/replacers/replaceImportsFromStaticInJsCode.js.map +1 -1
  4. package/bin/link_in_test_app.js +26 -8
  5. package/bin/link_in_test_app.js.map +1 -1
  6. package/bin/tsconfig.tsbuildinfo +1 -1
  7. package/lib/components/Error.js +15 -3
  8. package/lib/components/Error.js.map +1 -1
  9. package/lib/components/Info.js +15 -3
  10. package/lib/components/Info.js.map +1 -1
  11. package/lib/components/KcApp.d.ts +1 -1
  12. package/lib/components/KcApp.js +31 -18
  13. package/lib/components/KcApp.js.map +1 -1
  14. package/lib/components/KcProps.js +10 -52
  15. package/lib/components/KcProps.js.map +1 -1
  16. package/lib/components/Login.js +36 -22
  17. package/lib/components/Login.js.map +1 -1
  18. package/lib/components/LoginConfigTotp.js +18 -6
  19. package/lib/components/LoginConfigTotp.js.map +1 -1
  20. package/lib/components/LoginIdpLinkConfirm.js +16 -4
  21. package/lib/components/LoginIdpLinkConfirm.js.map +1 -1
  22. package/lib/components/LoginIdpLinkEmail.js +15 -3
  23. package/lib/components/LoginIdpLinkEmail.js.map +1 -1
  24. package/lib/components/LoginOtp.js +16 -4
  25. package/lib/components/LoginOtp.js.map +1 -1
  26. package/lib/components/LoginPageExpired.js +15 -3
  27. package/lib/components/LoginPageExpired.js.map +1 -1
  28. package/lib/components/LoginResetPassword.js +16 -4
  29. package/lib/components/LoginResetPassword.js.map +1 -1
  30. package/lib/components/LoginUpdatePassword.js +16 -4
  31. package/lib/components/LoginUpdatePassword.js.map +1 -1
  32. package/lib/components/LoginUpdateProfile.js +21 -8
  33. package/lib/components/LoginUpdateProfile.js.map +1 -1
  34. package/lib/components/LoginVerifyEmail.js +16 -4
  35. package/lib/components/LoginVerifyEmail.js.map +1 -1
  36. package/lib/components/LogoutConfirm.js +16 -4
  37. package/lib/components/LogoutConfirm.js.map +1 -1
  38. package/lib/components/Register.js +21 -8
  39. package/lib/components/Register.js.map +1 -1
  40. package/lib/components/RegisterUserProfile.js +22 -11
  41. package/lib/components/RegisterUserProfile.js.map +1 -1
  42. package/lib/components/Template.js +4 -4
  43. package/lib/components/Template.js.map +1 -1
  44. package/lib/components/Terms.js +18 -5
  45. package/lib/components/Terms.js.map +1 -1
  46. package/lib/getKcContext/getKcContext.js +10 -6
  47. package/lib/getKcContext/getKcContext.js.map +1 -1
  48. package/lib/getKcContext/kcContextMocks/kcContextMocks.js +121 -224
  49. package/lib/getKcContext/kcContextMocks/kcContextMocks.js.map +1 -1
  50. package/lib/i18n/index.js +18 -32
  51. package/lib/i18n/index.js.map +1 -1
  52. package/lib/tools/useCssAndCx.d.ts +4 -0
  53. package/lib/tools/useCssAndCx.js +9 -0
  54. package/lib/tools/useCssAndCx.js.map +1 -0
  55. package/lib/tsconfig.tsbuildinfo +1 -1
  56. package/lib/useFormValidationSlice.js +38 -44
  57. package/lib/useFormValidationSlice.js.map +1 -1
  58. package/package.json +10 -6
  59. package/src/bin/keycloakify/replacers/replaceImportsFromStaticInJsCode.ts +7 -4
  60. package/src/bin/link_in_test_app.ts +33 -9
  61. package/src/lib/components/KcApp.tsx +19 -17
  62. package/src/lib/components/Login.tsx +1 -1
  63. package/src/lib/components/LoginConfigTotp.tsx +1 -1
  64. package/src/lib/components/LoginIdpLinkConfirm.tsx +1 -1
  65. package/src/lib/components/LoginOtp.tsx +1 -1
  66. package/src/lib/components/LoginResetPassword.tsx +1 -1
  67. package/src/lib/components/LoginUpdatePassword.tsx +1 -1
  68. package/src/lib/components/LoginUpdateProfile.tsx +1 -1
  69. package/src/lib/components/LogoutConfirm.tsx +1 -1
  70. package/src/lib/components/Register.tsx +1 -1
  71. package/src/lib/components/RegisterUserProfile.tsx +1 -1
  72. package/src/lib/components/Template.tsx +1 -1
  73. package/src/lib/components/Terms.tsx +1 -1
  74. package/src/lib/getKcContext/getKcContext.ts +10 -6
  75. package/src/lib/i18n/index.tsx +6 -2
  76. package/src/lib/tools/useCssAndCx.ts +11 -0
  77. package/src/lib/tsconfig.json +1 -1
  78. package/src/test/bin/replaceImportFromStatic.ts +35 -23
@@ -19,7 +19,7 @@ import { assetIsSameCode } from "../tools/assertIsSameCode";
19
19
  }[e] + ".chunk.js"
20
20
  }
21
21
 
22
- n.u=function(e){return"static/js/" + e + "." + {
22
+ __webpack_require__.u=function(e){return"static/js/" + e + "." + {
23
23
  147: "6c5cee76",
24
24
  787: "8da10fcf",
25
25
  922: "be170a73"
@@ -54,11 +54,14 @@ import { assetIsSameCode } from "../tools/assertIsSameCode";
54
54
  }[e] + ".chunk.js"
55
55
  }
56
56
 
57
- n[(function (){
58
- Object.defineProperty(n, "p", {
59
- get: function() { return window.kcContext.url.resourcesPath; },
60
- set: function (){}
61
- });
57
+ __webpack_require__[(function (){
58
+ var pd= Object.getOwnPropertyDescriptor(__webpack_require__, "p");
59
+ if( pd === undefined || pd.configurable ){
60
+ Object.defineProperty(__webpack_require__, "p", {
61
+ get: function() { return window.kcContext.url.resourcesPath; },
62
+ set: function (){}
63
+ });
64
+ }
62
65
  return "u";
63
66
  })()] = function(e) {
64
67
  return "/build/static/js/" + e + "." + {
@@ -69,10 +72,13 @@ import { assetIsSameCode } from "../tools/assertIsSameCode";
69
72
  }
70
73
 
71
74
  t[(function (){
72
- Object.defineProperty(t, "p", {
73
- get: function() { return window.kcContext.url.resourcesPath; },
74
- set: function (){}
75
- });
75
+ var pd= Object.getOwnPropertyDescriptor(t, "p");
76
+ if( pd === undefined || pd.configurable ){
77
+ Object.defineProperty(t, "p", {
78
+ get: function() { return window.kcContext.url.resourcesPath; },
79
+ set: function (){}
80
+ });
81
+ }
76
82
  return "miniCssF";
77
83
  })()] = function(e) {
78
84
  return "/build/static/css/" + e + "." + {
@@ -97,23 +103,26 @@ import { assetIsSameCode } from "../tools/assertIsSameCode";
97
103
 
98
104
  const fixedJsCodeExpected = `
99
105
  function f() {
100
- return ("kcContext" in window ? "https://demo-app.keycloakify.dev" : "") + a.p + "static/js/" + ({}[e] || e) + "." + {
106
+ return ("kcContext" in window ? "https://demo-app.keycloakify.dev" : a.p) + "static/js/" + ({}[e] || e) + "." + {
101
107
  3: "0664cdc0"
102
108
  }[e] + ".chunk.js"
103
109
  }
104
110
 
105
111
  function sameAsF() {
106
- return ("kcContext" in window ? "https://demo-app.keycloakify.dev" : "") + a.p + "static/js/" + ({}[e] || e) + "." + {
112
+ return ("kcContext" in window ? "https://demo-app.keycloakify.dev" : a.p) + "static/js/" + ({}[e] || e) + "." + {
107
113
  3: "0664cdc0"
108
114
  }[e] + ".chunk.js"
109
115
  }
110
116
 
111
- n[(function (){
112
- var p= "";
113
- Object.defineProperty(n, "p", {
114
- get: function() { return ("kcContext" in window ? "https://demo-app.keycloakify.dev" : "") + p; },
115
- set: function (value){ p = value; }
116
- });
117
+ __webpack_require__[(function (){
118
+ var pd= Object.getOwnPropertyDescriptor(__webpack_require__, "p");
119
+ if( pd === undefined || pd.configurable ){
120
+ var p= "";
121
+ Object.defineProperty(__webpack_require__, "p", {
122
+ get: function() { return "kcContext" in window ? "https://demo-app.keycloakify.dev" : p; },
123
+ set: function (value){ p = value; }
124
+ });
125
+ }
117
126
  return "u";
118
127
  })()] = function(e) {
119
128
  return "static/js/" + e + "." + {
@@ -124,11 +133,14 @@ import { assetIsSameCode } from "../tools/assertIsSameCode";
124
133
  }
125
134
 
126
135
  t[(function (){
127
- var p= "";
128
- Object.defineProperty(t, "p", {
129
- get: function() { return ("kcContext" in window ? "https://demo-app.keycloakify.dev" : "") + p; },
130
- set: function (value){ p = value; }
131
- });
136
+ var pd= Object.getOwnPropertyDescriptor(t, "p");
137
+ if( pd === undefined || pd.configurable ){
138
+ var p= "";
139
+ Object.defineProperty(t, "p", {
140
+ get: function() { return "kcContext" in window ? "https://demo-app.keycloakify.dev" : p; },
141
+ set: function (value){ p = value; }
142
+ });
143
+ }
132
144
  return "miniCssF";
133
145
  })()] = function(e) {
134
146
  return "static/css/" + e + "." + {