react-semaphor 0.1.498 → 0.1.499
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 +22 -22
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +4 -4
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/{calculated-field-identity-BGIPbwBx.js → calculated-field-identity-BC2NViZZ.js} +73 -63
- package/dist/chunks/{calculated-field-identity-CEzmY7Bi.cjs → calculated-field-identity-CtYhhZoG.cjs} +1 -1
- package/dist/chunks/{constants-CKoIADZx.js → constants-CTRduy1g.js} +9 -9
- package/dist/chunks/{constants-CpBVuEea.cjs → constants-DNgpRMaX.cjs} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-C8eAX-JN.js → dashboard-briefing-launcher-Bp6SBVb6.js} +9 -9
- package/dist/chunks/{dashboard-briefing-launcher-BEmyxEd8.cjs → dashboard-briefing-launcher-Dtzn9Tqg.cjs} +1 -1
- package/dist/chunks/{dashboard-controls-YvJe7cPL.cjs → dashboard-controls-CLw5VQ2x.cjs} +1 -1
- package/dist/chunks/{dashboard-controls-C_v7sbq4.js → dashboard-controls-DDI3atQf.js} +11 -11
- package/dist/chunks/{dashboard-date-comparison-definition-aANgeL-E.js → dashboard-date-comparison-definition-C1vJshiP.js} +6 -6
- package/dist/chunks/{dashboard-date-comparison-definition-Er8D33iq.cjs → dashboard-date-comparison-definition-CWz_Yte8.cjs} +1 -1
- package/dist/chunks/{dashboard-json-CSp5bXIV.cjs → dashboard-json-BnT6W7Lt.cjs} +1 -1
- package/dist/chunks/{dashboard-json-BaT3Yy8x.js → dashboard-json-rHLrTBbN.js} +7 -7
- package/dist/chunks/{edit-dashboard-visual-GWiW0jjy.js → edit-dashboard-visual-BH2LkjHV.js} +6858 -6893
- package/dist/chunks/edit-dashboard-visual-DqAMe8XW.cjs +172 -0
- package/dist/chunks/{editor-action-buttons-BSC0nwgV.cjs → editor-action-buttons-Boq8MLya.cjs} +1 -1
- package/dist/chunks/{editor-action-buttons-CfZITZwQ.js → editor-action-buttons-DUEK2-kM.js} +6 -6
- package/dist/chunks/{field-aggregations-DLWbqnBW.cjs → field-aggregations-mlkON_QA.cjs} +1 -1
- package/dist/chunks/{field-aggregations-CxJWY4Ny.js → field-aggregations-tLaXZ2VJ.js} +13 -13
- package/dist/chunks/{field-dependencies-BiyQuGxZ.cjs → field-dependencies-R7MrlW6D.cjs} +1 -1
- package/dist/chunks/{field-dependencies-CNOgt39w.js → field-dependencies-ZE2klbHO.js} +1 -1
- package/dist/chunks/{index-BJfUMDHc.js → index-BVIet238.js} +42 -42
- package/dist/chunks/{index-C3RHKD3d.cjs → index-Bh3SlWJS.cjs} +1 -1
- package/dist/chunks/{index-DjbQVfS6.js → index-CEm8bwwd.js} +26924 -26927
- package/dist/chunks/{index-DhBGtRkR.cjs → index-Gos2ij10.cjs} +219 -219
- package/dist/chunks/{matrix-analytical-definition-s10yOPft.js → matrix-analytical-definition-CIVFNNnF.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-DbaMwlWM.cjs → matrix-analytical-definition-wIEDXvV5.cjs} +1 -1
- package/dist/chunks/{matrix-card-DGpXdK_Y.js → matrix-card-BVvKHL7s.js} +2 -2
- package/dist/chunks/{matrix-card-BitrcBVw.cjs → matrix-card-Dh0J0_Of.cjs} +1 -1
- package/dist/chunks/matrix-control-sources-CjnsBREg.js +605 -0
- package/dist/chunks/matrix-control-sources-a67fwoOO.cjs +1 -0
- package/dist/chunks/{matrix-definition-AP5W3wGc.js → matrix-definition-BEXCfZAe.js} +3 -3
- package/dist/chunks/{matrix-definition-C33isJ3k.cjs → matrix-definition-CKVi4VVg.cjs} +1 -1
- package/dist/chunks/{matrix-formatter-CZYFhdZ0.js → matrix-formatter-BTPfthsa.js} +41 -41
- package/dist/chunks/{matrix-formatter-UCXQxvV3.cjs → matrix-formatter-CWtdnbfv.cjs} +1 -1
- package/dist/chunks/{matrix-member-presentation-5-M0obIa.js → matrix-member-presentation-DiDUvZts.js} +1 -1
- package/dist/chunks/{matrix-member-presentation-DgIq9UG9.cjs → matrix-member-presentation-e_KZoZOx.cjs} +1 -1
- package/dist/chunks/{matrix-operation-contract-BFumahBa.js → matrix-operation-contract-CPgckXxm.js} +144 -144
- package/dist/chunks/{matrix-operation-contract-C0-V685e.cjs → matrix-operation-contract-thtFuUYf.cjs} +1 -1
- package/dist/chunks/{metric-comparison-ClKUI7Tu.cjs → metric-comparison-CAqV6VnZ.cjs} +1 -1
- package/dist/chunks/{metric-comparison-Df3HmmUE.js → metric-comparison-Dgyq1I3d.js} +1 -1
- package/dist/chunks/{pivot-header-presentation-CGWDx1V_.cjs → pivot-header-presentation-DUXM-VOP.cjs} +1 -1
- package/dist/chunks/{pivot-header-presentation-CAmKYLgn.js → pivot-header-presentation-DcCO8-Ij.js} +3 -3
- package/dist/chunks/{pivot-result-identity-DBeK76wx.js → pivot-result-identity-Be1zm0AV.js} +1 -1
- package/dist/chunks/{pivot-result-identity-0grcK7bY.cjs → pivot-result-identity-DJyF4I2K.cjs} +1 -1
- package/dist/chunks/{pivot-result-lifecycle-DVPJg7Gg.js → pivot-result-lifecycle-DpSZOMOZ.js} +7 -7
- package/dist/chunks/{pivot-result-lifecycle-CC0jWMFT.cjs → pivot-result-lifecycle-E_huAPev.cjs} +1 -1
- package/dist/chunks/{raw-temporal-Kc3mdzH7.cjs → raw-temporal-DYoPBY6B.cjs} +1 -1
- package/dist/chunks/{raw-temporal-T3PEaGmJ.js → raw-temporal-DfnRBxQn.js} +2 -2
- package/dist/chunks/{raw-temporal-contract-Ck5vJoQ6.js → raw-temporal-contract-CNwYygW2.js} +1 -1
- package/dist/chunks/{raw-temporal-contract-SwtP1jSh.cjs → raw-temporal-contract-D1_n2pBj.cjs} +1 -1
- package/dist/chunks/{report-preferences-dialog-B8DdDM7q.js → report-preferences-dialog-8nfXNWvl.js} +6 -6
- package/dist/chunks/{report-preferences-dialog-BcaEOgn2.cjs → report-preferences-dialog-CW59SyVZ.cjs} +1 -1
- package/dist/chunks/{report-runtime-context-D3t8vyl9.cjs → report-runtime-context-CqFbgZq9.cjs} +1 -1
- package/dist/chunks/{report-runtime-context-BziN1eg9.js → report-runtime-context-Dln1qvGS.js} +5 -5
- package/dist/chunks/{semantic-format-Ca-sdETk.cjs → semantic-format-C7Goni6h.cjs} +1 -1
- package/dist/chunks/{semantic-format-A3k--fpE.js → semantic-format-PKQt2EAz.js} +2 -2
- package/dist/chunks/{source-entity-resolution-CTUzMH2S.cjs → source-entity-resolution-BMKxwdKN.cjs} +1 -1
- package/dist/chunks/{source-entity-resolution-DX9C1ebK.js → source-entity-resolution-BSZ07Sl6.js} +19 -19
- package/dist/chunks/{switch-DV8zX7rV.js → switch-B4wVqV4L.js} +51 -50
- package/dist/chunks/{switch-CgycqpWv.cjs → switch-DVjKkt22.cjs} +12 -12
- package/dist/chunks/{temporal-bucket-contract-BBdvWsY0.cjs → temporal-bucket-contract-CSdspcYj.cjs} +1 -1
- package/dist/chunks/{temporal-bucket-contract-lq7Jrif0.js → temporal-bucket-contract-_WCvDnvn.js} +1 -1
- package/dist/chunks/{update-policy-DIw_H9RT.cjs → update-policy-BESKAspa.cjs} +1 -1
- package/dist/chunks/{update-policy-EgZ1nRbd.js → update-policy-BWbXhkk-.js} +2 -2
- package/dist/chunks/{validators-CvLOGzT3.js → validators-CHlnnHuS.js} +1102 -1043
- package/dist/chunks/validators-D2F_uxxP.cjs +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +112 -107
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +2 -2
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +1 -1
- package/dist/data-app-codegen-node/index.js +3 -3
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +4 -4
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +2 -2
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +5 -5
- package/dist/format-utils/index.cjs +1 -1
- package/dist/format-utils/index.js +16 -16
- package/dist/index.cjs +1 -1
- package/dist/index.js +81 -78
- package/dist/report-runtime-context/index.cjs +1 -1
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +15 -0
- package/dist/types/briefings.d.ts +16 -1
- package/dist/types/dashboard-assistant.d.ts +15 -0
- package/dist/types/dashboard-authoring.d.ts +49 -1
- package/dist/types/dashboard.d.ts +23 -1
- package/dist/types/data-app-builder.d.ts +15 -0
- package/dist/types/data-app-codegen-node.d.ts +15 -0
- package/dist/types/data-app-codegen.d.ts +15 -0
- package/dist/types/data-app-sdk-adapters.d.ts +15 -0
- package/dist/types/data-app-sdk-validation.d.ts +15 -0
- package/dist/types/data-app-sdk.d.ts +15 -0
- package/dist/types/format-utils.d.ts +15 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +30 -27
- package/dist/types/main.d.ts +67 -8
- package/dist/types/shared.d.ts +16 -1
- package/dist/types/surfboard.d.ts +23 -1
- package/dist/types/types.d.ts +67 -8
- package/package.json +1 -1
- package/dist/chunks/edit-dashboard-visual-_Wap0YGu.cjs +0 -172
- package/dist/chunks/matrix-control-sources-DdfST7Fo.cjs +0 -1
- package/dist/chunks/matrix-control-sources-Dxh6hOU9.js +0 -523
- package/dist/chunks/validators-mhiJSia7.cjs +0 -1
package/dist/types/main.d.ts
CHANGED
|
@@ -4621,6 +4621,8 @@ export declare const CALCULATED_FIELD_ENTITY_MARKER: "SEMAPHOR_CALCULATED_FIELD"
|
|
|
4621
4621
|
*/
|
|
4622
4622
|
export declare interface CalculatedFieldFormula {
|
|
4623
4623
|
operation: CalculatedFieldOperation;
|
|
4624
|
+
/** Evaluation stage of the definition, independent of its selected shelf. */
|
|
4625
|
+
computeStage?: 'row' | 'aggregate';
|
|
4624
4626
|
/**
|
|
4625
4627
|
* Array of full MetricField objects used as inputs to the calculated field.
|
|
4626
4628
|
*
|
|
@@ -4648,6 +4650,32 @@ export declare interface CalculatedFieldFormula {
|
|
|
4648
4650
|
constant?: number;
|
|
4649
4651
|
}
|
|
4650
4652
|
|
|
4653
|
+
/** Metadata surface needed to classify a field without requiring shelf UI fields. */
|
|
4654
|
+
export declare type CalculatedFieldInspectable = {
|
|
4655
|
+
calculationRepresentation?: Field['calculationRepresentation'];
|
|
4656
|
+
name?: string;
|
|
4657
|
+
sourceField?: string;
|
|
4658
|
+
role?: Field['role'];
|
|
4659
|
+
entityName?: string;
|
|
4660
|
+
entityId?: string;
|
|
4661
|
+
qualifiedEntityName?: string;
|
|
4662
|
+
fieldScope?: FieldScope;
|
|
4663
|
+
expression?: string;
|
|
4664
|
+
calculatedFormula?: CalculatedFieldFormula;
|
|
4665
|
+
calculatedFieldOrigin?: Field['calculatedFieldOrigin'];
|
|
4666
|
+
derivedField?: SemaphorDerivedFieldDefinition;
|
|
4667
|
+
};
|
|
4668
|
+
|
|
4669
|
+
export declare type CalculatedFieldInspection = {
|
|
4670
|
+
representation: 'physical' | 'inline-expression' | 'manual' | 'typed-derived';
|
|
4671
|
+
ownership: 'local' | 'domain';
|
|
4672
|
+
completeness: 'not-calculated' | 'complete' | 'incomplete';
|
|
4673
|
+
computeStage?: 'row' | 'aggregate';
|
|
4674
|
+
runtimeExecutable: boolean;
|
|
4675
|
+
/** Compatibility mode for local runtime fields created before stage metadata. */
|
|
4676
|
+
legacyManual: boolean;
|
|
4677
|
+
};
|
|
4678
|
+
|
|
4651
4679
|
/**
|
|
4652
4680
|
* Operations supported for calculated fields
|
|
4653
4681
|
*/
|
|
@@ -10578,6 +10606,19 @@ export declare interface Field {
|
|
|
10578
10606
|
*/
|
|
10579
10607
|
semanticTemporalPresentation?: SemanticTemporalPresentation;
|
|
10580
10608
|
aggregate?: AggregateFunction;
|
|
10609
|
+
/** Whether this placement aggregate was supplied by the editor or authored. Omitted means unknown. */
|
|
10610
|
+
aggregateOrigin?: 'default' | 'explicit';
|
|
10611
|
+
/** Runtime representation, independent of definition ownership and shelf role. */
|
|
10612
|
+
calculationRepresentation?: 'inline-expression' | 'manual' | 'typed-derived';
|
|
10613
|
+
/** Definition identity survives timestamped shelf IDs and changes of placement role. */
|
|
10614
|
+
calculatedFieldOrigin?: {
|
|
10615
|
+
id: string;
|
|
10616
|
+
role?: Field['role'];
|
|
10617
|
+
};
|
|
10618
|
+
/** Provenance for display metadata on governed fields. Unmarked legacy values are semantic snapshots. */
|
|
10619
|
+
labelOrigin?: 'semantic' | 'override';
|
|
10620
|
+
/** Provenance for display formatting on governed fields. Unmarked legacy values are semantic snapshots. */
|
|
10621
|
+
formatOrigin?: 'semantic' | 'override';
|
|
10581
10622
|
fieldScope?: FieldScope;
|
|
10582
10623
|
}
|
|
10583
10624
|
|
|
@@ -10664,7 +10705,7 @@ export declare type FilterDashboardInputDefinitionUpdateResult = {
|
|
|
10664
10705
|
*/
|
|
10665
10706
|
declare type FilterDisplayMode = 'canvas' | 'toolbar' | 'inherit';
|
|
10666
10707
|
|
|
10667
|
-
declare type FilterFieldMeta = Pick<Field, 'name' | 'qualifiedFieldName'> & Partial<Pick<Field, 'id' | 'qualifiedEntityName' | 'entityId' | 'dataType' | 'role' | 'fieldScope'>> & {
|
|
10708
|
+
declare type FilterFieldMeta = Pick<Field, 'name' | 'qualifiedFieldName'> & Partial<Pick<Field, 'id' | 'qualifiedEntityName' | 'entityId' | 'dataType' | 'role' | 'fieldScope' | 'calculationRepresentation' | 'calculatedFieldOrigin' | 'derivedField'>> & {
|
|
10668
10709
|
entityName?: Field['entityName'];
|
|
10669
10710
|
entityType?: string;
|
|
10670
10711
|
/** Exact database type used by server-side predicate formatting. */
|
|
@@ -10908,6 +10949,8 @@ export declare function getBriefingPreviewRun(apiServiceUrl: string, token: stri
|
|
|
10908
10949
|
|
|
10909
10950
|
export declare function getBriefingRun(apiServiceUrl: string, token: string, briefingId: string, runId: string): Promise<BriefingRun>;
|
|
10910
10951
|
|
|
10952
|
+
export declare function getCalculatedFieldComputeStage(field: CalculatedFieldInspectable | null | undefined): 'row' | 'aggregate' | undefined;
|
|
10953
|
+
|
|
10911
10954
|
export declare function getColumnDataType(column: TDataColumn): string;
|
|
10912
10955
|
|
|
10913
10956
|
export declare type GetDashboardResponse = {
|
|
@@ -11087,6 +11130,13 @@ export declare type InputReference = {
|
|
|
11087
11130
|
dimension: string;
|
|
11088
11131
|
};
|
|
11089
11132
|
|
|
11133
|
+
/**
|
|
11134
|
+
* Inspect a runtime field without conflating public typed-derived metadata with
|
|
11135
|
+
* the dashboard-local expression/formula representation. Consumers use this
|
|
11136
|
+
* result for classification and stage; each compiler still owns execution.
|
|
11137
|
+
*/
|
|
11138
|
+
export declare function inspectCalculatedField(field: CalculatedFieldInspectable | null | undefined): CalculatedFieldInspection;
|
|
11139
|
+
|
|
11090
11140
|
/**
|
|
11091
11141
|
* Unified Interaction type (V2)
|
|
11092
11142
|
* Combines all interaction types into a single union for the new interactions array.
|
|
@@ -11220,11 +11270,6 @@ export declare function isCalculatedDimension(field: GroupByField): field is Gro
|
|
|
11220
11270
|
expression: string;
|
|
11221
11271
|
};
|
|
11222
11272
|
|
|
11223
|
-
/**
|
|
11224
|
-
* Generic type guard for any calculated field
|
|
11225
|
-
*/
|
|
11226
|
-
export declare function isCalculatedField(field: Field): boolean;
|
|
11227
|
-
|
|
11228
11273
|
/**
|
|
11229
11274
|
* IMPORTANT: Why we store qualifiedFieldNames as strings instead of Field objects
|
|
11230
11275
|
*
|
|
@@ -11252,10 +11297,10 @@ export declare function isDateDataType(dataType: string): boolean;
|
|
|
11252
11297
|
* True for every representation of a derived (calculated) field:
|
|
11253
11298
|
* an expression, formula inputs, the shared-contract `derivedField`
|
|
11254
11299
|
* (the only shape Matrix-authored calculations may carry), or a synthetic
|
|
11255
|
-
* calculated-field owner. Use this
|
|
11300
|
+
* calculated-field owner. Use this wherever the
|
|
11256
11301
|
* question is "is this computed rather than stored".
|
|
11257
11302
|
*/
|
|
11258
|
-
export declare function isDerivedField(field:
|
|
11303
|
+
export declare function isDerivedField(field: CalculatedFieldInspectable | null | undefined): boolean;
|
|
11259
11304
|
|
|
11260
11305
|
/**
|
|
11261
11306
|
* Check if an export has completed (successfully or with failure)
|
|
@@ -20012,6 +20057,10 @@ declare type MonthAlignedFiscalCalendar = {
|
|
|
20012
20057
|
|
|
20013
20058
|
declare type NoneOptions = {};
|
|
20014
20059
|
|
|
20060
|
+
/** Normalize unannotated saved shapes once, before attaching placement/scope
|
|
20061
|
+
* metadata. Never replaces an explicit tag, even if invalid: validation owns it. */
|
|
20062
|
+
export declare function normalizeCalculatedFieldRepresentation<T extends CalculatedFieldInspectable>(field: T): T;
|
|
20063
|
+
|
|
20015
20064
|
/**
|
|
20016
20065
|
* Normalizes dashboard layout objects into a canonical structure:
|
|
20017
20066
|
* - strips transient react-grid-layout runtime fields
|
|
@@ -22836,6 +22885,9 @@ declare type ShareRole = 'VIEWER' | 'EDITOR' | 'CONTRIBUTOR';
|
|
|
22836
22885
|
|
|
22837
22886
|
declare type ShareScope = 'specific_tenant_user' | 'all_tenant_users' | 'specific_org_user' | 'all_org_users' | 'org_users_only' | 'all_tenants_only';
|
|
22838
22887
|
|
|
22888
|
+
/** Only a proven inherited default may be removed for an aggregate-stage definition. */
|
|
22889
|
+
export declare function shouldDropInheritedCalculationAggregate(computeStage: 'row' | 'aggregate' | undefined, aggregateOrigin: MetricField['aggregateOrigin']): boolean;
|
|
22890
|
+
|
|
22839
22891
|
export declare interface SortByField extends Field {
|
|
22840
22892
|
role: 'sortby';
|
|
22841
22893
|
direction: 'asc' | 'desc';
|
|
@@ -25153,6 +25205,13 @@ export declare type TDataColumn = {
|
|
|
25153
25205
|
expression?: string;
|
|
25154
25206
|
calculatedFormula?: CalculatedFieldFormula;
|
|
25155
25207
|
derivedField?: SemaphorDerivedFieldDefinition;
|
|
25208
|
+
fieldScope?: FieldScope;
|
|
25209
|
+
source?: Field['source'];
|
|
25210
|
+
calculatedFieldOrigin?: Field['calculatedFieldOrigin'];
|
|
25211
|
+
calculationRepresentation?: Field['calculationRepresentation'];
|
|
25212
|
+
aggregateOrigin?: Field['aggregateOrigin'];
|
|
25213
|
+
labelOrigin?: Field['labelOrigin'];
|
|
25214
|
+
formatOrigin?: Field['formatOrigin'];
|
|
25156
25215
|
format?: FormatSpec;
|
|
25157
25216
|
granularity?: TimeGranularity;
|
|
25158
25217
|
sourceField?: string;
|
package/dist/types/shared.d.ts
CHANGED
|
@@ -311,6 +311,8 @@ declare type CacheConfig = {
|
|
|
311
311
|
*/
|
|
312
312
|
declare interface CalculatedFieldFormula {
|
|
313
313
|
operation: CalculatedFieldOperation;
|
|
314
|
+
/** Evaluation stage of the definition, independent of its selected shelf. */
|
|
315
|
+
computeStage?: 'row' | 'aggregate';
|
|
314
316
|
/**
|
|
315
317
|
* Array of full MetricField objects used as inputs to the calculated field.
|
|
316
318
|
*
|
|
@@ -4839,6 +4841,19 @@ declare interface Field {
|
|
|
4839
4841
|
*/
|
|
4840
4842
|
semanticTemporalPresentation?: SemanticTemporalPresentation;
|
|
4841
4843
|
aggregate?: AggregateFunction;
|
|
4844
|
+
/** Whether this placement aggregate was supplied by the editor or authored. Omitted means unknown. */
|
|
4845
|
+
aggregateOrigin?: 'default' | 'explicit';
|
|
4846
|
+
/** Runtime representation, independent of definition ownership and shelf role. */
|
|
4847
|
+
calculationRepresentation?: 'inline-expression' | 'manual' | 'typed-derived';
|
|
4848
|
+
/** Definition identity survives timestamped shelf IDs and changes of placement role. */
|
|
4849
|
+
calculatedFieldOrigin?: {
|
|
4850
|
+
id: string;
|
|
4851
|
+
role?: Field['role'];
|
|
4852
|
+
};
|
|
4853
|
+
/** Provenance for display metadata on governed fields. Unmarked legacy values are semantic snapshots. */
|
|
4854
|
+
labelOrigin?: 'semantic' | 'override';
|
|
4855
|
+
/** Provenance for display formatting on governed fields. Unmarked legacy values are semantic snapshots. */
|
|
4856
|
+
formatOrigin?: 'semantic' | 'override';
|
|
4842
4857
|
fieldScope?: FieldScope;
|
|
4843
4858
|
}
|
|
4844
4859
|
|
|
@@ -4903,7 +4918,7 @@ declare type FilterDashboardInputBase = DashboardInputBase & {
|
|
|
4903
4918
|
*/
|
|
4904
4919
|
declare type FilterDisplayMode = 'canvas' | 'toolbar' | 'inherit';
|
|
4905
4920
|
|
|
4906
|
-
declare type FilterFieldMeta = Pick<Field, 'name' | 'qualifiedFieldName'> & Partial<Pick<Field, 'id' | 'qualifiedEntityName' | 'entityId' | 'dataType' | 'role' | 'fieldScope'>> & {
|
|
4921
|
+
declare type FilterFieldMeta = Pick<Field, 'name' | 'qualifiedFieldName'> & Partial<Pick<Field, 'id' | 'qualifiedEntityName' | 'entityId' | 'dataType' | 'role' | 'fieldScope' | 'calculationRepresentation' | 'calculatedFieldOrigin' | 'derivedField'>> & {
|
|
4907
4922
|
entityName?: Field['entityName'];
|
|
4908
4923
|
entityType?: string;
|
|
4909
4924
|
/** Exact database type used by server-side predicate formatting. */
|
|
@@ -403,6 +403,8 @@ export declare type CacheConfig = {
|
|
|
403
403
|
*/
|
|
404
404
|
declare interface CalculatedFieldFormula {
|
|
405
405
|
operation: CalculatedFieldOperation;
|
|
406
|
+
/** Evaluation stage of the definition, independent of its selected shelf. */
|
|
407
|
+
computeStage?: 'row' | 'aggregate';
|
|
406
408
|
/**
|
|
407
409
|
* Array of full MetricField objects used as inputs to the calculated field.
|
|
408
410
|
*
|
|
@@ -5213,6 +5215,19 @@ declare interface Field {
|
|
|
5213
5215
|
*/
|
|
5214
5216
|
semanticTemporalPresentation?: SemanticTemporalPresentation;
|
|
5215
5217
|
aggregate?: AggregateFunction;
|
|
5218
|
+
/** Whether this placement aggregate was supplied by the editor or authored. Omitted means unknown. */
|
|
5219
|
+
aggregateOrigin?: 'default' | 'explicit';
|
|
5220
|
+
/** Runtime representation, independent of definition ownership and shelf role. */
|
|
5221
|
+
calculationRepresentation?: 'inline-expression' | 'manual' | 'typed-derived';
|
|
5222
|
+
/** Definition identity survives timestamped shelf IDs and changes of placement role. */
|
|
5223
|
+
calculatedFieldOrigin?: {
|
|
5224
|
+
id: string;
|
|
5225
|
+
role?: Field['role'];
|
|
5226
|
+
};
|
|
5227
|
+
/** Provenance for display metadata on governed fields. Unmarked legacy values are semantic snapshots. */
|
|
5228
|
+
labelOrigin?: 'semantic' | 'override';
|
|
5229
|
+
/** Provenance for display formatting on governed fields. Unmarked legacy values are semantic snapshots. */
|
|
5230
|
+
formatOrigin?: 'semantic' | 'override';
|
|
5216
5231
|
fieldScope?: FieldScope;
|
|
5217
5232
|
}
|
|
5218
5233
|
|
|
@@ -5277,7 +5292,7 @@ declare type FilterDashboardInputBase = DashboardInputBase & {
|
|
|
5277
5292
|
*/
|
|
5278
5293
|
declare type FilterDisplayMode = 'canvas' | 'toolbar' | 'inherit';
|
|
5279
5294
|
|
|
5280
|
-
declare type FilterFieldMeta = Pick<Field, 'name' | 'qualifiedFieldName'> & Partial<Pick<Field, 'id' | 'qualifiedEntityName' | 'entityId' | 'dataType' | 'role' | 'fieldScope'>> & {
|
|
5295
|
+
declare type FilterFieldMeta = Pick<Field, 'name' | 'qualifiedFieldName'> & Partial<Pick<Field, 'id' | 'qualifiedEntityName' | 'entityId' | 'dataType' | 'role' | 'fieldScope' | 'calculationRepresentation' | 'calculatedFieldOrigin' | 'derivedField'>> & {
|
|
5281
5296
|
entityName?: Field['entityName'];
|
|
5282
5297
|
entityType?: string;
|
|
5283
5298
|
/** Exact database type used by server-side predicate formatting. */
|
|
@@ -10306,6 +10321,13 @@ export declare type TDataColumn = {
|
|
|
10306
10321
|
expression?: string;
|
|
10307
10322
|
calculatedFormula?: CalculatedFieldFormula;
|
|
10308
10323
|
derivedField?: SemaphorDerivedFieldDefinition;
|
|
10324
|
+
fieldScope?: FieldScope;
|
|
10325
|
+
source?: Field['source'];
|
|
10326
|
+
calculatedFieldOrigin?: Field['calculatedFieldOrigin'];
|
|
10327
|
+
calculationRepresentation?: Field['calculationRepresentation'];
|
|
10328
|
+
aggregateOrigin?: Field['aggregateOrigin'];
|
|
10329
|
+
labelOrigin?: Field['labelOrigin'];
|
|
10330
|
+
formatOrigin?: Field['formatOrigin'];
|
|
10309
10331
|
format?: FormatSpec;
|
|
10310
10332
|
granularity?: TimeGranularity;
|
|
10311
10333
|
sourceField?: string;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -877,6 +877,8 @@ export declare const CALCULATED_FIELD_ENTITY_MARKER: "SEMAPHOR_CALCULATED_FIELD"
|
|
|
877
877
|
*/
|
|
878
878
|
export declare interface CalculatedFieldFormula {
|
|
879
879
|
operation: CalculatedFieldOperation;
|
|
880
|
+
/** Evaluation stage of the definition, independent of its selected shelf. */
|
|
881
|
+
computeStage?: 'row' | 'aggregate';
|
|
880
882
|
/**
|
|
881
883
|
* Array of full MetricField objects used as inputs to the calculated field.
|
|
882
884
|
*
|
|
@@ -904,6 +906,32 @@ export declare interface CalculatedFieldFormula {
|
|
|
904
906
|
constant?: number;
|
|
905
907
|
}
|
|
906
908
|
|
|
909
|
+
/** Metadata surface needed to classify a field without requiring shelf UI fields. */
|
|
910
|
+
export declare type CalculatedFieldInspectable = {
|
|
911
|
+
calculationRepresentation?: Field['calculationRepresentation'];
|
|
912
|
+
name?: string;
|
|
913
|
+
sourceField?: string;
|
|
914
|
+
role?: Field['role'];
|
|
915
|
+
entityName?: string;
|
|
916
|
+
entityId?: string;
|
|
917
|
+
qualifiedEntityName?: string;
|
|
918
|
+
fieldScope?: FieldScope;
|
|
919
|
+
expression?: string;
|
|
920
|
+
calculatedFormula?: CalculatedFieldFormula;
|
|
921
|
+
calculatedFieldOrigin?: Field['calculatedFieldOrigin'];
|
|
922
|
+
derivedField?: SemaphorDerivedFieldDefinition;
|
|
923
|
+
};
|
|
924
|
+
|
|
925
|
+
export declare type CalculatedFieldInspection = {
|
|
926
|
+
representation: 'physical' | 'inline-expression' | 'manual' | 'typed-derived';
|
|
927
|
+
ownership: 'local' | 'domain';
|
|
928
|
+
completeness: 'not-calculated' | 'complete' | 'incomplete';
|
|
929
|
+
computeStage?: 'row' | 'aggregate';
|
|
930
|
+
runtimeExecutable: boolean;
|
|
931
|
+
/** Compatibility mode for local runtime fields created before stage metadata. */
|
|
932
|
+
legacyManual: boolean;
|
|
933
|
+
};
|
|
934
|
+
|
|
907
935
|
/**
|
|
908
936
|
* Operations supported for calculated fields
|
|
909
937
|
*/
|
|
@@ -5863,6 +5891,19 @@ export declare interface Field {
|
|
|
5863
5891
|
*/
|
|
5864
5892
|
semanticTemporalPresentation?: SemanticTemporalPresentation;
|
|
5865
5893
|
aggregate?: AggregateFunction;
|
|
5894
|
+
/** Whether this placement aggregate was supplied by the editor or authored. Omitted means unknown. */
|
|
5895
|
+
aggregateOrigin?: 'default' | 'explicit';
|
|
5896
|
+
/** Runtime representation, independent of definition ownership and shelf role. */
|
|
5897
|
+
calculationRepresentation?: 'inline-expression' | 'manual' | 'typed-derived';
|
|
5898
|
+
/** Definition identity survives timestamped shelf IDs and changes of placement role. */
|
|
5899
|
+
calculatedFieldOrigin?: {
|
|
5900
|
+
id: string;
|
|
5901
|
+
role?: Field['role'];
|
|
5902
|
+
};
|
|
5903
|
+
/** Provenance for display metadata on governed fields. Unmarked legacy values are semantic snapshots. */
|
|
5904
|
+
labelOrigin?: 'semantic' | 'override';
|
|
5905
|
+
/** Provenance for display formatting on governed fields. Unmarked legacy values are semantic snapshots. */
|
|
5906
|
+
formatOrigin?: 'semantic' | 'override';
|
|
5866
5907
|
fieldScope?: FieldScope;
|
|
5867
5908
|
}
|
|
5868
5909
|
|
|
@@ -5951,7 +5992,7 @@ declare type FilterDashboardInputBase = DashboardInputBase & {
|
|
|
5951
5992
|
*/
|
|
5952
5993
|
declare type FilterDisplayMode = 'canvas' | 'toolbar' | 'inherit';
|
|
5953
5994
|
|
|
5954
|
-
export declare type FilterFieldMeta = Pick<Field, 'name' | 'qualifiedFieldName'> & Partial<Pick<Field, 'id' | 'qualifiedEntityName' | 'entityId' | 'dataType' | 'role' | 'fieldScope'>> & {
|
|
5995
|
+
export declare type FilterFieldMeta = Pick<Field, 'name' | 'qualifiedFieldName'> & Partial<Pick<Field, 'id' | 'qualifiedEntityName' | 'entityId' | 'dataType' | 'role' | 'fieldScope' | 'calculationRepresentation' | 'calculatedFieldOrigin' | 'derivedField'>> & {
|
|
5955
5996
|
entityName?: Field['entityName'];
|
|
5956
5997
|
entityType?: string;
|
|
5957
5998
|
/** Exact database type used by server-side predicate formatting. */
|
|
@@ -6129,6 +6170,8 @@ export declare type FormatSpec = {
|
|
|
6129
6170
|
suffix?: string;
|
|
6130
6171
|
} | TemporalBucketFormat;
|
|
6131
6172
|
|
|
6173
|
+
export declare function getCalculatedFieldComputeStage(field: CalculatedFieldInspectable | null | undefined): 'row' | 'aggregate' | undefined;
|
|
6174
|
+
|
|
6132
6175
|
export declare type GetDashboardResponse = {
|
|
6133
6176
|
dashboard: TDashboard;
|
|
6134
6177
|
initialReportContext: ReportRuntimeContext;
|
|
@@ -6259,6 +6302,13 @@ export declare type InputReference = {
|
|
|
6259
6302
|
dimension: string;
|
|
6260
6303
|
};
|
|
6261
6304
|
|
|
6305
|
+
/**
|
|
6306
|
+
* Inspect a runtime field without conflating public typed-derived metadata with
|
|
6307
|
+
* the dashboard-local expression/formula representation. Consumers use this
|
|
6308
|
+
* result for classification and stage; each compiler still owns execution.
|
|
6309
|
+
*/
|
|
6310
|
+
export declare function inspectCalculatedField(field: CalculatedFieldInspectable | null | undefined): CalculatedFieldInspection;
|
|
6311
|
+
|
|
6262
6312
|
/**
|
|
6263
6313
|
* Unified Interaction type (V2)
|
|
6264
6314
|
* Combines all interaction types into a single union for the new interactions array.
|
|
@@ -6361,11 +6411,6 @@ export declare function isCalculatedDimension(field: GroupByField): field is Gro
|
|
|
6361
6411
|
expression: string;
|
|
6362
6412
|
};
|
|
6363
6413
|
|
|
6364
|
-
/**
|
|
6365
|
-
* Generic type guard for any calculated field
|
|
6366
|
-
*/
|
|
6367
|
-
export declare function isCalculatedField(field: Field): boolean;
|
|
6368
|
-
|
|
6369
6414
|
/**
|
|
6370
6415
|
* IMPORTANT: Why we store qualifiedFieldNames as strings instead of Field objects
|
|
6371
6416
|
*
|
|
@@ -6389,10 +6434,10 @@ export declare function isCalculatedMetric(field: Field): field is MetricField &
|
|
|
6389
6434
|
* True for every representation of a derived (calculated) field:
|
|
6390
6435
|
* an expression, formula inputs, the shared-contract `derivedField`
|
|
6391
6436
|
* (the only shape Matrix-authored calculations may carry), or a synthetic
|
|
6392
|
-
* calculated-field owner. Use this
|
|
6437
|
+
* calculated-field owner. Use this wherever the
|
|
6393
6438
|
* question is "is this computed rather than stored".
|
|
6394
6439
|
*/
|
|
6395
|
-
export declare function isDerivedField(field:
|
|
6440
|
+
export declare function isDerivedField(field: CalculatedFieldInspectable | null | undefined): boolean;
|
|
6396
6441
|
|
|
6397
6442
|
export declare interface Join {
|
|
6398
6443
|
id: string;
|
|
@@ -6696,6 +6741,10 @@ declare type MonthAlignedFiscalCalendar = {
|
|
|
6696
6741
|
|
|
6697
6742
|
declare type NoneOptions = {};
|
|
6698
6743
|
|
|
6744
|
+
/** Normalize unannotated saved shapes once, before attaching placement/scope
|
|
6745
|
+
* metadata. Never replaces an explicit tag, even if invalid: validation owns it. */
|
|
6746
|
+
export declare function normalizeCalculatedFieldRepresentation<T extends CalculatedFieldInspectable>(field: T): T;
|
|
6747
|
+
|
|
6699
6748
|
export declare type NormalizedDashboardInput = NormalizedFilterDashboardInput | ControlDashboardInput;
|
|
6700
6749
|
|
|
6701
6750
|
/** Runtime form after dashboard-filter references are resolved once. */
|
|
@@ -9112,6 +9161,9 @@ declare type SemaphorSourceRef = {
|
|
|
9112
9161
|
|
|
9113
9162
|
declare type SemaphorTimeGrain = (typeof SEMAPHOR_TIME_GRAINS)[number];
|
|
9114
9163
|
|
|
9164
|
+
/** Only a proven inherited default may be removed for an aggregate-stage definition. */
|
|
9165
|
+
export declare function shouldDropInheritedCalculationAggregate(computeStage: 'row' | 'aggregate' | undefined, aggregateOrigin: MetricField['aggregateOrigin']): boolean;
|
|
9166
|
+
|
|
9115
9167
|
export declare interface SortByField extends Field {
|
|
9116
9168
|
role: 'sortby';
|
|
9117
9169
|
direction: 'asc' | 'desc';
|
|
@@ -11338,6 +11390,13 @@ export declare type TDataColumn = {
|
|
|
11338
11390
|
expression?: string;
|
|
11339
11391
|
calculatedFormula?: CalculatedFieldFormula;
|
|
11340
11392
|
derivedField?: SemaphorDerivedFieldDefinition;
|
|
11393
|
+
fieldScope?: FieldScope;
|
|
11394
|
+
source?: Field['source'];
|
|
11395
|
+
calculatedFieldOrigin?: Field['calculatedFieldOrigin'];
|
|
11396
|
+
calculationRepresentation?: Field['calculationRepresentation'];
|
|
11397
|
+
aggregateOrigin?: Field['aggregateOrigin'];
|
|
11398
|
+
labelOrigin?: Field['labelOrigin'];
|
|
11399
|
+
formatOrigin?: Field['formatOrigin'];
|
|
11341
11400
|
format?: FormatSpec;
|
|
11342
11401
|
granularity?: TimeGranularity;
|
|
11343
11402
|
sourceField?: string;
|