semaphor 0.0.103 → 0.0.105
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-BuUA2b05.js +370 -0
- package/dist/chunks/dashboard-plus-BxRMgI4Z.js +13220 -0
- package/dist/chunks/index-3MZdC5cQ.js +638 -0
- package/dist/chunks/{index-Das4K9pB.js → index-DmA6sOL5.js} +65397 -58972
- 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 +127 -2
- package/dist/types/main.d.ts +171 -3
- package/dist/types/surfboard.d.ts +127 -2
- package/dist/types/types.d.ts +127 -2
- package/package.json +3 -1
- package/dist/chunks/dashboard-plus-CA0-C70T.js +0 -410
- package/dist/chunks/dashboard-plus-ZydhJTUT.js +0 -13272
- package/dist/chunks/index-W3FSZVh4.js +0 -534
package/dist/types/types.d.ts
CHANGED
|
@@ -61,8 +61,43 @@ 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?: 'none' | '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
|
|
|
99
|
+
declare type CardMode = 'explorer' | 'dev';
|
|
100
|
+
|
|
66
101
|
declare type CardWithContent = BaseCustomCard & {
|
|
67
102
|
content: React.FC<{
|
|
68
103
|
card: TCard;
|
|
@@ -81,6 +116,33 @@ declare type CardWithFooter = BaseCustomCard & {
|
|
|
81
116
|
}>;
|
|
82
117
|
};
|
|
83
118
|
|
|
119
|
+
declare interface ClickFilterInteraction {
|
|
120
|
+
mode: 'clickFilter';
|
|
121
|
+
/**
|
|
122
|
+
* Fields from the chart element that should be used as filters.
|
|
123
|
+
* e.g., [region, ship_mode] from a stacked bar chart
|
|
124
|
+
*/
|
|
125
|
+
filterFields: Field[];
|
|
126
|
+
/**
|
|
127
|
+
* Should this card visually highlight when clicked?
|
|
128
|
+
*/
|
|
129
|
+
highlightSelf?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Cards this filter applies to (inclusive).
|
|
132
|
+
* If omitted and `excludeCardIds` is also omitted → applies to all cards except self.
|
|
133
|
+
*/
|
|
134
|
+
applyToCardIds?: string[];
|
|
135
|
+
/**
|
|
136
|
+
* Cards to explicitly exclude from receiving this filter.
|
|
137
|
+
* Takes effect only if `applyToCardIds` is undefined (acts as override).
|
|
138
|
+
*/
|
|
139
|
+
excludeCardIds?: string[];
|
|
140
|
+
/**
|
|
141
|
+
* Optional UI label or tooltip.
|
|
142
|
+
*/
|
|
143
|
+
label?: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
84
146
|
export declare type ColorRange = {
|
|
85
147
|
start: number;
|
|
86
148
|
end: number;
|
|
@@ -204,7 +266,7 @@ declare interface DataSource {
|
|
|
204
266
|
selectedEntities: SelectedEntities;
|
|
205
267
|
}
|
|
206
268
|
|
|
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"];
|
|
269
|
+
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
270
|
|
|
209
271
|
declare type DateFormatValue = (typeof DATE_FORMAT_VALUES)[number];
|
|
210
272
|
|
|
@@ -218,6 +280,50 @@ declare type Dialect = 'mysql' | 'postgresql' | 'bigquery' | 'redshift' | 'snowf
|
|
|
218
280
|
|
|
219
281
|
export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
|
|
220
282
|
|
|
283
|
+
declare interface DrillHierarchy {
|
|
284
|
+
id: string;
|
|
285
|
+
label?: string;
|
|
286
|
+
type: 'static';
|
|
287
|
+
steps: DrillHierarchyStep[];
|
|
288
|
+
default?: boolean;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
declare interface DrillHierarchyStep {
|
|
292
|
+
field: Field;
|
|
293
|
+
mode: 'drillDown';
|
|
294
|
+
preferredChartType?: TChartType;
|
|
295
|
+
breadcrumbLabelTemplate?: string;
|
|
296
|
+
retainFilters?: boolean;
|
|
297
|
+
label?: string;
|
|
298
|
+
linkedInsightId?: string;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
declare type DrillInteraction = DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction;
|
|
302
|
+
|
|
303
|
+
declare interface DrillThroughInteraction {
|
|
304
|
+
mode: 'drillThrough';
|
|
305
|
+
filterFields: Field[];
|
|
306
|
+
targetSheetId: string;
|
|
307
|
+
label?: string;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
declare interface DrillToDetailInteraction {
|
|
311
|
+
mode: 'drillToDetail';
|
|
312
|
+
filterFields: Field[];
|
|
313
|
+
detailFields?: Field[];
|
|
314
|
+
sortBy?: SortByField[];
|
|
315
|
+
limit?: number;
|
|
316
|
+
detailTitle?: string;
|
|
317
|
+
label?: string;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
declare interface DrillToURLInteraction {
|
|
321
|
+
mode: 'drillToURL';
|
|
322
|
+
filterFields: Field[];
|
|
323
|
+
urlTemplate: string;
|
|
324
|
+
label?: string;
|
|
325
|
+
}
|
|
326
|
+
|
|
221
327
|
export declare type DroppableId = 'droppable-group-by' | 'droppable-metric';
|
|
222
328
|
|
|
223
329
|
export declare type EmailSettings = {
|
|
@@ -380,12 +486,21 @@ declare interface GroupByField extends Field {
|
|
|
380
486
|
* If present, used in SELECT and GROUP BY instead of just the column name.
|
|
381
487
|
*/
|
|
382
488
|
expression?: string;
|
|
489
|
+
timeDrillPath?: TimeDrillStep[];
|
|
383
490
|
}
|
|
384
491
|
|
|
385
492
|
export declare type HtmlOptions = {
|
|
386
493
|
html: string;
|
|
387
494
|
};
|
|
388
495
|
|
|
496
|
+
declare interface InlineDrillInteraction {
|
|
497
|
+
mode: 'inlineDrill';
|
|
498
|
+
filterFields: Field[];
|
|
499
|
+
fetchMode?: 'lazy' | 'preloaded';
|
|
500
|
+
inlineLimit?: number;
|
|
501
|
+
label?: string;
|
|
502
|
+
}
|
|
503
|
+
|
|
389
504
|
declare interface Join {
|
|
390
505
|
id: string;
|
|
391
506
|
source: DatabaseEntityReference;
|
|
@@ -485,7 +600,7 @@ declare type OldFilterValue = string | number | null | (string | number)[] | Ran
|
|
|
485
600
|
|
|
486
601
|
declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
|
|
487
602
|
|
|
488
|
-
declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in';
|
|
603
|
+
declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between';
|
|
489
604
|
|
|
490
605
|
declare type OptionsMap = {
|
|
491
606
|
number: NumberOptions;
|
|
@@ -620,6 +735,7 @@ export declare type TBaseQuery = {
|
|
|
620
735
|
};
|
|
621
736
|
|
|
622
737
|
export declare type TCard = {
|
|
738
|
+
mode?: CardMode;
|
|
623
739
|
id: string;
|
|
624
740
|
title: string;
|
|
625
741
|
tabTitle?: string;
|
|
@@ -633,6 +749,7 @@ export declare type TCard = {
|
|
|
633
749
|
python?: string;
|
|
634
750
|
dataSource?: DataSource;
|
|
635
751
|
config?: CardConfig;
|
|
752
|
+
interactionConfig?: CardInteractionConfig;
|
|
636
753
|
queryConfig?: QueryConfig;
|
|
637
754
|
customCfg?: any;
|
|
638
755
|
preferences?: TCardPreferences;
|
|
@@ -687,6 +804,7 @@ export declare type TCardPreferences = {
|
|
|
687
804
|
};
|
|
688
805
|
kpiVisualOptions?: {
|
|
689
806
|
lowerIsBetter?: boolean;
|
|
807
|
+
countryLogoId?: string;
|
|
690
808
|
};
|
|
691
809
|
};
|
|
692
810
|
|
|
@@ -830,6 +948,13 @@ export declare type TFrame = {
|
|
|
830
948
|
|
|
831
949
|
export declare type Theme = 'dark' | 'light' | 'system';
|
|
832
950
|
|
|
951
|
+
declare interface TimeDrillStep {
|
|
952
|
+
granularity: TimeGranularity;
|
|
953
|
+
next?: TimeGranularity;
|
|
954
|
+
comparison?: 'previous_year' | 'previous_period';
|
|
955
|
+
rollingWindow?: number;
|
|
956
|
+
}
|
|
957
|
+
|
|
833
958
|
declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
834
959
|
|
|
835
960
|
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.105",
|
|
9
9
|
"description": "Fully interactive and customizable dashboards for your apps.",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"react",
|
|
@@ -57,12 +57,14 @@
|
|
|
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",
|
|
63
64
|
"@radix-ui/react-icons": "^1.3.2",
|
|
64
65
|
"@radix-ui/react-label": "^2.1.1",
|
|
65
66
|
"@radix-ui/react-popover": "^1.1.4",
|
|
67
|
+
"@radix-ui/react-progress": "^1.1.7",
|
|
66
68
|
"@radix-ui/react-radio-group": "^1.2.2",
|
|
67
69
|
"@radix-ui/react-scroll-area": "^1.2.2",
|
|
68
70
|
"@radix-ui/react-select": "^2.1.4",
|