@masterteam/dashboard-builder 0.0.4 → 0.0.6

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.4",
3
+ "version": "0.0.6",
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';
@@ -95,6 +96,27 @@ interface BulkPropertyRequestItem {
95
96
  serviceName: string;
96
97
  selector: string;
97
98
  }
99
+ /**
100
+ * Canonical property metadata returned by backend reads.
101
+ */
102
+ interface CatalogPropertyDto {
103
+ id: number;
104
+ key: string;
105
+ normalizedKey: string;
106
+ name: string;
107
+ viewType: string;
108
+ configuration: string | Record<string, unknown> | null;
109
+ hasName?: boolean;
110
+ hasKey?: boolean;
111
+ hasNormalizedKey?: boolean;
112
+ hasConfiguration?: boolean;
113
+ hasViewType?: boolean;
114
+ source?: string;
115
+ order?: number;
116
+ isRequired?: boolean;
117
+ isSystem?: boolean;
118
+ isTranslatable?: boolean;
119
+ }
98
120
  /**
99
121
  * Request for bulk properties lookup from gateway
100
122
  */
@@ -111,12 +133,21 @@ interface BulkPropertiesResponseItem {
111
133
  selectorName?: string;
112
134
  properties: PropertyItem$1[];
113
135
  }
136
+ /**
137
+ * Raw response item from bulk properties lookup.
138
+ */
139
+ interface BulkPropertiesResponseItemDto {
140
+ serviceName: string;
141
+ selector: string;
142
+ selectorName?: string;
143
+ properties: CatalogPropertyDto[];
144
+ }
114
145
  /**
115
146
  * Response wrapper from bulk properties lookup
116
147
  * API returns { data: { items: [...] } }
117
148
  */
118
149
  interface BulkPropertiesResponse {
119
- items: BulkPropertiesResponseItem[];
150
+ items: BulkPropertiesResponseItemDto[];
120
151
  }
121
152
  /**
122
153
  * Property item from module properties response
@@ -124,16 +155,21 @@ interface BulkPropertiesResponse {
124
155
  interface PropertyItem$1 {
125
156
  id: number;
126
157
  name: string;
127
- hasName: boolean;
158
+ label?: string;
159
+ hasName?: boolean;
128
160
  key: string;
129
- hasKey: boolean;
161
+ hasKey?: boolean;
130
162
  normalizedKey: string;
131
- hasNormalizedKey: boolean;
132
- configuration: string;
133
- hasConfiguration: boolean;
163
+ hasNormalizedKey?: boolean;
164
+ configuration: Record<string, unknown> | null;
165
+ hasConfiguration?: boolean;
134
166
  viewType: string;
135
- hasViewType: boolean;
167
+ hasViewType?: boolean;
136
168
  isTranslatable: boolean;
169
+ source?: string;
170
+ order?: number;
171
+ isRequired?: boolean;
172
+ isSystem?: boolean;
137
173
  }
138
174
  /**
139
175
  * Property items response (lookup/status values)
@@ -155,7 +191,7 @@ interface PropertyItemOption {
155
191
  * Response from /metadata/{service}/modules/{moduleId}/properties
156
192
  */
157
193
  interface PropertiesResponse {
158
- properties: PropertyItem$1[];
194
+ properties: CatalogPropertyDto[];
159
195
  }
160
196
  /**
161
197
  * Report URL configuration for dashboard exports
@@ -474,23 +510,9 @@ interface IModule {
474
510
  * Property definition from API
475
511
  * Maps to PropertyItem from dashboard.model.ts
476
512
  */
