@masterteam/dashboard-builder 0.0.3 → 0.0.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/dashboard-builder",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/dashboard-builder",
6
6
  "linkDirectory": true,
@@ -6,6 +6,7 @@ import { ContextMenu } from 'primeng/contextmenu';
6
6
  import { MenuItem } from 'primeng/api';
7
7
  import * as _angular_forms from '@angular/forms';
8
8
  import { ControlValueAccessor, FormGroup, FormArray, ValidationErrors } from '@angular/forms';
9
+ import { MTIcon } from '@masterteam/icons';
9
10
  import * as rxjs from 'rxjs';
10
11
  import { Observable } from 'rxjs';
11
12
  import { ColumnDef, TableAction } from '@masterteam/components/table';
@@ -786,10 +787,10 @@ declare class DashboardBuilder implements OnInit, OnDestroy {
786
787
  * Dashboard Viewer Component
787
788
  *
788
789
  * A read-only component for viewing and displaying dashboard layouts.
789
- * Similar to pageBuilder-gridster but without editing capabilities.
790
+ * Uses a CSS Grid preview layout without editing capabilities.
790
791
  *
791
792
  * Features:
792
- * - Gridster-based layout display (read-only)
793
+ * - CSS Grid-based layout display
793
794
  * - Chart/widget rendering
794
795
  * - Group support with tab switching
795
796
  * - Filter sidebar integration
@@ -807,6 +808,8 @@ declare class DashboardViewer implements OnInit, OnDestroy {
807
808
  readonly backButton: _angular_core.InputSignal<boolean>;
808
809
  /** Dashboard/Page ID to load */
809
810
  readonly pageId: _angular_core.InputSignal<string | number | null>;
811
+ /** Unified dashboard payload for local/preview rendering */
812
+ readonly dashboardData: _angular_core.InputSignal<DashboardBuilderData | null>;
810
813
  /** Pre-loaded charts (optional - if provided, skips API call) */
811
814
  readonly chartsData: _angular_core.InputSignal<DashboardChartItem[]>;
812
815
  /** Pre-loaded dialogs (optional) */
@@ -824,7 +827,6 @@ declare class DashboardViewer implements OnInit, OnDestroy {
824
827
  chart: DashboardChartItem;
825
828
  event: Event;
826
829
  }>;
827
- readonly gridsterContainer: _angular_core.Signal<any>;
828
830
  readonly loading: _angular_core.WritableSignal<boolean>;
829
831
  readonly pageConfig: _angular_core.WritableSignal<_masterteam_dashboard_builder.Report | null>;
830
832
  readonly charts: _angular_core.WritableSignal<DashboardChartItem[]>;
@@ -832,16 +834,23 @@ declare class DashboardViewer implements OnInit, OnDestroy {
832
834
  readonly filters: _angular_core.WritableSignal<any[]>;
833
835
  readonly languageCode: _angular_core.Signal<string>;
834
836
  readonly direction: _angular_core.Signal<"ltr" | "rtl">;
835
- readonly options: GridsterConfig;
837
+ readonly hasRenderableContent: _angular_core.Signal<boolean>;
838
+ readonly visibleItems: _angular_core.Signal<DashboardChartItem[]>;
839
+ readonly layoutHeight: _angular_core.Signal<string>;
836
840
  private subscription;
841
+ private readonly rowHeight;
842
+ private readonly hasSplitPreloadedData;
843
+ private dashboardDataEffect;
837
844
  private chartsDataEffect;
838
845
  private dialogsDataEffect;
839
846
  private filtersDataEffect;
847
+ private preloadedInputsEffect;
840
848
  private pageIdEffect;
841
849
  ngOnInit(): void;
842
850
  ngOnDestroy(): void;
843
851
  private setupSubscriptions;
844
852
  loadPage(id: string | number): void;
853
+ private applyDashboardData;
845
854
  reloadPage(): void;
846
855
  /**
847
856
  * Get the title for a group item
@@ -891,6 +900,14 @@ declare class DashboardViewer implements OnInit, OnDestroy {
891
900
  * Get chart type
892
901
  */
893
902
  getChartType(item: DashboardChartItem): string;
903
+ /**
904
+ * Get CSS grid column range for an item
905
+ */
906
+ getGridColumn(item: DashboardChartItem): string;
907
+ /**
908
+ * Get CSS grid row range for an item
909
+ */
910
+ getGridRow(item: DashboardChartItem): string;
894
911
  /**
895
912
  * Handle chart click
896
913
  */
@@ -900,7 +917,7 @@ declare class DashboardViewer implements OnInit, OnDestroy {
900
917
  */
901
918
  trackByDashboardId(_index: number, item: DashboardChartItem): string;
902
919
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DashboardViewer, never>;
903
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DashboardViewer, "mt-dashboard-viewer", never, { "isPage": { "alias": "isPage"; "required": false; "isSignal": true; }; "pageTitle": { "alias": "pageTitle"; "required": false; "isSignal": true; }; "backButton": { "alias": "backButton"; "required": false; "isSignal": true; }; "pageId": { "alias": "pageId"; "required": false; "isSignal": true; }; "chartsData": { "alias": "chartsData"; "required": false; "isSignal": true; }; "dialogsData": { "alias": "dialogsData"; "required": false; "isSignal": true; }; "filtersData": { "alias": "filtersData"; "required": false; "isSignal": true; }; "showFilters": { "alias": "showFilters"; "required": false; "isSignal": true; }; }, { "pageLoaded": "pageLoaded"; "onBack": "onBack"; "chartClick": "chartClick"; }, never, never, true, never>;
920
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DashboardViewer, "mt-dashboard-viewer", never, { "isPage": { "alias": "isPage"; "required": false; "isSignal": true; }; "pageTitle": { "alias": "pageTitle"; "required": false; "isSignal": true; }; "backButton": { "alias": "backButton"; "required": false; "isSignal": true; }; "pageId": { "alias": "pageId"; "required": false; "isSignal": true; }; "dashboardData": { "alias": "dashboardData"; "required": false; "isSignal": true; }; "chartsData": { "alias": "chartsData"; "required": false; "isSignal": true; }; "dialogsData": { "alias": "dialogsData"; "required": false; "isSignal": true; }; "filtersData": { "alias": "filtersData"; "required": false; "isSignal": true; }; "showFilters": { "alias": "showFilters"; "required": false; "isSignal": true; }; }, { "pageLoaded": "pageLoaded"; "onBack": "onBack"; "chartClick": "chartClick"; }, never, never, true, never>;
904
921
  }
905
922
 
906
923
  /**
@@ -2027,6 +2044,10 @@ declare class StatisticCardComponent implements OnInit {
2027
2044
  readonly cardClick: _angular_core.OutputEmitterRef<any>;
2028
2045
  /** Path for images */
2029
2046
  pathImages: string;
2047
+ private readonly fallbackIcon;
2048
+ private readonly availableIcons;
2049
+ private readonly availableIconsSet;
2050
+ private readonly iconByShortName;
2030
2051
  /** Language code */
2031
2052
  readonly languageCode: _angular_core.Signal<string>;
2032
2053
  readonly isArabic: _angular_core.Signal<boolean>;
@@ -2055,6 +2076,7 @@ declare class StatisticCardComponent implements OnInit {
2055
2076
  }>;
2056
2077
  ngOnInit(): void;
2057
2078
  onClick(): void;
2079
+ resolveIcon(icon: string | null | undefined): MTIcon;
2058
2080
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<StatisticCardComponent, never>;
2059
2081
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<StatisticCardComponent, "mt-statistic-card", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; "styleConfig": { "alias": "styleConfig"; "required": false; "isSignal": true; }; "configurationItem": { "alias": "configurationItem"; "required": false; "isSignal": true; }; }, { "cardClick": "cardClick"; }, never, never, true, never>;
2060
2082
  }
@@ -2386,6 +2408,13 @@ declare class BarChartHandler {
2386
2408
  * Format X axis value using the formatXAxis utility
2387
2409
  */
2388
2410
  private formatXAxisValue;
2411
+ /**
2412
+ * Resolve bar corner radius with backward-compatible values:
2413
+ * - undefined/null/true => default curved
2414
+ * - false/0 => square corners
2415
+ * - number/string => that numeric value
2416
+ */
2417
+ private resolveBarBorderRadius;
2389
2418
  /**
2390
2419
  * Apply bar override configurations
2391
2420
  */
@@ -2423,6 +2452,7 @@ declare class PieChartHandler {
2423
2452
 
2424
2453
  declare class StackBarChartHandler {
2425
2454
  private readonly storeService;
2455
+ private resolveStackBarBorderRadius;
2426
2456
  /**
2427
2457
  * Helper method to convert legend position based on language
2428
2458
  */