react-semaphor 0.1.381 → 0.1.383

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 (86) 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 +4 -4
  6. package/dist/brand-studio/index.js +28 -28
  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-DOxxfERN.js → braces--20GzUQh.js} +1 -1
  10. package/dist/chunks/{braces-BT-ZyB-g.js → braces-C0Vh_Mft.js} +1 -1
  11. package/dist/chunks/{calendar-preferences-dialog-Dsgs8WDv.js → calendar-preferences-dialog-B-VsxhsA.js} +4 -4
  12. package/dist/chunks/calendar-preferences-dialog-DE67Z3oQ.js +1 -0
  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-BIj3X7b3.js} +108 -107
  16. package/dist/chunks/dashboard-briefing-launcher-Czx6BcXW.js +80 -0
  17. package/dist/chunks/dashboard-controls-BP-DcPFs.js +52 -0
  18. package/dist/chunks/{dashboard-controls-BfkcnIdy.js → dashboard-controls-BXxucM4f.js} +115 -114
  19. package/dist/chunks/dashboard-json-BNwshkK2.js +1 -0
  20. package/dist/chunks/{dashboard-json-DjXi4cI6.js → dashboard-json-C6oZuipD.js} +9 -9
  21. package/dist/chunks/edit-dashboard-visual-BAprin3J.js +178 -0
  22. package/dist/chunks/{edit-dashboard-visual-DOW1Ap1N.js → edit-dashboard-visual-CmfrI_L3.js} +1278 -1277
  23. package/dist/chunks/{index-CkoRCh3g.js → index-4W_ElSBJ.js} +219 -239
  24. package/dist/chunks/{index-DlprYjr6.js → index-icb12JV1.js} +900 -952
  25. package/dist/chunks/{layout-grid-DccceHv4.js → layout-grid-B7-klXiK.js} +1 -1
  26. package/dist/chunks/{layout-grid-DTbOIOsE.js → layout-grid-DV89AC9_.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-DCzLwqIw.js → palette-5IwhMbSF.js} +1 -1
  30. package/dist/chunks/{palette-SimHJELn.js → palette-Dj-dgPYh.js} +1 -1
  31. package/dist/chunks/{save-zNVYH02T.js → save-16C6YSW2.js} +1 -1
  32. package/dist/chunks/{save-D2O96E5A.js → save-C5fwVdTF.js} +1 -1
  33. package/dist/chunks/search-0LmWwZzW.js +57 -0
  34. package/dist/chunks/search-Dq1Mbb03.js +21 -0
  35. package/dist/chunks/{source-identity-Dj3dryN9.js → source-identity-CN4xiyKJ.js} +5 -5
  36. package/dist/chunks/{switch-DMPsMpHW.js → switch-DUdaHFZQ.js} +2328 -2414
  37. package/dist/chunks/{switch-Jhyl63RF.js → switch-bdJp0Bkw.js} +29 -54
  38. package/dist/chunks/use-create-flow-overlay-state-BIHKf_XK.js +21 -0
  39. package/dist/chunks/{use-create-flow-overlay-state-r5JKyXU8.js → use-create-flow-overlay-state-YvqCp6Zo.js} +75 -75
  40. package/dist/chunks/{validators-CtNmgsvG.js → validators-CHPH6ORs.js} +641 -498
  41. package/dist/chunks/validators-lWo8m0Q7.js +1 -0
  42. package/dist/chunks/x-B_cx7LwM.js +26 -0
  43. package/dist/chunks/x-IdR_js6f.js +139 -0
  44. package/dist/dashboard/index.cjs +1 -1
  45. package/dist/dashboard/index.js +1 -1
  46. package/dist/dashboard-authoring/index.cjs +3 -3
  47. package/dist/dashboard-authoring/index.js +105 -92
  48. package/dist/data-app-builder/index.cjs +23 -23
  49. package/dist/data-app-builder/index.js +17 -15
  50. package/dist/data-app-sdk/index.cjs +68 -1
  51. package/dist/data-app-sdk/index.js +2731 -384
  52. package/dist/data-app-sdk-adapters/index.cjs +1 -0
  53. package/dist/data-app-sdk-adapters/index.js +383 -0
  54. package/dist/data-app-sdk-validation/index.cjs +1 -1
  55. package/dist/data-app-sdk-validation/index.js +1073 -6
  56. package/dist/index.cjs +1 -1
  57. package/dist/index.js +15 -15
  58. package/dist/surfboard/index.cjs +1 -1
  59. package/dist/surfboard/index.js +2 -2
  60. package/dist/types/analytics-protocol.d.ts +58 -31
  61. package/dist/types/dashboard-assistant.d.ts +40 -15
  62. package/dist/types/dashboard-authoring.d.ts +36 -16
  63. package/dist/types/dashboard.d.ts +8 -8
  64. package/dist/types/data-app-builder.d.ts +35 -11
  65. package/dist/types/data-app-sdk-adapters.d.ts +733 -0
  66. package/dist/types/data-app-sdk-validation.d.ts +85 -25
  67. package/dist/types/data-app-sdk.d.ts +217 -147
  68. package/dist/types/main.d.ts +35 -11
  69. package/dist/types/shared.d.ts +8 -8
  70. package/dist/types/surfboard.d.ts +8 -8
  71. package/dist/types/types.d.ts +8 -8
  72. package/package.json +9 -2
  73. package/src/data-app-sdk/README.md +240 -0
  74. package/dist/chunks/calendar-preferences-dialog-iZs8XqyH.js +0 -1
  75. package/dist/chunks/catalog-field-grounding-8L9I0zdg.js +0 -1
  76. package/dist/chunks/catalog-field-grounding-BK4BX8sZ.js +0 -200
  77. package/dist/chunks/dashboard-briefing-launcher-B5vPTl8P.js +0 -80
  78. package/dist/chunks/dashboard-controls-Dyqye6fh.js +0 -52
  79. package/dist/chunks/dashboard-json-CV_LnO9x.js +0 -1
  80. package/dist/chunks/edit-dashboard-visual-yinO0yU-.js +0 -178
  81. package/dist/chunks/index-BxM99sFL.js +0 -1
  82. package/dist/chunks/index-CuHybtft.js +0 -51
  83. package/dist/chunks/use-create-flow-overlay-state-NsqFPwdB.js +0 -21
  84. package/dist/chunks/validation-BM3-ShHV.js +0 -1003
  85. package/dist/chunks/validation-BVpqRFar.js +0 -1
  86. package/dist/chunks/validators-jpoYhpHh.js +0 -1
