@nocios/crudify-ui 1.0.47 → 1.0.48

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/dist/index.js CHANGED
@@ -98,10 +98,13 @@ var getNestedValue = (obj, path) => {
98
98
  }, obj);
99
99
  };
100
100
  var I18nProvider = ({ children, translations = {}, language = "en" }) => {
101
+ console.log("I18nProvider received translations:", translations);
102
+ console.log("I18nProvider language:", language);
101
103
  const t = (0, import_react.useMemo)(() => {
102
104
  return (key, variables) => {
103
105
  const mergedTranslations = { ...defaultTranslations, ...translations };
104
106
  let value = getNestedValue(mergedTranslations, key) || key;
107
+ console.log(`Translation for "${key}":`, value);
105
108
  if (variables && typeof value === "string") {
106
109
  Object.entries(variables).forEach(([varKey, varValue]) => {
107
110
  value = value.replace(new RegExp(`{{${varKey}}}`, "g"), varValue);
@@ -1158,6 +1161,8 @@ var CrudifyLoginInternal = ({
1158
1161
  );
1159
1162
  };
1160
1163
  var CrudifyLogin = ({ translations, language = "en", config = {}, ...props }) => {
1164
+ console.log("CrudifyLogin received translations:", translations);
1165
+ console.log("CrudifyLogin received language:", language);
1161
1166
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(I18nProvider, { translations, language, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CrudifyLoginInternal, { config, ...props }) });
1162
1167
  };
1163
1168
  var CrudifyLogin_default = CrudifyLogin;
package/dist/index.mjs CHANGED
@@ -54,10 +54,13 @@ var getNestedValue = (obj, path) => {
54
54
  }, obj);
55
55
  };
56
56
  var I18nProvider = ({ children, translations = {}, language = "en" }) => {
57
+ console.log("I18nProvider received translations:", translations);
58
+ console.log("I18nProvider language:", language);
57
59
  const t = useMemo(() => {
58
60
  return (key, variables) => {
59
61
  const mergedTranslations = { ...defaultTranslations, ...translations };
60
62
  let value = getNestedValue(mergedTranslations, key) || key;
63
+ console.log(`Translation for "${key}":`, value);
61
64
  if (variables && typeof value === "string") {
62
65
  Object.entries(variables).forEach(([varKey, varValue]) => {
63
66
  value = value.replace(new RegExp(`{{${varKey}}}`, "g"), varValue);
@@ -1114,6 +1117,8 @@ var CrudifyLoginInternal = ({
1114
1117
  );
1115
1118
  };
1116
1119
  var CrudifyLogin = ({ translations, language = "en", config = {}, ...props }) => {
1120
+ console.log("CrudifyLogin received translations:", translations);
1121
+ console.log("CrudifyLogin received language:", language);
1117
1122
  return /* @__PURE__ */ jsx6(I18nProvider, { translations, language, children: /* @__PURE__ */ jsx6(CrudifyLoginInternal, { config, ...props }) });
1118
1123
  };
1119
1124
  var CrudifyLogin_default = CrudifyLogin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocios/crudify-ui",
3
- "version": "1.0.47",
3
+ "version": "1.0.48",
4
4
  "description": "Biblioteca de componentes UI para Crudify",
5
5
  "author": "Nocios",
6
6
  "license": "MIT",