477
- interface IProperty {
478
- id: number;
479
- name: string;
480
- hasName?: boolean;
481
- key: string;
482
- hasKey?: boolean;
483
- normalizedKey: string;
484
- hasNormalizedKey?: boolean;
485
- configuration?: string;
486
- hasConfiguration?: boolean;
487
- viewType: string;
488
- hasViewType?: boolean;
489
- isTranslatable: boolean;
513
+ interface IProperty extends PropertyItem$1 {
490
514
  /** @deprecated Use PropertyItem.isCalculated when available */
491
515
  isCalculated?: boolean;
492
- /** @deprecated Use sorting on client side */
493
- order?: number;
494
516
  description?: string;
495
517
  }
496
518
  /**
@@ -2043,6 +2065,10 @@ declare class StatisticCardComponent implements OnInit {
2043
2065
  readonly cardClick: _angular_core.OutputEmitterRef<any>;
2044
2066
  /** Path for images */
2045
2067
  pathImages: string;
2068
+ private readonly fallbackIcon;
2069
+ private readonly availableIcons;
2070
+ private readonly availableIconsSet;
2071
+ private readonly iconByShortName;
2046
2072
  /** Language code */
2047
2073
  readonly languageCode: _angular_core.Signal<string>;
2048
2074
  readonly isArabic: _angular_core.Signal<boolean>;
@@ -2071,6 +2097,7 @@ declare class StatisticCardComponent implements OnInit {
2071
2097
  }>;
2072
2098
  ngOnInit(): void;
2073
2099
  onClick(): void;
2100
+ resolveIcon(icon: string | null | undefined): MTIcon;
2074
2101
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<StatisticCardComponent, never>;
2075
2102
  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>;
2076
2103
  }
