osi-cards-lib 1.5.44 → 1.5.46

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/README.md CHANGED
@@ -46,10 +46,17 @@ npm install @angular/common@^17.0.0 @angular/core@^17.0.0 @angular/animations@^1
46
46
 
47
47
  ### Optional Dependencies (for charts and maps)
48
48
 
49
+ **Important:** These dependencies are optional but **required** if you use chart or map sections in your cards.
50
+
49
51
  ```bash
50
52
  npm install frappe-charts leaflet
51
53
  ```
52
54
 
55
+ - **frappe-charts**: Required for `chart` section type (bar, line, pie, doughnut, area charts)
56
+ - **leaflet**: Required for `map` section type (geographic location maps)
57
+
58
+ **Note:** If you use chart or map sections without installing these dependencies, you'll see error messages in the console and the sections will display error states. The library will gracefully handle missing dependencies, but functionality will be limited.
59
+
53
60
  ---
54
61
 
55
62
  ## Integration Guide
@@ -442,6 +449,41 @@ npm install lucide-angular@^0.292.0
442
449
  - The `[theme]` input automatically sets the `data-theme` attribute
443
450
  - Check browser console for any errors
444
451
 
452
+ ### Chart sections not rendering / "Failed to resolve import 'frappe-charts'" error
453
+
454
+ If you're using chart sections (`type: "chart"`) and encounter build errors or see error messages in the console:
455
+
456
+ 1. **Install frappe-charts:**
457
+ ```bash
458
+ npm install frappe-charts
459
+ ```
460
+
461
+ 2. **Verify installation:**
462
+ - Check that `frappe-charts` appears in your `package.json` dependencies
463
+ - Ensure `node_modules/frappe-charts` exists
464
+
465
+ 3. **Rebuild your application:**
466
+ ```bash
467
+ npm install # If you just added the dependency
468
+ ng serve # Restart dev server
469
+ # or
470
+ ng build # Rebuild
471
+ ```
472
+
473
+ 4. **If using Vite/Angular 17+**: The library now handles missing dependencies gracefully. If you see "frappe-charts is not installed" in the console, simply install it as shown above.
474
+
475
+ **Note:** Chart sections will display an error state if `frappe-charts` is not installed. The library handles this gracefully, but charts won't render until the dependency is installed.
476
+
477
+ ### Map sections not rendering
478
+
479
+ Similar to charts, map sections require `leaflet` to be installed:
480
+
481
+ ```bash
482
+ npm install leaflet
483
+ ```
484
+
485
+ If you're not using map sections, you can skip this dependency.
486
+
445
487
  ---
446
488
 
447
489
  ## License