react-semaphor 0.0.516 → 0.0.518
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/chunks/dashboard-plus-DI4Qb6iN.js +375 -0
- package/dist/chunks/{dashboard-plus-DIpyPOTJ.js → dashboard-plus-DzPDyise.js} +5287 -5693
- package/dist/chunks/index-0e5ek9VV.js +643 -0
- package/dist/chunks/{index-CmYcMGxs.js → index-Bb5ixhkS.js} +65827 -59247
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +39 -35
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/dashboard.d.ts +124 -2
- package/dist/types/main.d.ts +167 -3
- package/dist/types/surfboard.d.ts +124 -2
- package/dist/types/types.d.ts +124 -2
- package/package.json +2 -1
- package/dist/chunks/dashboard-plus-l5tcfQ45.js +0 -410
- package/dist/chunks/index-DDq9dhWf.js +0 -534
package/dist/types/types.d.ts
CHANGED
|
@@ -61,6 +61,39 @@ declare interface CardConfig {
|
|
|
61
61
|
filters?: FilterGroup;
|
|
62
62
|
joinPlan?: JoinPlan;
|
|
63
63
|
rowLimit?: number;
|
|
64
|
+
/**
|
|
65
|
+
* One or more hierarchies that define drillable paths through dimensions.
|
|
66
|
+
*/
|
|
67
|
+
drillHierarchies?: DrillHierarchy[];
|
|
68
|
+
/**
|
|
69
|
+
* Optional list of dimensions allowed for dynamic drill-down across this card.
|
|
70
|
+
* Used only when drill steps contain `mode: 'dynamicDrill'` or `type: 'dynamic'`.
|
|
71
|
+
*/
|
|
72
|
+
allowedDrillTargets?: Field[];
|
|
73
|
+
/**
|
|
74
|
+
* NOT UOptional preload settings for inline drill previews
|
|
75
|
+
*/
|
|
76
|
+
inlineDrillPreview?: {
|
|
77
|
+
enabled: boolean;
|
|
78
|
+
limit: number;
|
|
79
|
+
mode: 'lazy' | 'preloaded';
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Configuration for on-click dashboard filters triggered by this card.
|
|
83
|
+
*/
|
|
84
|
+
clickFilterInteractions?: ClickFilterInteraction[];
|
|
85
|
+
comparisonType?: 'previous_period' | 'same_period_last_year' | 'target';
|
|
86
|
+
targetValue?: number;
|
|
87
|
+
showTrendline?: boolean;
|
|
88
|
+
trendlineWindow?: number;
|
|
89
|
+
trendlineGranularity?: 'day' | 'week' | 'month';
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
declare interface CardInteractionConfig {
|
|
93
|
+
allowedDrillTargets?: Field[];
|
|
94
|
+
drillHierarchies?: DrillHierarchy[];
|
|
95
|
+
drillInteractions?: DrillInteraction[];
|
|
96
|
+
clickFilterInteractions?: ClickFilterInteraction[];
|
|
64
97
|
}
|
|
65
98
|
|
|
66
99
|
declare type CardWithContent = BaseCustomCard & {
|
|
@@ -81,6 +114,33 @@ declare type CardWithFooter = BaseCustomCard & {
|
|
|
81
114
|
}>;
|
|
82
115
|
};
|
|
83
116
|
|
|
117
|
+
declare interface ClickFilterInteraction {
|
|
118
|
+
mode: 'clickFilter';
|
|
119
|
+
/**
|
|
120
|
+
* Fields from the chart element that should be used as filters.
|
|
121
|
+
* e.g., [region, ship_mode] from a stacked bar chart
|
|
122
|
+
*/
|
|
123
|
+
filterFields: Field[];
|
|
124
|
+
/**
|
|
125
|
+
* Should this card visually highlight when clicked?
|
|
126
|
+
*/
|
|
127
|
+
highlightSelf?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Cards this filter applies to (inclusive).
|
|
130
|
+
* If omitted and `excludeCardIds` is also omitted → applies to all cards except self.
|
|
131
|
+
*/
|
|
132
|
+
applyToCardIds?: string[];
|
|
133
|
+
/**
|
|
134
|
+
* Cards to explicitly exclude from receiving this filter.
|
|
135
|
+
* Takes effect only if `applyToCardIds` is undefined (acts as override).
|
|
136
|
+
*/
|
|
137
|
+
excludeCardIds?: string[];
|
|
138
|
+
/**
|
|
139
|
+
* Optional UI label or tooltip.
|
|
140
|
+
*/
|
|
141
|
+
label?: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
84
144
|
export declare type ColorRange = {
|
|
85
145
|
start: number;
|
|
86
146
|
end: number;
|
|
@@ -204,7 +264,7 @@ declare interface DataSource {
|
|
|
204
264
|
selectedEntities: SelectedEntities;
|
|
205
265
|
}
|
|
206
266
|
|
|
207
|
-
declare const DATE_FORMAT_VALUES: readonly ["YYYY-MM-DD", "MM/DD/YYYY", "DD/MM/YYYY", "MMMM DD, YYYY", "MMM DD, YYYY", "DD MMM YYYY", "YYYY-MM", "MMMM YYYY", "custom"];
|
|
267
|
+
declare const DATE_FORMAT_VALUES: readonly ["MM-DD-YYYY", "YYYY-MM-DD", "MM/DD/YYYY", "DD/MM/YYYY", "MMMM DD, YYYY", "MMM DD, YYYY", "DD MMM YYYY", "YYYY-MM", "MMMM YYYY", "custom"];
|
|
208
268
|
|
|
209
269
|
declare type DateFormatValue = (typeof DATE_FORMAT_VALUES)[number];
|
|
210
270
|
|
|
@@ -218,6 +278,50 @@ declare type Dialect = 'mysql' | 'postgresql' | 'bigquery' | 'redshift' | 'snowf
|
|
|
218
278
|
|
|
219
279
|
export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
|
|
220
280
|
|
|
281
|
+
declare interface DrillHierarchy {
|
|
282
|
+
id: string;
|
|
283
|
+
label?: string;
|
|
284
|
+
type: 'static';
|
|
285
|
+
steps: DrillHierarchyStep[];
|
|
286
|
+
default?: boolean;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
declare interface DrillHierarchyStep {
|
|
290
|
+
field: Field;
|
|
291
|
+
mode: 'drillDown';
|
|
292
|
+
preferredChartType?: TChartType;
|
|
293
|
+
breadcrumbLabelTemplate?: string;
|
|
294
|
+
retainFilters?: boolean;
|
|
295
|
+
label?: string;
|
|
296
|
+
linkedInsightId?: string;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
declare type DrillInteraction = DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction;
|
|
300
|
+
|
|
301
|
+
declare interface DrillThroughInteraction {
|
|
302
|
+
mode: 'drillThrough';
|
|
303
|
+
filterFields: Field[];
|
|
304
|
+
targetSheetId: string;
|
|
305
|
+
label?: string;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
declare interface DrillToDetailInteraction {
|
|
309
|
+
mode: 'drillToDetail';
|
|
310
|
+
filterFields: Field[];
|
|
311
|
+
detailFields?: Field[];
|
|
312
|
+
sortBy?: SortByField[];
|
|
313
|
+
limit?: number;
|
|
314
|
+
detailTitle?: string;
|
|
315
|
+
label?: string;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
declare interface DrillToURLInteraction {
|
|
319
|
+
mode: 'drillToURL';
|
|
320
|
+
filterFields: Field[];
|
|
321
|
+
urlTemplate: string;
|
|
322
|
+
label?: string;
|
|
323
|
+
}
|
|
324
|
+
|
|
221
325
|
export declare type DroppableId = 'droppable-group-by' | 'droppable-metric';
|
|
222
326
|
|
|
223
327
|
export declare type EmailSettings = {
|
|
@@ -380,12 +484,21 @@ declare interface GroupByField extends Field {
|
|
|
380
484
|
* If present, used in SELECT and GROUP BY instead of just the column name.
|
|
381
485
|
*/
|
|
382
486
|
expression?: string;
|
|
487
|
+
timeDrillPath?: TimeDrillStep[];
|
|
383
488
|
}
|
|
384
489
|
|
|
385
490
|
export declare type HtmlOptions = {
|
|
386
491
|
html: string;
|
|
387
492
|
};
|
|
388
493
|
|
|
494
|
+
declare interface InlineDrillInteraction {
|
|
495
|
+
mode: 'inlineDrill';
|
|
496
|
+
filterFields: Field[];
|
|
497
|
+
fetchMode?: 'lazy' | 'preloaded';
|
|
498
|
+
inlineLimit?: number;
|
|
499
|
+
label?: string;
|
|
500
|
+
}
|
|
501
|
+
|
|
389
502
|
declare interface Join {
|
|
390
503
|
id: string;
|
|
391
504
|
source: DatabaseEntityReference;
|
|
@@ -485,7 +598,7 @@ declare type OldFilterValue = string | number | null | (string | number)[] | Ran
|
|
|
485
598
|
|
|
486
599
|
declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
|
|
487
600
|
|
|
488
|
-
declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in';
|
|
601
|
+
declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between';
|
|
489
602
|
|
|
490
603
|
declare type OptionsMap = {
|
|
491
604
|
number: NumberOptions;
|
|
@@ -620,6 +733,7 @@ export declare type TBaseQuery = {
|
|
|
620
733
|
};
|
|
621
734
|
|
|
622
735
|
export declare type TCard = {
|
|
736
|
+
mode?: 'explorer' | 'dev';
|
|
623
737
|
id: string;
|
|
624
738
|
title: string;
|
|
625
739
|
tabTitle?: string;
|
|
@@ -633,6 +747,7 @@ export declare type TCard = {
|
|
|
633
747
|
python?: string;
|
|
634
748
|
dataSource?: DataSource;
|
|
635
749
|
config?: CardConfig;
|
|
750
|
+
interactionConfig?: CardInteractionConfig;
|
|
636
751
|
queryConfig?: QueryConfig;
|
|
637
752
|
customCfg?: any;
|
|
638
753
|
preferences?: TCardPreferences;
|
|
@@ -830,6 +945,13 @@ export declare type TFrame = {
|
|
|
830
945
|
|
|
831
946
|
export declare type Theme = 'dark' | 'light' | 'system';
|
|
832
947
|
|
|
948
|
+
declare interface TimeDrillStep {
|
|
949
|
+
granularity: TimeGranularity;
|
|
950
|
+
next?: TimeGranularity;
|
|
951
|
+
comparison?: 'previous_year' | 'previous_period';
|
|
952
|
+
rollingWindow?: number;
|
|
953
|
+
}
|
|
954
|
+
|
|
833
955
|
declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
834
956
|
|
|
835
957
|
export declare type TLegendOptions = {
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"email": "support@semaphor.cloud"
|
|
6
6
|
},
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"version": "0.0.
|
|
8
|
+
"version": "0.0.518",
|
|
9
9
|
"description": "Fully interactive and customizable dashboards for your apps.",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"react",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"@radix-ui/react-alert-dialog": "^1.1.4",
|
|
58
58
|
"@radix-ui/react-checkbox": "^1.1.3",
|
|
59
59
|
"@radix-ui/react-collapsible": "^1.1.2",
|
|
60
|
+
"@radix-ui/react-context-menu": "^2.2.15",
|
|
60
61
|
"@radix-ui/react-dialog": "^1.1.14",
|
|
61
62
|
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
62
63
|
"@radix-ui/react-hover-card": "^1.1.4",
|