react-semaphor 0.1.597 → 0.1.599

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 (96) hide show
  1. package/dist/analytics-protocol/index.js +355 -346
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +8 -8
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{add-to-dashboard-C86FsM8D.js → add-to-dashboard-ClhEIFst.js} +1 -1
  7. package/dist/chunks/{analytics-base-schemas-8wz9vqn_.js → analytics-base-schemas-DevrgqQb.js} +67 -60
  8. package/dist/chunks/{assistant-chat-DUDiH9z4.js → assistant-chat-f3XuzrAm.js} +88 -89
  9. package/dist/chunks/{bookmark-impact-Dh-wiTs3.js → bookmark-impact-B5hyttm2.js} +3 -3
  10. package/dist/chunks/{bookmark-state-Be2W3s6t.js → bookmark-state-h1OLXVjE.js} +153 -153
  11. package/dist/chunks/{card-filter-builder-2-OxEBWf.js → card-filter-builder-DfLqD2RV.js} +1047 -1075
  12. package/dist/chunks/{comparison-window-caption-DmMFtNP5.js → comparison-window-caption-DJDwP9XO.js} +6 -6
  13. package/dist/chunks/{context-CVXTFljo.js → context-BJoEFgNl.js} +1 -1
  14. package/dist/chunks/{dashboard-g-7XY0Kw.js → dashboard-CoI4aOUc.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-CVDhvsTk.js → dashboard-briefing-launcher-RxYGtk-F.js} +181 -181
  16. package/dist/chunks/{dashboard-controls-CtQY-J33.js → dashboard-controls-DeaXrtLK.js} +85 -85
  17. package/dist/chunks/{dashboard-json-DkhzPI3-.js → dashboard-json-DvxKpKd_.js} +5 -5
  18. package/dist/chunks/dates-BhtO28Sn.js +164 -0
  19. package/dist/chunks/{edit-dashboard-visual-DWn74pCl.js → edit-dashboard-visual-C4f5hONA.js} +5489 -5433
  20. package/dist/chunks/{filter-line-BpdPq1D2.js → filter-line-Dkg3yuOX.js} +6 -6
  21. package/dist/chunks/{filter-reach-copy-DoXmRmk-.js → filter-reach-copy-Cl5Od38Q.js} +1760 -1584
  22. package/dist/chunks/{filter-value-text-CDQCIREQ.js → filter-value-text-CXyuLW9Q.js} +4 -4
  23. package/dist/chunks/{index-C0jX5wlM.js → index-EKpTtkYF.js} +7 -7
  24. package/dist/chunks/{layout-grid-DoFIfQGd.js → layout-grid-DSrBSfPM.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-CyWOwLmE.js → matrix-analytical-definition-BuUSBDm7.js} +242 -214
  26. package/dist/chunks/matrix-member-presentation-B_2beBc0.js +258 -0
  27. package/dist/chunks/{matrix-operation-contract-CAanJeCj.js → matrix-operation-contract-DdK0J_KU.js} +47 -47
  28. package/dist/chunks/{metric-comparison-BeKnUD08.js → metric-comparison-Bhz0V841.js} +2 -2
  29. package/dist/chunks/{paintbrush-KeaU1L1a.js → paintbrush-1UiU-uTz.js} +1 -1
  30. package/dist/chunks/{palette-BcFJLeXB.js → palette-DFIFf_-m.js} +1 -1
  31. package/dist/chunks/{pivot-result-contract-expectations-Dt0E1Wou.js → pivot-result-contract-expectations-Dk7WFR_u.js} +47 -47
  32. package/dist/chunks/{pivot-result-identity-BKUjYO1u.js → pivot-result-identity-CzzrJpEm.js} +1 -1
  33. package/dist/chunks/{raw-temporal-value-BzdgeDa7.js → raw-temporal-value-BLvdaMng.js} +2 -2
  34. package/dist/chunks/{report-preferences-dialog-5WUi6jC0.js → report-preferences-dialog-CZaYsQLK.js} +14 -14
  35. package/dist/chunks/{report-runtime-context-g4Zp_TU9.js → report-runtime-context-CEGluufW.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-DfJshnw8.js → resolve-dashboard-input-context-vPtbuDDz.js} +11786 -11247
  37. package/dist/chunks/{save-C9CZAk6V.js → save-CWQ02kHo.js} +1 -1
  38. package/dist/chunks/{saved-dashboard-context-DdhPU2Kq.js → saved-dashboard-context-C6X5nP4C.js} +97 -97
  39. package/dist/chunks/{selection-filter-compiler-BclSpK3P.js → selection-filter-compiler-Ce4BpjRX.js} +1 -1
  40. package/dist/chunks/{semaphor-ready-indicator-miYoJ-HP.js → semaphor-ready-indicator-BUiaKY6O.js} +60709 -59628
  41. package/dist/chunks/{shelf-drop-preview-context-D-awfyyo.js → shelf-drop-preview-context-CwxWJjBv.js} +6 -6
  42. package/dist/chunks/{stored-dashboard-D6FtWx_3.js → stored-dashboard-Bmct-STp.js} +1165 -1148
  43. package/dist/chunks/{style-sheet-parts-DM_Mw_sm.js → style-sheet-parts-BX7d7-2-.js} +198 -198
  44. package/dist/chunks/{table-export-sheet-DBlFMvE8.js → table-export-sheet-BWSVTclx.js} +1 -1
  45. package/dist/chunks/{token-types-BB2ImFx6.js → token-types-CnlEiAdS.js} +1 -1
  46. package/dist/chunks/{upload-CMTCg47S.js → upload-DsqUSS8l.js} +1 -1
  47. package/dist/chunks/{validators-BlEWWX9O.js → validators-D2Hm57lJ.js} +1090 -1071
  48. package/dist/chunks/{variable-draft-CxdgKDCx.js → variable-draft-Bi-zUa_a.js} +4 -4
  49. package/dist/dashboard/index.js +2 -2
  50. package/dist/dashboard-authoring/index.js +2554 -2538
  51. package/dist/format-utils/index.js +14 -14
  52. package/dist/index.js +48 -48
  53. package/dist/report-runtime-context/index.js +2 -2
  54. package/dist/style.css +1 -1
  55. package/dist/surfboard/index.js +2 -2
  56. package/dist/types/components/surfboard/filter/types.d.ts +13 -1
  57. package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +0 -2
  58. package/dist/types/components/visual/data-table/types/data-table.d.ts +14 -21
  59. package/dist/types/index.js +5 -5
  60. package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +11 -1
  61. package/dist/types/lib/dashboard-view-state/drill-path.d.ts +7 -0
  62. package/dist/types/lib/dashboard-viewer/table-view.d.ts +20 -0
  63. package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +8 -0
  64. package/dist/types/lib/matrix-table/matrix-runtime.d.ts +1 -0
  65. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +2 -0
  66. package/dist/types/lib/stores/dashboard-store.d.ts +3 -1
  67. package/dist/types/lib/utils/filter-default-value-utils.d.ts +1 -1
  68. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +64 -0
  69. package/dist/types/shared/analytics-protocol/catalog-field-grounding.d.ts +7 -0
  70. package/dist/types/shared/analytics-protocol/column-filter-id.d.ts +4 -0
  71. package/dist/types/shared/analytics-protocol/contracts.d.ts +26 -0
  72. package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
  73. package/dist/types/shared/analytics-protocol/numeric-range-options.d.ts +46 -0
  74. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +12 -1
  75. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +12 -0
  76. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  77. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -1
  78. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +4 -0
  79. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +2 -0
  80. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +63 -0
  81. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  82. package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +2 -0
  83. package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +2 -0
  84. package/dist/types/shared/dashboard-authoring/filter-model/number-condition-spec.d.ts +24 -0
  85. package/dist/types/shared/dashboard-authoring/filter-model/number-range-setting.d.ts +47 -0
  86. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +8 -1
  87. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +3 -1
  88. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +35 -3
  89. package/dist/types/shared/usage-events/attribution.d.ts +2 -2
  90. package/dist/types/shared/usage-events/envelope.d.ts +2 -2
  91. package/dist/usage-events/index.js +1 -1
  92. package/package.json +1 -1
  93. package/dist/chunks/aggregate-measure-field-DHlDj0Pc.js +0 -22
  94. package/dist/chunks/dates-B-bKEsiu.js +0 -115
  95. package/dist/chunks/list-filter-BeTQxjNy.js +0 -15
  96. package/dist/chunks/matrix-member-presentation-Bj2YcHAP.js +0 -169
