@luzmo/embed 6.1.2 → 6.1.4
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/CHANGELOG.md +19 -0
- package/index.cjs +4422 -871
- package/index.d.ts +1 -1
- package/index.js +4422 -871
- package/lib/viz-item/viz-item.base.d.ts +3 -4
- package/libs/dashboard-contents-types/json-schemas.d.ts +3812 -756
- package/libs/dashboard-contents-types/src/index.d.ts +1 -0
- package/libs/dashboard-contents-types/src/lib/area-chart/area-chart-options.d.ts +7 -4
- package/libs/dashboard-contents-types/src/lib/date-filter/date-filter-options.d.ts +1 -2
- package/libs/dashboard-contents-types/src/lib/dropdown-filter/dropdown-filter-options.d.ts +1 -2
- package/libs/dashboard-contents-types/src/lib/scatter-plot/scatter-plot-options.d.ts +1 -1
- package/libs/dashboard-contents-types/src/lib/search-filter/index.d.ts +3 -0
- package/libs/dashboard-contents-types/src/lib/search-filter/search-filter-options.d.ts +56 -0
- package/libs/dashboard-contents-types/src/lib/search-filter/search-filter-slots.d.ts +17 -0
- package/libs/dashboard-contents-types/src/lib/search-filter/search-filter.d.ts +23 -0
- package/libs/dashboard-contents-types/src/lib/shared/common.d.ts +1 -1
- package/libs/dashboard-contents-types/src/lib/shared/index.d.ts +1 -0
- package/libs/dashboard-contents-types/src/lib/shared/item-filter-group.d.ts +54 -2
- package/libs/dashboard-contents-types/src/lib/shared/object-view-options.d.ts +2 -1
- package/libs/dashboard-contents-types/src/lib/shared/slots.d.ts +60 -3
- package/libs/dashboard-contents-types/src/lib/shared/viz-item.d.ts +60 -0
- package/libs/dashboard-contents-types/src/lib/slicer-filter/slicer-filter-options.d.ts +1 -1
- package/libs/dashboard-contents-types/src/lib/slider-filter/slider-filter-options.d.ts +1 -1
- package/libs/dashboard-contents-types/src/options.d.ts +1 -1
- package/libs/embed-libs/embed/src/index.d.ts +1 -1
- package/libs/embed-libs/embed/src/lib/viz-item/viz-item.base.d.ts +3 -4
- package/libs/embed-libs/shared-embed/src/lib/models/viz-item-post-message.model.d.ts +1 -2
- package/libs/embed-libs/shared-embed/src/lib/models/viz-item.model.d.ts +0 -18
- package/luzmo-embed.min.js +4443 -7633
- package/package.json +3 -5
|
@@ -22,6 +22,7 @@ export * from './lib/scatter-plot';
|
|
|
22
22
|
export * from './lib/conditional-number';
|
|
23
23
|
export * from './lib/sankey-diagram';
|
|
24
24
|
export * from './lib/funnel-chart';
|
|
25
|
+
export * from './lib/search-filter';
|
|
25
26
|
export * from './lib/shared';
|
|
26
27
|
export * from './options';
|
|
27
28
|
export * from './slots';
|
|
@@ -62,7 +62,8 @@ export interface AreaChartViewOptions extends Omit<AxisObjectViewOptions, 'inter
|
|
|
62
62
|
position: YAxisLabelPosition;
|
|
63
63
|
};
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* !!! Y2 axis partially implemented in the Area Chart, so hide it for now in the docs
|
|
66
|
+
* @TJS-ignore
|
|
66
67
|
*/
|
|
67
68
|
y2?: {
|
|
68
69
|
/**
|
|
@@ -101,7 +102,7 @@ export interface AreaChartViewOptions extends Omit<AxisObjectViewOptions, 'inter
|
|
|
101
102
|
ticksStyle?: AxisTicksStyle;
|
|
102
103
|
};
|
|
103
104
|
/**
|
|
104
|
-
*
|
|
105
|
+
* Y-axis options
|
|
105
106
|
*/
|
|
106
107
|
y?: {
|
|
107
108
|
/**
|
|
@@ -140,7 +141,8 @@ export interface AreaChartViewOptions extends Omit<AxisObjectViewOptions, 'inter
|
|
|
140
141
|
type?: AreaChartMeasureAxisType;
|
|
141
142
|
};
|
|
142
143
|
/**
|
|
143
|
-
* Y2
|
|
144
|
+
* !!! Y2 axis partially implemented in the Area Chart, so hide it for now in the docs
|
|
145
|
+
* @TJS-ignore
|
|
144
146
|
*/
|
|
145
147
|
y2?: {
|
|
146
148
|
/**
|
|
@@ -232,7 +234,8 @@ export interface AreaChartViewOptions extends Omit<AxisObjectViewOptions, 'inter
|
|
|
232
234
|
opacity?: number;
|
|
233
235
|
};
|
|
234
236
|
/**
|
|
235
|
-
*
|
|
237
|
+
* !!! Y2 axis partially implemented in the Area Chart, so hide it for now in the docs
|
|
238
|
+
* @TJS-ignore
|
|
236
239
|
*/
|
|
237
240
|
y2?: {
|
|
238
241
|
/**
|
|
@@ -97,8 +97,7 @@ export interface DateFilterViewOptions extends DropObjectViewOptions, InfoToolti
|
|
|
97
97
|
measureDimensionPicker?: NonNullable<NonNullable<InteractivityMeasureDimensionPickerViewOptions['interactivity']>['measureDimensionPicker']>;
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
|
-
|
|
101
|
-
}
|
|
100
|
+
type DateFilterInteractivityViewOptions = InteractivityMeasureDimensionPickerViewOptions;
|
|
102
101
|
export interface DateFilterRange {
|
|
103
102
|
/**
|
|
104
103
|
* Predefined list of keys to select from
|
|
@@ -79,6 +79,5 @@ interface DropdownFilterDisplayViewOptions extends DisplayTitleViewOptions {
|
|
|
79
79
|
clear?: boolean;
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
}
|
|
82
|
+
type DropdownFilterInteractivityViewOptions = InteractivityMeasureDimensionPickerViewOptions;
|
|
84
83
|
export {};
|
|
@@ -167,7 +167,7 @@ interface ScatterPlotDisplayViewOptions extends DisplayLegendViewOptions, Displa
|
|
|
167
167
|
legend?: NonNullable<NonNullable<DisplayLegendViewOptions['display']>['legend']>;
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
interface ScatterPlotInteractivityViewOptions extends InteractivityBrushViewOptions, InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityExportViewOptions, InteractivityGoToUrlViewOptions {
|
|
170
|
+
interface ScatterPlotInteractivityViewOptions extends InteractivityBrushViewOptions, InteractivityCustomEventsViewOptions, InteractivityCustomTooltipViewOptions, InteractivityExportViewOptions, InteractivityGoToUrlViewOptions, InteractivityMeasureDimensionPickerViewOptions {
|
|
171
171
|
/**
|
|
172
172
|
* Interactivity options
|
|
173
173
|
*/
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { InteractivityMeasureDimensionPickerViewOptions } from '../shared';
|
|
2
|
+
import { DropObjectViewOptions } from '../shared/drop-object-view-options';
|
|
3
|
+
import { InfoTooltipViewOptions } from '../shared/info-tooltip-options';
|
|
4
|
+
import { PlaceholderViewOptions } from '../shared/placeholder';
|
|
5
|
+
import { DisplayTitleViewOptions, TitleViewOptions } from '../shared/title';
|
|
6
|
+
export interface SearchFilterViewOptions extends Omit<DropObjectViewOptions, 'display' | 'interactivity'>, InfoTooltipViewOptions, TitleViewOptions, PlaceholderViewOptions, SearchFilterDisplayViewOptions, SearchFilterInteractivityViewOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Whether to auto apply filters or add the apply button
|
|
9
|
+
*/
|
|
10
|
+
applyFiltersWithButton?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Update left or right padding of the Search filter
|
|
13
|
+
*/
|
|
14
|
+
padding?: {
|
|
15
|
+
/**
|
|
16
|
+
* Update left padding of the Search filter
|
|
17
|
+
*/
|
|
18
|
+
left?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Update right padding of the Search filter
|
|
21
|
+
*/
|
|
22
|
+
right?: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
interface SearchFilterDisplayViewOptions extends DisplayTitleViewOptions {
|
|
26
|
+
/**
|
|
27
|
+
* General display options of the Search filter: title, label, placeholder, search and clear
|
|
28
|
+
*/
|
|
29
|
+
display: {
|
|
30
|
+
/**
|
|
31
|
+
* Show or hide the title
|
|
32
|
+
*/
|
|
33
|
+
title: NonNullable<NonNullable<DisplayTitleViewOptions['display']>['title']>;
|
|
34
|
+
/**
|
|
35
|
+
* Show or hide the label of the Search filter
|
|
36
|
+
*/
|
|
37
|
+
label?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Show or hide the placeholder
|
|
40
|
+
*/
|
|
41
|
+
placeholder?: boolean;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
interface SearchFilterInteractivityViewOptions extends InteractivityMeasureDimensionPickerViewOptions {
|
|
45
|
+
/**
|
|
46
|
+
* Interactivity options
|
|
47
|
+
*/
|
|
48
|
+
interactivity?: {
|
|
49
|
+
/**
|
|
50
|
+
* An array of measure dimension picker configurations
|
|
51
|
+
* @default [[]]
|
|
52
|
+
*/
|
|
53
|
+
measureDimensionPicker?: NonNullable<NonNullable<InteractivityMeasureDimensionPickerViewOptions['interactivity']>['measureDimensionPicker']>;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DashboardContentVizItemSlot, DateTimeSlotContent, HierarchySlotContent, NumericSlotContent } from '../shared/slots';
|
|
2
|
+
/**
|
|
3
|
+
* Dimension slot definition of the search filter. Dimension slot is a required slot and it can have multiple columns.
|
|
4
|
+
*/
|
|
5
|
+
interface DimensionSlot extends DashboardContentVizItemSlot {
|
|
6
|
+
name: 'dimension';
|
|
7
|
+
/**
|
|
8
|
+
* Dimension slot definition
|
|
9
|
+
*/
|
|
10
|
+
content: (HierarchySlotContent | NumericSlotContent | DateTimeSlotContent)[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Data definition of the Search filter
|
|
14
|
+
* @maxItems 1
|
|
15
|
+
*/
|
|
16
|
+
export type SearchFilterSlots = DimensionSlot[];
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { VizItemType } from '../shared/common';
|
|
2
|
+
import { SearchFilterViewOptions } from './search-filter-options';
|
|
3
|
+
import { SearchFilterSlots } from './search-filter-slots';
|
|
4
|
+
/**
|
|
5
|
+
* Search filter item
|
|
6
|
+
*/
|
|
7
|
+
export interface SearchFilter {
|
|
8
|
+
/**
|
|
9
|
+
* Type of the item
|
|
10
|
+
*/
|
|
11
|
+
type: Extract<VizItemType, 'search-filter'>;
|
|
12
|
+
/**
|
|
13
|
+
* Options of the search filter item
|
|
14
|
+
* @$ref ./search-filter-options.schema.json/
|
|
15
|
+
*/
|
|
16
|
+
options: SearchFilterViewOptions;
|
|
17
|
+
/**
|
|
18
|
+
* Data definition of the search filter
|
|
19
|
+
* @maxItems 1
|
|
20
|
+
* @$ref ./search-filter-slots.schema.json
|
|
21
|
+
*/
|
|
22
|
+
slots: SearchFilterSlots;
|
|
23
|
+
}
|
|
@@ -97,7 +97,7 @@ export interface RankingViewOptions {
|
|
|
97
97
|
ranking?: ItemQueryRanking;
|
|
98
98
|
}
|
|
99
99
|
export type SortDirection = OrderDirection | '';
|
|
100
|
-
export type VizItemType = 'area-chart' | 'bar-chart' | 'bubble-chart' | 'box-plot' | 'bullet-chart' | 'choropleth-map' | 'circular-gauge' | 'circle-pack-chart' | 'column-chart' | 'combination-chart' | 'date-filter' | 'donut-chart' | 'dropdown-filter' | 'dynamic-imageobject' | 'evolution-number' | 'funnel-chart' | 'heat-map' | 'heat-table' | 'hexbin-map' | 'iframeobject' | 'image' | 'line-chart' | 'line-chart-forecast' | 'marker-map' | 'conditional-number' | 'ohlc-chart' | 'parallel-coordinates-plot' | 'pivot-table' | 'pyramid-chart' | 'radar-chart' | 'regular-table' | 'route-map' | 'sankey-diagram' | 'scatter-plot' | 'slicer-filter' | 'slider-filter' | 'spacer' | 'speedometer-chart' | 'spike-map' | 'strip-plot' | 'sunburst-chart' | 'symbol-map' | 'text' | 'treemap-chart' | 'venn-diagram' | 'video' | 'wordcloud-chart';
|
|
100
|
+
export type VizItemType = 'area-chart' | 'bar-chart' | 'bubble-chart' | 'box-plot' | 'bullet-chart' | 'choropleth-map' | 'circular-gauge' | 'circle-pack-chart' | 'column-chart' | 'combination-chart' | 'date-filter' | 'donut-chart' | 'dropdown-filter' | 'dynamic-imageobject' | 'evolution-number' | 'funnel-chart' | 'heat-map' | 'heat-table' | 'hexbin-map' | 'iframeobject' | 'image' | 'line-chart' | 'line-chart-forecast' | 'marker-map' | 'conditional-number' | 'ohlc-chart' | 'parallel-coordinates-plot' | 'pivot-table' | 'pyramid-chart' | 'radar-chart' | 'regular-table' | 'route-map' | 'sankey-diagram' | 'scatter-plot' | 'search-filter' | 'slicer-filter' | 'slider-filter' | 'spacer' | 'speedometer-chart' | 'spike-map' | 'strip-plot' | 'sunburst-chart' | 'symbol-map' | 'text' | 'treemap-chart' | 'venn-diagram' | 'video' | 'wordcloud-chart';
|
|
101
101
|
export type ItemType = VizItemType;
|
|
102
102
|
export type DatetimeDisplayMode = 'default' | 'weekday_number' | 'weekday_name' | 'day_in_month' | 'day_in_year' | 'month_name' | 'month_number' | 'week_number' | 'second_in_minute' | 'minute_in_hour' | 'hour_in_day' | 'quarter_number';
|
|
103
103
|
export type ScreenMode = 'desktop' | 'tablet' | 'mobile' | 'largeScreen' | 'fixed';
|
|
@@ -1,16 +1,37 @@
|
|
|
1
1
|
export interface ItemQueryDimension {
|
|
2
2
|
/**
|
|
3
3
|
* @format uuid
|
|
4
|
+
* @TJS-ignore
|
|
5
|
+
* @deprecated user columnId instead.
|
|
4
6
|
*/
|
|
5
7
|
column_id?: string;
|
|
6
8
|
/**
|
|
7
9
|
* @format uuid
|
|
10
|
+
* @TJS-ignore
|
|
11
|
+
* @deprecated use formulaId instead.
|
|
8
12
|
*/
|
|
9
13
|
formula_id?: string;
|
|
10
14
|
/**
|
|
11
15
|
* @format uuid
|
|
16
|
+
* @TJS-ignore
|
|
17
|
+
* @deprecated use datasetId instead.
|
|
12
18
|
*/
|
|
13
19
|
dataset_id?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Column id
|
|
22
|
+
* @format uuid
|
|
23
|
+
*/
|
|
24
|
+
columnId?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Formula id
|
|
27
|
+
* @format uuid
|
|
28
|
+
*/
|
|
29
|
+
formulaId?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Dataset id
|
|
32
|
+
* @format uuid
|
|
33
|
+
*/
|
|
34
|
+
datasetId?: string;
|
|
14
35
|
level?: number;
|
|
15
36
|
expression?: string;
|
|
16
37
|
include_nonoccurring?: boolean;
|
|
@@ -22,7 +43,7 @@ export interface ItemQueryDiscretization {
|
|
|
22
43
|
over?: ItemQueryDimension[];
|
|
23
44
|
}
|
|
24
45
|
export type ItemFilterOrigin = 'filterFromVizItem' | 'filterFromFilterItem' | 'itemFilter' | 'global';
|
|
25
|
-
export type ItemQueryFilterExpression = '? = ?' | '? != ?' | '? in ?' | '? not in ?' | '? like ?' | '? not like ?' | '? starts with ?' | '? not starts with ?' | '? ends with ?' | '? not ends with ?' | '? < ?' | '? <= ?' | '? > ?' | '? >= ?' | '? between ?' | 'last_now' | 'to_date' | 'last_available' | 'last_completed' | 'next_now' | 'next_full' | 'WTD' | 'MTD' | 'QTD' | 'YTD' | '? is null' | '? is not null';
|
|
46
|
+
export type ItemQueryFilterExpression = '? = ?' | '? != ?' | '? in ?' | '? not in ?' | '? like ?' | '? not like ?' | '? starts with ?' | '? not starts with ?' | '? ends with ?' | '? not ends with ?' | '? < ?' | '? <= ?' | '? > ?' | '? >= ?' | '? between ?' | 'last_now' | 'to_date' | 'last_available' | 'last_completed' | 'next_now' | 'next_full' | 'ago' | 'WTD' | 'MTD' | 'QTD' | 'YTD' | '? is null' | '? is not null';
|
|
26
47
|
export interface ItemFilterProperties {
|
|
27
48
|
/**
|
|
28
49
|
* @format uuid
|
|
@@ -30,7 +51,17 @@ export interface ItemFilterProperties {
|
|
|
30
51
|
id?: string;
|
|
31
52
|
origin?: ItemFilterOrigin;
|
|
32
53
|
type?: 'where' | 'having';
|
|
54
|
+
/**
|
|
55
|
+
* @format uuid
|
|
56
|
+
* @TJS-ignore
|
|
57
|
+
* @deprecated use itemId instead.
|
|
58
|
+
*/
|
|
33
59
|
viz?: string;
|
|
60
|
+
/**
|
|
61
|
+
* itemId of the chart.
|
|
62
|
+
* @format uuid
|
|
63
|
+
*/
|
|
64
|
+
itemId?: string;
|
|
34
65
|
ignore?: string[];
|
|
35
66
|
objects?: string[];
|
|
36
67
|
}
|
|
@@ -46,12 +77,26 @@ export interface ItemFilter {
|
|
|
46
77
|
{
|
|
47
78
|
/**
|
|
48
79
|
* @format uuid
|
|
80
|
+
* @TJS-ignore
|
|
81
|
+
* @deprecated use datasetId instead.
|
|
49
82
|
*/
|
|
50
|
-
dataset_id
|
|
83
|
+
dataset_id?: string;
|
|
51
84
|
/**
|
|
52
85
|
* @format uuid
|
|
86
|
+
* @TJS-ignore
|
|
87
|
+
* @deprecated use columnId instead.
|
|
53
88
|
*/
|
|
54
89
|
column_id?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Dataset id
|
|
92
|
+
* @format uuid
|
|
93
|
+
*/
|
|
94
|
+
datasetId?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Column id
|
|
97
|
+
* @format uuid
|
|
98
|
+
*/
|
|
99
|
+
columnId?: string;
|
|
55
100
|
level?: number;
|
|
56
101
|
lowestLevel?: number;
|
|
57
102
|
discretization?: ItemQueryDiscretization;
|
|
@@ -102,8 +147,15 @@ export interface ItemFilterGroup {
|
|
|
102
147
|
*
|
|
103
148
|
* @format uuid
|
|
104
149
|
* @TJS-ignore
|
|
150
|
+
* @deprecated use itemId instead.
|
|
105
151
|
*/
|
|
106
152
|
vizId?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Stores vizItem (chart) id if origin is not 'global'.
|
|
155
|
+
*
|
|
156
|
+
* @format uuid
|
|
157
|
+
*/
|
|
158
|
+
itemId?: string;
|
|
107
159
|
/**
|
|
108
160
|
* Specifies if it's a drilldown filter group.
|
|
109
161
|
* @TJS-ignore
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FilterableByViewOptions, FilterViewOptions } from './filters';
|
|
2
2
|
import { ThemeViewOptions } from './theme';
|
|
3
3
|
import { DisplayTitleViewOptions, TitleViewOptions } from './title';
|
|
4
|
-
|
|
4
|
+
import { VizItemCustomOptions } from './viz-item';
|
|
5
|
+
export interface ObjectViewOptions extends FilterViewOptions, ThemeViewOptions, TitleViewOptions, DisplayTitleViewOptions, FilterableByViewOptions, VizItemCustomOptions {
|
|
5
6
|
}
|
|
@@ -88,18 +88,31 @@ export interface GenericSlotContent {
|
|
|
88
88
|
/**
|
|
89
89
|
* Dataset id
|
|
90
90
|
* @format uuid
|
|
91
|
+
* @TJS-ignore
|
|
92
|
+
* @deprecated use datasetId instead.
|
|
91
93
|
*/
|
|
92
94
|
set?: string;
|
|
93
95
|
/**
|
|
94
96
|
* Column id
|
|
95
97
|
* @format uuid
|
|
98
|
+
* @TJS-ignore
|
|
99
|
+
* @deprecated use columnId instead.
|
|
96
100
|
*/
|
|
97
101
|
column?: string;
|
|
98
102
|
/**
|
|
99
|
-
*
|
|
100
|
-
* @format uuid
|
|
103
|
+
* A dataset formula id or an ad-hoc formula. A formula is an entity similar to a column. You can add formulas on the dataset details page or use ad-hoc formulas. You can find more information about formulas in the article https://academy.luzmo.com/article/52tm82oo
|
|
101
104
|
*/
|
|
102
105
|
formula?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Dataset id
|
|
108
|
+
* @format uuid
|
|
109
|
+
*/
|
|
110
|
+
datasetId?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Column id
|
|
113
|
+
* @format uuid
|
|
114
|
+
*/
|
|
115
|
+
columnId?: string;
|
|
103
116
|
/**
|
|
104
117
|
* D3 format, it is used for "numeric" formatting (https://observablehq.com/@d3/d3-format), for "datetime" formatting (https://d3js.org/d3-time-format).
|
|
105
118
|
* It can also be used for "hierarchy" formatting but when it's used in the measure slot.
|
|
@@ -120,13 +133,27 @@ export interface GenericSlotContent {
|
|
|
120
133
|
/**
|
|
121
134
|
* Dataset id
|
|
122
135
|
* @format uuid
|
|
136
|
+
* @TJS-ignore
|
|
137
|
+
* @deprecated use datasetId instead.
|
|
123
138
|
*/
|
|
124
139
|
set: string;
|
|
125
140
|
/**
|
|
126
141
|
* Column id
|
|
127
142
|
* @format uuid
|
|
143
|
+
* @TJS-ignore
|
|
144
|
+
* @deprecated use columnId instead.
|
|
128
145
|
*/
|
|
129
146
|
column: string;
|
|
147
|
+
/**
|
|
148
|
+
* Dataset id
|
|
149
|
+
* @format uuid
|
|
150
|
+
*/
|
|
151
|
+
datasetId?: string;
|
|
152
|
+
/**
|
|
153
|
+
* Column id
|
|
154
|
+
* @format uuid
|
|
155
|
+
*/
|
|
156
|
+
columnId?: string;
|
|
130
157
|
/**
|
|
131
158
|
* Column subtype
|
|
132
159
|
*/
|
|
@@ -254,6 +281,36 @@ export interface GenericSlotContent {
|
|
|
254
281
|
* @TJS-ignore
|
|
255
282
|
*/
|
|
256
283
|
model?: any;
|
|
284
|
+
/**
|
|
285
|
+
* Settings to configure period over period comparison. It can be used only in a measure slot.
|
|
286
|
+
*/
|
|
287
|
+
periodOverPeriod?: {
|
|
288
|
+
/**
|
|
289
|
+
* Period over period comparison type:
|
|
290
|
+
* 'none' - turned off,
|
|
291
|
+
* 'past' - absolute value comparison to the past,
|
|
292
|
+
* 'change' - percentage change comparison to the past
|
|
293
|
+
*/
|
|
294
|
+
type: 'none' | 'past' | 'change';
|
|
295
|
+
/**
|
|
296
|
+
* Period of time level
|
|
297
|
+
* 0 - period, 1 - year, 2 - quarter, 3 - month, 4 - week, 5 - day... 9 - millisecond
|
|
298
|
+
*/
|
|
299
|
+
level: number;
|
|
300
|
+
/**
|
|
301
|
+
* Number of periods
|
|
302
|
+
*/
|
|
303
|
+
quantity: number;
|
|
304
|
+
/**
|
|
305
|
+
* Turn ON/OFF period to date comparison
|
|
306
|
+
*/
|
|
307
|
+
periodToDate: boolean;
|
|
308
|
+
/**
|
|
309
|
+
* Category date level to disallow smaller Period-Over-Period levels. For internal use only
|
|
310
|
+
* @TJS-ignore
|
|
311
|
+
*/
|
|
312
|
+
minLevel: number;
|
|
313
|
+
};
|
|
257
314
|
}
|
|
258
315
|
export interface NumericSlotContent extends Omit<GenericSlotContent, 'level' | 'lowestLevel' | 'include_nonoccurring' | 'datetimeDisplayMode' | 'weekStart' | 'weekDayNameFormat' | 'monthNameFormat'> {
|
|
259
316
|
/**
|
|
@@ -285,7 +342,7 @@ export interface DateTimeSlotContent extends Omit<GenericSlotContent, 'formula'
|
|
|
285
342
|
*/
|
|
286
343
|
aggregationFunc?: BasicItemQueryAggregation;
|
|
287
344
|
}
|
|
288
|
-
export interface SpatialSlotContent extends Omit<GenericSlotContent, 'formula' | 'format' | 'currency' | 'aggregationFunc' | 'aggregationWeight' | 'level' | 'lowestLevel' | 'bins' | 'duration' | 'datetimeDisplayMode' | 'grandTotals' | 'weekStart' | 'weekDayNameFormat' | 'monthNameFormat'> {
|
|
345
|
+
export interface SpatialSlotContent extends Omit<GenericSlotContent, 'formula' | 'format' | 'currency' | 'aggregationFunc' | 'aggregationWeight' | 'level' | 'lowestLevel' | 'bins' | 'duration' | 'datetimeDisplayMode' | 'grandTotals' | 'weekStart' | 'weekDayNameFormat' | 'monthNameFormat' | 'periodOverPeriod'> {
|
|
289
346
|
/**
|
|
290
347
|
* "spatial" column type
|
|
291
348
|
*/
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export interface VizItemCustomOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Locale to be used
|
|
4
|
+
* @default "en"
|
|
5
|
+
* @examples ["en", "fr"]
|
|
6
|
+
*/
|
|
7
|
+
locale?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The loader configuration
|
|
10
|
+
*/
|
|
11
|
+
loader?: ChartLoader;
|
|
12
|
+
/**
|
|
13
|
+
* The timezone that will be used in the dashboard. This timezone id needs to be a valid id that is available in the IANA timezone database
|
|
14
|
+
* @examples ["Europe/Brussels", "America/New_York"]
|
|
15
|
+
*/
|
|
16
|
+
timezoneId?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ChartLoader {
|
|
19
|
+
/**
|
|
20
|
+
* Background color of the chart loader element
|
|
21
|
+
* @default "#f9f9f9"
|
|
22
|
+
*/
|
|
23
|
+
background?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Font color of the text of the chart loaders
|
|
26
|
+
* @default "#5a5a5a"
|
|
27
|
+
*/
|
|
28
|
+
fontColor?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Locale to be used if "msg" is set
|
|
31
|
+
* @default "en"
|
|
32
|
+
* @examples ["en", "fr"]
|
|
33
|
+
*/
|
|
34
|
+
locale?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Light or dark loader
|
|
37
|
+
* @default "light"
|
|
38
|
+
*/
|
|
39
|
+
mode?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Loading message
|
|
42
|
+
* @examples ["Loading dashboard..."]
|
|
43
|
+
*/
|
|
44
|
+
msg?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Background color of the spinner
|
|
47
|
+
* @default "rgba(169, 169, 169, 0.14)"
|
|
48
|
+
*/
|
|
49
|
+
spinnerBackground?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Spinner color of the loader
|
|
52
|
+
* @default "rgba(255, 165, 0, 0.7)"
|
|
53
|
+
*/
|
|
54
|
+
spinnerColor?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Shows the branded "powered by" information
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
showBranded?: boolean;
|
|
60
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { InteractivityMeasureDimensionPickerViewOptions } from '../shared';
|
|
2
2
|
import { LimitViewOptions, RankingViewOptions } from '../shared/common';
|
|
3
3
|
import { DropObjectViewOptions } from '../shared/drop-object-view-options';
|
|
4
4
|
import { FilterViewOptions } from '../shared/filters';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { InteractivityMeasureDimensionPickerViewOptions } from '../shared';
|
|
2
2
|
import type { LimitViewOptions } from '../shared/common';
|
|
3
3
|
import type { DropObjectViewOptions } from '../shared/drop-object-view-options';
|
|
4
4
|
import type { InfoTooltipViewOptions } from '../shared/info-tooltip-options';
|
|
@@ -22,4 +22,4 @@ import { ScatterPlotViewOptions } from './lib/scatter-plot';
|
|
|
22
22
|
import { SlicerFilterViewOptions } from './lib/slicer-filter';
|
|
23
23
|
import { SliderFilterViewOptions } from './lib/slider-filter';
|
|
24
24
|
import { TextViewOptions } from './lib/text';
|
|
25
|
-
export type
|
|
25
|
+
export type VizItemOptions = AreaChartViewOptions | BarChartViewOptions | BoxPlotViewOptions | BubbleChartViewOptions | BulletChartViewOptions | ChoroplethMapViewOptions | CircularGaugeViewOptions | ColumnChartViewOptions | CombinationChartViewOptions | ConditionalNumberViewOptions | DateFilterViewOptions | DonutChartViewOptions | DropdownFilterViewOptions | EvolutionNumberViewOptions | FunnelChartViewOptions | ImageViewOptions | LineChartViewOptions | PivotTableViewOptions | RegularTableViewOptions | SankeyDiagramViewOptions | ScatterPlotViewOptions | SlicerFilterViewOptions | SliderFilterViewOptions | TextViewOptions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from '@luzmo/dashboard-contents-types';
|
|
2
|
-
export type { LoadEvent, ChangedFiltersEvent, CustomEvent, ItemsRenderedEvent, ExportedEvent, DashboardActionEvent, SelectedDataInput, ExportType, ItemData, ExportDashboard, AccessibleDashboard, SetEditMode, SetSelectedData,
|
|
2
|
+
export type { LoadEvent, ChangedFiltersEvent, CustomEvent, ItemsRenderedEvent, ExportedEvent, DashboardActionEvent, SelectedDataInput, ExportType, ItemData, ExportDashboard, AccessibleDashboard, SetEditMode, SetSelectedData, VizItemPostMessageLoadEvent, VizItemPostMessageRenderedEvent, VizItemPostMessageExportedEvent, VizItemPostMessageChangedFiltersEvent, VizItemPostMessageCustomEventEvent } from '@luzmo/shared-embed';
|
|
3
3
|
export { selectedDataUtils } from '@luzmo/shared-embed';
|
|
4
4
|
export * from './lib/dashboard-component/dashboard-component';
|
|
5
5
|
export * from './lib/viz-item/viz-item-component';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from 'lit';
|
|
2
2
|
import * as SharedLib from '@luzmo/shared-embed';
|
|
3
|
-
import type { VizItemType, VizItemSlots, FilterGroup } from '@luzmo/dashboard-contents-types';
|
|
3
|
+
import type { VizItemType, VizItemSlots, FilterGroup, VizItemOptions } from '@luzmo/dashboard-contents-types';
|
|
4
4
|
/**
|
|
5
5
|
* The version of the dashboard contents that is linked to the current library.
|
|
6
6
|
*
|
|
@@ -12,7 +12,7 @@ import type { VizItemType, VizItemSlots, FilterGroup } from '@luzmo/dashboard-co
|
|
|
12
12
|
export declare const dashboardContentsVersion = "0.1.89";
|
|
13
13
|
type FunctionCall = [(...args: any) => any, any[]];
|
|
14
14
|
interface LuzmoVizItemComponentInterface extends HTMLElement {
|
|
15
|
-
options?:
|
|
15
|
+
options?: VizItemOptions;
|
|
16
16
|
type?: VizItemType;
|
|
17
17
|
appServer?: string;
|
|
18
18
|
apiHost?: string;
|
|
@@ -36,7 +36,7 @@ export declare class LuzmoBaseVizItem extends LitElement implements LuzmoVizItem
|
|
|
36
36
|
appServer?: string;
|
|
37
37
|
apiHost?: string;
|
|
38
38
|
slots?: VizItemSlots;
|
|
39
|
-
options?:
|
|
39
|
+
options?: VizItemOptions;
|
|
40
40
|
type?: VizItemType;
|
|
41
41
|
authKey?: string;
|
|
42
42
|
authToken?: string;
|
|
@@ -68,6 +68,5 @@ export declare class LuzmoBaseVizItem extends LitElement implements LuzmoVizItem
|
|
|
68
68
|
private createAndAppendElement;
|
|
69
69
|
private updateVizItemProperties;
|
|
70
70
|
updated(changedProperties: PropertyValues): Promise<void>;
|
|
71
|
-
private parseAndValidate;
|
|
72
71
|
protected render(): unknown;
|
|
73
72
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { FilterGroup, FilterOrigin } from '@luzmo/dashboard-contents-types';
|
|
1
|
+
import { FilterGroup, FilterOrigin, VizItemOptions } from '@luzmo/dashboard-contents-types';
|
|
2
2
|
import { ExportType } from '../methods/export-dashboard';
|
|
3
|
-
import { VizItemOptions } from './viz-item.model';
|
|
4
3
|
type VizItemPostMessageMetadata = {
|
|
5
4
|
dashboardId?: string;
|
|
6
5
|
itemId?: string;
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
import type { Options, ThemeConfig } from '@luzmo/dashboard-contents-types';
|
|
2
1
|
export declare const libraryTypeToWebComponentTypeMapping: Record<string, string>;
|
|
3
2
|
export declare const libraryAcceptedParametersList: string[];
|
|
4
3
|
export type CanFilter = string[] | 'all';
|
|
5
4
|
export type VizItemCanFilter = CanFilter;
|
|
6
|
-
type ChartLoader = {
|
|
7
|
-
background: string;
|
|
8
|
-
fontColor: string;
|
|
9
|
-
locale: string;
|
|
10
|
-
mode: string;
|
|
11
|
-
msg: string;
|
|
12
|
-
spinnerBackground: string;
|
|
13
|
-
spinnerColor: string;
|
|
14
|
-
showBranded: boolean;
|
|
15
|
-
};
|
|
16
|
-
export type VizItemOptions = Options & {
|
|
17
|
-
theme?: string | ThemeConfig;
|
|
18
|
-
locale?: string;
|
|
19
|
-
loader?: ChartLoader;
|
|
20
|
-
timezoneId?: string;
|
|
21
|
-
};
|
|
22
|
-
export {};
|