@masterteam/dashboard-builder 0.0.57 → 0.0.58

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.
@@ -1,2 +1,2 @@
1
- export { ay as ActionsSettings, aG as ArrayBuilderField, I as BarChartHandler, ar as BarControlUi, aU as CHART_CAPABILITIES, au as CHART_TYPES, b7 as CONFIG_DOMAINS, C as CardContentComponent, q as CardFilterComponent, t as CardInfoComponent, u as ChartCardComponent, G as ChartDataService, aK as ChartFilterDrawer, an as ChartSettingsDrawer, az as ChartViewer, aF as ColorListField, X as ComparisonChartHandler, b as DashboardBuilder, ag as DashboardBuilderService, a as DashboardItem, D as DashboardItemStoreService, ae as DashboardList, ah as DashboardStoreService, d as DashboardViewer, ax as DataSourceSettings, aQ as DatasourcePanelComponent, ap as DefaultControlUi, ao as DisplaySettings, r as DynamicFiltersComponent, am as DynamicFiltersConfig, E as EChartComponent, P as EntitiesPreviewCardComponent, v as EntityInfoComponent, x as EntityPreviewCardComponent, aP as FilterBuilderComponent, aS as FilterByGroupPipe, aO as FilterChipsBarComponent, O as GaugeChartHandler, aw as GeneralSettings, aT as GetChartActionsPipe, aN as GuidedConfigDialogComponent, af as HTTPMethod, H as HeaderCardComponent, bR as ITEM_GUIDANCE_REGISTRY, aJ as ItemCardMenuComponent, aM as ItemConfigPopoverComponent, aL as ItemContextToolbarComponent, bT as ItemGuidanceService, aH as KeyValueMapField, L as LastHistoryLevelCardComponent, aI as LegendOrderField, Z as LevelCardHandler, V as LineChartHandler, y as ListStatisticCardComponent, ak as ManageBreadcrumb, al as ManageFilterOnPage, at as ManageItem, av as ManageItemService, aj as ManagePages, _ as MapChartHandler, R as OverviewCardHandler, ba as POPOVER_TABS, bb as POPOVER_TAB_SPECS, a1 as PhaseGateStepperHandler, J as PieChartHandler, aq as PieControlUi, P as PropertiesCardComponent, $ as RingGaugeChartHandler, a0 as SPlusChartHandler, bs as STYLE_PRESETS, aR as SchemaControlRendererComponent, aE as SegmentedField, z as SkeletonCardComponent, W as SnapshotHandler, Y as SplitterChartHandler, K as StackBarChartHandler, as as StackBarControlUi, S as StaticFiltersComponent, A as StatisticCardComponent, aD as StyleField, aB as StyleSettingsRenderer, aA as StyleStudioDrawer, T as TableCardComponent, Q as TableViewHandler, U as TimelineHandler, B as TopbarCardComponent, m as addCommasToNumber, bo as applyBehaviorToPersisted, bD as applyControlPatchToPersisted, bE as applyControlPatchesToPersisted, bp as applyFilterChipsToPersisted, bm as applyLabelLegendFormatToPersisted, bk as applyLayoutToPersisted, bi as applyStyleToPersisted, bd as applyTitleToPersisted, M as axisFormatters, bn as behaviorToUi, bM as bindingKey, br as buildAssembly, bL as buildDisplayFieldPredicate, c as cloneDeep, a7 as createAxisFormatter, a8 as createTooltipFormatter, be as datasourceToUi, bz as deepMerge, bS as describeGuidance, b8 as domainsForCapability, h as dynamicReorder, f as dynamicTextReplace, aC as expandResetPatches, bf as fieldsToUi, bg as filtersToUi, b9 as findDomain, bu as findPreset, bJ as flattenSchema, a2 as formatCurrency, a6 as formatDate, bA as formatForEditor, a5 as formatNumber, a4 as formatPercentage, j as formatValue, a9 as formatWordsUnderBar, aa as formatXAxis, i as generalConfiguration, bN as getBinding, aV as getCapabilityById, p as getColorFromConditions, bF as getControlSchema, a3 as getCurrencySuffix, bI as getFallbackControlSchema, k as getLocalizedTitle, g as getNestedData, N as groupDatesByYearAndMonth, bx as groupIssuesByDomain, ac as handleFilterForCard, ad as handleFilterForSnapshot, ab as handleFiltersForCustom, bw as hasBlockingIssues, ai as isManagePagesDeleteResult, o as isMobilePlatform, bl as labelLegendFormatToUi, bj as layoutToUi, bO as listBindings, bP as listBindingsForChart, bG as listControlSchemaIds, bH as listControlSchemas, b1 as moduleIdFromSelector, a_ as normalizeAggregateFunction, b6 as normalizeBeforeRequest, b5 as normalizeBeforeSave, aY as normalizeChartTypeForRequest, w as normalizeDashboardCardEntityValue, aZ as normalizeFilterOperation, a$ as normalizeFilters, b4 as normalizeOnLoad, by as parseAdvancedJson, bq as persistedToUi, bt as presetsForCapability, bQ as readBoundValue, bB as readByPath, aW as resolveCapability, bK as resolveDisplayFields, b0 as selectorFromLegacy, bC as setByPath, l as sortChartData, n as sortDataTableView, bh as styleToUi, e as switchAllKeysSmall, s as switchAllKeysToLower, bc as titleToUi, aX as toBackendChartType, b2 as toBackendSourceLink, b3 as toFormSourceLink, bv as validate } from './masterteam-dashboard-builder-masterteam-dashboard-builder-DbySCZwd.mjs';
1
+ export { ay as ActionsSettings, aG as ArrayBuilderField, I as BarChartHandler, ar as BarControlUi, aU as CHART_CAPABILITIES, au as CHART_TYPES, b7 as CONFIG_DOMAINS, C as CardContentComponent, q as CardFilterComponent, t as CardInfoComponent, u as ChartCardComponent, G as ChartDataService, aK as ChartFilterDrawer, an as ChartSettingsDrawer, az as ChartViewer, aF as ColorListField, X as ComparisonChartHandler, b as DashboardBuilder, ag as DashboardBuilderService, a as DashboardItem, D as DashboardItemStoreService, ae as DashboardList, ah as DashboardStoreService, d as DashboardViewer, ax as DataSourceSettings, aQ as DatasourcePanelComponent, ap as DefaultControlUi, ao as DisplaySettings, r as DynamicFiltersComponent, am as DynamicFiltersConfig, E as EChartComponent, P as EntitiesPreviewCardComponent, v as EntityInfoComponent, x as EntityPreviewCardComponent, aP as FilterBuilderComponent, aS as FilterByGroupPipe, aO as FilterChipsBarComponent, O as GaugeChartHandler, aw as GeneralSettings, aT as GetChartActionsPipe, aN as GuidedConfigDialogComponent, af as HTTPMethod, H as HeaderCardComponent, bR as ITEM_GUIDANCE_REGISTRY, aJ as ItemCardMenuComponent, aM as ItemConfigPopoverComponent, aL as ItemContextToolbarComponent, bT as ItemGuidanceService, aH as KeyValueMapField, L as LastHistoryLevelCardComponent, aI as LegendOrderField, Z as LevelCardHandler, V as LineChartHandler, y as ListStatisticCardComponent, ak as ManageBreadcrumb, al as ManageFilterOnPage, at as ManageItem, av as ManageItemService, aj as ManagePages, _ as MapChartHandler, R as OverviewCardHandler, ba as POPOVER_TABS, bb as POPOVER_TAB_SPECS, a1 as PhaseGateStepperHandler, J as PieChartHandler, aq as PieControlUi, P as PropertiesCardComponent, $ as RingGaugeChartHandler, a0 as SPlusChartHandler, bs as STYLE_PRESETS, aR as SchemaControlRendererComponent, aE as SegmentedField, z as SkeletonCardComponent, W as SnapshotHandler, Y as SplitterChartHandler, K as StackBarChartHandler, as as StackBarControlUi, S as StaticFiltersComponent, A as StatisticCardComponent, aD as StyleField, aB as StyleSettingsRenderer, aA as StyleStudioDrawer, T as TableCardComponent, Q as TableViewHandler, U as TimelineHandler, B as TopbarCardComponent, m as addCommasToNumber, bo as applyBehaviorToPersisted, bD as applyControlPatchToPersisted, bE as applyControlPatchesToPersisted, bp as applyFilterChipsToPersisted, bm as applyLabelLegendFormatToPersisted, bk as applyLayoutToPersisted, bi as applyStyleToPersisted, bd as applyTitleToPersisted, M as axisFormatters, bn as behaviorToUi, bM as bindingKey, br as buildAssembly, bL as buildDisplayFieldPredicate, c as cloneDeep, a7 as createAxisFormatter, a8 as createTooltipFormatter, be as datasourceToUi, bz as deepMerge, bS as describeGuidance, b8 as domainsForCapability, h as dynamicReorder, f as dynamicTextReplace, aC as expandResetPatches, bf as fieldsToUi, bg as filtersToUi, b9 as findDomain, bu as findPreset, bJ as flattenSchema, a2 as formatCurrency, a6 as formatDate, bA as formatForEditor, a5 as formatNumber, a4 as formatPercentage, j as formatValue, a9 as formatWordsUnderBar, aa as formatXAxis, i as generalConfiguration, bN as getBinding, aV as getCapabilityById, p as getColorFromConditions, bF as getControlSchema, a3 as getCurrencySuffix, bI as getFallbackControlSchema, k as getLocalizedTitle, g as getNestedData, N as groupDatesByYearAndMonth, bx as groupIssuesByDomain, ac as handleFilterForCard, ad as handleFilterForSnapshot, ab as handleFiltersForCustom, bw as hasBlockingIssues, ai as isManagePagesDeleteResult, o as isMobilePlatform, bl as labelLegendFormatToUi, bj as layoutToUi, bO as listBindings, bP as listBindingsForChart, bG as listControlSchemaIds, bH as listControlSchemas, b1 as moduleIdFromSelector, a_ as normalizeAggregateFunction, b6 as normalizeBeforeRequest, b5 as normalizeBeforeSave, aY as normalizeChartTypeForRequest, w as normalizeDashboardCardEntityValue, aZ as normalizeFilterOperation, a$ as normalizeFilters, b4 as normalizeOnLoad, by as parseAdvancedJson, bq as persistedToUi, bt as presetsForCapability, bQ as readBoundValue, bB as readByPath, aW as resolveCapability, bK as resolveDisplayFields, b0 as selectorFromLegacy, bC as setByPath, l as sortChartData, n as sortDataTableView, bh as styleToUi, e as switchAllKeysSmall, s as switchAllKeysToLower, bc as titleToUi, aX as toBackendChartType, b2 as toBackendSourceLink, b3 as toFormSourceLink, bv as validate } from './masterteam-dashboard-builder-masterteam-dashboard-builder-F3nIcsti.mjs';
2
2
  //# sourceMappingURL=masterteam-dashboard-builder.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/dashboard-builder",
