react-semaphor 0.1.368 → 0.1.370
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.
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +1 -1
- package/dist/brand-studio/index.cjs +5 -5
- package/dist/brand-studio/index.js +24 -23
- package/dist/chunks/{braces-Cc86y9Ov.js → braces-C3-w6xDL.js} +1 -1
- package/dist/chunks/{braces-CXvY9MwQ.js → braces-C8QqW4wu.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-BOFlzOJg.js → calendar-preferences-dialog-6q51A6XC.js} +3 -3
- package/dist/chunks/{calendar-preferences-dialog-ZzwfJv2J.js → calendar-preferences-dialog-CUGzkNcE.js} +1 -1
- package/dist/chunks/{chevrons-up-down-CUZL1zaU.js → chevrons-up-down-CnCSGY02.js} +1 -1
- package/dist/chunks/{chevrons-up-down-qQMadOWA.js → chevrons-up-down-DSvLu4Ye.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-9-PCYMjR.js → dashboard-briefing-launcher-BEZnvIla.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-D2lBFqAd.js → dashboard-briefing-launcher-ptERmNJr.js} +176 -177
- package/dist/chunks/{dashboard-controls-D4bUHAjX.js → dashboard-controls-CGt6_hMf.js} +11 -11
- package/dist/chunks/{dashboard-controls-BIk094Ah.js → dashboard-controls-CqKC5oEk.js} +77 -77
- package/dist/chunks/{dashboard-json-DImOf512.js → dashboard-json-6SgPm_QW.js} +13 -14
- package/dist/chunks/dashboard-json-CYSbOdmE.js +1 -0
- package/dist/chunks/{edit-dashboard-visual-DTxkV6Fl.js → edit-dashboard-visual-ByQx_M2i.js} +8 -9
- package/dist/chunks/{edit-dashboard-visual-BHKlcqQR.js → edit-dashboard-visual-w6hKbjlw.js} +1 -1
- package/dist/chunks/index-BtqYNH_S.js +1361 -0
- package/dist/chunks/{index-BVEIk-rB.js → index-CPyEi9gS.js} +72498 -76193
- package/dist/chunks/{palette-DPuAc82h.js → palette-D-f4-82S.js} +1 -1
- package/dist/chunks/{palette-C1k347Tb.js → palette-DUGktM-M.js} +1 -1
- package/dist/chunks/{resource-management-panel-BeHceP2D.js → resource-management-panel-Bf8-3eUf.js} +1 -1
- package/dist/chunks/{resource-management-panel-BOfbSf48.js → resource-management-panel-mJ84NxzC.js} +152 -152
- package/dist/chunks/save-D3YYinDz.js +6 -0
- package/dist/chunks/save-kkBEBeLg.js +21 -0
- package/dist/chunks/{switch-xcWLtWs0.js → switch-Dkx2qEOr.js} +758 -776
- package/dist/chunks/{switch-C0S63HAv.js → switch-fIkmwzUt.js} +27 -32
- package/dist/chunks/{use-create-flow-overlay-state-B5FygfQL.js → use-create-flow-overlay-state-BfoXDDrd.js} +190 -189
- package/dist/chunks/use-create-flow-overlay-state-c6rCm36x.js +26 -0
- package/dist/chunks/{use-visual-utils-DxDE8S8M.js → use-visual-utils-C_c-aiqi.js} +1 -1
- package/dist/chunks/{use-visual-utils-CszWnFBW.js → use-visual-utils-NN0e3fBP.js} +13 -13
- package/dist/chunks/validation-DYL3ArlL.js +1 -0
- package/dist/chunks/validation-PPSpYtVf.js +900 -0
- package/dist/chunks/validators-CgxWT8UX.js +1 -0
- package/dist/chunks/validators-DBNa-eb1.js +1799 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +1 -1
- package/dist/dashboard-authoring/index.js +1 -1
- package/dist/data-app-builder/index.cjs +51 -1
- package/dist/data-app-builder/index.js +3666 -2
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +661 -389
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +4 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +14 -14
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +472 -3
- package/dist/types/dashboard-assistant.d.ts +469 -3
- package/dist/types/dashboard-authoring.d.ts +170 -2
- package/dist/types/data-app-builder.d.ts +167 -2
- package/dist/types/data-app-sdk-validation.d.ts +576 -25
- package/dist/types/data-app-sdk.d.ts +655 -37
- package/dist/types/main.d.ts +167 -2
- package/package.json +1 -1
- package/dist/chunks/dashboard-json-Bo1kX6W1.js +0 -1
- package/dist/chunks/index-HjDeEytV.js +0 -1411
- package/dist/chunks/use-create-flow-overlay-state-DOXTbTcQ.js +0 -26
- package/dist/chunks/validation-CrUjNWby.js +0 -689
- package/dist/chunks/validation-DGl8wnTt.js +0 -1
- package/dist/chunks/validators-Dq5X4mp0.js +0 -1
- package/dist/chunks/validators-L0xEXtjf.js +0 -965
package/dist/types/main.d.ts
CHANGED
|
@@ -4420,7 +4420,7 @@ declare type SemaphorAnalyticsFilterBase = {
|
|
|
4420
4420
|
|
|
4421
4421
|
declare type SemaphorAnalyticsFilterOperator = SemaphorInputOperator | 'not_contains' | 'is_null' | 'is_not_null';
|
|
4422
4422
|
|
|
4423
|
-
declare type SemaphorAnalyticsIntent = SemaphorMetricIntent | SemaphorRecordsIntent | SemaphorInputOptionsIntent | SemaphorSqlIntent;
|
|
4423
|
+
declare type SemaphorAnalyticsIntent = SemaphorMetricIntent | SemaphorRecordsIntent | SemaphorInputOptionsIntent | SemaphorSqlIntent | SemaphorMatrixIntent;
|
|
4424
4424
|
|
|
4425
4425
|
declare type SemaphorAnalyticsNullFilter = SemaphorAnalyticsFilterBase & {
|
|
4426
4426
|
operator: SemaphorAnalyticsNullFilterOperator;
|
|
@@ -4443,6 +4443,14 @@ export declare const SemaphorContextProvider: ({ children, dashboardProps, }: {
|
|
|
4443
4443
|
|
|
4444
4444
|
declare type SemaphorDialect = 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
|
|
4445
4445
|
|
|
4446
|
+
/**
|
|
4447
|
+
* Explorer-backed table source. This is intentionally distinct from raw SQL:
|
|
4448
|
+
* matrix planning needs stable source metadata, fields, and dialect context.
|
|
4449
|
+
*/
|
|
4450
|
+
declare type SemaphorExplorerSourceRef = Extract<SemaphorSourceRef, {
|
|
4451
|
+
kind: 'physical';
|
|
4452
|
+
}>;
|
|
4453
|
+
|
|
4446
4454
|
declare type SemaphorFieldRef = {
|
|
4447
4455
|
name: string;
|
|
4448
4456
|
label?: string;
|
|
@@ -4454,6 +4462,9 @@ declare type SemaphorFieldRef = {
|
|
|
4454
4462
|
|
|
4455
4463
|
declare type SemaphorInputBinding = {
|
|
4456
4464
|
inputId: string;
|
|
4465
|
+
kind?: 'filter' | 'control';
|
|
4466
|
+
controlRole?: 'grain' | 'metric' | 'dimension' | 'aggregation' | 'sqlParam';
|
|
4467
|
+
operator?: SemaphorInputOperator;
|
|
4457
4468
|
field?: SemaphorFieldRef;
|
|
4458
4469
|
};
|
|
4459
4470
|
|
|
@@ -4470,6 +4481,149 @@ declare type SemaphorInputOptionsIntent = {
|
|
|
4470
4481
|
limit?: number;
|
|
4471
4482
|
};
|
|
4472
4483
|
|
|
4484
|
+
declare type SemaphorMatrixAxisExpansionOptions = {
|
|
4485
|
+
defaultDepth?: number;
|
|
4486
|
+
lazy?: boolean;
|
|
4487
|
+
expandedPaths?: SemaphorMatrixMemberPathSegment[][];
|
|
4488
|
+
};
|
|
4489
|
+
|
|
4490
|
+
declare type SemaphorMatrixAxisLevel = {
|
|
4491
|
+
id?: string;
|
|
4492
|
+
field: SemaphorFieldRef;
|
|
4493
|
+
grain?: SemaphorTimeGrain;
|
|
4494
|
+
label?: string;
|
|
4495
|
+
subtotal?: boolean | SemaphorMatrixSubtotalOptions;
|
|
4496
|
+
sortBy?: SemaphorMatrixAxisSortRule;
|
|
4497
|
+
};
|
|
4498
|
+
|
|
4499
|
+
declare type SemaphorMatrixAxisSortRule = {
|
|
4500
|
+
direction: 'asc' | 'desc';
|
|
4501
|
+
by: {
|
|
4502
|
+
kind: 'label';
|
|
4503
|
+
} | {
|
|
4504
|
+
kind: 'field';
|
|
4505
|
+
field: SemaphorFieldRef;
|
|
4506
|
+
aggregate?: SemaphorAggregateFunction;
|
|
4507
|
+
};
|
|
4508
|
+
nulls?: 'warehouseDefault' | 'first' | 'last';
|
|
4509
|
+
scope?: 'global' | 'withinParent';
|
|
4510
|
+
};
|
|
4511
|
+
|
|
4512
|
+
declare type SemaphorMatrixDisplayLimitOptions = {
|
|
4513
|
+
rows?: SemaphorMatrixDisplayLimitRule;
|
|
4514
|
+
columns?: SemaphorMatrixDisplayLimitRule;
|
|
4515
|
+
};
|
|
4516
|
+
|
|
4517
|
+
declare type SemaphorMatrixDisplayLimitRule = {
|
|
4518
|
+
limit: number;
|
|
4519
|
+
by?: 'label' | 'value';
|
|
4520
|
+
direction?: 'top' | 'bottom';
|
|
4521
|
+
others?: boolean | {
|
|
4522
|
+
label?: string;
|
|
4523
|
+
};
|
|
4524
|
+
};
|
|
4525
|
+
|
|
4526
|
+
declare type SemaphorMatrixExpansionOptions = {
|
|
4527
|
+
rows?: SemaphorMatrixAxisExpansionOptions;
|
|
4528
|
+
columns?: SemaphorMatrixAxisExpansionOptions;
|
|
4529
|
+
};
|
|
4530
|
+
|
|
4531
|
+
declare type SemaphorMatrixIntent = {
|
|
4532
|
+
kind: 'matrix';
|
|
4533
|
+
version?: SemaphorProtocolVersion;
|
|
4534
|
+
id?: string;
|
|
4535
|
+
label?: string;
|
|
4536
|
+
source: SemaphorMatrixSourceRef;
|
|
4537
|
+
rows: SemaphorMatrixAxisLevel[];
|
|
4538
|
+
columns?: SemaphorMatrixAxisLevel[];
|
|
4539
|
+
values: SemaphorMatrixValueField[];
|
|
4540
|
+
filters?: SemaphorAnalyticsFilter[];
|
|
4541
|
+
inputs?: SemaphorInputBinding[];
|
|
4542
|
+
totals?: SemaphorMatrixTotalOptions;
|
|
4543
|
+
sort?: SemaphorMatrixSortRule[];
|
|
4544
|
+
expansion?: SemaphorMatrixExpansionOptions;
|
|
4545
|
+
layout?: SemaphorMatrixLayoutOptions;
|
|
4546
|
+
displayLimits?: SemaphorMatrixDisplayLimitOptions;
|
|
4547
|
+
};
|
|
4548
|
+
|
|
4549
|
+
declare type SemaphorMatrixLayoutOptions = {
|
|
4550
|
+
hierarchy?: 'compact' | 'tabular' | 'outline';
|
|
4551
|
+
valuesPlacement?: 'columns' | 'rows';
|
|
4552
|
+
stickyRowHeaders?: boolean;
|
|
4553
|
+
stickyColumnHeaders?: boolean;
|
|
4554
|
+
};
|
|
4555
|
+
|
|
4556
|
+
declare type SemaphorMatrixMemberPathSegment = {
|
|
4557
|
+
levelId: string;
|
|
4558
|
+
value: unknown;
|
|
4559
|
+
};
|
|
4560
|
+
|
|
4561
|
+
declare type SemaphorMatrixSortRule = {
|
|
4562
|
+
axis: 'row' | 'column';
|
|
4563
|
+
targetId?: string;
|
|
4564
|
+
direction: 'asc' | 'desc';
|
|
4565
|
+
by: {
|
|
4566
|
+
kind: 'label';
|
|
4567
|
+
} | {
|
|
4568
|
+
kind: 'field';
|
|
4569
|
+
field: SemaphorFieldRef;
|
|
4570
|
+
aggregate?: SemaphorAggregateFunction;
|
|
4571
|
+
} | {
|
|
4572
|
+
kind: 'value';
|
|
4573
|
+
valueId: string;
|
|
4574
|
+
rowPath?: SemaphorMatrixMemberPathSegment[];
|
|
4575
|
+
columnPath?: SemaphorMatrixMemberPathSegment[];
|
|
4576
|
+
};
|
|
4577
|
+
nulls?: 'warehouseDefault' | 'first' | 'last';
|
|
4578
|
+
scope?: 'global' | 'withinParent';
|
|
4579
|
+
};
|
|
4580
|
+
|
|
4581
|
+
declare type SemaphorMatrixSourceRef = SemaphorSemanticSourceRef | SemaphorExplorerSourceRef;
|
|
4582
|
+
|
|
4583
|
+
declare type SemaphorMatrixSubtotalOptions = {
|
|
4584
|
+
enabled?: boolean;
|
|
4585
|
+
position?: 'before' | 'after';
|
|
4586
|
+
label?: string;
|
|
4587
|
+
};
|
|
4588
|
+
|
|
4589
|
+
declare type SemaphorMatrixTotalCalculation = {
|
|
4590
|
+
kind: 'defaultAggregate';
|
|
4591
|
+
} | {
|
|
4592
|
+
kind: 'blank';
|
|
4593
|
+
} | {
|
|
4594
|
+
kind: 'labelOnly';
|
|
4595
|
+
label?: string;
|
|
4596
|
+
} | {
|
|
4597
|
+
kind: 'customAggregate';
|
|
4598
|
+
aggregate: SemaphorAggregateFunction;
|
|
4599
|
+
} | {
|
|
4600
|
+
kind: 'percentOfParent';
|
|
4601
|
+
} | {
|
|
4602
|
+
kind: 'percentOfGrandTotal';
|
|
4603
|
+
} | {
|
|
4604
|
+
kind: 'customExpression';
|
|
4605
|
+
expressionId: string;
|
|
4606
|
+
};
|
|
4607
|
+
|
|
4608
|
+
declare type SemaphorMatrixTotalOptions = {
|
|
4609
|
+
rows?: boolean | 'perLevel';
|
|
4610
|
+
columns?: boolean | 'perLevel';
|
|
4611
|
+
grandTotal?: boolean | {
|
|
4612
|
+
rows?: boolean;
|
|
4613
|
+
columns?: boolean;
|
|
4614
|
+
};
|
|
4615
|
+
rowPosition?: 'top' | 'bottom';
|
|
4616
|
+
columnPosition?: 'left' | 'right';
|
|
4617
|
+
};
|
|
4618
|
+
|
|
4619
|
+
declare type SemaphorMatrixValueField = {
|
|
4620
|
+
id?: string;
|
|
4621
|
+
field: SemaphorFieldRef;
|
|
4622
|
+
aggregate?: SemaphorAggregateFunction;
|
|
4623
|
+
label?: string;
|
|
4624
|
+
totalBehavior?: SemaphorMatrixTotalCalculation;
|
|
4625
|
+
};
|
|
4626
|
+
|
|
4473
4627
|
declare type SemaphorMetricAnalysis = {
|
|
4474
4628
|
kind: 'period_change';
|
|
4475
4629
|
orderBy?: 'absolute_change' | 'positive_change' | 'negative_change' | 'period';
|
|
@@ -4503,6 +4657,11 @@ declare type SemaphorMetricIntent = {
|
|
|
4503
4657
|
limit?: number;
|
|
4504
4658
|
};
|
|
4505
4659
|
|
|
4660
|
+
declare type SemaphorPaginationRequest = {
|
|
4661
|
+
page: number;
|
|
4662
|
+
pageSize: number;
|
|
4663
|
+
};
|
|
4664
|
+
|
|
4506
4665
|
declare type SemaphorProtocolVersion = 1;
|
|
4507
4666
|
|
|
4508
4667
|
declare function SemaphorQueryClient({ children, }: {
|
|
@@ -4523,6 +4682,7 @@ declare type SemaphorRecordsIntent = {
|
|
|
4523
4682
|
timeWindow?: SemaphorTimeWindow;
|
|
4524
4683
|
filters?: SemaphorAnalyticsFilter[];
|
|
4525
4684
|
limit?: number;
|
|
4685
|
+
pagination?: SemaphorPaginationRequest;
|
|
4526
4686
|
orderBy?: {
|
|
4527
4687
|
field: SemaphorFieldRef;
|
|
4528
4688
|
direction: 'asc' | 'desc';
|
|
@@ -4538,6 +4698,10 @@ declare type SemaphorRelativeTimeWindow = {
|
|
|
4538
4698
|
completeness?: 'include_partial' | 'complete_periods';
|
|
4539
4699
|
};
|
|
4540
4700
|
|
|
4701
|
+
declare type SemaphorSemanticSourceRef = Extract<SemaphorSourceRef, {
|
|
4702
|
+
kind: 'semantic';
|
|
4703
|
+
}>;
|
|
4704
|
+
|
|
4541
4705
|
declare type SemaphorSourceRef = {
|
|
4542
4706
|
kind: 'semantic';
|
|
4543
4707
|
domainId: string;
|
|
@@ -4570,9 +4734,10 @@ declare type SemaphorSqlIntent = {
|
|
|
4570
4734
|
kind: 'sql';
|
|
4571
4735
|
}>;
|
|
4572
4736
|
sql: string;
|
|
4573
|
-
|
|
4737
|
+
defaultParameters?: Record<string, unknown>;
|
|
4574
4738
|
pythonCode?: string;
|
|
4575
4739
|
limit?: number;
|
|
4740
|
+
pagination?: SemaphorPaginationRequest;
|
|
4576
4741
|
rationale?: string;
|
|
4577
4742
|
fields?: SemaphorFieldRef[];
|
|
4578
4743
|
inputs?: SemaphorInputBinding[];
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),o=require("react");require("./index-BxM99sFL.js");const s=require("./switch-C0S63HAv.js");require("./index-HjDeEytV.js");require("./index-DRlMUglg.js");require("react-dom/client");require("react-dom");function b(){const t=s.useDashboardStore(e=>e.dashboard),c=s.useDashboardStore(e=>e.actions.setDashboard),u=s.useDashboardStore(e=>e.showDashboardJSON),h=s.useDashboardStore(e=>e.actions.setShowDashboardJSON),r=o.useMemo(()=>t?JSON.stringify(t,null,2):"",[t]),[l,i]=o.useState(r),n=o.useRef(r);return o.useEffect(()=>{r!==n.current&&(i(r),n.current=r)},[r]),a.jsxs("div",{className:s.cn("relative p-2",{hidden:!u}),children:[a.jsxs(s.Button,{variant:"secondary",size:"sm",className:"absolute right-2 top-2 z-10 h-8",onClick:()=>h(!1),children:[a.jsx(s.X,{className:"mr-2 h-4 w-4"}),"Close"]}),a.jsx("div",{className:"h-[550px] overflow-hidden",children:a.jsx(s.CodeEditor,{value:l,onValueChange:e=>{i(e);try{const d=JSON.parse(e);n.current=JSON.stringify(d,null,2),c(d)}catch{}},language:"json"})})]})}exports.default=b;
|