react-semaphor 0.1.380 → 0.1.382

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 (74) hide show
  1. package/DATA_APP_SDK.md +238 -0
  2. package/README.md +7 -0
  3. package/dist/analytics-protocol/index.cjs +1 -1
  4. package/dist/analytics-protocol/index.js +45 -41
  5. package/dist/brand-studio/index.cjs +1 -1
  6. package/dist/brand-studio/index.js +6 -6
  7. package/dist/chunks/analyze-result-contract-CtXfp3nv.js +1 -0
  8. package/dist/chunks/analyze-result-contract-DuhlklhI.js +102 -0
  9. package/dist/chunks/{braces-BT-ZyB-g.js → braces-CGi-YFZp.js} +1 -1
  10. package/dist/chunks/{braces-DOxxfERN.js → braces-CP8BEzl3.js} +1 -1
  11. package/dist/chunks/{calendar-preferences-dialog-Dsgs8WDv.js → calendar-preferences-dialog-CV4xF2Tp.js} +3 -3
  12. package/dist/chunks/{calendar-preferences-dialog-iZs8XqyH.js → calendar-preferences-dialog-rDDobeLo.js} +1 -1
  13. package/dist/chunks/catalog-field-grounding-Bnx-3tE0.js +1 -0
  14. package/dist/chunks/catalog-field-grounding-CJKAqtiC.js +100 -0
  15. package/dist/chunks/{dashboard-briefing-launcher-Coks66cV.js → dashboard-briefing-launcher-BT00MvGB.js} +5 -5
  16. package/dist/chunks/{dashboard-briefing-launcher-B5vPTl8P.js → dashboard-briefing-launcher-Dcbh-mjY.js} +1 -1
  17. package/dist/chunks/{dashboard-controls-BfkcnIdy.js → dashboard-controls-B6y7jkKO.js} +8 -8
  18. package/dist/chunks/{dashboard-controls-Dyqye6fh.js → dashboard-controls-CRqnPibB.js} +1 -1
  19. package/dist/chunks/{dashboard-json-DjXi4cI6.js → dashboard-json-CfIUG8k1.js} +3 -3
  20. package/dist/chunks/{dashboard-json-CV_LnO9x.js → dashboard-json-DEQqRR1x.js} +1 -1
  21. package/dist/chunks/{edit-dashboard-visual-DOW1Ap1N.js → edit-dashboard-visual-DMbf89xa.js} +5 -5
  22. package/dist/chunks/{edit-dashboard-visual-yinO0yU-.js → edit-dashboard-visual-wDOcHak3.js} +1 -1
  23. package/dist/chunks/{index-DlprYjr6.js → index-BAsWLkZ8.js} +169 -168
  24. package/dist/chunks/{index-CkoRCh3g.js → index-CrKxP9uF.js} +5 -5
  25. package/dist/chunks/{layout-grid-DTbOIOsE.js → layout-grid-BsKH3TgY.js} +1 -1
  26. package/dist/chunks/{layout-grid-DccceHv4.js → layout-grid-jJQUqDN9.js} +1 -1
  27. package/dist/chunks/operators-C8TxpM4C.js +48 -0
  28. package/dist/chunks/operators-DrTQsJXv.js +1 -0
  29. package/dist/chunks/{palette-SimHJELn.js → palette-9zLPGlj2.js} +1 -1
  30. package/dist/chunks/{palette-DCzLwqIw.js → palette-xU9Qt6bE.js} +1 -1
  31. package/dist/chunks/{save-D2O96E5A.js → save-8A_q6K4E.js} +1 -1
  32. package/dist/chunks/{save-zNVYH02T.js → save-DzciESDh.js} +1 -1
  33. package/dist/chunks/{source-identity-Dj3dryN9.js → source-identity-CN4xiyKJ.js} +5 -5
  34. package/dist/chunks/{switch-DMPsMpHW.js → switch-DArtNJZh.js} +292 -291
  35. package/dist/chunks/{switch-Jhyl63RF.js → switch-k7kj6NRg.js} +1 -1
  36. package/dist/chunks/{use-create-flow-overlay-state-r5JKyXU8.js → use-create-flow-overlay-state-BdG1DiSx.js} +4 -4
  37. package/dist/chunks/{use-create-flow-overlay-state-NsqFPwdB.js → use-create-flow-overlay-state-ipeaE65_.js} +1 -1
  38. package/dist/chunks/{validators-CtNmgsvG.js → validators-CHPH6ORs.js} +641 -498
  39. package/dist/chunks/validators-lWo8m0Q7.js +1 -0
  40. package/dist/dashboard/index.cjs +1 -1
  41. package/dist/dashboard/index.js +1 -1
  42. package/dist/dashboard-authoring/index.cjs +3 -3
  43. package/dist/dashboard-authoring/index.js +105 -92
  44. package/dist/data-app-builder/index.cjs +1 -1
  45. package/dist/data-app-builder/index.js +3 -3
  46. package/dist/data-app-sdk/index.cjs +1 -1
  47. package/dist/data-app-sdk/index.js +444 -380
  48. package/dist/data-app-sdk-adapters/index.cjs +1 -0
  49. package/dist/data-app-sdk-adapters/index.js +383 -0
  50. package/dist/data-app-sdk-validation/index.cjs +1 -1
  51. package/dist/data-app-sdk-validation/index.js +1073 -6
  52. package/dist/index.cjs +1 -1
  53. package/dist/index.js +7 -7
  54. package/dist/surfboard/index.cjs +1 -1
  55. package/dist/surfboard/index.js +2 -2
  56. package/dist/types/analytics-protocol.d.ts +58 -31
  57. package/dist/types/dashboard-assistant.d.ts +40 -15
  58. package/dist/types/dashboard-authoring.d.ts +36 -16
  59. package/dist/types/dashboard.d.ts +8 -8
  60. package/dist/types/data-app-builder.d.ts +35 -11
  61. package/dist/types/data-app-sdk-adapters.d.ts +733 -0
  62. package/dist/types/data-app-sdk-validation.d.ts +85 -25
  63. package/dist/types/data-app-sdk.d.ts +99 -155
  64. package/dist/types/main.d.ts +35 -11
  65. package/dist/types/shared.d.ts +8 -8
  66. package/dist/types/surfboard.d.ts +8 -8
  67. package/dist/types/types.d.ts +8 -8
  68. package/package.json +9 -2
  69. package/src/data-app-sdk/README.md +240 -0
  70. package/dist/chunks/catalog-field-grounding-8L9I0zdg.js +0 -1
  71. package/dist/chunks/catalog-field-grounding-BK4BX8sZ.js +0 -200
  72. package/dist/chunks/validation-BM3-ShHV.js +0 -1003
  73. package/dist/chunks/validation-BVpqRFar.js +0 -1
  74. package/dist/chunks/validators-jpoYhpHh.js +0 -1