3
- "version": "0.0.57",
3
+ "version": "0.0.58",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/dashboard-builder",
6
6
  "linkDirectory": true,
@@ -23,9 +23,9 @@
23
23
  "quill": "^2.0.3",
24
24
  "rxjs": "^7.8.2",
25
25
  "tailwindcss": "^4.2.2",
26
- "@masterteam/components": "^0.0.226",
27
- "@masterteam/timeline": "^0.0.17",
28
- "@masterteam/formula-builder": "^0.0.26",
26
+ "@masterteam/formula-builder": "^0.0.25",
27
+ "@masterteam/components": "^0.0.225",
28
+ "@masterteam/timeline": "^0.0.18",
29
29
  "@masterteam/icons": "^0.0.17"
30
30
  },
31
31
  "dependencies": {
@@ -595,18 +595,20 @@ declare class ItemCardMenuComponent {
595
595
  /** Backend ChartType enum names that the host BE accepts in execution payloads. */
596
596
  type BackendChartType = 'BarChart' | 'PropertiesBarChar' | 'DonutChart' | 'TableChart' | 'SplitterChart' | 'BarStackChart' | 'TimeLine' | 'OverviewCard' | 'TableView' | 'PercentagePieChart' | 'Properties' | 'FormulaBarChart' | 'ComparisonChart' | 'BarV2Chart' | 'PieV2Chart' | 'StackBarV2Chart' | 'CardViewV2Chart' | 'GaugeChart' | 'LineChart' | 'SplitChart' | 'GaugeComponentChart' | 'PropertyCardView';
597
597
  type RequestType$1 = 'level' | 'levellog' | 'log' | 'custom' | 'snapShot' | 'levelCards' | 'timelineProjectDependencies' | 'customSplus' | 'phaseGate';
598
- type QueryEditorKind = 'none' | 'general' | 'table' | 'properties' | 'timeline' | 'timelineMultiLevel' | 'map' | 'splitter' | 'snapshot' | 'phaseGate' | 'repeater';
598
+ type QueryEditorKind = 'none' | 'general' | 'table' | 'properties' | 'timeline' | 'timelineMultiLevel' | 'phaseGateTable' | 'map' | 'splitter' | 'snapshot' | 'phaseGate' | 'repeater';
599
599
  type RendererKey = 'chart' | 'map' | 'table' | 'phaseGateTable' | 'timeline' | 'listStatistic' | 'levelCards' | 'properties' | 'entityPreview' | 'performanceCard' | 'performanceGaugeCard' | 'splitter' | 'phaseGateStepper' | 'header' | 'topbar' | 'repeater' | 'group' | 'raw';
600
600
  type Product = 'pplus' | 'splus' | 'report';
601
601
  /** Generic display schema field key. Open string to allow registry-specific extensions. */
602
602
  type DisplayField = string;
603
603
  /** Generic query schema field key. */
604
- type QueryField = 'valueProperty' | 'aggregateFunction' | 'groupByProperties' | 'autoStack' | 'stackProperties' | 'autoStackByProperty' | 'categoryProperty' | 'color' | 'formula' | 'filters' | 'extraProperties' | 'showAdvancedSettings' | 'barType';
604
+ type QueryField = 'valueProperty' | 'aggregateFunction' | 'groupByProperties' | 'autoStack' | 'stackProperties' | 'autoStackByProperty' | 'categoryProperty' | 'color' | 'formula' | 'filters' | 'extraProperties' | 'showAdvancedSettings' | 'barType' | 'baseProperties' | 'rowIdentityProperty' | 'phaseNameProperty' | 'phaseIdProperty' | 'phaseOrderProperty' | 'phaseStatusProperty' | 'phaseProgressProperty' | 'phaseIsCurrentProperty' | 'phaseIsCompletedProperty' | 'phaseAllItemsCompletedProperty';
605
605
  interface QuerySchema {
606
606
  /** Visible chart-specific fields (subset of QueryField, in chosen order). */
607
607
  fields: QueryField[];
608
608
  /** Required fields before save. */
609
609
  required: QueryField[];
610
+ /** At least one of these fields must be configured when the list is set. */
611
+ requiredAnyOf?: QueryField[];
610
612
  }
611
613
  interface DisplaySchema {
612
614
  /** Visible display-config fields. */
@@ -1106,8 +1108,8 @@ declare function findPreset(key: StylePresetKey): StylePreset | undefined;
1106
1108
  * surface them next to the right control.
1107
1109
  *
1108
1110
  * Validators are read-only — they never mutate the input. They DO honor
1109
- * the manifest schema (`capability.query.schema.required`) so a chart can
1110
- * declare which fields must be present before save is allowed.
1111
+ * the manifest schema (`required` / `requiredAnyOf`) so a chart can declare
1112
+ * which fields must be present before save is allowed.
1111
1113
  */
1112
1114
 
1113
1115
  type ValidationSeverity = 'error' | 'warning' | 'info';
@@ -2280,6 +2282,7 @@ declare class DatasourcePanelComponent {
2280
2282
  readonly serviceConfigChange: _angular_core.OutputEmitterRef<Partial<ServiceConfig>>;
2281
2283
  readonly openAdvanced: _angular_core.OutputEmitterRef<void>;
2282
2284
  readonly config: _angular_core.Signal<ItemConfig | null>;
2285
+ readonly capability: _angular_core.Signal<_masterteam_dashboard_builder.ChartCapability | null>;
2283
2286
  readonly chartTypeConfig: _angular_core.Signal<ChartTypeConfig | null>;
2284
2287
  readonly summary: _angular_core.Signal<{
2285
2288
  chartType: string;
@@ -3262,7 +3265,6 @@ declare class DashboardItem implements OnInit, OnDestroy {
3262
3265
  private initialized;
3263
3266
  /** Track current dashboardId to detect changes */
3264
3267
  private currentDashboardId;
3265
- private isMissingQueryValue;
3266
3268
  constructor();
3267
3269
  ngOnInit(): void;
3268
3270
  /**
@@ -4600,11 +4602,21 @@ declare class TableCardComponent implements OnInit, OnDestroy {
4600
4602
  private resolveConfiguredTableKeys;
4601
4603
  private toStringArray;
4602
4604
  private findLargestRow;
4605
+ private isCanonicalPhaseGateQuery;
4603
4606
  private resolvePhaseGateFields;
4604
4607
  private findFirstFieldValue;
4605
- private isPhaseGateMetaField;
4608
+ private readPhaseGateProperty;
4609
+ private resolvePhaseGateFieldKey;
4610
+ private resolveLegacyPhaseGateAlias;
4611
+ private resolveLegacyFieldByViewType;
4612
+ private getPhaseGateFieldValue;
4613
+ private isConfiguredPhaseMetadataField;
4614
+ private isLegacyPhaseGateMetaField;
4606
4615
  private toPhaseColumnKey;
4607
- private getPhaseGateGroupKey;
4616
+ private comparePhaseGateOrder;
4617
+ private getCanonicalPhaseGateGroupKey;
4618
+ private getLegacyPhaseGateGroupKey;
4619
+ private toStablePhaseGateValue;
4608
4620
  private buildPhaseGateCell;
4609
4621
  getLegendColor(label: any): string;
4610
4622
  getLegendText(label: any): string;
@@ -5526,7 +5538,8 @@ declare class PhaseGateStepperHandler {
5526
5538
  * Number, currency, and date formatting utilities.
5527
5539
  */
5528
5540
  /**
5529
- * Format large numbers with suffixes (K, M, B, T)
5541
+ * Format currency with the host pattern, falling back to legacy K/M/B/T
5542
+ * compaction when no canonical system pattern is available.
5530
5543
  */
5531
5544
  declare function formatCurrency(value: number | string | null | undefined, config?: {
5532
5545
  type?: 'currency';
@@ -7454,6 +7467,30 @@ declare class GeneralSettings {
7454
7467
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<GeneralSettings, "mt-general-settings", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; "isDialog": { "alias": "isDialog"; "required": false; "isSignal": true; }; "hasPreselectedType": { "alias": "hasPreselectedType"; "required": false; "isSignal": true; }; }, { "configChange": "configChange"; "chartTypeChange": "chartTypeChange"; }, never, never, true, never>;
7455
7468
  }
7456
7469
 
7470
+ /**
7471
+ * Canonical query contract for the PhaseGate table.
7472
+ *
7473
+ * `baseProperties` is the ordered list of business columns shown to the user.
7474
+ * `properties` and `selectedProperties` are identical backend projections and
7475
+ * are always rebuilt from the visible properties plus every configured role.
7476
+ */
7477
+ interface PhaseGateTableQueryConfig {
7478
+ rowIdentityProperty: string;
7479
+ phaseNameProperty: string;
7480
+ phaseIdProperty: string;
7481
+ phaseOrderProperty: string;
7482
+ phaseStatusProperty: string;
7483
+ phaseProgressProperty: string;
7484
+ phaseIsCurrentProperty: string;
7485
+ phaseIsCompletedProperty: string;
7486
+ phaseAllItemsCompletedProperty: string;
7487
+ baseProperties: string[];
7488
+ properties: string[];
7489
+ selectedProperties: string[];
7490
+ }
7491
+ declare const PHASE_GATE_TABLE_ROLE_FIELDS: readonly ["rowIdentityProperty", "phaseNameProperty", "phaseIdProperty", "phaseOrderProperty", "phaseStatusProperty", "phaseProgressProperty", "phaseIsCurrentProperty", "phaseIsCompletedProperty", "phaseAllItemsCompletedProperty"];
7492
+ type PhaseGateTableRoleField = (typeof PHASE_GATE_TABLE_ROLE_FIELDS)[number];
7493
+
7457
7494
  /**
7458
7495
  * Selection module info for linking - includes properties for each selection
7459
7496
  */
@@ -7589,7 +7626,7 @@ interface ModuleProperties {
7589
7626
  /**
7590
7627
  * Query component type based on chart type and component name
7591
7628
  */
7592
- type QueryComponentType = 'general' | 'table' | 'timeline' | 'timelineMultiLevel' | 'map' | 'splitter' | 'properties' | 'snapshot' | 'phaseGate' | 'repeater' | 'none';
7629
+ type QueryComponentType = 'general' | 'table' | 'timeline' | 'timelineMultiLevel' | 'phaseGateTable' | 'map' | 'splitter' | 'properties' | 'snapshot' | 'phaseGate' | 'repeater' | 'none';
7593
7630
  type TimelineTimeFrame = 'monthly' | 'quarterly' | 'biannually' | 'annually';
7594
7631
  /**
7595
7632
  * Data Source Settings Component
@@ -7838,6 +7875,21 @@ declare class DataSourceSettings {
7838
7875
  * Handle table query change
7839
7876
  */
7840
7877
  onTableQueryChange(query: TableQuery): void;
7878
+ /**
7879
+ * Update one semantic PhaseGate table role by property key.
7880
+ *
7881
+ * The backend projection is rebuilt on every edit so it always contains the
7882
+ * visible columns and every runtime role, independent of picker order.
7883
+ */
7884
+ onPhaseGateTableRoleChange(field: PhaseGateTableRoleField, value: string | null): void;
7885
+ /** Update the ordered business columns rendered before the phase columns. */
7886
+ onPhaseGateTableBasePropertiesChange(values: string[]): void;
7887
+ /**
7888
+ * Persist the dedicated PhaseGate query and remove fields left by the old
7889
+ * generic table editor. `baseProperties` is the ordered visible-column list;
7890
+ * both backend projection aliases are rebuilt by the shared normalizer.
7891
+ */
7892
+ private commitPhaseGateTableQuery;
7841
7893
  /**
7842
7894
  * Handle timeline query change
7843
7895
  */
@@ -7903,6 +7955,8 @@ declare class DataSourceSettings {
7903
7955
  * Reads the phaseGate levelId — convenience accessor for the template.
7904
7956
  */
7905
7957
  readonly phaseGateLevelId: _angular_core.Signal<string>;
7958
+ /** Dedicated PhaseGate table query hydrated from legacy table configs. */
7959
+ readonly phaseGateTableQuery: _angular_core.Signal<PhaseGateTableQueryConfig>;
7906
7960
  /**
7907
7961
  * Reads the current timeline-multi-level query for the template.
7908
7962
  */
@@ -8462,12 +8516,12 @@ interface MapRow {
8462
8516
  * boolean). Controlled: `value` in, `valueChange` out.
8463
8517
  */
8464
8518
  declare class KeyValueMapField {
8465
- readonly value: _angular_core.InputSignal<unknown[] | Record<string, unknown> | null>;
8519
+ readonly value: _angular_core.InputSignal<Record<string, unknown> | unknown[] | null>;
8466
8520
  readonly keys: _angular_core.InputSignal<ControlOption[]>;
8467
8521
  readonly valueFields: _angular_core.InputSignal<ControlField[]>;
8468
8522
  /** When true, store/read a positional array aligned to `keys` order. */
8469
8523
  readonly asArray: _angular_core.InputSignal<boolean>;
8470
- readonly valueChange: _angular_core.OutputEmitterRef<unknown[] | Record<string, unknown>>;
8524
+ readonly valueChange: _angular_core.OutputEmitterRef<Record<string, unknown> | unknown[]>;
8471
8525
  readonly rows: _angular_core.WritableSignal<MapRow[]>;
8472
8526
  private readonly destroyRef;
8473
8527
  /** Subscriptions for the current row set; torn down on every rebuild. */