react-semaphor 0.1.552 → 0.1.554

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 (73) hide show
  1. package/dist/analytics-protocol/index.js +228 -227
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/brand-studio/index.js +3 -3
  4. package/dist/briefings/index.js +5 -5
  5. package/dist/chunks/{assistant-chat-sWQaBT61.js → assistant-chat-ngs5dTvo.js} +1275 -1296
  6. package/dist/chunks/{bookmark-state-Cu-a5ie_.js → bookmark-state-BAeGKd3s.js} +3 -3
  7. package/dist/chunks/{comparison-window-caption-CF90-I0i.js → comparison-window-caption-C2WNTlxK.js} +44 -44
  8. package/dist/chunks/{custom-visual-inputs-ByQUyWf4.js → custom-visual-inputs-cTHqcqPu.js} +1 -1
  9. package/dist/chunks/{dashboard-BjoJI7NN.js → dashboard-548YvEW5.js} +1 -1
  10. package/dist/chunks/{dashboard-briefing-launcher-DUJQv719.js → dashboard-briefing-launcher-ptIRn5FS.js} +62 -62
  11. package/dist/chunks/{dashboard-controls-BjnvfcQp.js → dashboard-controls-CqyUTN6Q.js} +46 -46
  12. package/dist/chunks/{dashboard-json-BqcLekhd.js → dashboard-json-CvDFipA0.js} +4 -4
  13. package/dist/chunks/{document-dashboard-inputs-PoQihHLu.js → document-dashboard-inputs-DrA9m-5H.js} +119 -119
  14. package/dist/chunks/{edit-dashboard-visual-KNJQr60W.js → edit-dashboard-visual-BHL0AlIj.js} +4087 -3979
  15. package/dist/chunks/{filter-reach-copy-zdhUFn6t.js → filter-reach-copy-CyftKCZE.js} +48 -48
  16. package/dist/chunks/{filter-value-text-Ddf55Ku1.js → filter-value-text-DMrpj4h9.js} +2 -2
  17. package/dist/chunks/{global-date-filter-utils-C1jCNWdV.js → global-date-filter-utils-Or-3DL3k.js} +6033 -5772
  18. package/dist/chunks/{index-Dp0ta6KB.js → index-ClwmmbUH.js} +9 -9
  19. package/dist/chunks/{matrix-analytical-definition-B9vW-osb.js → matrix-analytical-definition-DPVGg1mU.js} +12 -12
  20. package/dist/chunks/{matrix-card-LiMEipvq.js → matrix-card-CVFVtqyo.js} +2 -2
  21. package/dist/chunks/{matrix-formatter-C_EpDP6o.js → matrix-formatter-K2OVPJQI.js} +30 -30
  22. package/dist/chunks/{matrix-member-presentation-DqzG-UhQ.js → matrix-member-presentation-DRWcJ8Mi.js} +1 -1
  23. package/dist/chunks/{matrix-operation-contract-D6vYkZK4.js → matrix-operation-contract--lMaLlpV.js} +64 -61
  24. package/dist/chunks/{metric-comparison-zpGw4lD6.js → metric-comparison-CYIt2F5X.js} +1 -1
  25. package/dist/chunks/{pivot-header-presentation-CQnIDtUv.js → pivot-header-presentation-CX4fkRuG.js} +1 -1
  26. package/dist/chunks/{pivot-result-identity-C-Q1j1Wb.js → pivot-result-identity-BHJGZwIc.js} +1 -1
  27. package/dist/chunks/{pivot-result-lifecycle-pwq3b7LC.js → pivot-result-lifecycle-BygCpOhk.js} +20 -20
  28. package/dist/chunks/{raw-temporal-presentation-D3i0mnUe.js → raw-temporal-presentation-gooAp93G.js} +6 -6
  29. package/dist/chunks/{report-preferences-dialog-C0uGI0v7.js → report-preferences-dialog-2tqY0BMQ.js} +49 -49
  30. package/dist/chunks/{report-runtime-context-hWiTCzFV.js → report-runtime-context-BaIKSaja.js} +1 -1
  31. package/dist/chunks/{resolve-dashboard-input-context-Cm0b7s-d.js → resolve-dashboard-input-context-bOKDTHfJ.js} +2062 -1986
  32. package/dist/chunks/{saved-dashboard-context-DCtGmAWe.js → saved-dashboard-context--Hq1juf9.js} +8 -8
  33. package/dist/chunks/{selection-reducer-CJzkTZio.js → selection-reducer-yw_JgICP.js} +1 -1
  34. package/dist/chunks/{semaphor-ready-indicator-ChyotaWB.js → semaphor-ready-indicator-yM4wo-FH.js} +26 -26
  35. package/dist/chunks/{shelf-drop-preview-context-D09ATIXv.js → shelf-drop-preview-context-BuLzyT1T.js} +119 -119
  36. package/dist/chunks/{source-entity-resolution-D195CrYS.js → source-entity-resolution-CGymm5td.js} +1 -1
  37. package/dist/chunks/{switch-wJP6O7ZT.js → switch-B-UTI6v-.js} +2 -2
  38. package/dist/chunks/{table-export-sheet-DUS_s8Cj.js → table-export-sheet-CgO6gaSM.js} +1 -1
  39. package/dist/chunks/{table-settings-WysCBj62.js → table-settings-DOT_Bv1m.js} +224 -201
  40. package/dist/chunks/{temporal-bucket-CQOSbv9-.js → temporal-bucket-C4rqmwaQ.js} +24 -24
  41. package/dist/chunks/{token-types-BMqRmT-C.js → token-types-DYECHYGH.js} +1 -1
  42. package/dist/chunks/{use-create-flow-overlay-state-t7JLE_LV.js → use-create-flow-overlay-state-DSXC-LD7.js} +6 -6
  43. package/dist/chunks/{validators-C-aOQlTB.js → validators-ClKLGDGZ.js} +1077 -1054
  44. package/dist/dashboard/index.js +2 -2
  45. package/dist/dashboard-authoring/index.js +273 -264
  46. package/dist/data-app-sdk/index.js +5 -5
  47. package/dist/data-app-sdk-adapters/index.js +2 -2
  48. package/dist/data-app-sdk-validation/index.js +5 -5
  49. package/dist/format-utils/index.js +15 -15
  50. package/dist/index.js +21 -21
  51. package/dist/report-runtime-context/index.js +1 -1
  52. package/dist/style.css +1 -1
  53. package/dist/surfboard/index.js +2 -2
  54. package/dist/types/index.js +6 -6
  55. package/dist/types/lib/dashboard-inputs/prepare-loaded-dashboard.d.ts +3 -0
  56. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +3 -2
  57. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +4 -2
  58. package/dist/types/lib/utils/card-config-utils.d.ts +61 -0
  59. package/dist/types/lib/utils/card-definition.d.ts +2 -1
  60. package/dist/types/lib/utils/card-type-change.d.ts +5 -1
  61. package/dist/types/shared/analytics-protocol/explorer-input-schemas.d.ts +2 -0
  62. package/dist/types/shared/analytics-protocol/index.d.ts +2 -2
  63. package/dist/types/shared/analytics-protocol/matrix-analytical-definition.d.ts +1 -0
  64. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +59 -21
  65. package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +12 -7
  66. package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +16 -9
  67. package/dist/types/shared/dashboard-authoring/document-section-cards.d.ts +6 -0
  68. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  69. package/dist/types/shared/dashboard-authoring/legacy-table-routing.d.ts +62 -0
  70. package/dist/types/shared/dashboard-authoring/matrix-authoring.d.ts +4 -1
  71. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +8 -4
  72. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +4 -2
  73. package/package.json +2 -2