@@ -2005,15 +2005,9 @@ declare type SemaphorDerivedFieldInput = {
2005
2005
  kind: 'field';
2006
2006
  field: SemaphorFieldRef;
2007
2007
  aggregate?: SemaphorAggregateFunction;
2008
- } | {
2009
- kind: 'metric';
2010
- metric: SemaphorFieldRef;
2011
- } | {
2012
- kind: 'dimension';
2013
- dimension: SemaphorFieldRef;
2014
2008
  };
2015
2009
 
2016
- declare type SemaphorDerivedFieldResultRole = 'measure' | 'group' | 'date' | 'id' | 'filter';
2010
+ declare type SemaphorDerivedFieldResultRole = 'measure' | 'dimension' | 'date' | 'id' | 'unknown';
2017
2011
 
2018
2012
  declare type SemaphorDialect = 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
2019
2013
 
@@ -2037,9 +2031,10 @@ declare type SemaphorFieldRef = {
2037
2031
  declare type SemaphorInputBinding = {
2038
2032
  inputId: string;
2039
2033
  kind?: 'filter' | 'control';
2040
- controlRole?: 'grain' | 'metric' | 'dimension' | 'aggregation' | 'sqlParam';
2034
+ controlRole?: 'grain' | 'measure' | 'dimension' | 'aggregation' | 'sqlParam';
2041
2035
  operator?: SemaphorInputOperator;
2042
2036
  field?: SemaphorFieldRef;
2037
+ relationshipHint?: SemaphorRelationshipHint;
2043
2038
  };
2044
2039
 
2045
2040
  declare type SemaphorInputOperator = '=' | '!=' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'between' | 'not_between' | '>' | '>=' | '<' | '<=';
@@ -2102,6 +2097,7 @@ declare type SemaphorMatrixIntent = {
2102
2097
  values: SemaphorMatrixValueField[];
2103
2098
  filters?: SemaphorAnalyticsFilter[];
2104
2099
  inputs?: SemaphorInputBinding[];
2100
+ relationshipHint?: SemaphorRelationshipHint;
2105
2101
  totals?: SemaphorMatrixTotalOptions;
2106
2102
  sort?: SemaphorMatrixSortRule[];
2107
2103
  expansion?: SemaphorMatrixExpansionOptions;
@@ -2190,6 +2186,10 @@ declare type SemaphorMatrixValueField = {
2190
2186
 
2191
2187
  declare type SemaphorProtocolVersion = 1;
2192
2188
 
2189
+ declare type SemaphorRelationshipHint = {
2190
+ relationshipIds?: string[];
2191
+ };
2192
+
2193
2193
  declare type SemaphorSemanticSourceRef = Extract<SemaphorSourceRef, {
2194
2194
  kind: 'semantic';
2195
2195
  }>;
@@ -608,15 +608,9 @@ declare type SemaphorDerivedFieldInput = {
608
608
  kind: 'field';
609
609
  field: SemaphorFieldRef;
610
610
  aggregate?: SemaphorAggregateFunction;
611
- } | {
612
- kind: 'metric';
613
- metric: SemaphorFieldRef;
614
- } | {
615
- kind: 'dimension';
616
- dimension: SemaphorFieldRef;
617
611
  };
618
612
 
619
- declare type SemaphorDerivedFieldResultRole = 'measure' | 'group' | 'date' | 'id' | 'filter';
613
+ declare type SemaphorDerivedFieldResultRole = 'measure' | 'dimension' | 'date' | 'id' | 'unknown';
620
614
 
621
615
  declare type SemaphorDialect = 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
622
616
 
@@ -640,9 +634,10 @@ declare type SemaphorFieldRef = {
640
634
  declare type SemaphorInputBinding = {
641
635
  inputId: string;
642
636
  kind?: 'filter' | 'control';
643
- controlRole?: 'grain' | 'metric' | 'dimension' | 'aggregation' | 'sqlParam';
637
+ controlRole?: 'grain' | 'measure' | 'dimension' | 'aggregation' | 'sqlParam';
644
638
  operator?: SemaphorInputOperator;
645
639
  field?: SemaphorFieldRef;
640
+ relationshipHint?: SemaphorRelationshipHint;
646
641
  };
647
642
 
648
643
  declare type SemaphorInputOperator = '=' | '!=' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'between' | 'not_between' | '>' | '>=' | '<' | '<=';
@@ -652,10 +647,17 @@ declare type SemaphorInputOptionsIntent = {
652
647
  version?: SemaphorProtocolVersion;
653
648
  id?: string;
654
649
  label?: string;
650
+ inputId: string;
655
651
  source: SemaphorSourceRef;
656
- field: SemaphorFieldRef;
652
+ labelField: SemaphorFieldRef;
653
+ valueField: SemaphorFieldRef;
654
+ searchField?: SemaphorFieldRef;
655
+ disambiguationFields?: SemaphorFieldRef[];
656
+ population?: SemaphorOptionPopulation;
657
+ dependencies?: SemaphorOptionDependencies;
657
658
  search?: string;
658
659
  limit?: number;
660
+ inputs?: SemaphorInputBinding[];
659
661
  derivedFields?: SemaphorDerivedFieldDefinition[];
660
662
  };
661
663
 
@@ -717,6 +719,7 @@ declare type SemaphorMatrixIntent = {
717
719
  values: SemaphorMatrixValueField[];
718
720
  filters?: SemaphorAnalyticsFilter[];
719
721
  inputs?: SemaphorInputBinding[];
722
+ relationshipHint?: SemaphorRelationshipHint;
720
723
  totals?: SemaphorMatrixTotalOptions;
721
724
  sort?: SemaphorMatrixSortRule[];
722
725
  expansion?: SemaphorMatrixExpansionOptions;
@@ -815,8 +818,8 @@ declare type SemaphorMetricIntent = {
815
818
  version?: SemaphorProtocolVersion;
816
819
  id?: string;
817
820
  source: SemaphorSourceRef;
818
- metrics: SemaphorFieldRef[];
819
- primaryMetric?: SemaphorFieldRef;
821
+ measures: SemaphorFieldRef[];
822
+ primaryMeasure?: SemaphorFieldRef;
820
823
  label?: string;
821
824
  dateField?: SemaphorFieldRef;
822
825
  timeGrain?: SemaphorTimeGrain;
@@ -833,10 +836,26 @@ declare type SemaphorMetricIntent = {
833
836
  direction: 'asc' | 'desc';
834
837
  };
835
838
  inputs?: SemaphorInputBinding[];
839
+ relationshipHint?: SemaphorRelationshipHint;
836
840
  limit?: number;
837
841
  derivedFields?: SemaphorDerivedFieldDefinition[];
838
842
  };
839
843
 
844
+ declare type SemaphorOptionDependencies = {
845
+ mode?: 'auto' | 'independent' | 'explicit';
846
+ includeInputIds?: string[];
847
+ excludeInputIds?: string[];
848
+ };
849
+
850
+ declare type SemaphorOptionPopulation = {
851
+ kind: 'option_source';
852
+ baseSource?: never;
853
+ } | {
854
+ kind: 'related_population';
855
+ baseSource: SemaphorSourceRef;
856
+ relationshipHint?: SemaphorRelationshipHint;
857
+ };
858
+
840
859
  declare type SemaphorPaginationRequest = {
841
860
  page: number;
842
861
  pageSize: number;
@@ -862,9 +881,14 @@ declare type SemaphorRecordsIntent = {
862
881
  direction: 'asc' | 'desc';
863
882
  };
864
883
  inputs?: SemaphorInputBinding[];
884
+ relationshipHint?: SemaphorRelationshipHint;
865
885
  derivedFields?: SemaphorDerivedFieldDefinition[];
866
886
  };
867
887
 
888
+ declare type SemaphorRelationshipHint = {
889
+ relationshipIds?: string[];
890
+ };
891
+
868
892
  declare type SemaphorRelativeTimeWindow = {
869
893
  kind?: 'relative';
870
894
  unit: 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';