@@ -2402,6 +2429,13 @@ declare class BarChartHandler {
2402
2429
  * Format X axis value using the formatXAxis utility
2403
2430
  */
2404
2431
  private formatXAxisValue;
2432
+ /**
2433
+ * Resolve bar corner radius with backward-compatible values:
2434
+ * - undefined/null/true => default curved
2435
+ * - false/0 => square corners
2436
+ * - number/string => that numeric value
2437
+ */
2438
+ private resolveBarBorderRadius;
2405
2439
  /**
2406
2440
  * Apply bar override configurations
2407
2441
  */
@@ -2439,6 +2473,7 @@ declare class PieChartHandler {
2439
2473
 
2440
2474
  declare class StackBarChartHandler {
2441
2475
  private readonly storeService;
2476
+ private resolveStackBarBorderRadius;
2442
2477
  /**
2443
2478
  * Helper method to convert legend position based on language
2444
2479
  */
@@ -4883,4 +4918,4 @@ declare class GetChartActionsPipe implements PipeTransform {
4883
4918
  declare function cloneDeep<T>(obj: T): T;
4884
4919
 
4885
4920
  export { ActionsSettings, BarChartHandler, BarControlUi, CHART_TYPES, CardContentComponent, CardFilterComponent, CardInfoComponent, ChartCardComponent, ChartDataService, ChartSettingsDrawer, ChartViewer, ComparisonChartHandler, DashboardBuilder, DashboardBuilderService, DashboardItem, DashboardItemStoreService, DashboardList, DashboardStoreService, DashboardViewer, DataSourceSettings, DefaultControlUi, DisplaySettings, DynamicFiltersComponent, DynamicFiltersConfig, EChartComponent, EntityInfoComponent, EntityPreviewCardComponent, FilterByGroupPipe, GaugeChartHandler, GeneralSettings, GetChartActionsPipe, HTTPMethod, HeaderCardComponent, LevelCardHandler, LevelCardListComponent, LineChartHandler, ListStatisticCardComponent, ManageBreadcrumb, ManageFilterOnPage, ManageItem, ManageItemService, ManagePages, MapChartHandler, OverviewCardHandler, PhaseGateStepperHandler, PieChartHandler, PieControlUi, RingGaugeChartHandler, SPlusChartHandler, SkeletonCardComponent, SnapshotHandler, SplitterChartHandler, StackBarChartHandler, StackBarControlUi, StaticFiltersComponent, StatisticCardComponent, TableCardComponent, TableViewHandler, TimelineHandler, addCommasToNumber, axisFormatters, cloneDeep, createAxisFormatter, createTooltipFormatter, dynamicReorder, dynamicTextReplace, formatCurrency, formatDate, formatNumber, formatPercentage, formatValue, formatWordsUnderBar, formatXAxis, generalConfiguration, getColorFromConditions, getLanguageCode, getLocalizedTitle, getNestedData, groupDatesByYearAndMonth, handleFilterForCard, handleFilterForSnapshot, handleFiltersForCustom, isMobilePlatform, sortChartData, sortDataTableView, switchAllKeysSmall, switchAllKeysToLower };
4886
- export type { ActionConfig, ApiResponse, BarChartData, BreadcrumbItem, BulkLinkChartRequest, BulkLinkChartResponse, BulkPropertiesRequest, BulkPropertiesResponse, BulkPropertiesResponseItem, BulkPropertyRequestItem, CardBorderStyleConfig, CardInfoConfig$1 as CardInfoConfig, CardStyleConfig$1 as CardStyleConfig, ChartActionEvent, ChartActionsContext, ChartData, ChartDataHandled, ChartLabel, ChartLinkConfiguration, ChartTypeConfig, ClientConfig, ComponentType, CustomApi, DashboardBuilderData, DashboardChartItem, DashboardDialogItem, DashboardItemStore, DashboardListEvent, DashboardPage, DisplayConfig, EChartSeriesItem, ExcelSheet, FilterConfig, FilterOption, FormatXAxisConfig$1 as FormatXAxisConfig, GroupedModuleOption, HandleAction, HeaderCardConfig$1 as HeaderCardConfig, IModule, IModuleType, IProperty, IPropertyWithGroup, ISelection, ItemConfig, LevelCardData, LevelCardProperty, LinkChartRequest, LocalizedName, ModuleItem, ModuleSelectOption, ModuleType, ModuleValue, ModulesTreeRequest, ModulesTreeResponse, PhaseGateProperty, PhaseGateStep, PieChartData, PropertiesResponse, PropertyItem$1 as PropertyItem, PropertyItemOption, PropertyItemsResponse, QuickManageType, Report, ReportChartLink, ReportDashboardConfig, ReportExcelConfig, ReportType, ReportUrl, RequestType, SelectionFilter, ServiceConfig, ServiceItem, SourceLink, StaticFilterConfig, StaticFilterItem, StatisticCardData, StyleConfig, TableColumn$1 as TableColumn, TableViewData, TimelineData, TimelineItem, UnlinkChartRequest };
4921
+ export type { ActionConfig, ApiResponse, BarChartData, BreadcrumbItem, BulkLinkChartRequest, BulkLinkChartResponse, BulkPropertiesRequest, BulkPropertiesResponse, BulkPropertiesResponseItem, BulkPropertiesResponseItemDto, BulkPropertyRequestItem, CardBorderStyleConfig, CardInfoConfig$1 as CardInfoConfig, CardStyleConfig$1 as CardStyleConfig, CatalogPropertyDto, ChartActionEvent, ChartActionsContext, ChartData, ChartDataHandled, ChartLabel, ChartLinkConfiguration, ChartTypeConfig, ClientConfig, ComponentType, CustomApi, DashboardBuilderData, DashboardChartItem, DashboardDialogItem, DashboardItemStore, DashboardListEvent, DashboardPage, DisplayConfig, EChartSeriesItem, ExcelSheet, FilterConfig, FilterOption, FormatXAxisConfig$1 as FormatXAxisConfig, GroupedModuleOption, HandleAction, HeaderCardConfig$1 as HeaderCardConfig, IModule, IModuleType, IProperty, IPropertyWithGroup, ISelection, ItemConfig, LevelCardData, LevelCardProperty, LinkChartRequest, LocalizedName, ModuleItem, ModuleSelectOption, ModuleType, ModuleValue, ModulesTreeRequest, ModulesTreeResponse, PhaseGateProperty, PhaseGateStep, PieChartData, PropertiesResponse, PropertyItem$1 as PropertyItem, PropertyItemOption, PropertyItemsResponse, QuickManageType, Report, ReportChartLink, ReportDashboardConfig, ReportExcelConfig, ReportType, ReportUrl, RequestType, SelectionFilter, ServiceConfig, ServiceItem, SourceLink, StaticFilterConfig, StaticFilterItem, StatisticCardData, StyleConfig, TableColumn$1 as TableColumn, TableViewData, TimelineData, TimelineItem, UnlinkChartRequest };