react-semaphor 0.1.372 → 0.1.374

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.
Files changed (53) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +1 -1
  3. package/dist/chunks/{calendar-preferences-dialog-Dn6o2r2Y.js → calendar-preferences-dialog-94DoRSW_.js} +1 -1
  4. package/dist/chunks/{calendar-preferences-dialog-ClBAkMmF.js → calendar-preferences-dialog-DmBRXOH6.js} +1 -1
  5. package/dist/chunks/{dashboard-briefing-launcher-BO-kXtEd.js → dashboard-briefing-launcher-CAFCkwG3.js} +1 -1
  6. package/dist/chunks/{dashboard-briefing-launcher-D3Xfc_26.js → dashboard-briefing-launcher-l0ylhcAv.js} +104 -104
  7. package/dist/chunks/{dashboard-controls-DcXMFgGR.js → dashboard-controls-BX47yuCH.js} +1 -1
  8. package/dist/chunks/{dashboard-controls-B3sdy_Zx.js → dashboard-controls-DyzG0r5f.js} +167 -167
  9. package/dist/chunks/{dashboard-json-BWfkEy48.js → dashboard-json-B8kke4ES.js} +1 -1
  10. package/dist/chunks/{dashboard-json-CFURS_OR.js → dashboard-json-BlPA6wRT.js} +1 -1
  11. package/dist/chunks/{edit-dashboard-visual-DjdhKiP2.js → edit-dashboard-visual-CgJxTZLJ.js} +6592 -6565
  12. package/dist/chunks/{edit-dashboard-visual-BD2AJLiT.js → edit-dashboard-visual-DA8SaE4h.js} +37 -37
  13. package/dist/chunks/index-BJ971AL_.js +1361 -0
  14. package/dist/chunks/{index-C0Qnfr_7.js → index-BiDFY4Gr.js} +36742 -34869
  15. package/dist/chunks/{resource-management-panel-YvIfaphX.js → resource-management-panel-Bssc5uaX.js} +51 -51
  16. package/dist/chunks/{resource-management-panel-DytUMSGA.js → resource-management-panel-C14F7VSc.js} +1 -1
  17. package/dist/chunks/{use-create-flow-overlay-state-BETXykC9.js → use-create-flow-overlay-state-BGhwg121.js} +35 -35
  18. package/dist/chunks/{use-create-flow-overlay-state-CwIG1Ekp.js → use-create-flow-overlay-state-DAVI3fO1.js} +1 -1
  19. package/dist/chunks/{use-visual-utils-Bk135OgA.js → use-visual-utils-47dkDwLK.js} +12 -12
  20. package/dist/chunks/{use-visual-utils-BzFjIykb.js → use-visual-utils-K0yQRSI7.js} +1 -1
  21. package/dist/chunks/{validation-D4Zz6WPD.js → validation-1V7bWmYw.js} +1 -1
  22. package/dist/chunks/{validation-CQFpcSSP.js → validation-DlrTIf1N.js} +1 -1
  23. package/dist/chunks/{validators-CuKnUZFO.js → validators-CtNmgsvG.js} +409 -314
  24. package/dist/chunks/validators-jpoYhpHh.js +1 -0
  25. package/dist/dashboard/index.cjs +1 -1
  26. package/dist/dashboard/index.js +1 -1
  27. package/dist/dashboard-authoring/index.cjs +1 -1
  28. package/dist/dashboard-authoring/index.js +1 -1
  29. package/dist/data-app-builder/index.cjs +1 -1
  30. package/dist/data-app-builder/index.js +1 -1
  31. package/dist/data-app-sdk/index.cjs +1 -1
  32. package/dist/data-app-sdk/index.js +32 -32
  33. package/dist/data-app-sdk-validation/index.cjs +1 -1
  34. package/dist/data-app-sdk-validation/index.js +2 -2
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.js +127 -126
  37. package/dist/style.css +1 -1
  38. package/dist/surfboard/index.cjs +1 -1
  39. package/dist/surfboard/index.js +2 -2
  40. package/dist/types/analytics-protocol.d.ts +102 -11
  41. package/dist/types/dashboard-assistant.d.ts +117 -103
  42. package/dist/types/dashboard-authoring.d.ts +63 -2
  43. package/dist/types/dashboard.d.ts +263 -2
  44. package/dist/types/data-app-builder.d.ts +40 -1
  45. package/dist/types/data-app-sdk-validation.d.ts +94 -102
  46. package/dist/types/data-app-sdk.d.ts +106 -11
  47. package/dist/types/main.d.ts +473 -2
  48. package/dist/types/shared.d.ts +263 -2
  49. package/dist/types/surfboard.d.ts +263 -2
  50. package/dist/types/types.d.ts +529 -2
  51. package/package.json +1 -1
  52. package/dist/chunks/index-DlLvzmJF.js +0 -1361
  53. package/dist/chunks/validators-DHee9kM2.js +0 -1