@@ -1934,15 +1934,9 @@ declare type SemaphorDerivedFieldInput = {
1934
1934
  kind: 'field';
1935
1935
  field: SemaphorFieldRef;
1936
1936
  aggregate?: SemaphorAggregateFunction;
1937
- } | {
1938
- kind: 'metric';
1939
- metric: SemaphorFieldRef;
1940
- } | {
1941
- kind: 'dimension';
1942
- dimension: SemaphorFieldRef;
1943
1937
  };
1944
1938
 
1945
- declare type SemaphorDerivedFieldResultRole = 'measure' | 'group' | 'date' | 'id' | 'filter';
1939
+ declare type SemaphorDerivedFieldResultRole = 'measure' | 'dimension' | 'date' | 'id' | 'unknown';
1946
1940
 
1947
1941
  declare type SemaphorDialect = 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
1948
1942
 
@@ -1966,26 +1960,30 @@ declare type SemaphorFieldRef = {
1966
1960
  declare type SemaphorInputBinding = {
1967
1961
  inputId: string;
1968
1962
  kind?: 'filter' | 'control';
1969
- controlRole?: 'grain' | 'metric' | 'dimension' | 'aggregation' | 'sqlParam';
1963
+ controlRole?: 'grain' | 'measure' | 'dimension' | 'aggregation' | 'sqlParam';
1970
1964
  operator?: SemaphorInputOperator;
1971
1965
  field?: SemaphorFieldRef;
1966
+ relationshipHint?: SemaphorRelationshipHint;
1972
1967
  };
1973
1968
 
1974
1969
  declare type SemaphorInputOperator = '=' | '!=' | 'in' | 'not_in' | 'contains' | 'not_contains' | 'between' | 'not_between' | '>' | '>=' | '<' | '<=';
1975
1970
 
1976
- declare type SemaphorInputOperatorAlias = 'eq' | 'equals' | 'not_equals' | 'neq' | 'not equal' | 'not equals' | 'not in' | 'like' | 'not_contains' | 'not contains' | 'not_like' | 'not like' | 'not_between' | 'not between';
1977
-
1978
- declare type SemaphorInputOperatorInput = SemaphorInputOperator | SemaphorInputOperatorAlias;
1979
-
1980
1971
  declare type SemaphorInputOptionsIntent = {
1981
1972
  kind: 'inputOptions';
1982
1973
  version?: SemaphorProtocolVersion;
1983
1974
  id?: string;
1984
1975
  label?: string;
1976
+ inputId: string;
1985
1977
  source: SemaphorSourceRef;
1986
- field: SemaphorFieldRef;
1978
+ labelField: SemaphorFieldRef;
1979
+ valueField: SemaphorFieldRef;
1980
+ searchField?: SemaphorFieldRef;
1981
+ disambiguationFields?: SemaphorFieldRef[];
1982
+ population?: SemaphorOptionPopulation;
1983
+ dependencies?: SemaphorOptionDependencies;
1987
1984
  search?: string;
1988
1985
  limit?: number;
1986
+ inputs?: SemaphorInputBinding[];
1989
1987
  derivedFields?: SemaphorDerivedFieldDefinition[];
1990
1988
  };
1991
1989
 
@@ -2006,7 +2004,7 @@ declare type SemaphorInputSpec = {
2006
2004
  kind: 'filter' | 'control';
2007
2005
  label: string;
2008
2006
  field: SemaphorFieldRef;
2009
- operator?: SemaphorInputOperatorInput;
2007
+ operator?: SemaphorInputOperator;
2010
2008
  multi?: boolean;
2011
2009
  defaultValue?: unknown;
2012
2010
  scope?: SemaphorInputScope;
@@ -2070,6 +2068,7 @@ declare type SemaphorMatrixIntent = {
2070
2068
  values: SemaphorMatrixValueField[];
2071
2069
  filters?: SemaphorAnalyticsFilter[];
2072
2070
  inputs?: SemaphorInputBinding[];
2071
+ relationshipHint?: SemaphorRelationshipHint;
2073
2072
  totals?: SemaphorMatrixTotalOptions;
2074
2073
  sort?: SemaphorMatrixSortRule[];
2075
2074
  expansion?: SemaphorMatrixExpansionOptions;
@@ -2168,8 +2167,8 @@ declare type SemaphorMetricIntent = {
2168
2167
  version?: SemaphorProtocolVersion;
2169
2168
  id?: string;
2170
2169
  source: SemaphorSourceRef;
2171
- metrics: SemaphorFieldRef[];
2172
- primaryMetric?: SemaphorFieldRef;
2170
+ measures: SemaphorFieldRef[];
2171
+ primaryMeasure?: SemaphorFieldRef;
2173
2172
  label?: string;
2174
2173
  dateField?: SemaphorFieldRef;
2175
2174
  timeGrain?: SemaphorTimeGrain;
@@ -2186,10 +2185,26 @@ declare type SemaphorMetricIntent = {
2186
2185
  direction: 'asc' | 'desc';
2187
2186
  };
2188
2187
  inputs?: SemaphorInputBinding[];
2188
+ relationshipHint?: SemaphorRelationshipHint;
2189
2189
  limit?: number;
2190
2190
  derivedFields?: SemaphorDerivedFieldDefinition[];
2191
2191
  };
2192
2192
 
2193
+ declare type SemaphorOptionDependencies = {
2194
+ mode?: 'auto' | 'independent' | 'explicit';
2195
+ includeInputIds?: string[];
2196
+ excludeInputIds?: string[];
2197
+ };
2198
+
2199
+ declare type SemaphorOptionPopulation = {
2200
+ kind: 'option_source';
2201
+ baseSource?: never;
2202
+ } | {
2203
+ kind: 'related_population';
2204
+ baseSource: SemaphorSourceRef;
2205
+ relationshipHint?: SemaphorRelationshipHint;
2206
+ };
2207
+
2193
2208
  declare type SemaphorPaginationRequest = {
2194
2209
  page: number;
2195
2210
  pageSize: number;
@@ -2215,9 +2230,14 @@ declare type SemaphorRecordsIntent = {
2215
2230
  direction: 'asc' | 'desc';
2216
2231
  };
2217
2232
  inputs?: SemaphorInputBinding[];
2233
+ relationshipHint?: SemaphorRelationshipHint;
2218
2234
  derivedFields?: SemaphorDerivedFieldDefinition[];
2219
2235
  };
2220
2236
 
2237
+ declare type SemaphorRelationshipHint = {
2238
+ relationshipIds?: string[];
2239
+ };
2240
+
2221
2241
  declare type SemaphorRelativeTimeWindow = {
2222
2242
  kind?: 'relative';
2223
2243
  unit: 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
@@ -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';