@@ -5327,9 +5327,26 @@ export declare const dashboardChangeSchema: z.ZodDiscriminatedUnion<"op", [z.Zod
5327
5327
  datasetName: z.ZodString;
5328
5328
  field: z.ZodString;
5329
5329
  selection: z.ZodOptional<z.ZodEnum<["single", "multiple"]>>;
5330
+ /** A number field: pick a condition (range) or tick values (list); new number filters start as range (number range filters NR-D4). */
5331
+ showAs: z.ZodOptional<z.ZodString>;
5330
5332
  defaultValues: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">>;
5333
+ /** A range filter's default condition. */
5334
+ defaultCondition: z.ZodOptional<z.ZodObject<{
5335
+ operator: z.ZodString;
5336
+ values: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
5337
+ }, "strict", z.ZodTypeAny, {
5338
+ operator: string;
5339
+ values?: unknown[] | undefined;
5340
+ }, {
5341
+ operator: string;
5342
+ values?: unknown[] | undefined;
5343
+ }>>;
5331
5344
  defaultPeriod: z.ZodOptional<z.ZodType<import('../../analytics-protocol/agent-time-window.js').AgentTimeWindow, z.ZodTypeDef, import('../../analytics-protocol/index.js').SemaphorTimeWindow>>;
5332
5345
  sheetIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5346
+ /** Pins the filter on this card instead (no sheetIds). */
5347
+ cardId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
5348
+ /** A pinned filter's place, 0 first. */
5349
+ position: z.ZodOptional<z.ZodNumber>;
5333
5350
  }, "strict", z.ZodTypeAny, {
5334
5351
  domainId: string;
5335
5352
  datasetName: string;
@@ -5338,8 +5355,15 @@ export declare const dashboardChangeSchema: z.ZodDiscriminatedUnion<"op", [z.Zod
5338
5355
  op: "filter.add";
5339
5356
  selection?: "single" | "multiple" | undefined;
5340
5357
  defaultPeriod?: import('../../analytics-protocol/agent-time-window.js').AgentTimeWindow | undefined;
5358
+ position?: number | undefined;
5359
+ cardId?: string | undefined;
5341
5360
  defaultValues?: (string | number | boolean)[] | undefined;
5342
5361
  handle?: string | undefined;
5362
+ showAs?: string | undefined;
5363
+ defaultCondition?: {
5364
+ operator: string;
5365
+ values?: unknown[] | undefined;
5366
+ } | undefined;
5343
5367
  sheetIds?: string[] | undefined;
5344
5368
  }, {
5345
5369
  domainId: string;
@@ -5349,24 +5373,53 @@ export declare const dashboardChangeSchema: z.ZodDiscriminatedUnion<"op", [z.Zod
5349
5373
  op: "filter.add";
5350
5374
  selection?: "single" | "multiple" | undefined;
5351
5375
  defaultPeriod?: import('../../analytics-protocol/index.js').SemaphorTimeWindow | undefined;
5376
+ position?: number | undefined;
5377
+ cardId?: string | undefined;
5352
5378
  defaultValues?: (string | number | boolean)[] | undefined;
5353
5379
  handle?: string | undefined;
5380
+ showAs?: string | undefined;
5381
+ defaultCondition?: {
5382
+ operator: string;
5383
+ values?: unknown[] | undefined;
5384
+ } | undefined;
5354
5385
  sheetIds?: string[] | undefined;
5355
5386
  }>, z.ZodObject<{
5356
5387
  op: z.ZodLiteral<"filter.update">;
5357
5388
  filterId: z.ZodUnion<[z.ZodString, z.ZodString]>;
5358
5389
  label: z.ZodOptional<z.ZodString>;
5359
5390
  selection: z.ZodOptional<z.ZodEnum<["single", "multiple"]>>;
5391
+ showAs: z.ZodOptional<z.ZodString>;
5360
5392
  defaultValues: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">>>;
5393
+ /** null clears it. */
5394
+ defaultCondition: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5395
+ operator: z.ZodString;
5396
+ values: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
5397
+ }, "strict", z.ZodTypeAny, {
5398
+ operator: string;
5399
+ values?: unknown[] | undefined;
5400
+ }, {
5401
+ operator: string;
5402
+ values?: unknown[] | undefined;
5403
+ }>>>;
5361
5404
  defaultPeriod: z.ZodOptional<z.ZodNullable<z.ZodType<import('../../analytics-protocol/agent-time-window.js').AgentTimeWindow, z.ZodTypeDef, import('../../analytics-protocol/index.js').SemaphorTimeWindow>>>;
5362
5405
  sheetIds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
5406
+ position: z.ZodOptional<z.ZodNumber>;
5407
+ /** The card a pinned filter is on, as the outline lists it (an id or a handle, as filterId). */
5408
+ cardId: z.ZodOptional<z.ZodString>;
5363
5409
  }, "strict", z.ZodTypeAny, {
5364
5410
  filterId: string;
5365
5411
  op: "filter.update";
5366
5412
  selection?: "single" | "multiple" | undefined;
5367
5413
  label?: string | undefined;
5368
5414
  defaultPeriod?: import('../../analytics-protocol/agent-time-window.js').AgentTimeWindow | null | undefined;
5415
+ position?: number | undefined;
5416
+ cardId?: string | undefined;
5369
5417
  defaultValues?: (string | number | boolean)[] | null | undefined;
5418
+ showAs?: string | undefined;
5419
+ defaultCondition?: {
5420
+ operator: string;
5421
+ values?: unknown[] | undefined;
5422
+ } | null | undefined;
5370
5423
  sheetIds?: string[] | null | undefined;
5371
5424
  }, {
5372
5425
  filterId: string;
@@ -5374,17 +5427,27 @@ export declare const dashboardChangeSchema: z.ZodDiscriminatedUnion<"op", [z.Zod
5374
5427
  selection?: "single" | "multiple" | undefined;
5375
5428
  label?: string | undefined;
5376
5429
  defaultPeriod?: import('../../analytics-protocol/index.js').SemaphorTimeWindow | null | undefined;
5430
+ position?: number | undefined;
5431
+ cardId?: string | undefined;
5377
5432
  defaultValues?: (string | number | boolean)[] | null | undefined;
5433
+ showAs?: string | undefined;
5434
+ defaultCondition?: {
5435
+ operator: string;
5436
+ values?: unknown[] | undefined;
5437
+ } | null | undefined;
5378
5438
  sheetIds?: string[] | null | undefined;
5379
5439
  }>, z.ZodObject<{
5380
5440
  op: z.ZodLiteral<"filter.remove">;
5381
5441
  filterId: z.ZodString;
5442
+ cardId: z.ZodOptional<z.ZodString>;
5382
5443
  }, "strict", z.ZodTypeAny, {
5383
5444
  filterId: string;
5384
5445
  op: "filter.remove";
5446
+ cardId?: string | undefined;
5385
5447
  }, {
5386
5448
  filterId: string;
5387
5449
  op: "filter.remove";
5450
+ cardId?: string | undefined;
5388
5451
  }>, z.ZodObject<{
5389
5452
  op: z.ZodLiteral<"filter.bind">;
5390
5453
  filterId: z.ZodUnion<[z.ZodString, z.ZodString]>;
@@ -1446,9 +1446,9 @@ export declare const conditionalRuleSchema: z.ZodObject<{
1446
1446
  italic?: boolean | undefined;
1447
1447
  fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
1448
1448
  backgroundColor?: string | undefined;
1449
- textColor?: string | undefined;
1450
1449
  textDecoration?: "none" | "underline" | "line-through" | undefined;
1451
1450
  icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
1451
+ textColor?: string | undefined;
1452
1452
  }, {
1453
1453
  dataBar?: {
1454
1454
  color: string;
@@ -1457,9 +1457,9 @@ export declare const conditionalRuleSchema: z.ZodObject<{
1457
1457
  italic?: boolean | undefined;
1458
1458
  fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
1459
1459
  backgroundColor?: string | undefined;
1460
- textColor?: string | undefined;
1461
1460
  textDecoration?: "none" | "underline" | "line-through" | undefined;
1462
1461
  icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
1462
+ textColor?: string | undefined;
1463
1463
  }>>;
1464
1464
  }, "strict", z.ZodTypeAny, {
1465
1465
  id: string;
@@ -1726,9 +1726,9 @@ export declare const conditionalRuleSchema: z.ZodObject<{
1726
1726
  italic?: boolean | undefined;
1727
1727
  fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
1728
1728
  backgroundColor?: string | undefined;
1729
- textColor?: string | undefined;
1730
1729
  textDecoration?: "none" | "underline" | "line-through" | undefined;
1731
1730
  icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
1731
+ textColor?: string | undefined;
1732
1732
  } | undefined;
1733
1733
  enabled?: boolean | undefined;
1734
1734
  }, {
@@ -1996,9 +1996,9 @@ export declare const conditionalRuleSchema: z.ZodObject<{
1996
1996
  italic?: boolean | undefined;
1997
1997
  fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
1998
1998
  backgroundColor?: string | undefined;
1999
- textColor?: string | undefined;
2000
1999
  textDecoration?: "none" | "underline" | "line-through" | undefined;
2001
2000
  icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
2001
+ textColor?: string | undefined;
2002
2002
  } | undefined;
2003
2003
  enabled?: boolean | undefined;
2004
2004
  }>;
@@ -3380,9 +3380,9 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
3380
3380
  italic?: boolean | undefined;
3381
3381
  fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
3382
3382
  backgroundColor?: string | undefined;
3383
- textColor?: string | undefined;
3384
3383
  textDecoration?: "none" | "underline" | "line-through" | undefined;
3385
3384
  icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
3385
+ textColor?: string | undefined;
3386
3386
  }, {
3387
3387
  dataBar?: {
3388
3388
  color: string;
@@ -3391,9 +3391,9 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
3391
3391
  italic?: boolean | undefined;
3392
3392
  fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
3393
3393
  backgroundColor?: string | undefined;
3394
- textColor?: string | undefined;
3395
3394
  textDecoration?: "none" | "underline" | "line-through" | undefined;
3396
3395
  icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
3396
+ textColor?: string | undefined;
3397
3397
  }>>;
3398
3398
  }, "strict", z.ZodTypeAny, {
3399
3399
  id: string;
@@ -3660,9 +3660,9 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
3660
3660
  italic?: boolean | undefined;
3661
3661
  fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
3662
3662
  backgroundColor?: string | undefined;
3663
- textColor?: string | undefined;
3664
3663
  textDecoration?: "none" | "underline" | "line-through" | undefined;
3665
3664
  icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
3665
+ textColor?: string | undefined;
3666
3666
  } | undefined;
3667
3667
  enabled?: boolean | undefined;
3668
3668
  }, {
@@ -3930,9 +3930,9 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
3930
3930
  italic?: boolean | undefined;
3931
3931
  fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
3932
3932
  backgroundColor?: string | undefined;
3933
- textColor?: string | undefined;
3934
3933
  textDecoration?: "none" | "underline" | "line-through" | undefined;
3935
3934
  icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
3935
+ textColor?: string | undefined;
3936
3936
  } | undefined;
3937
3937
  enabled?: boolean | undefined;
3938
3938
  }>, "many">;
@@ -4203,9 +4203,9 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
4203
4203
  italic?: boolean | undefined;
4204
4204
  fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
4205
4205
  backgroundColor?: string | undefined;
4206
- textColor?: string | undefined;
4207
4206
  textDecoration?: "none" | "underline" | "line-through" | undefined;
4208
4207
  icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
4208
+ textColor?: string | undefined;
4209
4209
  } | undefined;