@@ -224,11 +224,11 @@ declare const matrixExecutionShape: {
224
224
  id: z.ZodString;
225
225
  kind: z.ZodLiteral<"aggregate">;
226
226
  field: z.ZodType<import('./matrix-definition-contract.js').MatrixField, z.ZodTypeDef, import('./matrix-definition-contract.js').MatrixField>;
227
- aggregate: z.ZodEnum<["SUM", "COUNT", "DISTINCT", "AVG", "MIN", "MAX"]>;
227
+ aggregate: z.ZodEnum<["SUM", "COUNT", "DISTINCT", "AVG", "MIN", "MAX", "MEDIAN"]>;
228
228
  }, "strict", z.ZodTypeAny, {
229
229
  id: string;
230
230
  kind: "aggregate";
231
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
231
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
232
232
  field: Omit<import('./contracts.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
233
233
  source?: import('./contracts.js').SemaphorMatrixSourceRef;
234
234
  derivedField?: Omit<import('./contracts.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -244,7 +244,7 @@ declare const matrixExecutionShape: {
244
244
  }, {
245
245
  id: string;
246
246
  kind: "aggregate";
247
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
247
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
248
248
  field: Omit<import('./contracts.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
249
249
  source?: import('./contracts.js').SemaphorMatrixSourceRef;
250
250
  derivedField?: Omit<import('./contracts.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -403,6 +403,7 @@ declare const matrixExecutionShape: {
403
403
  nulls: "last" | "first";
404
404
  }>, "many">>;
405
405
  rankings: z.ZodReadonly<z.ZodArray<z.ZodType<import('./matrix-definition-contract.js').MatrixRanking, z.ZodTypeDef, import('./matrix-definition-contract.js').MatrixRanking>, "many">>;
406
+ measureFilters: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodType<import('./matrix-definition-contract.js').MatrixMeasureFilter, z.ZodTypeDef, import('./matrix-definition-contract.js').MatrixMeasureFilter>, "many">>>;
406
407
  } & {
407
408
  kind: z.ZodLiteral<"matrix">;
408
409
  }, "strict", z.ZodTypeAny, {
@@ -428,7 +429,7 @@ declare const matrixExecutionShape: {
428
429
  measures: readonly ({
429
430
  id: string;
430
431
  kind: "aggregate";
431
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
432
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
432
433
  field: Omit<import('./contracts.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
433
434
  source?: import('./contracts.js').SemaphorMatrixSourceRef;
434
435
  derivedField?: Omit<import('./contracts.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -487,6 +488,7 @@ declare const matrixExecutionShape: {
487
488
  relationshipHint?: {
488
489
  relationshipIds?: string[] | undefined;
489
490
  } | undefined;
491
+ measureFilters?: readonly import('./matrix-definition-contract.js').MatrixMeasureFilter[] | undefined;
490
492
  }, {
491
493
  kind: "matrix";
492
494
  source: {
@@ -510,7 +512,7 @@ declare const matrixExecutionShape: {
510
512
  measures: readonly ({
511
513
  id: string;
512
514
  kind: "aggregate";
513
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
515
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
514
516
  field: Omit<import('./contracts.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
515
517
  source?: import('./contracts.js').SemaphorMatrixSourceRef;
516
518
  derivedField?: Omit<import('./contracts.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -569,6 +571,7 @@ declare const matrixExecutionShape: {
569
571
  relationshipHint?: {
570
572
  relationshipIds?: string[] | undefined;
571
573
  } | undefined;
574
+ measureFilters?: readonly import('./matrix-definition-contract.js').MatrixMeasureFilter[] | undefined;
572
575
  }>, {
573
576
  kind: "matrix";
574
577
  source: {
@@ -592,7 +595,7 @@ declare const matrixExecutionShape: {
592
595
  measures: readonly ({
593
596
  id: string;
594
597
  kind: "aggregate";
595
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
598
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
596
599
  field: Omit<import('./contracts.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
597
600
  source?: import('./contracts.js').SemaphorMatrixSourceRef;
598
601
  derivedField?: Omit<import('./contracts.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -651,6 +654,7 @@ declare const matrixExecutionShape: {
651
654
  relationshipHint?: {
652
655
  relationshipIds?: string[] | undefined;
653
656
  } | undefined;
657
+ measureFilters?: readonly import('./matrix-definition-contract.js').MatrixMeasureFilter[] | undefined;
654
658
  }, {
655
659
  kind: "matrix";
656
660
  source: {
@@ -674,7 +678,7 @@ declare const matrixExecutionShape: {
674
678
  measures: readonly ({
675
679
  id: string;
676
680
  kind: "aggregate";
677
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
681
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
678
682
  field: Omit<import('./contracts.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
679
683
  source?: import('./contracts.js').SemaphorMatrixSourceRef;
680
684
  derivedField?: Omit<import('./contracts.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -733,6 +737,7 @@ declare const matrixExecutionShape: {
733
737
  relationshipHint?: {
734
738
  relationshipIds?: string[] | undefined;
735
739
  } | undefined;
740
+ measureFilters?: readonly import('./matrix-definition-contract.js').MatrixMeasureFilter[] | undefined;
736
741
  }>;
737
742
  resultShape: z.ZodLiteral<"matrix">;
738
743
  result: z.ZodOptional<z.ZodType<{
@@ -58,11 +58,11 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
58
58
  id: z.ZodString;
59
59
  kind: z.ZodLiteral<"aggregate">;
60
60
  field: z.ZodType<import('./matrix-definition-contract.js').MatrixField, z.ZodTypeDef, import('./matrix-definition-contract.js').MatrixField>;
61
- aggregate: z.ZodEnum<["SUM", "COUNT", "DISTINCT", "AVG", "MIN", "MAX"]>;
61
+ aggregate: z.ZodEnum<["SUM", "COUNT", "DISTINCT", "AVG", "MIN", "MAX", "MEDIAN"]>;
62
62
  }, "strict", z.ZodTypeAny, {
63
63
  id: string;
64
64
  kind: "aggregate";
65
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
65
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
66
66
  field: Omit<import('./contracts.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
67
67
  source?: import('./contracts.js').SemaphorMatrixSourceRef;
68
68
  derivedField?: Omit<import('./contracts.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -78,7 +78,7 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
78
78
  }, {
79
79
  id: string;
80
80
  kind: "aggregate";
81
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
81
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
82
82
  field: Omit<import('./contracts.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
83
83
  source?: import('./contracts.js').SemaphorMatrixSourceRef;
84
84
  derivedField?: Omit<import('./contracts.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -237,6 +237,7 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
237
237
  nulls: "last" | "first";
238
238
  }>, "many">>;
239
239
  rankings: z.ZodReadonly<z.ZodArray<z.ZodType<import('./matrix-definition-contract.js').MatrixRanking, z.ZodTypeDef, import('./matrix-definition-contract.js').MatrixRanking>, "many">>;
240
+ measureFilters: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodType<import('./matrix-definition-contract.js').MatrixMeasureFilter, z.ZodTypeDef, import('./matrix-definition-contract.js').MatrixMeasureFilter>, "many">>>;
240
241
  } & {
241
242
  kind: z.ZodLiteral<"matrix">;
242
243
  }, "strict", z.ZodTypeAny, {
@@ -262,7 +263,7 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
262
263
  measures: readonly ({
263
264
  id: string;
264
265
  kind: "aggregate";
265
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
266
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
266
267
  field: Omit<import('./contracts.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
267
268
  source?: import('./contracts.js').SemaphorMatrixSourceRef;
268
269
  derivedField?: Omit<import('./contracts.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -321,6 +322,7 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
321
322
  relationshipHint?: {
322
323
  relationshipIds?: string[] | undefined;
323
324
  } | undefined;
325
+ measureFilters?: readonly import('./matrix-definition-contract.js').MatrixMeasureFilter[] | undefined;
324
326
  }, {
325
327
  kind: "matrix";
326
328
  source: {
@@ -344,7 +346,7 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
344
346
  measures: readonly ({
345
347
  id: string;
346
348
  kind: "aggregate";
347
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
349
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
348
350
  field: Omit<import('./contracts.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
349
351
  source?: import('./contracts.js').SemaphorMatrixSourceRef;
350
352
  derivedField?: Omit<import('./contracts.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -403,6 +405,7 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
403
405
  relationshipHint?: {
404
406
  relationshipIds?: string[] | undefined;
405
407
  } | undefined;
408
+ measureFilters?: readonly import('./matrix-definition-contract.js').MatrixMeasureFilter[] | undefined;
406
409
  }>, {
407
410
  kind: "matrix";
408
411
  source: {
@@ -426,7 +429,7 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
426
429
  measures: readonly ({
427
430
  id: string;
428
431
  kind: "aggregate";
429
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
432
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
430
433
  field: Omit<import('./contracts.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
431
434
  source?: import('./contracts.js').SemaphorMatrixSourceRef;
432
435
  derivedField?: Omit<import('./contracts.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -485,6 +488,7 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
485
488
  relationshipHint?: {
486
489
  relationshipIds?: string[] | undefined;
487
490
  } | undefined;
491
+ measureFilters?: readonly import('./matrix-definition-contract.js').MatrixMeasureFilter[] | undefined;
488
492
  }, {
489
493
  kind: "matrix";
490
494
  source: {
@@ -508,7 +512,7 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
508
512
  measures: readonly ({
509
513
  id: string;
510
514
  kind: "aggregate";
511
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
515
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
512
516
  field: Omit<import('./contracts.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
513
517
  source?: import('./contracts.js').SemaphorMatrixSourceRef;
514
518
  derivedField?: Omit<import('./contracts.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -567,6 +571,7 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
567
571
  relationshipHint?: {
568
572
  relationshipIds?: string[] | undefined;
569
573
  } | undefined;
574
+ measureFilters?: readonly import('./matrix-definition-contract.js').MatrixMeasureFilter[] | undefined;
570
575
  }>;
571
576
  matrixWindowRequest: z.ZodType<import('./matrix-window-contract.js').MatrixWindowRequest, z.ZodTypeDef, import('./matrix-window-contract.js').MatrixWindowRequest>;
572
577
  }, "strict", z.ZodTypeAny, {
@@ -593,7 +598,7 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
593
598
  measures: readonly ({
594
599
  id: string;
595
600
  kind: "aggregate";
596
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
601
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
597
602
  field: Omit<import('./contracts.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
598
603
  source?: import('./contracts.js').SemaphorMatrixSourceRef;
599
604
  derivedField?: Omit<import('./contracts.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -652,6 +657,7 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
652
657
  relationshipHint?: {
653
658
  relationshipIds?: string[] | undefined;
654
659
  } | undefined;
660
+ measureFilters?: readonly import('./matrix-definition-contract.js').MatrixMeasureFilter[] | undefined;
655
661
  };
656
662
  matrixWindowRequest: import('./matrix-window-contract.js').MatrixWindowRequest;
657
663
  }, {
@@ -678,7 +684,7 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
678
684
  measures: readonly ({
679
685
  id: string;
680
686
  kind: "aggregate";
681
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
687
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
682
688
  field: Omit<import('./contracts.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
683
689
  source?: import('./contracts.js').SemaphorMatrixSourceRef;
684
690
  derivedField?: Omit<import('./contracts.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -737,6 +743,7 @@ export declare const matrixOperationRequestSchema: z.ZodObject<{
737
743
  relationshipHint?: {
738
744
  relationshipIds?: string[] | undefined;
739
745
  } | undefined;
746
+ measureFilters?: readonly import('./matrix-definition-contract.js').MatrixMeasureFilter[] | undefined;
740
747
  };
741
748
  matrixWindowRequest: import('./matrix-window-contract.js').MatrixWindowRequest;
742
749
  }>;
@@ -44,6 +44,12 @@ export type DashboardCardLocation = {
44
44
  * then frame cards, then document section cards (every KPI card included).
45
45
  */
46
46
  export declare function listDashboardCardLocations(dashboard: Pick<TDashboard, 'sheets'>): readonly DashboardCardLocation[];
47
+ /**
48
+ * The dashboard with each card mapped, in `listDashboardCardLocations` order.
49
+ * Returns the input object when no card changed, and likewise each sheet,
50
+ * frame and section, so callers can compare by reference.
51
+ */
52
+ export declare function mapDashboardCards<T extends Pick<TDashboard, 'sheets'>>(dashboard: T, map: (card: TCard, location: DashboardCardLocation) => TCard): T;
47
53
  export type DocumentSectionShapeIssue = {
48
54
  /** Path relative to the section, for example `cards[2].type`. Empty for the section itself. */
49
55
  path: string;
@@ -9,6 +9,7 @@ export * from './temporal-bucket-authoring.js';
9
9
  export * from './canonical-result-keys.js';
10
10
  export * from './dashboard-card-source-index.js';
11
11
  export * from './document-section-cards.js';
12
+ export * from './legacy-table-routing.js';
12
13
  export * from './dashboard-filter-mapping-types.js';
13
14
  export * from './dashboard-filter-automatic-target.js';
14
15
  export * from './dashboard-filter-sql-subscription.js';
@@ -0,0 +1,62 @@
1
+ import { TCard, TDashboard, TFrame } from '../../lib/types/common-types.js';
2
+ import { CardTypeChangeGap } from '../../lib/utils/card-type-change.js';
3
+ import { DashboardCardLocation } from './document-section-cards.js';
4
+ export { LEGACY_TABLE_CARD_TYPES, isLegacyTableCard, type LegacyTableCardType, } from '../../lib/utils/card-config-utils.js';
5
+ /**
6
+ * Load routing of Pivot and Hierarchical cards
7
+ * (semaphor-app docs/implementation-plans/pivot-aggregate-to-matrix). Every
8
+ * saved `pivotTable` or `aggregateTable` card is converted in memory by the
9
+ * one converter, so no legacy card reaches a renderer (PM-D3, amended
10
+ * 2026-10-21): the Pivot and Hierarchical implementations are removed. Data
11
+ * parts the converter cannot keep are dropped and returned as gaps. A Pivot
12
+ * that only groups rows becomes the regular Table; every other card becomes
13
+ * Matrix (`legacyTableRoutingTarget`). Nothing is written back; a save stores
14
+ * the new card like any other edit (PM-D1). This module never builds a
15
+ * definition itself (PM-D2).
16
+ */
17
+ /** PM-D7: the namespace of the ids routing mints. Fixed forever: changing it changes every routed card. */
18
+ export declare const LEGACY_TABLE_ROUTING_ID_NAMESPACE = "9677efdd-86ec-4afb-b9bb-5ead8b5442af";
19
+ /**
20
+ * The ids a routed card's Matrix levels and measures get: the n-th call
21
+ * returns the UUID v5 of `${cardId}#${n}`. The same saved card therefore
22
+ * converts to the same Matrix definition on every load, in the browser and
23
+ * on the server (PM-D7).
24
+ */
25
+ export declare function legacyTableRoutingIds(cardId: string): () => string;
26
+ export type LegacyTableCardRouting =
27
+ /** Not a Pivot or Hierarchical card: the input object. */
28
+ {
29
+ status: 'not_legacy';
30
+ card: TCard;
31
+ }
32
+ /** The converter's Matrix or Table card, same card id, and the data parts it dropped. */
33
+ | {
34
+ status: 'routed';
35
+ card: TCard;
36
+ gaps: readonly CardTypeChangeGap[];
37
+ };
38
+ /**
39
+ * PM-D3 target: a Pivot driven by its shelves (no SQL text, at least one row
40
+ * level or metric) with no pivot columns and no
41
+ * row or column totals is a flat grouped table, so it becomes the regular
42
+ * Table (the editor's table-kind switch keeps its config unchanged, and the
43
+ * query builder compiles the same SQL for both types). Every other Pivot and
44
+ * every Hierarchical card becomes Matrix.
45
+ */
46
+ export declare function legacyTableRoutingTarget(card: TCard): 'table' | 'matrixTable';
47
+ /** One card: always routed, with what the conversion could not keep (PM-D3). */
48
+ export declare function routeLegacyTableCard(card: TCard): LegacyTableCardRouting;
49
+ /** Each card of a library frame. Returns the input object when nothing routed. */
50
+ export declare function routeLegacyTableFrame<T extends Pick<TFrame, 'cards'>>(frame: T): T;
51
+ /** A routed card that dropped data parts, where it sits, and what it dropped. */
52
+ export type LegacyTableRoutingGaps = {
53
+ location: DashboardCardLocation;
54
+ gaps: readonly CardTypeChangeGap[];
55
+ };
56
+ export type LegacyTableDashboardRouting<T> = {
57
+ /** The input object when nothing routed. */
58
+ dashboard: T;
59
+ routedWithGaps: readonly LegacyTableRoutingGaps[];
60
+ };
61
+ /** Every sheet, frame and document section card of a dashboard. */
62
+ export declare function routeLegacyTableCards<T extends Pick<TDashboard, 'sheets'>>(dashboard: T): LegacyTableDashboardRouting<T>;
@@ -35,11 +35,14 @@ export type MatrixAuthoringChange = {
35
35
  } | {
36
36
  kind: 'rankings';
37
37
  rankings: MatrixSpec['rankings'];
38
+ } | {
39
+ kind: 'measureFilters';
40
+ measureFilters: NonNullable<MatrixSpec['measureFilters']>;
38
41
  };
39
42
  /** Shelf drops and the Axis menu use the same ID-preserving level transaction. */
40
43
  export declare function moveMatrixLevel(spec: MatrixSpec, id: string, target: MatrixAxis, beforeId?: string): MatrixAuthoringChange;
41
44
  export type MatrixAuthoringNotice = {
42
- kind: 'sort' | 'ranking' | 'format' | 'label' | 'total' | 'conditional_format' | 'expansion' | 'depth' | 'binding';
45
+ kind: 'sort' | 'ranking' | 'measure_filter' | 'format' | 'label' | 'total' | 'conditional_format' | 'expansion' | 'depth' | 'binding';
43
46
  id: string;
44
47
  message: string;
45
48
  };
@@ -257,7 +257,7 @@ export declare function captureMatrixExport(input: {
257
257
  measures: readonly ({
258
258
  id: string;
259
259
  kind: "aggregate";
260
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
260
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
261
261
  field: Omit<import('../analytics-protocol/index.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
262
262
  source?: import('../analytics-protocol/index.js').SemaphorMatrixSourceRef;
263
263
  derivedField?: Omit<import('../analytics-protocol/index.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -316,6 +316,7 @@ export declare function captureMatrixExport(input: {
316
316
  relationshipHint?: {
317
317
  relationshipIds?: string[] | undefined;
318
318
  } | undefined;
319
+ measureFilters?: readonly import('../analytics-protocol/index.js').MatrixMeasureFilter[] | undefined;
319
320
  };
320
321
  expansion: {
321
322
  kind: "current";
@@ -609,7 +610,7 @@ export declare function captureMatrixExport(input: {
609
610
  measures: readonly ({
610
611
  id: string;
611
612
  kind: "aggregate";
612
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
613
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
613
614
  field: Omit<import('../analytics-protocol/index.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
614
615
  source?: import('../analytics-protocol/index.js').SemaphorMatrixSourceRef;
615
616
  derivedField?: Omit<import('../analytics-protocol/index.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -668,6 +669,7 @@ export declare function captureMatrixExport(input: {
668
669
  relationshipHint?: {
669
670
  relationshipIds?: string[] | undefined;
670
671
  } | undefined;
672
+ measureFilters?: readonly import('../analytics-protocol/index.js').MatrixMeasureFilter[] | undefined;
671
673
  };
672
674
  };
673
675
  /** Public analytical payload, shared by job and PDF adapters. Never accepts cells. */
@@ -1043,7 +1045,7 @@ export declare function buildMatrixDeliveryEnvelope<TSource extends {
1043
1045
  measures: readonly ({
1044
1046
  id: string;
1045
1047
  kind: "aggregate";
1046
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
1048
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
1047
1049
  field: Omit<import('../analytics-protocol/index.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
1048
1050
  source?: import('../analytics-protocol/index.js').SemaphorMatrixSourceRef;
1049
1051
  derivedField?: Omit<import('../analytics-protocol/index.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -1102,6 +1104,7 @@ export declare function buildMatrixDeliveryEnvelope<TSource extends {
1102
1104
  relationshipHint?: {
1103
1105
  relationshipIds?: string[] | undefined;
1104
1106
  } | undefined;
1107
+ measureFilters?: readonly import('../analytics-protocol/index.js').MatrixMeasureFilter[] | undefined;
1105
1108
  };
1106
1109
  expansion: {
1107
1110
  kind: "current";
@@ -1395,7 +1398,7 @@ export declare function buildMatrixDeliveryEnvelope<TSource extends {
1395
1398
  measures: readonly ({
1396
1399
  id: string;
1397
1400
  kind: "aggregate";
1398
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
1401
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
1399
1402
  field: Omit<import('../analytics-protocol/index.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
1400
1403
  source?: import('../analytics-protocol/index.js').SemaphorMatrixSourceRef;
1401
1404
  derivedField?: Omit<import('../analytics-protocol/index.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -1454,6 +1457,7 @@ export declare function buildMatrixDeliveryEnvelope<TSource extends {
1454
1457
  relationshipHint?: {
1455
1458
  relationshipIds?: string[] | undefined;
1456
1459
  } | undefined;
1460
+ measureFilters?: readonly import('../analytics-protocol/index.js').MatrixMeasureFilter[] | undefined;
1457
1461
  };
1458
1462
  };
1459
1463
  delimiter: "," | ";" | "\t";
@@ -338,7 +338,7 @@ export declare function buildMatrixPrintTable(input: {
338
338
  measures: readonly ({
339
339
  id: string;
340
340
  kind: "aggregate";
341
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
341
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
342
342
  field: Omit<import('../analytics-protocol/index.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
343
343
  source?: import('../analytics-protocol/index.js').SemaphorMatrixSourceRef;
344
344
  derivedField?: Omit<import('../analytics-protocol/index.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -397,6 +397,7 @@ export declare function buildMatrixPrintTable(input: {
397
397
  relationshipHint?: {
398
398
  relationshipIds?: string[] | undefined;
399
399
  } | undefined;
400
+ measureFilters?: readonly import('../analytics-protocol/index.js').MatrixMeasureFilter[] | undefined;
400
401
  };
401
402
  expansion: {
402
403
  kind: "current";
@@ -690,7 +691,7 @@ export declare function buildMatrixPrintTable(input: {
690
691
  measures: readonly ({
691
692
  id: string;
692
693
  kind: "aggregate";
693
- aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "DISTINCT";
694
+ aggregate: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT";
694
695
  field: Omit<import('../analytics-protocol/index.js').SemaphorExecutionFieldRef, "source" | "aggregate" | "derivedField"> & {
695
696
  source?: import('../analytics-protocol/index.js').SemaphorMatrixSourceRef;
696
697
  derivedField?: Omit<import('../analytics-protocol/index.js').SemaphorDerivedFieldDefinition, "inputs"> & {
@@ -749,6 +750,7 @@ export declare function buildMatrixPrintTable(input: {
749
750
  relationshipHint?: {
750
751
  relationshipIds?: string[] | undefined;
751
752
  } | undefined;
753
+ measureFilters?: readonly import('../analytics-protocol/index.js').MatrixMeasureFilter[] | undefined;
752
754
  };
753
755
  };
754
756
  table: FastPathTableStructure;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.552",
8
+ "version": "0.1.554",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",
@@ -127,7 +127,7 @@
127
127
  "build": "node scripts/build.mjs",
128
128
  "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
129
129
  "lint:regressions": "node scripts/lint-regressions.mjs",
130
- "check:guards": "node scripts/card-config-consumers.mjs && node scripts/components-entry-imports.mjs && node scripts/types-entry-imports.mjs && node scripts/card-query-assembly-imports.mjs && node scripts/assistant-chat-imports.mjs && node scripts/filter-model-reads.mjs && node scripts/layout-engine.mjs",
130
+ "check:guards": "node scripts/card-config-consumers.mjs && node scripts/components-entry-imports.mjs && node scripts/types-entry-imports.mjs && node scripts/card-query-assembly-imports.mjs && node scripts/matrix-conversion-imports.mjs && node scripts/assistant-chat-imports.mjs && node scripts/filter-model-reads.mjs && node scripts/layout-engine.mjs",
131
131
  "preview": "vite preview",
132
132
  "test": "vitest run",
133
133
  "test:changed": "vitest run --changed",