@nocios/crudify-ui 1.2.6 → 1.2.10
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.
|
@@ -240,23 +240,25 @@ var _ConfigurationManager = class _ConfigurationManager {
|
|
|
240
240
|
const appName = getCookie("appName");
|
|
241
241
|
console.log("\u{1F527} ConfigurationManager - Cookie appName:", appName);
|
|
242
242
|
if (appName) {
|
|
243
|
-
config.appName = appName;
|
|
243
|
+
config.appName = decodeURIComponent(appName);
|
|
244
244
|
}
|
|
245
245
|
const loginActions = getCookie("loginActions");
|
|
246
246
|
console.log("\u{1F527} ConfigurationManager - Cookie loginActions:", loginActions);
|
|
247
247
|
if (loginActions) {
|
|
248
|
-
|
|
248
|
+
const decodedActions = decodeURIComponent(loginActions);
|
|
249
|
+
config.loginActions = decodedActions.split(",").map((action) => action.trim()).filter(Boolean);
|
|
249
250
|
}
|
|
250
251
|
const logo = getCookie("logo");
|
|
251
252
|
console.log("\u{1F527} ConfigurationManager - Cookie logo:", logo);
|
|
252
253
|
if (logo) {
|
|
253
|
-
config.logo = logo;
|
|
254
|
+
config.logo = decodeURIComponent(logo);
|
|
254
255
|
}
|
|
255
256
|
const colors = getCookie("colors");
|
|
256
257
|
console.log("\u{1F527} ConfigurationManager - Cookie colors:", colors);
|
|
257
258
|
if (colors) {
|
|
258
259
|
try {
|
|
259
|
-
|
|
260
|
+
const decodedColors = decodeURIComponent(colors);
|
|
261
|
+
config.colors = JSON.parse(decodedColors);
|
|
260
262
|
} catch (error) {
|
|
261
263
|
console.warn("\u{1F527} ConfigurationManager - Failed to parse colors from cookie:", error);
|
|
262
264
|
}
|
|
@@ -330,6 +332,12 @@ var _CrudifyInitializer = class _CrudifyInitializer {
|
|
|
330
332
|
* This method is idempotent and thread-safe
|
|
331
333
|
*/
|
|
332
334
|
async initialize(config) {
|
|
335
|
+
console.log("\u{1F680} CrudifyInitializer - ENTRY_POINT - Received config:", {
|
|
336
|
+
env: config.env,
|
|
337
|
+
publicApiKey: config.publicApiKey ? `${config.publicApiKey.substring(0, 8)}...` : null,
|
|
338
|
+
appName: config.appName,
|
|
339
|
+
loginActionsCount: config.loginActions?.length || 0
|
|
340
|
+
});
|
|
333
341
|
if (this.state.isInitialized && this.isConfigurationSame(config)) {
|
|
334
342
|
console.log("\u{1F680} CrudifyInitializer - Already initialized with same config");
|
|
335
343
|
return;
|
|
@@ -1037,6 +1045,12 @@ var CrudifyDataProvider = ({
|
|
|
1037
1045
|
setIsInitializing(true);
|
|
1038
1046
|
setInitializationError(null);
|
|
1039
1047
|
console.log("\u{1F680} CrudifyDataProvider - Starting crudify initialization");
|
|
1048
|
+
console.log("\u{1F680} CrudifyDataProvider - Resolved config being passed:", {
|
|
1049
|
+
env: resolvedConfig.env,
|
|
1050
|
+
publicApiKey: resolvedConfig.publicApiKey ? `${resolvedConfig.publicApiKey.substring(0, 8)}...` : null,
|
|
1051
|
+
appName: resolvedConfig.appName,
|
|
1052
|
+
loginActionsCount: resolvedConfig.loginActions.length
|
|
1053
|
+
});
|
|
1040
1054
|
await crudifyInitializer.initialize({
|
|
1041
1055
|
env: resolvedConfig.env,
|
|
1042
1056
|
publicApiKey: resolvedConfig.publicApiKey,
|
package/dist/index.js
CHANGED
|
@@ -397,23 +397,25 @@ var init_ConfigurationManager = __esm({
|
|
|
397
397
|
const appName = getCookie("appName");
|
|
398
398
|
console.log("\u{1F527} ConfigurationManager - Cookie appName:", appName);
|
|
399
399
|
if (appName) {
|
|
400
|
-
config.appName = appName;
|
|
400
|
+
config.appName = decodeURIComponent(appName);
|
|
401
401
|
}
|
|
402
402
|
const loginActions = getCookie("loginActions");
|
|
403
403
|
console.log("\u{1F527} ConfigurationManager - Cookie loginActions:", loginActions);
|
|
404
404
|
if (loginActions) {
|
|
405
|
-
|
|
405
|
+
const decodedActions = decodeURIComponent(loginActions);
|
|
406
|
+
config.loginActions = decodedActions.split(",").map((action) => action.trim()).filter(Boolean);
|
|
406
407
|
}
|
|
407
408
|
const logo = getCookie("logo");
|
|
408
409
|
console.log("\u{1F527} ConfigurationManager - Cookie logo:", logo);
|
|
409
410
|
if (logo) {
|
|
410
|
-
config.logo = logo;
|
|
411
|
+
config.logo = decodeURIComponent(logo);
|
|
411
412
|
}
|
|
412
413
|
const colors = getCookie("colors");
|
|
413
414
|
console.log("\u{1F527} ConfigurationManager - Cookie colors:", colors);
|
|
414
415
|
if (colors) {
|
|
415
416
|
try {
|
|
416
|
-
|
|
417
|
+
const decodedColors = decodeURIComponent(colors);
|
|
418
|
+
config.colors = JSON.parse(decodedColors);
|
|
417
419
|
} catch (error) {
|
|
418
420
|
console.warn("\u{1F527} ConfigurationManager - Failed to parse colors from cookie:", error);
|
|
419
421
|
}
|
|
@@ -493,6 +495,12 @@ var init_CrudifyInitializer = __esm({
|
|
|
493
495
|
* This method is idempotent and thread-safe
|
|
494
496
|
*/
|
|
495
497
|
async initialize(config) {
|
|
498
|
+
console.log("\u{1F680} CrudifyInitializer - ENTRY_POINT - Received config:", {
|
|
499
|
+
env: config.env,
|
|
500
|
+
publicApiKey: config.publicApiKey ? `${config.publicApiKey.substring(0, 8)}...` : null,
|
|
501
|
+
appName: config.appName,
|
|
502
|
+
loginActionsCount: config.loginActions?.length || 0
|
|
503
|
+
});
|
|
496
504
|
if (this.state.isInitialized && this.isConfigurationSame(config)) {
|
|
497
505
|
console.log("\u{1F680} CrudifyInitializer - Already initialized with same config");
|
|
498
506
|
return;
|
|
@@ -1121,6 +1129,12 @@ var init_CrudifyDataProvider = __esm({
|
|
|
1121
1129
|
setIsInitializing(true);
|
|
1122
1130
|
setInitializationError(null);
|
|
1123
1131
|
console.log("\u{1F680} CrudifyDataProvider - Starting crudify initialization");
|
|
1132
|
+
console.log("\u{1F680} CrudifyDataProvider - Resolved config being passed:", {
|
|
1133
|
+
env: resolvedConfig.env,
|
|
1134
|
+
publicApiKey: resolvedConfig.publicApiKey ? `${resolvedConfig.publicApiKey.substring(0, 8)}...` : null,
|
|
1135
|
+
appName: resolvedConfig.appName,
|
|
1136
|
+
loginActionsCount: resolvedConfig.loginActions.length
|
|
1137
|
+
});
|
|
1124
1138
|
await crudifyInitializer.initialize({
|
|
1125
1139
|
env: resolvedConfig.env,
|
|
1126
1140
|
publicApiKey: resolvedConfig.publicApiKey,
|
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
secureSessionStorage,
|
|
11
11
|
tokenManager,
|
|
12
12
|
useCrudifyDataContext
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-E4QBRF4O.mjs";
|
|
14
14
|
|
|
15
15
|
// src/index.ts
|
|
16
16
|
import { default as default2 } from "@nocios/crudify-browser";
|
|
@@ -2370,7 +2370,7 @@ var useCrudifyInstance = () => {
|
|
|
2370
2370
|
}
|
|
2371
2371
|
try {
|
|
2372
2372
|
console.log("\u{1F504} useCrudifyInstance - waitForReady: Using CrudifyInitializer.waitForInitialization()");
|
|
2373
|
-
const { crudifyInitializer: crudifyInitializer2 } = await import("./CrudifyDataProvider-
|
|
2373
|
+
const { crudifyInitializer: crudifyInitializer2 } = await import("./CrudifyDataProvider-QJL635VY.mjs");
|
|
2374
2374
|
await crudifyInitializer2.waitForInitialization();
|
|
2375
2375
|
console.log("\u2705 useCrudifyInstance - waitForReady: CrudifyInitializer completed");
|
|
2376
2376
|
if (!crudifyInitializer2.isReady()) {
|
|
@@ -2512,7 +2512,7 @@ var useCrudifyInstance = () => {
|
|
|
2512
2512
|
};
|
|
2513
2513
|
var getCrudifyInstanceAsync = async () => {
|
|
2514
2514
|
console.log("\u{1F504} getCrudifyInstanceAsync - Starting");
|
|
2515
|
-
const { crudifyInitializer: crudifyInitializer2 } = await import("./CrudifyDataProvider-
|
|
2515
|
+
const { crudifyInitializer: crudifyInitializer2 } = await import("./CrudifyDataProvider-QJL635VY.mjs");
|
|
2516
2516
|
console.log("\u{1F504} getCrudifyInstanceAsync - Checking if ready");
|
|
2517
2517
|
console.log(" - crudifyInitializer.isReady():", crudifyInitializer2.isReady());
|
|
2518
2518
|
console.log(" - crudifyInitializer.getStatus():", crudifyInitializer2.getStatus());
|
|
@@ -2531,7 +2531,7 @@ var getCrudifyInstanceAsync = async () => {
|
|
|
2531
2531
|
return crudify5;
|
|
2532
2532
|
};
|
|
2533
2533
|
var getCrudifyInstanceSync = async () => {
|
|
2534
|
-
const { crudifyInitializer: crudifyInitializer2 } = await import("./CrudifyDataProvider-
|
|
2534
|
+
const { crudifyInitializer: crudifyInitializer2 } = await import("./CrudifyDataProvider-QJL635VY.mjs");
|
|
2535
2535
|
if (!crudifyInitializer2.isReady()) {
|
|
2536
2536
|
throw new Error("Crudify not ready. Use getCrudifyInstanceAsync() or call this from within a React component using useCrudifyInstance()");
|
|
2537
2537
|
}
|