@@ -654,6 +654,28 @@ export declare type CancelBriefingRunResponse = {
654
654
  export declare type CanonicalFormatSpec = NumericCanonicalFormat | DateCanonicalFormat | DurationCanonicalFormat | StringCanonicalFormat;
655
655
 
656
656
  export declare interface CardConfig {
657
+ /**
658
+ * Matrix table is the shared analytics-spine successor for pivot and
659
+ * hierarchical aggregate tables. Dashboard cards store the public matrix
660
+ * intent shape so Data Apps, MCP, and dashboard runtime consume one contract.
661
+ */
662
+ matrixIntent?: SemaphorMatrixIntent;
663
+ /**
664
+ * Deprecated compatibility fields for older matrix table drafts. New
665
+ * dashboard-authored matrix cards should use `matrixIntent` so normal
666
+ * `filters` can remain the explorer/card-level `FilterGroup`.
667
+ */
668
+ version?: SemaphorMatrixIntent['version'];
669
+ source?: SemaphorMatrixIntent['source'];
670
+ rows?: SemaphorMatrixIntent['rows'];
671
+ columns?: SemaphorMatrixIntent['columns'];
672
+ values?: SemaphorMatrixIntent['values'];
673
+ inputs?: SemaphorMatrixIntent['inputs'];
674
+ totals?: SemaphorMatrixIntent['totals'];
675
+ sort?: SemaphorMatrixIntent['sort'];
676
+ expansion?: SemaphorMatrixIntent['expansion'];
677
+ layout?: SemaphorMatrixIntent['layout'];
678
+ displayLimits?: SemaphorMatrixIntent['displayLimits'];
657
679
  groupByColumns?: GroupByField[];
658
680
  metricColumns?: MetricField[];
659
681
  pivotByColumns?: PivotByField[];
@@ -2287,6 +2309,226 @@ export declare type LoadingProps = {
2287
2309
 
2288
2310
  export declare type LogicalOperator = 'AND' | 'OR';
2289
2311
 
2312
+ declare type MatrixAxisLevelDescriptor = {
2313
+ instanceId: string;
2314
+ fieldKey: string;
2315
+ label: string;
2316
+ field: SemaphorFieldRef;
2317
+ grain?: SemaphorTimeGrain;
2318
+ subtotal?: SemaphorMatrixSubtotalOptions;
2319
+ };
2320
+
2321
+ declare type MatrixAxisResultPayload = {
2322
+ id: 'rows' | 'columns';
2323
+ levels: MatrixAxisLevelDescriptor[];
2324
+ nodeIds: string[];
2325
+ };
2326
+
2327
+ declare type MatrixCalculationDescriptor = {
2328
+ id: string;
2329
+ measureId: string;
2330
+ aggregate?: SemaphorAggregateFunction;
2331
+ label?: string;
2332
+ source: 'measureDefault' | 'rowSubtotal' | 'columnSubtotal' | 'subtotalIntersection' | 'rowGrandTotal' | 'columnGrandTotal' | 'matrixGrandTotal' | 'custom';
2333
+ scope?: {
2334
+ rowLevelId?: string;
2335
+ columnLevelId?: string;
2336
+ rowNodeId?: string;
2337
+ columnNodeId?: string;
2338
+ };
2339
+ };
2340
+
2341
+ declare type MatrixCapability = 'rowHierarchy' | 'columnHierarchy' | 'rowSubtotals' | 'columnSubtotals' | 'grandTotals' | 'lazyRows' | 'lazyColumns' | 'conditionalFormatting' | 'visualExport' | (string & {});
2342
+
2343
+ declare type MatrixCellPresence = 'present' | 'presentNull' | 'missing' | 'densified';
2344
+
2345
+ declare type MatrixCellRole = 'value' | 'rowSubtotal' | 'columnSubtotal' | 'subtotalIntersection' | 'rowGrandTotal' | 'columnGrandTotal' | 'matrixGrandTotal';
2346
+
2347
+ declare type MatrixExecutionMetadata = {
2348
+ strategy?: MatrixQueryStrategy;
2349
+ dialect?: SemaphorDialect;
2350
+ rowNodeCount?: number;
2351
+ columnNodeCount?: number;
2352
+ cellCount?: number;
2353
+ groupingSetCount?: number;
2354
+ queryDurationMs?: number;
2355
+ budgetRejected?: boolean;
2356
+ cacheStatus?: 'hit' | 'miss' | 'bypass';
2357
+ [key: string]: unknown;
2358
+ };
2359
+
2360
+ declare type MatrixExpansionRequest = {
2361
+ axis: 'row' | 'column';
2362
+ path: MatrixMemberPathSegment[];
2363
+ depth?: number;
2364
+ };
2365
+
2366
+ declare type MatrixExpansionResponseHints = {
2367
+ rowLazyLoading?: boolean;
2368
+ columnLazyLoading?: boolean;
2369
+ expandableRowNodeIds?: string[];
2370
+ expandableColumnNodeIds?: string[];
2371
+ nextRequests?: MatrixExpansionRequest[];
2372
+ };
2373
+
2374
+ declare type MatrixFieldDescriptor = {
2375
+ instanceId: string;
2376
+ fieldKey: string;
2377
+ field: SemaphorFieldRef;
2378
+ role: 'row' | 'column' | 'measure' | 'sort' | 'filter';
2379
+ label?: string;
2380
+ };
2381
+
2382
+ declare type MatrixFormattingContext = {
2383
+ domains?: Record<string, {
2384
+ min?: number;
2385
+ max?: number;
2386
+ }>;
2387
+ rules?: Array<Record<string, unknown>>;
2388
+ };
2389
+
2390
+ declare type MatrixGridColumn = {
2391
+ id: string;
2392
+ label: string;
2393
+ columnNodeId?: string;
2394
+ columnPath: MatrixMemberPathSegment[];
2395
+ measureInstanceId: string;
2396
+ role: 'value' | 'columnSubtotal' | 'columnGrandTotal';
2397
+ };
2398
+
2399
+ declare type MatrixGridHeaderCell = {
2400
+ id: string;
2401
+ label: string;
2402
+ role: 'rowHeader' | 'columnHeader' | 'measureHeader' | 'subtotal' | 'grandTotal';
2403
+ colSpan: number;
2404
+ rowSpan: number;
2405
+ columnPath: MatrixMemberPathSegment[];
2406
+ measureInstanceId?: string;
2407
+ };
2408
+
2409
+ declare type MatrixGridHeaderRow = {
2410
+ id: string;
2411
+ cells: MatrixGridHeaderCell[];
2412
+ };
2413
+
2414
+ declare type MatrixGridRowHeaderLevel = {
2415
+ id: string;
2416
+ label: string;
2417
+ fieldInstanceId: string;
2418
+ };
2419
+
2420
+ declare type MatrixLayoutProjection = {
2421
+ rowHeaderLevels: MatrixGridRowHeaderLevel[];
2422
+ columnHeaderRows: MatrixGridHeaderRow[];
2423
+ columns: MatrixGridColumn[];
2424
+ };
2425
+
2426
+ declare type MatrixMeasureDescriptor = {
2427
+ instanceId: string;
2428
+ fieldKey: string;
2429
+ label: string;
2430
+ field: SemaphorFieldRef;
2431
+ aggregate?: SemaphorAggregateFunction;
2432
+ format?: SemaphorValueFormat;
2433
+ totalBehavior?: SemaphorMatrixTotalCalculation;
2434
+ };
2435
+
2436
+ declare type MatrixMeasureResultDescriptor = MatrixMeasureDescriptor & {
2437
+ semantics: MatrixMeasureSemantics;
2438
+ };
2439
+
2440
+ declare type MatrixMeasureSemantics = {
2441
+ kind: 'additive';
2442
+ aggregate?: SemaphorAggregateFunction;
2443
+ } | {
2444
+ kind: 'semiAdditive';
2445
+ aggregate?: SemaphorAggregateFunction;
2446
+ grain?: SemaphorTimeGrain;
2447
+ } | {
2448
+ kind: 'nonAdditive';
2449
+ aggregate?: SemaphorAggregateFunction;
2450
+ } | {
2451
+ kind: 'ratio';
2452
+ numeratorMeasureInstanceId?: string;
2453
+ denominatorMeasureInstanceId?: string;
2454
+ } | {
2455
+ kind: 'custom';
2456
+ expressionId?: string;
2457
+ };
2458
+
2459
+ declare type MatrixMemberPathSegment = {
2460
+ instanceId: string;
2461
+ fieldKey: string;
2462
+ value: unknown;
2463
+ label: string;
2464
+ };
2465
+
2466
+ declare type MatrixNode = {
2467
+ id: string;
2468
+ axis: 'row' | 'column';
2469
+ path: MatrixMemberPathSegment[];
2470
+ level: number;
2471
+ label: string;
2472
+ value: unknown;
2473
+ parentId?: string;
2474
+ hasChildren: boolean;
2475
+ isExpanded?: boolean;
2476
+ isSubtotal?: boolean;
2477
+ isGrandTotal?: boolean;
2478
+ subtotalFunction?: SemaphorAggregateFunction;
2479
+ childCount?: number;
2480
+ actions?: MatrixNodeAction[];
2481
+ };
2482
+
2483
+ declare type MatrixNodeAction = {
2484
+ kind: 'expand' | 'collapse' | 'requestSubgoal' | 'filter' | 'drillThrough' | 'openRelatedRecords' | (string & {});
2485
+ label?: string;
2486
+ payload?: Record<string, unknown>;
2487
+ };
2488
+
2489
+ declare type MatrixPageInfo = {
2490
+ rowOffset?: number;
2491
+ rowLimit?: number;
2492
+ columnOffset?: number;
2493
+ columnLimit?: number;
2494
+ hasMoreRows?: boolean;
2495
+ hasMoreColumns?: boolean;
2496
+ };
2497
+
2498
+ declare type MatrixQueryStrategy = 'tall' | 'wide' | 'lazy' | 'export';
2499
+
2500
+ declare type MatrixResolvedSort = {
2501
+ id: string;
2502
+ axis: 'row' | 'column';
2503
+ targetInstanceId?: string;
2504
+ direction: 'asc' | 'desc';
2505
+ nulls?: 'warehouseDefault' | 'first' | 'last';
2506
+ scope?: 'global' | 'withinParent';
2507
+ by: SemaphorMatrixSortRule['by'];
2508
+ };
2509
+
2510
+ declare type MatrixResultCell = {
2511
+ rowId: string;
2512
+ columnId?: string;
2513
+ measureId: string;
2514
+ value: unknown;
2515
+ formattedValue?: string;
2516
+ presence: MatrixCellPresence;
2517
+ role: MatrixCellRole;
2518
+ calculationId?: string;
2519
+ };
2520
+
2521
+ declare type MatrixShape = 'hierarchical' | 'pivot';
2522
+
2523
+ declare type MatrixTotals = {
2524
+ rows?: boolean;
2525
+ columns?: boolean;
2526
+ grandTotal?: boolean | {
2527
+ rows?: boolean;
2528
+ columns?: boolean;
2529
+ };
2530
+ };
2531
+
2290
2532
  declare interface MetricColumn extends BaseColumn {
2291
2533
  role: 'metric';
2292
2534
  aggregate: AggregateFunction;
@@ -2529,6 +2771,7 @@ export declare interface QueryExecutionResponse {
2529
2771
  columnKeyMap?: QueryColumnKeyMap;
2530
2772
  tableTotalsByColumnId?: Record<string, string | number | null>;
2531
2773
  documentTableTotalsBaseSql?: string;
2774
+ matrixResult?: SemaphorMatrixResult;
2532
2775
  metadata?: any;
2533
2776
  }
2534
2777
 
@@ -2694,6 +2937,47 @@ declare type SemanticExecutionPayload = {
2694
2937
 
2695
2938
  declare type SemaphorAggregateFunction = 'SUM' | 'COUNT' | 'AVG' | 'MIN' | 'MAX' | 'MEDIAN' | 'DISTINCT';
2696
2939
 
2940
+ declare type SemaphorAnalyticsFilter = SemaphorAnalyticsValueFilter | SemaphorAnalyticsNullFilter;
2941
+
2942
+ declare type SemaphorAnalyticsFilterBase = {
2943
+ id?: string;
2944
+ field: SemaphorFieldRef;
2945
+ /**
2946
+ * Controls where the filter is applied in an aggregate query.
2947
+ *
2948
+ * `row` means pre-aggregation filtering (`WHERE`).
2949
+ * `aggregate` means post-aggregation filtering (`HAVING`) and is valid only
2950
+ * for measure fields the execution engine can aggregate safely.
2951
+ */
2952
+ scope?: 'row' | 'aggregate';
2953
+ };
2954
+
2955
+ declare type SemaphorAnalyticsFilterOperator = SemaphorInputOperator | 'not_contains' | 'is_null' | 'is_not_null';
2956
+
2957
+ declare type SemaphorAnalyticsNullFilter = SemaphorAnalyticsFilterBase & {
2958
+ operator: SemaphorAnalyticsNullFilterOperator;
2959
+ values?: never;
2960
+ };
2961
+
2962
+ declare type SemaphorAnalyticsNullFilterOperator = 'is_null' | 'is_not_null';
2963
+
2964
+ declare type SemaphorAnalyticsResultBase = {
2965
+ intentId?: string;
2966
+ queryPath: SemaphorQueryPath;
2967
+ warnings?: string[];
2968
+ rowCount?: number;
2969
+ rowLimitExceeded?: boolean;
2970
+ limit?: number;
2971
+ pagination?: SemaphorPaginationMetadata;
2972
+ };
2973
+
2974
+ declare type SemaphorAnalyticsValueFilter = SemaphorAnalyticsFilterBase & {
2975
+ operator?: SemaphorAnalyticsValueFilterOperator;
2976
+ values: unknown[];
2977
+ };
2978
+
2979
+ declare type SemaphorAnalyticsValueFilterOperator = Exclude<SemaphorAnalyticsFilterOperator, 'is_null' | 'is_not_null'>;
2980
+
2697
2981
  declare type SemaphorDerivedFieldAggregationBehavior = 'additive' | 'non_additive' | 'ratio_of_sums' | 'weighted' | 'pre_aggregated' | 'snapshot';
2698
2982
 
2699
2983
  declare type SemaphorDerivedFieldAggregationStrategy = 'default' | 'symmetric_aggregate' | 'aggregate_then_join' | 'weighted';
@@ -2714,7 +2998,7 @@ declare type SemaphorDerivedFieldDefinition = {
2714
2998
  defaultAggregate?: SemaphorAggregateFunction;
2715
2999
  aggregationBehavior?: SemaphorDerivedFieldAggregationBehavior;
2716
3000
  aggregationStrategy?: SemaphorDerivedFieldAggregationStrategy;
2717
- format?: unknown;
3001
+ format?: SemaphorValueFormat;
2718
3002
  tags?: string[];
2719
3003
  };
2720
3004
 
@@ -2734,6 +3018,14 @@ declare type SemaphorDerivedFieldResultRole = 'measure' | 'group' | 'date' | 'id
2734
3018
 
2735
3019
  declare type SemaphorDialect = 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
2736
3020
 
3021
+ /**
3022
+ * Explorer-backed table source. This is intentionally distinct from raw SQL:
3023
+ * matrix planning needs stable source metadata, fields, and dialect context.
3024
+ */
3025
+ declare type SemaphorExplorerSourceRef = Extract<SemaphorSourceRef, {
3026
+ kind: 'physical';
3027
+ }>;
3028
+
2737
3029
  declare type SemaphorFieldRef = {
2738
3030
  name: string;
2739
3031
  label?: string;
@@ -2743,6 +3035,201 @@ declare type SemaphorFieldRef = {
2743
3035
  aggregate?: SemaphorAggregateFunction;
2744
3036
  };
2745
3037
 
3038
+ declare type SemaphorInputBinding = {
3039
+ inputId: string;
3040
+ kind?: 'filter' | 'control';
3041
+ controlRole?: 'grain' | 'metric' | 'dimension' | 'aggregation' | 'sqlParam';
3042
+ operator?: SemaphorInputOperator;
3043
+ field?: SemaphorFieldRef;
3044
+ };
3045
+
3046
+ declare type SemaphorInputOperator = '=' | '!=' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'between' | 'not_between' | '>' | '>=' | '<' | '<=';
3047
+
3048
+ declare type SemaphorMatrixAxisExpansionOptions = {
3049
+ defaultDepth?: number;
3050
+ lazy?: boolean;
3051
+ expandedPaths?: SemaphorMatrixMemberPathSegment[][];
3052
+ };
3053
+
3054
+ declare type SemaphorMatrixAxisLevel = {
3055
+ id?: string;
3056
+ field: SemaphorFieldRef;
3057
+ grain?: SemaphorTimeGrain;
3058
+ label?: string;
3059
+ subtotal?: boolean | SemaphorMatrixSubtotalOptions;
3060
+ sortBy?: SemaphorMatrixAxisSortRule;
3061
+ };
3062
+
3063
+ declare type SemaphorMatrixAxisSortRule = {
3064
+ direction: 'asc' | 'desc';
3065
+ by: {
3066
+ kind: 'label';
3067
+ } | {
3068
+ kind: 'field';
3069
+ field: SemaphorFieldRef;
3070
+ aggregate?: SemaphorAggregateFunction;
3071
+ };
3072
+ nulls?: 'warehouseDefault' | 'first' | 'last';
3073
+ scope?: 'global' | 'withinParent';
3074
+ };
3075
+
3076
+ declare type SemaphorMatrixDisplayLimitOptions = {
3077
+ rows?: SemaphorMatrixDisplayLimitRule;
3078
+ columns?: SemaphorMatrixDisplayLimitRule;
3079
+ };
3080
+
3081
+ declare type SemaphorMatrixDisplayLimitRule = {
3082
+ limit: number;
3083
+ by?: 'label' | 'value';
3084
+ direction?: 'top' | 'bottom';
3085
+ others?: boolean | {
3086
+ label?: string;
3087
+ };
3088
+ };
3089
+
3090
+ declare type SemaphorMatrixExpansionOptions = {
3091
+ rows?: SemaphorMatrixAxisExpansionOptions;
3092
+ columns?: SemaphorMatrixAxisExpansionOptions;
3093
+ };
3094
+
3095
+ declare type SemaphorMatrixIntent = {
3096
+ kind: 'matrix';
3097
+ version?: SemaphorProtocolVersion;
3098
+ id?: string;
3099
+ label?: string;
3100
+ source: SemaphorMatrixSourceRef;
3101
+ rows: SemaphorMatrixAxisLevel[];
3102
+ columns?: SemaphorMatrixAxisLevel[];
3103
+ values: SemaphorMatrixValueField[];
3104
+ filters?: SemaphorAnalyticsFilter[];
3105
+ inputs?: SemaphorInputBinding[];
3106
+ totals?: SemaphorMatrixTotalOptions;
3107
+ sort?: SemaphorMatrixSortRule[];
3108
+ expansion?: SemaphorMatrixExpansionOptions;
3109
+ layout?: SemaphorMatrixLayoutOptions;
3110
+ displayLimits?: SemaphorMatrixDisplayLimitOptions;
3111
+ };
3112
+
3113
+ declare type SemaphorMatrixLayoutOptions = {
3114
+ hierarchy?: 'compact' | 'tabular' | 'outline';
3115
+ valuesPlacement?: 'columns' | 'rows';
3116
+ stickyRowHeaders?: boolean;
3117
+ stickyColumnHeaders?: boolean;
3118
+ };
3119
+
3120
+ declare type SemaphorMatrixMemberPathSegment = {
3121
+ levelId: string;
3122
+ value: unknown;
3123
+ };
3124
+
3125
+ declare type SemaphorMatrixResult = SemaphorAnalyticsResultBase & {
3126
+ kind: 'matrix';
3127
+ schemaVersion: 1;
3128
+ intent?: SemaphorMatrixIntent;
3129
+ shape: MatrixShape;
3130
+ capabilities: MatrixCapability[];
3131
+ executionMetadata: MatrixExecutionMetadata;
3132
+ fieldsById: Record<string, MatrixFieldDescriptor>;
3133
+ measuresById: Record<string, MatrixMeasureResultDescriptor>;
3134
+ calculationsById?: Record<string, MatrixCalculationDescriptor>;
3135
+ axes: {
3136
+ rows: MatrixAxisResultPayload;
3137
+ columns: MatrixAxisResultPayload;
3138
+ };
3139
+ nodesById: Record<string, MatrixNode>;
3140
+ layout: MatrixLayoutProjection;
3141
+ cells: MatrixResultCell[];
3142
+ totals: MatrixTotals;
3143
+ sort: MatrixResolvedSort[];
3144
+ formattingContext: MatrixFormattingContext;
3145
+ pageInfo?: MatrixPageInfo;
3146
+ expansion?: MatrixExpansionResponseHints;
3147
+ };
3148
+
3149
+ declare type SemaphorMatrixSortRule = {
3150
+ axis: 'row' | 'column';
3151
+ targetId?: string;
3152
+ direction: 'asc' | 'desc';
3153
+ by: {
3154
+ kind: 'label';
3155
+ } | {
3156
+ kind: 'field';
3157
+ field: SemaphorFieldRef;
3158
+ aggregate?: SemaphorAggregateFunction;
3159
+ } | {
3160
+ kind: 'value';
3161
+ valueId: string;
3162
+ rowPath?: SemaphorMatrixMemberPathSegment[];
3163
+ columnPath?: SemaphorMatrixMemberPathSegment[];
3164
+ };
3165
+ nulls?: 'warehouseDefault' | 'first' | 'last';
3166
+ scope?: 'global' | 'withinParent';
3167
+ };
3168
+
3169
+ declare type SemaphorMatrixSourceRef = SemaphorSemanticSourceRef | SemaphorExplorerSourceRef;
3170
+
3171
+ declare type SemaphorMatrixSubtotalOptions = {
3172
+ enabled?: boolean;
3173
+ position?: 'before' | 'after';
3174
+ label?: string;
3175
+ };
3176
+
3177
+ declare type SemaphorMatrixTotalCalculation = {
3178
+ kind: 'defaultAggregate';
3179
+ } | {
3180
+ kind: 'blank';
3181
+ } | {
3182
+ kind: 'labelOnly';
3183
+ label?: string;
3184
+ } | {
3185
+ kind: 'customAggregate';
3186
+ aggregate: SemaphorAggregateFunction;
3187
+ } | {
3188
+ kind: 'percentOfParent';
3189
+ } | {
3190
+ kind: 'percentOfGrandTotal';
3191
+ } | {
3192
+ kind: 'customExpression';
3193
+ expressionId: string;
3194
+ };
3195
+
3196
+ declare type SemaphorMatrixTotalOptions = {
3197
+ rows?: boolean | 'perLevel';
3198
+ columns?: boolean | 'perLevel';
3199
+ grandTotal?: boolean | {
3200
+ rows?: boolean;
3201
+ columns?: boolean;
3202
+ };
3203
+ rowPosition?: 'top' | 'bottom';
3204
+ columnPosition?: 'left' | 'right';
3205
+ };
3206
+
3207
+ declare type SemaphorMatrixValueField = {
3208
+ id?: string;
3209
+ field: SemaphorFieldRef;
3210
+ aggregate?: SemaphorAggregateFunction;
3211
+ label?: string;
3212
+ format?: SemaphorValueFormat;
3213
+ totalBehavior?: SemaphorMatrixTotalCalculation;
3214
+ };
3215
+
3216
+ declare type SemaphorPaginationMetadata = {
3217
+ page: number;
3218
+ pageSize: number;
3219
+ pageCount: number;
3220
+ totalCount: number;
3221
+ hasNextPage: boolean;
3222
+ hasPrevPage: boolean;
3223
+ };
3224
+
3225
+ declare type SemaphorProtocolVersion = 1;
3226
+
3227
+ declare type SemaphorQueryPath = 'query_spec' | 'sql' | 'sql_python';
3228
+
3229
+ declare type SemaphorSemanticSourceRef = Extract<SemaphorSourceRef, {
3230
+ kind: 'semantic';
3231
+ }>;
3232
+
2746
3233
  declare type SemaphorSourceRef = {
2747
3234
  kind: 'semantic';
2748
3235
  domainId: string;
@@ -2766,6 +3253,46 @@ declare type SemaphorSourceRef = {
2766
3253
  label?: string;
2767
3254
  };
2768
3255
 
3256
+ declare type SemaphorTimeGrain = 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
3257
+
3258
+ declare type SemaphorValueFormat = {
3259
+ type: 'number' | 'currency' | 'percent' | 'percentage' | 'scientific';
3260
+ locale?: string;
3261
+ minimumFractionDigits?: number;
3262
+ maximumFractionDigits?: number;
3263
+ useGrouping?: boolean;
3264
+ prefix?: string;
3265
+ suffix?: string;
3266
+ negativeStyle?: 'minus' | 'parentheses';
3267
+ compact?: boolean;
3268
+ scale?: number;
3269
+ currency?: string;
3270
+ percentValueMode?: 'fraction' | 'whole';
3271
+ } | {
3272
+ type: 'date' | 'datetime';
3273
+ locale?: string;
3274
+ pattern?: string;
3275
+ relative?: boolean;
3276
+ timezone?: string;
3277
+ sourceTimezone?: string;
3278
+ prefix?: string;
3279
+ suffix?: string;
3280
+ } | {
3281
+ type: 'duration';
3282
+ inputUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
3283
+ outputStyle?: 'compact' | 'digital' | 'long';
3284
+ largestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
3285
+ smallestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
3286
+ maxUnits?: number;
3287
+ prefix?: string;
3288
+ suffix?: string;
3289
+ negativeStyle?: 'minus' | 'parentheses';
3290
+ } | {
3291
+ type: 'string';
3292
+ prefix?: string;
3293
+ suffix?: string;
3294
+ };
3295
+
2769
3296
  export declare interface SortByField extends Field {
2770
3297
  role: 'sortby';
2771
3298
  direction: 'asc' | 'desc';
@@ -3345,7 +3872,7 @@ export declare type TChartOptions = {
3345
3872
  treemapColorMode?: 'branch' | 'category';
3346
3873
  };
3347
3874
 
3348
- export declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'area' | 'stackedArea' | 'combo' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'pivotTable' | 'aggregateTable' | 'detailTable' | 'tableBuilder' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'bullet' | 'heatmap' | 'treemap' | 'custom';
3875
+ export declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'area' | 'stackedArea' | 'combo' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'pivotTable' | 'aggregateTable' | 'matrixTable' | 'detailTable' | 'tableBuilder' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'bullet' | 'heatmap' | 'treemap' | 'custom';
3349
3876
 
3350
3877
  export declare type TColumnSetting<T extends DisplayDataType> = {
3351
3878
  columnIdx: number;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.372",
8
+ "version": "0.1.374",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",