4210
4210
  enabled?: boolean | undefined;
4211
4211
  }[];
@@ -4476,9 +4476,9 @@ export declare const cardConditionalFormattingSchema: z.ZodObject<{
4476
4476
  italic?: boolean | undefined;
4477
4477
  fontWeight?: "bold" | "medium" | "normal" | "semibold" | undefined;
4478
4478
  backgroundColor?: string | undefined;
4479
- textColor?: string | undefined;
4480
4479
  textDecoration?: "none" | "underline" | "line-through" | undefined;
4481
4480
  icon?: "warning" | "arrowUp" | "arrowDown" | "check" | "x" | undefined;
4481
+ textColor?: string | undefined;
4482
4482
  } | undefined;
4483
4483
  enabled?: boolean | undefined;
4484
4484
  }[];
@@ -30,6 +30,8 @@ export type NormalizeDashboardInputsResult = {
30
30
  */
31
31
  export declare const DASHBOARD_INPUT_RUNTIME_SCOPE_KINDS: Readonly<Record<DashboardInput['runtimeScope'], ReadonlyArray<DashboardInput['scope']['kind']>>>;
32
32
  export declare function isAllowedDashboardInputScopeCombination(runtimeScope: DashboardInput['runtimeScope'], scopeKind: DashboardInput['scope']['kind']): boolean;
33
+ /** A filter definition the input contract accepts: an id, a column and a data type. */
34
+ export declare function isCompleteOwnedFilter(value: unknown): value is TFilter;
33
35
  export declare function normalizeDashboardInputs({ inputs, dashboardFilters, cards, validateCardTargets, }: {
34
36
  inputs: DashboardInput[] | unknown;
35
37
  dashboardFilters: TFilter[] | undefined;
@@ -8,3 +8,5 @@ export { upgradeToStoredDashboard } from './stored-dashboard.js';
8
8
  /** Every input the dashboard has at runtime, compatibility inputs named as the runtime names them (data variables P1a-21). */
9
9
  export { listDashboardInputsTolerantly } from '../../../lib/dashboard-inputs/build-normalized-dashboard-inputs.js';
10
10
  export * from './date-filter-default.js';
11
+ export * from './number-range-setting.js';
12
+ export * from './number-condition-spec.js';
@@ -0,0 +1,24 @@
1
+ import { Operation } from '../../../components/surfboard/filter/types.js';
2
+ export type NumberConditionOperation = Extract<Operation, '=' | '!=' | '>' | '>=' | '<' | '<=' | 'between' | 'not between' | 'is null' | 'is not null'>;
3
+ export type NumberConditionSpec = {
4
+ operation: NumberConditionOperation;
5
+ /** The menu's words; lowercased, the sentence's ("at least 0.5"). */
6
+ label: string;
7
+ /** How many numbers the condition takes. */
8
+ arity: 0 | 1 | 2;
9
+ /** How an agent writes it, in the card filters' vocabulary (`not_between`, `is_null`). */
10
+ agentOperator: string;
11
+ };
12
+ /** The conditions, in words, in the groups the menu shows (NR-D12). */
13
+ export declare const NUMBER_CONDITION_GROUPS: readonly (readonly NumberConditionSpec[])[];
14
+ export declare const NUMBER_CONDITION_SPECS: readonly NumberConditionSpec[];
15
+ export declare function isNumberConditionOperation(operation: unknown): operation is NumberConditionOperation;
16
+ /** The spec for an operation; Between for one that isn't a condition. */
17
+ export declare function numberConditionSpec(operation: NumberConditionOperation): NumberConditionSpec;
18
+ /** The spec an agent's operator names, if any. */
19
+ export declare function numberConditionSpecForAgent(operator: string): NumberConditionSpec | undefined;
20
+ export type NumberConditionProblem = 'arity' | 'notANumber' | 'reversed';
21
+ /** Why a completed condition can't apply, or undefined when it can. */
22
+ export declare function numberConditionProblem(operation: NumberConditionOperation, values: readonly unknown[]): NumberConditionProblem | undefined;
23
+ /** A condition in words, e.g. "at least 0.5", "between 1 and 2", "is empty". */
24
+ export declare function describeNumberCondition(operation: NumberConditionOperation, values: readonly number[]): string;
@@ -0,0 +1,47 @@
1
+ import { TFilter } from '../../../components/surfboard/filter/types.js';
2
+ import { NumberConditionOperation } from './number-condition-spec.js';
3
+ export type NumberFilterShowAs = 'range' | 'list';
4
+ /** A Range's default condition: the operation and its numbers (none for empty checks). */
5
+ export type NumberConditionDefault = {
6
+ operation: NumberConditionOperation;
7
+ values: number[];
8
+ };
9
+ /** Whether a field type can show as a Range. */
10
+ export declare function canShowAsRange(dataType: string | undefined): boolean;
11
+ /** How a number filter shows; undefined for any other field type. */
12
+ export declare function readNumberFilterShowAs(filter: Pick<TFilter, 'dataType' | 'searchMode'>): NumberFilterShowAs | undefined;
13
+ /** The default condition a Range filter opens with, if it has one. */
14
+ export declare function readNumberConditionDefault(filter: Pick<TFilter, 'dataType' | 'searchMode' | 'operation' | 'defaultValues'>): NumberConditionDefault | undefined;
15
+ /** Why a default condition can't be saved, in words an author or agent reads; undefined when it can. */
16
+ export declare function validateNumberConditionDefault(condition: NumberConditionDefault,
17
+ /** The operator as the caller wrote it (an agent's is_null), for the message. */
18
+ operatorWords?: string): string | undefined;
19
+ /**
20
+ * The fields Show as writes. Range: `searchMode: 'numeric'`; a list default
21
+ * (values to tick) has no meaning as a condition, so it goes. List: the
22
+ * list's own search mode (`auto`, or `text` when it was text), and a
23
+ * condition default goes back to no default under Include.
24
+ */
25
+ export declare function writeNumberFilterShowAs(filter: Pick<TFilter, 'searchMode' | 'operation' | 'defaultValues'>, showAs: NumberFilterShowAs): Partial<Pick<TFilter, 'searchMode' | 'operation' | 'defaultValues'>>;
26
+ /** The fields a Range's default condition writes; null clears it. */
27
+ export declare function writeNumberConditionDefault(condition: NumberConditionDefault | null): Pick<TFilter, 'operation' | 'defaultValues'>;
28
+ /** The Show as a new filter on this field starts with (NR-D4): Range for numbers. */
29
+ export declare function initialNumberFilterSearchMode(dataType: string | undefined): Pick<TFilter, 'searchMode'>;
30
+ /** A Range's default condition read back in words, e.g. "at least 0.5" (NR-D12). */
31
+ export declare function describeNumberConditionDefault(condition: NumberConditionDefault): string;
32
+ /** A default condition as an agent states it (filter.add / filter.update `defaultCondition`), in the card filters' vocabulary. */
33
+ export type AgentNumberConditionDefault = {
34
+ operator: string;
35
+ /** Numbers; the change schema lists them untyped, so they're checked here. */
36
+ values?: unknown[];
37
+ };
38
+ /** An agent's default condition as the filter stores it, or why it can't be one. */
39
+ export declare function readAgentNumberConditionDefault(stated: AgentNumberConditionDefault): {
40
+ ok: true;
41
+ condition: NumberConditionDefault;
42
+ } | {
43
+ ok: false;
44
+ message: string;
45
+ };
46
+ /** A stored default condition as an agent reads it in the outline. */
47
+ export declare function toAgentNumberConditionDefault(condition: NumberConditionDefault): AgentNumberConditionDefault;
@@ -1,4 +1,4 @@
1
- import { DataVariable, EmbeddedFilterDashboardInput, TDashboard, TFrame, TextCardRichContent } from '../../../lib/types/common-types.js';
1
+ import { DataVariable, EmbeddedFilterDashboardInput, TDashboard, TFrame, TInlineFilter, TextCardRichContent } from '../../../lib/types/common-types.js';
2
2
  import { DocumentEdit } from '../../../lib/document/document-edits.js';
3
3
  import { ResolvedCardSettings } from '../card-settings/resolved.js';
4
4
  import { MeasureCalculationsUpdate } from '../measure-calculations/resolve.js';
@@ -120,6 +120,13 @@ export type DashboardOperation = ({
120
120
  op: 'filter.remove';
121
121
  filterId: string;
122
122
  }
123
+ /** A card's pinned filters, the whole list in order (table column filters Phase 5). */
124
+ | {
125
+ op: 'pinnedFilters.set';
126
+ cardId: string;
127
+ filters: TInlineFilter[]; /** It removes a pinned filter (a proposal's risk reads it). */
128
+ unpins?: true;
129
+ }
123
130
  /** The card's bound entry in the filter's mapping, built as the mapping editor builds one. */
124
131
  | {
125
132
  op: 'filter.bind';
@@ -8,7 +8,7 @@ import { CardTypeProperties } from '../changes/card-types.js';
8
8
  import { CardSettingsView } from '../card-settings/views.js';
9
9
  import { NotEditableReason, OutlineCardSource } from '../changes/read-card-query.js';
10
10
  import { CardQuery, MatrixColumns } from '../changes/dashboard-change.js';
11
- import { OutlineFilter } from './outline-filters.js';
11
+ import { OutlineFilter, OutlinePinnedFilter } from './outline-filters.js';
12
12
  import { CalendarContext } from '../../report-runtime-context/index.js';
13
13
  import { AgentTimeWindowRefusal } from '../../analytics-protocol/agent-time-window.js';
14
14
  import { AppearanceSpec } from '../../../lib/appearance/types.js';
@@ -71,6 +71,8 @@ export type OutlineCard = ({
71
71
  matrix?: MatrixColumns;
72
72
  /** The query's stored window is one a card can't be saved with now: its refusal and replacements (relative-date-as-of SPEC-B 3.6). */
73
73
  timeWindowReadOnly?: AgentTimeWindowRefusal;
74
+ /** The filters pinned on the card, in order: filter.update and filter.remove take their ids (table column filters Phase 5). */
75
+ pinnedFilters?: OutlinePinnedFilter[];
74
76
  } & CardTypeProperties &
75
77
  /** How the card reads and shows, in the shape a change takes; absent when the outline is truncated (card appearance SPEC 3.2). */
76
78
  Partial<CardSettingsView>) | OutlineTextCard | ({
@@ -1,6 +1,7 @@
1
- import { TDashboard } from '../../../lib/types/common-types.js';
1
+ import { TCard, TDashboard } from '../../../lib/types/common-types.js';
2
+ import { TFilter, TFilterValue } from '../../../components/surfboard/filter/types.js';
2
3
  import { DashboardFilterNotReachedReason, DashboardRelationshipReachResolver } from '../../../lib/query-context/dashboard-filter-mapping-resolution.js';
3
- import { FilterInputEntry } from '../filter-model/index.js';
4
+ import { AgentNumberConditionDefault, FilterInputEntry, NumberFilterShowAs } from '../filter-model/index.js';
4
5
  import { AgentTimeWindowRefusal } from '../../analytics-protocol/agent-time-window.js';
5
6
  import { RelativeDateWindow } from '../../analytics-protocol/relative-date/index.js';
6
7
  import { CalendarContext } from '../../report-runtime-context/index.js';
@@ -22,8 +23,12 @@ export type OutlineFilter = {
22
23
  datasetName: string;
23
24
  field: string;
24
25
  selection: 'single' | 'multiple';
25
- /** The values it loads with, read through the default owner (a saved default first, else the definition). */
26
+ /** A number filter: range (viewers pick a condition) or list (viewers tick values) (number range filters NR-D2). */
27
+ showAs?: NumberFilterShowAs;
28
+ /** The values it loads with, read through the default owner (a saved default first, else the definition). Not for a range. */
26
29
  defaultValues?: FilterValue[];
30
+ /** A range filter's default condition, as filter.add / filter.update take it. */
31
+ defaultCondition?: AgentNumberConditionDefault;
27
32
  /** The window it loads with, only when the loaded default keeps one (a day picker clamps a wider window to a day). */
28
33
  defaultPeriod?: RelativeDateWindow;
29
34
  /**
@@ -118,7 +123,34 @@ export type OutlineReachOptions = {
118
123
  */
119
124
  export declare function outlineCalendar(calendar: CalendarContext | undefined, updatedAt: string | undefined): CalendarContext;
120
125
  export declare function summarizeFilter(dashboard: TDashboard, entry: FilterInputEntry, calendar?: CalendarContext, options?: OutlineReachOptions): OutlineFilter;
126
+ /**
127
+ * A filter's picking and the default it loads with, as filter.add and
128
+ * filter.update take them: a dashboard filter's and a pinned filter's alike.
129
+ * `loaded` is the default as it loads, read by its owner.
130
+ */
131
+ declare function readLoadedFilterDefault(filter: TFilter, loaded: TFilterValue | undefined): {
132
+ datePicker?: "day" | "month" | "range" | undefined;
133
+ defaultPeriodReadOnly?: AgentTimeWindowRefusal | undefined;
134
+ defaultPeriod?: RelativeDateWindow | undefined;
135
+ defaultCondition?: AgentNumberConditionDefault | undefined;
136
+ defaultValues?: (string | number | boolean)[] | undefined;
137
+ showAs?: NumberFilterShowAs | undefined;
138
+ selection: "single" | "multiple";
139
+ };
140
+ /**
141
+ * A card's pinned filter (table column filters Phase 5), in filter.update's
142
+ * words: its id, name and field, how viewers pick, and the default it loads
143
+ * with (the toolbar filter's own default reading). Listed in the card's order,
144
+ * which filter.update position changes.
145
+ */
146
+ export type OutlinePinnedFilter = {
147
+ filterId: string;
148
+ label: string;
149
+ field: string;
150
+ } & ReturnType<typeof readLoadedFilterDefault>;
151
+ export declare function outlinePinnedFilters(card: TCard, calendar?: CalendarContext): OutlinePinnedFilter[];
121
152
  /** Every filter on the dashboard, in the filter model's order. */
122
153
  export declare function outlineFilters(dashboard: TDashboard, calendar?: CalendarContext, options?: OutlineReachOptions): OutlineFilter[];
123
154
  /** One filter by its input id, or undefined. */
124
155
  export declare function outlineFilter(dashboard: TDashboard, filterId: string, calendar?: CalendarContext, options?: OutlineReachOptions): OutlineFilter | undefined;
156
+ export {};
@@ -32,15 +32,15 @@ export declare const usageAttributionFieldsSchema: z.ZodObject<{
32
32
  }, "strip", z.ZodTypeAny, {
33
33
  dashboardId?: string | undefined;
34
34
  sheetId?: string | undefined;
35
- sheetTitle?: string | undefined;
36
35
  trigger?: "sort" | "page" | "refresh" | "drill" | "initial_load" | "input_change" | "click_filter" | undefined;
36
+ sheetTitle?: string | undefined;
37
37
  operationId?: string | undefined;
38
38
  dashboardTitle?: string | undefined;
39
39
  }, {
40
40
  dashboardId?: unknown;
41
41
  sheetId?: unknown;
42
- sheetTitle?: unknown;
43
42
  trigger?: unknown;
43
+ sheetTitle?: unknown;
44
44
  operationId?: unknown;
45
45
  dashboardTitle?: unknown;
46
46
  }>;
@@ -108,7 +108,7 @@ export declare const usageEventEnvelopeSchema: z.ZodObject<{
108
108
  release: string;
109
109
  org_id: string | null;
110
110
  tenant_id: string | null;
111
- actor_type: "system" | "tenant" | "tenant_user" | "org_user" | "anonymous" | "api_key";
111
+ actor_type: "system" | "tenant" | "tenant_user" | "anonymous" | "org_user" | "api_key";
112
112
  org_user_id: string | null;
113
113
  tenant_user_id: string | null;
114
114
  session_id: string | null;
@@ -137,7 +137,7 @@ export declare const usageEventEnvelopeSchema: z.ZodObject<{
137
137
  release: string;
138
138
  org_id: string | null;
139
139
  tenant_id: string | null;
140
- actor_type: "system" | "tenant" | "tenant_user" | "org_user" | "anonymous" | "api_key";
140
+ actor_type: "system" | "tenant" | "tenant_user" | "anonymous" | "org_user" | "api_key";
141
141
  org_user_id: string | null;
142
142
  tenant_user_id: string | null;
143
143
  session_id: string | null;
@@ -1,5 +1,5 @@
1
1
  import { z as e } from "zod";
2
- import { g as h, l as S } from "../chunks/context-CVXTFljo.js";
2
+ import { g as h, l as S } from "../chunks/context-BJoEFgNl.js";
3
3
  import { Q as b, a as y, b as x } from "../chunks/attribution-BvoKvhcj.js";
4
4
  import { U as te, c as ne, u as ae } from "../chunks/attribution-BvoKvhcj.js";
5
5
  const r = e.string().min(1).max(128), t = e.string().max(500), m = e.array(e.string().max(500)).max(500), n = e.number().int().nonnegative(), p = e.string().refine((o) => new TextEncoder().encode(o).length <= 16 * 1024), f = e.object({
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.597",
8
+ "version": "0.1.599",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",
@@ -1,22 +0,0 @@
1
- import { h as n } from "./validators-BlEWWX9O.js";
2
- import { s as c } from "./matrix-operation-contract-CAanJeCj.js";
3
- function i(r) {
4
- var a;
5
- if (!r) return !1;
6
- if (typeof r.aggregate == "string" || r.isPreAggregated) return !0;
7
- const s = typeof r.expression == "string" ? r.expression : "";
8
- if (!s) return !1;
9
- if (c(s).calls.length > 0) return !0;
10
- const t = (a = r.calculatedFormula) == null ? void 0 : a.inputFields;
11
- return Array.isArray(t) && t.some((e) => {
12
- const g = String((e == null ? void 0 : e.role) || "").toLowerCase(), o = String((e == null ? void 0 : e.aggregate) || "").trim();
13
- return g === "metric" && o.length > 0;
14
- });
15
- }
16
- function u(r) {
17
- return !!((r == null ? void 0 : r.role) === "metric" && (n(r) || i(r)));
18
- }
19
- export {
20
- i as h,
21
- u as i
22
- };
@@ -1,115 +0,0 @@
1
- import { d as D, e as h } from "./filter-reach-copy-DoXmRmk-.js";
2
- import { h as y, d as g, r as b, a as m, e as F } from "./resolve-dashboard-input-context-DfJshnw8.js";
3
- import "./validators-BlEWWX9O.js";
4
- import "./matrix-operation-contract-CAanJeCj.js";
5
- import "./analytics-base-schemas-8wz9vqn_.js";
6
- import "zod";
7
- import "./pivot-result-contract-expectations-Dt0E1Wou.js";
8
- import "../value-format-preferences/index.js";
9
- import { D as w } from "./bookmark-state-Be2W3s6t.js";
10
- import "./schema-C9NPiIru.js";
11
- import "./index-CV_Kzou0.js";
12
- import "./context-CVXTFljo.js";
13
- import { p as N, r as T } from "./stored-dashboard-D6FtWx_3.js";
14
- import { g as C } from "./saved-dashboard-context-DdhPU2Kq.js";
15
- const M = ["hour", "day", "week", "month", "quarter", "year"], O = 12, P = {
16
- automatic: "Automatic",
17
- card: "Set on this card",
18
- trend_by: "From Trend By"
19
- };
20
- function j(r, e, n = {}) {
21
- if (!r) return;
22
- const t = r.granularity;
23
- if (r.skipped)
24
- return {
25
- head: `Too many points by ${t}`,
26
- // A Trend By sets the grain, so the fix is there (review P3R-02).
27
- detail: r.grainSource === "trend_by" ? "Pick a coarser grain on the Trend By." : "Pick a coarser grain, or Automatic."
28
- };
29
- const i = P[r.grainSource], a = r.span === "recent" ? `The last 12 ${t}s: no date range` : r.span === "history" ? `The 12 ${t}s ending with this one` : r.window ? D({ ...r.window, timezone: r.calendar.tz }, n.now) : void 0;
30
- return {
31
- head: `By ${t} · ${e} ${e === 1 ? "point" : "points"}`,
32
- detail: a ? `${a} · ${i}` : i
33
- };
34
- }
35
- function q(r, e) {
36
- var t;
37
- if (e.status === "blocked" || (t = r.sql) != null && t.trim()) return !1;
38
- const n = new Set(
39
- e.mappingDispositions.flatMap(
40
- (i) => i.status === "apply" ? [i.filterValue.filterId] : []
41
- )
42
- );
43
- return e.cardFilterValues.some((i) => {
44
- const a = e.queryFilterDefinitions.find(
45
- (d) => d.id === i.filterId
46
- );
47
- if (!y(i)) return !1;
48
- if (!(n.has(i.filterId) || (a == null ? void 0 : a.kind) === "global-date"))
49
- return !!(a && $(
50
- [a],
51
- e.resolvedPrimaryDateField,
52
- [i]
53
- ));
54
- const s = g(i);
55
- return !!(s && b({
56
- card: r,
57
- filter: s,
58
- filterValue: i,
59
- effectiveFilterValue: i,
60
- temporalBinding: e.resolvedPrimaryDateField
61
- }).status === "eligible");
62
- });
63
- }
64
- function $(r, e, n) {
65
- if (!e) return !1;
66
- const t = e.qualifiedFieldName, i = e.qualifiedEntityName, a = i && e.name ? `${i}.${e.name}` : t;
67
- return r.some((o) => {
68
- if (!(m(o.dataType || "") === "date")) return !1;
69
- const d = h(o, n), l = d.split("."), c = l[l.length - 1] || d, p = l.length > 1 ? l.slice(0, -1).join(".") : void 0, f = o.qualifiedTableName || p, u = f ? `${f}.${c}` : void 0;
70
- return t ? u ? u === a || u.endsWith(`.${t}`) : c === e.name : u ? u === a : c === e.name;
71
- });
72
- }
73
- function R(r, e) {
74
- const n = (a) => {
75
- const o = a.field;
76
- return o ? e.id && o.id === e.id ? !0 : e.qualifiedFieldName && o.qualifiedFieldName ? o.qualifiedFieldName === e.qualifiedFieldName : o.name === e.name : !1;
77
- }, t = (a) => a.conditions.some((o) => {
78
- var s;
79
- return m(((s = o.field) == null ? void 0 : s.dataType) || "") === "date" && n(o);
80
- }) || a.groups.some(t), i = F(r);
81
- return i ? t(i) : !1;
82
- }
83
- function k(r, e) {
84
- var s, d;
85
- const n = (d = (s = r.config) == null ? void 0 : s.groupByColumns) == null ? void 0 : d.find((l) => m(l.dataType || "") === "date"), t = e.resolvedPrimaryDateField, i = n ? { id: n.id, name: n.name, label: n.label || n.name, qualifiedFieldName: n.qualifiedFieldName } : t ? { name: t.name, label: t.name, qualifiedFieldName: t.qualifiedFieldName } : void 0;
86
- if (!i) return { comparisonDate: null, dateWindow: e.status === "ready" ? "none" : "unknown" };
87
- const a = { name: i.name, label: i.label };
88
- if (R(r, i)) return { comparisonDate: a, dateWindow: "applies" };
89
- if (e.status !== "ready") return { comparisonDate: a, dateWindow: "unknown" };
90
- const o = q(r, { status: "ready", ...e.compiledFilters });
91
- return { comparisonDate: a, dateWindow: o ? "applies" : "none" };
92
- }
93
- function U(r) {
94
- const e = N(r.dashboard), n = w(e).find((o) => o.cardId === r.cardId);
95
- if (!n || n.kind === "documentSectionCard") return { comparisonDate: null, dateWindow: "unknown" };
96
- const { runtimeValues: t, transientContexts: i } = T({ dashboard: e, capture: {}, calendar: r.calendar }), a = C({
97
- dashboard: e,
98
- location: n,
99
- runtimeValues: t,
100
- semanticExecutionPayload: r.semanticExecutionPayload,
101
- calendar: r.calendar,
102
- transientContexts: i
103
- });
104
- return k(
105
- n.card,
106
- (a == null ? void 0 : a.status) === "ready" ? { status: "ready", compiledFilters: a.compiledFilters, resolvedPrimaryDateField: a.resolvedPrimaryDateField } : { status: "blocked", resolvedPrimaryDateField: a == null ? void 0 : a.resolvedPrimaryDateField }
107
- );
108
- }
109
- export {
110
- M as K,
111
- O as a,
112
- U as b,
113
- j as d,
114
- k as r
115
- };
@@ -1,15 +0,0 @@
1
- import { c as t } from "./style-sheet-parts-DM_Mw_sm.js";
2
- /**
3
- * @license lucide-react v0.453.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */
8
- const i = t("ListFilter", [
9
- ["path", { d: "M3 6h18", key: "d0wm0j" }],
10
- ["path", { d: "M7 12h10", key: "b7w52i" }],
11
- ["path", { d: "M10 18h4", key: "1ulq68" }]
12
- ]);
13
- export {
14
- i as L
15
- };