@vizzly/dashboard 0.14.0 → 0.14.1-dev-e0ca0009df3e30e44abcabf4d846020c4205cc61
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/charts/src/PieChart/PieChart.d.ts +4 -0
- package/dist/dashboard/src/contexts/GlobalProvider/useGlobalProvider.d.ts +54 -12
- package/dist/dashboard/src/types.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/AdditionalFilter/toQueries.d.ts +3 -1
- package/dist/shared-logic/src/AdditionalFilter/fromDashboardRequiredFilterGroups.d.ts +9 -0
- package/dist/shared-logic/src/Callbacks/cell.funcs.d.ts +5 -3
- package/dist/shared-logic/src/Component/types.d.ts +7 -0
- package/dist/shared-logic/src/ComponentInterface/types/namespaces.types.d.ts +1 -0
- package/dist/shared-logic/src/Drilldown/Drilldown.d.ts +6 -1
- package/dist/shared-logic/src/FeatureToggle/types.d.ts +2 -0
- package/dist/shared-logic/src/Filter/combineFilters.d.ts +2 -0
- package/dist/shared-logic/src/Filter/index.d.ts +1 -0
- package/dist/shared-logic/src/FormatPanelConfig/types.d.ts +1 -1
- package/dist/shared-logic/src/PieChart/onViewClick.d.ts +8 -3
- package/dist/shared-logic/src/Query/Query.d.ts +1 -1
- package/dist/shared-logic/src/Theme/types.d.ts +22 -0
- package/dist/shared-logic/src/VizzlyState/index.d.ts +3 -0
- package/dist/shared-ui/src/api/useQueryEffect/download.d.ts +1 -1
- package/dist/shared-ui/src/base/Alert/Alert.types.d.ts +1 -1
- package/dist/shared-ui/src/base/Button/IconButton.d.ts +2 -0
- package/dist/shared-ui/src/base/DateTime/CustomRangePicker.d.ts +1 -0
- package/dist/shared-ui/src/base/DateTime/DatePicker.styles.d.ts +1 -1
- package/dist/shared-ui/src/base/DateTime/DateTimeFilter.d.ts +1 -0
- package/dist/shared-ui/src/base/Icons/SVGs.d.ts +6 -10
- package/dist/shared-ui/src/base/Icons.d.ts +2 -0
- package/dist/shared-ui/src/base/Input/Input.styles.d.ts +1 -1
- package/dist/shared-ui/src/base/Input/InputContainer.d.ts +1 -0
- package/dist/shared-ui/src/base/InputWithVariables/InputWithVariables.d.ts +14 -0
- package/dist/shared-ui/src/base/Section/Section.d.ts +1 -0
- package/dist/shared-ui/src/base/Table/Table.styles.d.ts +9 -1
- package/dist/shared-ui/src/components/AdditionalFilter/AdditionalFilter.d.ts +1 -0
- package/dist/shared-ui/src/components/AdditionalFilter/AdvancedPicker/AdvancedDisplayValues.d.ts +0 -2
- package/dist/shared-ui/src/components/AdditionalFilter/AdvancedPicker/AdvancedPicker.d.ts +0 -1
- package/dist/shared-ui/src/components/AdditionalFilter/AdvancedPicker/AdvancedSelectFilter.d.ts +1 -0
- package/dist/shared-ui/src/components/AdditionalFilter/DateFilter/index.d.ts +1 -0
- package/dist/shared-ui/src/components/AdditionalFilter/usePopupPosition.d.ts +7 -0
- package/dist/shared-ui/src/components/BarChart/BarChartView.d.ts +3 -1
- package/dist/shared-ui/src/components/BarChart/types.d.ts +1 -1
- package/dist/shared-ui/src/components/ChartHelper.d.ts +2 -2
- package/dist/shared-ui/src/components/ClickSettings/AddClickSettingModal.d.ts +7 -0
- package/dist/shared-ui/src/components/ClickSettings/ClickSettingsModal.d.ts +7 -0
- package/dist/shared-ui/src/components/ComboChart/ComboChartView.d.ts +1 -1
- package/dist/shared-ui/src/components/DataTable/DataTable.d.ts +2 -2
- package/dist/shared-ui/src/components/DataTable/DataTableView.d.ts +1 -1
- package/dist/shared-ui/src/components/GlobalFilters/storedFilters.d.ts +6 -0
- package/dist/shared-ui/src/components/GlobalFilters/updateGlobalFilters.d.ts +13 -1
- package/dist/shared-ui/src/components/LineChart/LineChartView.d.ts +3 -0
- package/dist/shared-ui/src/components/MercatorMap/View.d.ts +3 -0
- package/dist/shared-ui/src/components/PieChart/PieChartView.d.ts +2 -0
- package/dist/shared-ui/src/components/SingleStat/SingleStatView.d.ts +2 -1
- package/dist/shared-ui/src/components/Studio/StudioContexts.d.ts +1 -1
- package/dist/shared-ui/src/contexts/DashboardBehaviour/context.d.ts +1 -1
- package/dist/shared-ui/src/contexts/DashboardBehaviour/defaultFormatMapping.d.ts +2 -0
- package/dist/shared-ui/src/contexts/DashboardBehaviour/types.d.ts +10 -2
- package/dist/shared-ui/src/contexts/DashboardContext/types.d.ts +4 -1
- package/dist/shared-ui/src/headlessui/components/switch/switch.d.ts +1 -1
- package/dist/shared-ui/src/hooks/types.d.ts +9 -0
- package/dist/shared-ui/src/hooks/useDeveloperTools.d.ts +11 -0
- package/dist/shared-ui/src/hooks/useLocalStorage.d.ts +5 -0
- package/dist/shared-ui/src/library/ConditionalFormatting.d.ts +6 -1
- package/dist/shared-ui/src/library/Empty.d.ts +1 -0
- package/dist/shared-ui/src/library/StylePanel/GoalLine/GoalLineModal.d.ts +1 -8
- package/dist/shared-ui/src/library/StylePanel/GoalLine/GoalLineRules.d.ts +1 -2
- package/dist/shared-ui/src/library/StylePanel/GoalLine/types.d.ts +8 -0
- package/dist/shared-ui/src/library/StylePanel/GoalLine/useGoalLine.d.ts +1 -1
- package/dist/shared-ui/src/types.d.ts +9 -0
- package/package.json +4 -3
- package/dist/shared-logic/src/JSQueryEngine/compare.d.ts +0 -6
- package/dist/shared-ui/src/runQuery/compare.d.ts +0 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { AdditionalFilter } from '../../../../../shared-logic/src/AdditionalFilter/types';
|
|
2
1
|
import { DataSet } from '../../../../../shared-logic/src/DataSet/types';
|
|
3
2
|
import { QueryEngineConfig } from '../../../../../shared-logic/src/QueryEngineConfig/types';
|
|
4
3
|
import { PreparedQuery, Query as QueryType } from '../../../../../shared-logic/src/Query/types';
|
|
5
4
|
import { Result as ResultType } from '../../../../../shared-logic/src/Result/types';
|
|
5
|
+
import { QueryAttributes } from '../../../../../shared-logic/src/QueryAttributes/types';
|
|
6
6
|
import { VariableList } from '../../../../../shared-logic/src/Variables/types';
|
|
7
|
+
import { AdditionalFilter } from '../../../../../shared-logic/src/AdditionalFilter/types';
|
|
7
8
|
export declare const toQueries: (additionalFilter: AdditionalFilter, dataSets: DataSet[], queryEngineConfig: QueryEngineConfig, variables: VariableList) => {
|
|
8
9
|
queries: (QueryType | PreparedQuery)[];
|
|
9
10
|
resultFields: Array<ResultType.Field[]>;
|
|
10
11
|
};
|
|
12
|
+
export declare function getOptionsOrders(dataSetField: DataSet.Field): QueryAttributes.Order[] | [];
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
import { DataSet } from '../DataSet/types';
|
|
2
2
|
import { AdditionalFilter } from './types';
|
|
3
|
+
declare type GroupedFields = {
|
|
4
|
+
[key: string]: Array<{
|
|
5
|
+
publicName: string;
|
|
6
|
+
dataSetField: DataSet['fields'][number];
|
|
7
|
+
dataSetId: string;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
export declare const groupFilters: (dataSets: DataSet[]) => GroupedFields[string][];
|
|
3
11
|
export declare const fromDashboardRequiredFilterGroups: (dataSets: DataSet[]) => Array<AdditionalFilter>;
|
|
12
|
+
export {};
|
|
@@ -5,15 +5,17 @@ import * as Field from '../../../shared-logic/src/Field';
|
|
|
5
5
|
import { Result } from '../Result/types';
|
|
6
6
|
import { SupportedAggregates } from '../Aggregate/types';
|
|
7
7
|
import { TableContent, TableFields, TableFieldsV2 } from '../DataTable/types';
|
|
8
|
+
import * as Drilldown from '../../../shared-logic/src/Drilldown/Drilldown';
|
|
8
9
|
export declare type BuildViewClick = {
|
|
9
|
-
onViewClick: (data: Component.ChartOnViewClick) => void;
|
|
10
|
+
onViewClick: (data: Component.ChartOnViewClick, query: Component.OnViewClickQuery) => void;
|
|
10
11
|
dimension: QueryAttributes.Dimension[] | undefined;
|
|
11
12
|
measure: QueryAttributes.Measure[] | undefined;
|
|
12
13
|
viewId: string;
|
|
13
14
|
type: 'barChart' | 'horizontalBarChart';
|
|
14
|
-
timeDimension: QueryAttributes.TimeDimension |
|
|
15
|
+
timeDimension: QueryAttributes.TimeDimension | null;
|
|
15
16
|
};
|
|
16
|
-
export declare
|
|
17
|
+
export declare type runViewClickQueryType = (queries: Partial<QueryAttributes>, existingField: Drilldown.DrilldownField[]) => Promise<any | null>;
|
|
18
|
+
export declare function buildOnViewClick(clickedValue?: Datum, nearestDatum?: DatumByKey, props?: BuildViewClick, runViewClickQuery?: runViewClickQueryType): void;
|
|
17
19
|
export declare type BuildTableViewClick = {
|
|
18
20
|
viewId: string;
|
|
19
21
|
supportedAggregates: SupportedAggregates;
|
|
@@ -261,6 +261,7 @@ export declare namespace Component {
|
|
|
261
261
|
protectedFields?: Omit<ProtectedFields, 'dimension'>;
|
|
262
262
|
hiddenFields?: HiddenField[];
|
|
263
263
|
};
|
|
264
|
+
export type SingleStatDirectionOptions = 'horizontal' | 'vertical';
|
|
264
265
|
export type SingleStatAttributes = BaseAttributes & Omit<BaseQueryAttributes, 'dimension' | 'timeDimension' | 'order'> & {
|
|
265
266
|
type: 'singleStat';
|
|
266
267
|
prefixes: {
|
|
@@ -273,6 +274,7 @@ export declare namespace Component {
|
|
|
273
274
|
[fieldIdAndAggregate: string]: string;
|
|
274
275
|
};
|
|
275
276
|
fontSize: string;
|
|
277
|
+
direction?: SingleStatDirectionOptions;
|
|
276
278
|
conditionalFormattingRules: Array<ConditionalFormatting.Rule>;
|
|
277
279
|
deltaTimeDimension: QueryAttributes.TimeDimension | null;
|
|
278
280
|
parameters?: Parameters;
|
|
@@ -309,6 +311,7 @@ export declare namespace Component {
|
|
|
309
311
|
goalLines?: Array<Component.GoalLine.Rule>;
|
|
310
312
|
axisTitles?: AxisTitles;
|
|
311
313
|
};
|
|
314
|
+
export type ViewType = 'areaChart' | 'barChart' | 'basicTable' | 'comboChart' | 'custom' | 'dataTable' | 'funnelChart' | 'horizontalBarChart' | 'lineChart' | 'mercatorMap' | 'pieChart' | 'progress' | 'richText' | 'scatterChart' | 'singleStat';
|
|
312
315
|
export type Attributes = AreaChartAttributes | BarChartAttributes | BasicTableAttributes | ComboChartAttributes | CustomViewAttributes | DataTableAttributes | FunnelChartAttributes | HorizontalBarChartAttributes | LineChartAttributes | MercatorMapAttributes | PieChartAttributes | ProgressAttributes | RichTextAttributes | ScatterChartAttributes | SingleStatAttributes;
|
|
313
316
|
export interface RenderTableCell {
|
|
314
317
|
viewId: string;
|
|
@@ -348,6 +351,10 @@ export declare namespace Component {
|
|
|
348
351
|
};
|
|
349
352
|
}
|
|
350
353
|
export type OnViewClick = TableOnViewClick | ChartOnViewClick;
|
|
354
|
+
export type OnViewClickQuery = (queries: Partial<Omit<QueryAttributes, 'dataSetId'>>) => Promise<QueryResponse | null>;
|
|
355
|
+
export type QueryResponse = {
|
|
356
|
+
results: (Result | null)[] | (any[][] | null)[] | null;
|
|
357
|
+
};
|
|
351
358
|
export type LabelFormatOptionsValues = Dictionary<string | number | string[] | null>;
|
|
352
359
|
export type LabelFormatOptions = {
|
|
353
360
|
fieldId: string;
|
|
@@ -2,7 +2,7 @@ import { DataSet } from '../../../shared-logic/src/DataSet/types';
|
|
|
2
2
|
import { QueryAttributes } from '../QueryAttributes/types';
|
|
3
3
|
import { QueryEngineConfig } from '../QueryEngineConfig/types';
|
|
4
4
|
import { Component } from '../Component/types';
|
|
5
|
-
import { Datum } from '../DatumKey';
|
|
5
|
+
import { Datum, ParsedDatumKey } from '../DatumKey';
|
|
6
6
|
export declare const updateTimeDimension: (dataSet: DataSet, option: QueryAttributes.TimeDimension & {
|
|
7
7
|
function?: string;
|
|
8
8
|
}) => QueryAttributes.TimeDimension | null;
|
|
@@ -23,3 +23,8 @@ export declare function buildSelectedField(clickedValue: Datum, queryEngineConfi
|
|
|
23
23
|
value: string;
|
|
24
24
|
function: string;
|
|
25
25
|
};
|
|
26
|
+
export declare function buildClickedOnFieldForQuery(getField: (metric: {
|
|
27
|
+
field: string;
|
|
28
|
+
function: string;
|
|
29
|
+
}) => string, parseKey: (key: string) => ParsedDatumKey | undefined, dimension?: QueryAttributes.Dimension[], timeDimension?: QueryAttributes.TimeDimension | null, clickedValue?: Datum | undefined): DrilldownField[];
|
|
30
|
+
export declare function buildDrilldownFilters(attributes: Component.BarChartAttributes | Component.HorizontalBarChartAttributes | Component.PieChartAttributes, queries: Partial<QueryAttributes>, existingField: DrilldownField[], combineFilters: (array1: QueryAttributes.Filter[][], array2: QueryAttributes.Filter[][]) => QueryAttributes.Filter[][], updateFilter: (field: DrilldownField, timeDimension: QueryAttributes.TimeDimension | null, dimension: QueryAttributes.Dimension[]) => QueryAttributes.Filter[][]): QueryAttributes.Filter[][];
|
|
@@ -39,4 +39,6 @@ export declare type FeatureToggles = {
|
|
|
39
39
|
unloadOffScreenViews: boolean;
|
|
40
40
|
/** Show the saving indicator */
|
|
41
41
|
showSavingIndicator: boolean;
|
|
42
|
+
/** For `read` users, the global filters are persisted by storing configuration locally */
|
|
43
|
+
disablePersistingGlobalFiltersLocally: boolean;
|
|
42
44
|
};
|
|
@@ -4,7 +4,7 @@ export declare type HeadingSubSections = Section<'title'> | Section<'subject'>;
|
|
|
4
4
|
export declare type HeadingSection = Section<'heading'> & {
|
|
5
5
|
subSection: Array<HeadingSubSections>;
|
|
6
6
|
};
|
|
7
|
-
export declare type FormatSubSections = Section<'time'> | Section<'fontSize'>;
|
|
7
|
+
export declare type FormatSubSections = Section<'time'> | Section<'fontSize'> | Section<'direction'>;
|
|
8
8
|
export declare type FormatSection = Section<'format'> & {
|
|
9
9
|
subSection: Array<FormatSubSections>;
|
|
10
10
|
};
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { Component } from '../Component/types';
|
|
2
|
-
|
|
2
|
+
import { QueryAttributes } from '../QueryAttributes/types';
|
|
3
|
+
import { runViewClickQueryType } from '../Callbacks';
|
|
4
|
+
export declare type ClickDatumValues = {
|
|
3
5
|
datum: {
|
|
4
6
|
[key: string]: number | string;
|
|
5
7
|
};
|
|
6
8
|
index: number;
|
|
7
9
|
key: string;
|
|
8
10
|
};
|
|
9
|
-
export declare
|
|
10
|
-
|
|
11
|
+
export declare type PieEvent = {
|
|
12
|
+
clientX: number;
|
|
13
|
+
clientY: number;
|
|
14
|
+
};
|
|
15
|
+
export declare function buildPieOnViewClick(onViewClick: ((data: Component.ChartOnViewClick, query?: Component.OnViewClickQuery) => void) | undefined, clickedValue: ClickDatumValues, viewId: string, dimension: QueryAttributes.Dimension[] | undefined, timeDimension: QueryAttributes.TimeDimension | null, runViewClickQuery?: runViewClickQueryType): void;
|
|
@@ -29,7 +29,7 @@ export declare const buildUniqueArrayValuesPreparedQuery: (dataSetId: string, da
|
|
|
29
29
|
query: PreparedQuery;
|
|
30
30
|
resultFields: Result.Field[];
|
|
31
31
|
};
|
|
32
|
-
export declare const buildFilterQuery: (dataSet: DataSet, fieldId: string, optionsFilters?: QueryAttributes.Filter[] | undefined) => QueryAttributes;
|
|
32
|
+
export declare const buildFilterQuery: (dataSet: DataSet, fieldId: string, optionsFilters?: QueryAttributes.Filter[] | undefined, optionsOrders?: QueryAttributes.Order[] | undefined) => QueryAttributes;
|
|
33
33
|
export declare const requiredFields: (query: Query) => Array<string>;
|
|
34
34
|
export declare const supportsFeature: (queryEngineConfig: QueryEngineConfig, feature: SupportedFeatureType) => boolean;
|
|
35
35
|
export declare const toDataSetDashboardFilters: (dataSets: DataSet[], additionalFilters: AdditionalFilter[], dateFilterOptions: TimeRangeOptions) => DataSetDashboardFilters;
|
|
@@ -153,6 +153,11 @@ export declare namespace VizzlyTheming {
|
|
|
153
153
|
'&:focus'?: InputState;
|
|
154
154
|
'&:hover'?: InputState;
|
|
155
155
|
'&:focus:hover'?: InputState;
|
|
156
|
+
active?: InputState & {
|
|
157
|
+
'&:focus'?: InputState;
|
|
158
|
+
'&:hover'?: InputState;
|
|
159
|
+
'&:focus:hover'?: InputState;
|
|
160
|
+
};
|
|
156
161
|
}
|
|
157
162
|
type InputStyle = {
|
|
158
163
|
padding?: CSSProperties['padding'];
|
|
@@ -330,6 +335,7 @@ export declare namespace VizzlyTheming {
|
|
|
330
335
|
info?: AlertType;
|
|
331
336
|
warning?: AlertType;
|
|
332
337
|
critical?: AlertType;
|
|
338
|
+
guidance?: AlertType;
|
|
333
339
|
};
|
|
334
340
|
type AlertType = {
|
|
335
341
|
background?: CSSProperties['background'];
|
|
@@ -397,6 +403,10 @@ export declare namespace VizzlyTheming {
|
|
|
397
403
|
background?: CSSProperties['background'];
|
|
398
404
|
borderTop?: CSSProperties['borderTop'];
|
|
399
405
|
textTransform?: CSSProperties['textTransform'];
|
|
406
|
+
/**
|
|
407
|
+
* @deprecated TH padding has moved to tables.th.button.padding and tables.th.sort.padding
|
|
408
|
+
*/
|
|
409
|
+
padding?: CSSProperties['padding'];
|
|
400
410
|
inner?: TableTHInner;
|
|
401
411
|
first?: TableTHFirst;
|
|
402
412
|
last?: TableTHLast;
|
|
@@ -404,6 +414,8 @@ export declare namespace VizzlyTheming {
|
|
|
404
414
|
color?: CSSProperties['color'];
|
|
405
415
|
background?: CSSProperties['background'];
|
|
406
416
|
};
|
|
417
|
+
button?: TableTHButton;
|
|
418
|
+
sort?: TableTHButton;
|
|
407
419
|
group?: {
|
|
408
420
|
textTransform?: CSSProperties['textTransform'];
|
|
409
421
|
fontWeight?: CSSProperties['fontWeight'];
|
|
@@ -428,6 +440,16 @@ export declare namespace VizzlyTheming {
|
|
|
428
440
|
};
|
|
429
441
|
};
|
|
430
442
|
}
|
|
443
|
+
interface TableTHButton {
|
|
444
|
+
color?: CSSProperties['color'];
|
|
445
|
+
background?: CSSProperties['background'];
|
|
446
|
+
padding?: CSSProperties['padding'];
|
|
447
|
+
borderRadius?: CSSProperties['borderRadius'];
|
|
448
|
+
'&:hover'?: {
|
|
449
|
+
color?: CSSProperties['color'];
|
|
450
|
+
background?: CSSProperties['background'];
|
|
451
|
+
};
|
|
452
|
+
}
|
|
431
453
|
type TableTHFirst = {
|
|
432
454
|
borderLeft: CSSProperties['borderLeft'];
|
|
433
455
|
};
|
|
@@ -41,7 +41,10 @@ interface VizzlyState {
|
|
|
41
41
|
get: (identifier: string, listener: Subscriber) => () => void;
|
|
42
42
|
set: (identifier: string, data: StateOptions) => void;
|
|
43
43
|
reload: (identifier: string) => void;
|
|
44
|
+
inBrowserRefetchData: (identifier: string) => void;
|
|
44
45
|
save: (identifier: string) => void;
|
|
46
|
+
resizing: (identifier: string, resizing: boolean) => void;
|
|
47
|
+
drilldown: (identifier: string, params?: Drilldown) => void;
|
|
45
48
|
}
|
|
46
49
|
export declare class VizzlyStateManager implements VizzlyState {
|
|
47
50
|
private subscribers;
|
|
@@ -12,7 +12,7 @@ declare type OnFinishedArgs = {
|
|
|
12
12
|
fileName: string;
|
|
13
13
|
};
|
|
14
14
|
declare type OnFinished = (args: OnFinishedArgs) => void;
|
|
15
|
-
export declare const _toCSV: (tableRepresentation: TableRepresentation | null | undefined, onFinished: OnFinished) => void
|
|
15
|
+
export declare const _toCSV: (tableRepresentation: TableRepresentation | null | undefined, onFinished: OnFinished, forceStringFileConents: boolean) => Promise<void>;
|
|
16
16
|
export declare const _toXLSX: (tableRepresentation: TableRepresentation | null | undefined, onFinished: OnFinished, forceStringFileConents: boolean) => Promise<void>;
|
|
17
17
|
export declare const download: (downloadType: DownloadType, dataSet: DataSetType, runQueriesCallback: VizzlyComponents.runQueriesCallbackInternal, maxCSVDownloadLimit: number, attributes: Component.Attributes, dateTimeFormatOptions: DashboardBehaviour['dateTimeFormatOptions'], numberFormatOptions: DashboardBehaviour['numberFormatOptions'], queryEngineConfig: DashboardBehaviour['queryEngineConfig'], populatedFilterConfig: FilterConfig, onFinished: ((args: OnFinishedArgs) => void) | undefined, labelFormat: DashboardBehaviour['labelFormat'], fileFormat: FileFormat, forceStringFileConents?: boolean | undefined) => Promise<void>;
|
|
18
18
|
export {};
|
|
@@ -20,6 +20,7 @@ declare type DatePickerProps = {
|
|
|
20
20
|
queryEngineConfig?: QueryEngineConfig;
|
|
21
21
|
data?: DataSet[];
|
|
22
22
|
relative?: RelativeRangeState;
|
|
23
|
+
onOpenChange?: (open: boolean) => void;
|
|
23
24
|
} & VizzlyComponents.ComponentOverrides.Props.DateTimeRangeInput;
|
|
24
25
|
export declare type Time = {
|
|
25
26
|
start?: moment.Moment | null;
|
|
@@ -8,7 +8,7 @@ export declare const pickerStyles: (() => null) & {
|
|
|
8
8
|
(variantOptions: Object): string;
|
|
9
9
|
toString: any;
|
|
10
10
|
};
|
|
11
|
-
inputsWrapper: (themedStyles?: VizzlyTheming.DateTime | undefined) => {
|
|
11
|
+
inputsWrapper: (themedStyles?: VizzlyTheming.DateTime | undefined, active?: boolean | undefined) => {
|
|
12
12
|
(variantOptions: Object): string;
|
|
13
13
|
toString: any;
|
|
14
14
|
};
|
|
@@ -20,7 +20,7 @@ export declare const ComponentOptionsMenu: renderSvg<{}>;
|
|
|
20
20
|
export declare const Tag: renderSvg<{}>;
|
|
21
21
|
export declare const Merge: renderSvg<{}>;
|
|
22
22
|
export declare const Split: renderSvg<{}>;
|
|
23
|
-
export declare const InsertRowAbove:
|
|
23
|
+
export declare const InsertRowAbove: ({ fill, width, height, ...props }: React.SVGAttributes<SVGElement>) => JSX.Element;
|
|
24
24
|
export declare const InsertRowBelow: renderSvg<{}>;
|
|
25
25
|
export declare const AppendCell: renderSvg<{}>;
|
|
26
26
|
export declare const OpenLibrary: renderSvg<{}>;
|
|
@@ -94,19 +94,14 @@ export declare const Present: renderSvg<{
|
|
|
94
94
|
width?: number;
|
|
95
95
|
height?: number;
|
|
96
96
|
}>;
|
|
97
|
-
export declare const Fullscreen:
|
|
98
|
-
|
|
99
|
-
height?: number;
|
|
100
|
-
}>;
|
|
101
|
-
export declare const ExternalLink: renderSvg<{
|
|
102
|
-
width?: number;
|
|
103
|
-
height?: number;
|
|
104
|
-
fill?: string;
|
|
105
|
-
}>;
|
|
97
|
+
export declare const Fullscreen: ({ fill, width, height, ...props }: React.SVGAttributes<SVGElement>) => JSX.Element;
|
|
98
|
+
export declare const ExternalLink: ({ fill, width, height, ...props }: React.SVGAttributes<SVGElement>) => JSX.Element;
|
|
106
99
|
export declare const Upload: ({ fill, ...props }: React.SVGAttributes<SVGElement>) => JSX.Element;
|
|
107
100
|
export declare const File: ({ fill, ...props }: React.SVGAttributes<SVGElement>) => JSX.Element;
|
|
108
101
|
export declare const Hide: ({ fill, ...props }: React.SVGAttributes<SVGElement>) => JSX.Element;
|
|
109
102
|
export declare const Show: ({ fill, ...props }: React.SVGAttributes<SVGElement>) => JSX.Element;
|
|
103
|
+
export declare const Cog: ({ fill, width, height, ...props }: React.SVGAttributes<SVGElement>) => JSX.Element;
|
|
104
|
+
export declare const Globe: ({ fill, width, height, ...props }: React.SVGAttributes<SVGElement>) => JSX.Element;
|
|
110
105
|
export declare const ArrowUp: renderSvg<{
|
|
111
106
|
width?: number;
|
|
112
107
|
height?: number;
|
|
@@ -122,4 +117,5 @@ export declare const ExclamationCircle: renderSvg<{
|
|
|
122
117
|
height?: number;
|
|
123
118
|
fill?: CSSProperties['fill'];
|
|
124
119
|
}>;
|
|
120
|
+
export declare const Code: ({ fill, ...props }: React.SVGAttributes<SVGElement>) => JSX.Element;
|
|
125
121
|
export {};
|
|
@@ -32,6 +32,8 @@ export declare const Reset: (props: {}) => JSX.Element;
|
|
|
32
32
|
export declare const Drilldown: (props: VizzlyComponents.ComponentOverrides.DrilldownIconProps) => JSX.Element;
|
|
33
33
|
export declare const Present: (props: {}) => JSX.Element;
|
|
34
34
|
export declare const Fullscreen: (props: {}) => JSX.Element;
|
|
35
|
+
export declare const Cog: (props: {}) => JSX.Element;
|
|
35
36
|
export declare const ArrowUp: (props: {}) => JSX.Element;
|
|
36
37
|
export declare const ArrowDown: (props: {}) => JSX.Element;
|
|
37
38
|
export declare const ErrorIcon: (props: VizzlyComponents.ComponentOverrides.ErrorProps) => JSX.Element;
|
|
39
|
+
export declare const Code: (props: {}) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VizzlyTheming } from '../../types';
|
|
2
|
-
export declare const inputStyles: (themedStyles?: VizzlyTheming.Input | undefined, highlight?: boolean | undefined) => {
|
|
2
|
+
export declare const inputStyles: (themedStyles?: VizzlyTheming.Input | undefined, highlight?: boolean | undefined, active?: boolean | undefined) => {
|
|
3
3
|
(variantOptions: Object): string;
|
|
4
4
|
toString: any;
|
|
5
5
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
export declare type InputWithVariableEntry = {
|
|
3
|
+
type: 'variable' | 'text' | 'field';
|
|
4
|
+
value: string;
|
|
5
|
+
};
|
|
6
|
+
interface InputWithVariablesProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
labelHidden?: boolean;
|
|
10
|
+
value: InputWithVariableEntry[];
|
|
11
|
+
onChange: (value: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const InputWithVariables: FunctionComponent<InputWithVariablesProps>;
|
|
14
|
+
export {};
|
|
@@ -9,6 +9,7 @@ export declare const Section: React.FunctionComponent<RawSectionProps> & {
|
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
columns?: number | undefined;
|
|
11
11
|
'data-component'?: string | undefined;
|
|
12
|
+
gap?: string | undefined;
|
|
12
13
|
}>;
|
|
13
14
|
Panel: React.FunctionComponent<{
|
|
14
15
|
title?: string | ReactNode;
|
|
@@ -38,7 +38,15 @@ export declare const tableStyles: (() => null) & {
|
|
|
38
38
|
(variantOptions: Object): string;
|
|
39
39
|
toString: any;
|
|
40
40
|
};
|
|
41
|
-
thButton: (
|
|
41
|
+
thButton: ({ theme }: {
|
|
42
|
+
theme?: VizzlyTheming.TableTHButton | undefined;
|
|
43
|
+
}) => {
|
|
44
|
+
(variantOptions: Object): string;
|
|
45
|
+
toString: any;
|
|
46
|
+
};
|
|
47
|
+
thSortButton: ({ theme }: {
|
|
48
|
+
theme?: VizzlyTheming.TableTHButton | undefined;
|
|
49
|
+
}) => {
|
|
42
50
|
(variantOptions: Object): string;
|
|
43
51
|
toString: any;
|
|
44
52
|
};
|
package/dist/shared-ui/src/components/AdditionalFilter/AdvancedPicker/AdvancedDisplayValues.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import { TextOverride } from '../../../../../shared-logic/src/Translations/types';
|
|
3
2
|
import { DisplayChipsType } from './displayChips.funcs';
|
|
4
3
|
import { MultiSelectFilter, NumericFilter } from '../../../../../shared-logic/src/AdditionalFilter/types';
|
|
5
4
|
import { DataType } from '../../../../../shared-logic/src/Field/types';
|
|
@@ -9,7 +8,6 @@ export declare const AdvancedDisplayValues: FunctionComponent<{
|
|
|
9
8
|
pickerOpen: boolean;
|
|
10
9
|
defined: boolean;
|
|
11
10
|
onClearAll: () => void;
|
|
12
|
-
textOverride?: TextOverride;
|
|
13
11
|
chips?: DisplayChipsType[];
|
|
14
12
|
clearDisabled?: boolean;
|
|
15
13
|
onClick: (open: boolean) => void;
|
package/dist/shared-ui/src/components/AdditionalFilter/AdvancedPicker/AdvancedSelectFilter.d.ts
CHANGED
|
@@ -7,4 +7,5 @@ export declare const AdvancedSelectFilter: (props: import("react").PropsWithChil
|
|
|
7
7
|
onChange: (filter: NumericFilter | MultiSelectFilterType) => void;
|
|
8
8
|
showClearBtn?: boolean | undefined;
|
|
9
9
|
type: Pick<import("../../../../../shared-logic/src/Field/types").DataType, number | "replace" | "fixed" | "repeat" | "slice" | "small" | "sub" | "bold" | "blink" | "toString" | "charAt" | "charCodeAt" | "concat" | "indexOf" | "lastIndexOf" | "localeCompare" | "match" | "search" | "split" | "substring" | "toLowerCase" | "toLocaleLowerCase" | "toUpperCase" | "toLocaleUpperCase" | "trim" | "length" | "substr" | "valueOf" | "codePointAt" | "includes" | "endsWith" | "normalize" | "startsWith" | "anchor" | "big" | "fontcolor" | "fontsize" | "italics" | "link" | "strike" | "sup" | "padStart" | "padEnd" | "trimEnd" | "trimStart" | "trimLeft" | "trimRight" | "matchAll" | "replaceAll" | "at">;
|
|
10
|
+
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
10
11
|
}>) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
export declare function usePickerPosition(picker: boolean, inputRef: MutableRefObject<HTMLDivElement | null>, formHeight: number, setPosition: (params: {
|
|
3
|
+
left: string | number;
|
|
4
|
+
top: number;
|
|
5
|
+
right: string | number;
|
|
6
|
+
transform?: string;
|
|
7
|
+
}) => void): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { VizzlyComponents } from '../../types';
|
|
3
3
|
import { Component } from '../../../../shared-logic/src/Component/types';
|
|
4
|
+
import * as OnViewClick from '../../../../shared-logic/src/Callbacks/cell.funcs';
|
|
4
5
|
import { DashboardBehaviour, IdPrefix } from '../../contexts/DashboardBehaviour/types';
|
|
5
6
|
import { HeadlineStatsProps } from '../HeadlineStats/HeadlineStats';
|
|
6
7
|
import * as Drilldown from '../../../../shared-logic/src/Drilldown/Drilldown';
|
|
@@ -10,13 +11,14 @@ declare type ExtendedProps = BarChartViewProps & {
|
|
|
10
11
|
library?: boolean;
|
|
11
12
|
numberFormatOptions: DashboardBehaviour['numberFormatOptions'];
|
|
12
13
|
dateTimeFormatOptions: DashboardBehaviour['dateTimeFormatOptions'];
|
|
13
|
-
onViewClick: (data: Component.ChartOnViewClick) => void;
|
|
14
|
+
onViewClick: (data: Component.ChartOnViewClick, query: Component.OnViewClickQuery) => void;
|
|
14
15
|
propsForHeadline: HeadlineStatsProps;
|
|
15
16
|
idPrefix: IdPrefix;
|
|
16
17
|
onDrilldownChange: (payload: Drilldown.SelectedDrilldown) => void;
|
|
17
18
|
drilldownSelections: Drilldown.SelectedDrilldown[];
|
|
18
19
|
onResetDrilldown: () => void;
|
|
19
20
|
editor?: boolean;
|
|
21
|
+
runViewClickQuery: OnViewClick.runViewClickQueryType;
|
|
20
22
|
};
|
|
21
23
|
declare const _default: React.NamedExoticComponent<ExtendedProps>;
|
|
22
24
|
export default _default;
|
|
@@ -16,7 +16,7 @@ export declare type BarChartProps = {
|
|
|
16
16
|
dashboardBehaviour: DashboardBehaviour;
|
|
17
17
|
sm?: boolean;
|
|
18
18
|
library?: boolean;
|
|
19
|
-
onViewClick?: (data: ComponentType.ChartOnViewClick) => void;
|
|
19
|
+
onViewClick?: (data: ComponentType.ChartOnViewClick, query: ComponentType.OnViewClickQuery) => void;
|
|
20
20
|
updateComponentAttributes: (attributes: ComponentType.BarChartAttributes | ComponentType.HorizontalBarChartAttributes) => void;
|
|
21
21
|
idPrefix: IdPrefix;
|
|
22
22
|
editor?: boolean;
|
|
@@ -2,7 +2,6 @@ import { DataSet as DataSetType } from '../../../shared-logic/src/DataSet/types'
|
|
|
2
2
|
import { Component as ActualComponent, ComponentType, FormatType } from '../../../shared-logic/src/Component/types';
|
|
3
3
|
import { QueryAttributes as QueryAttributesType } from '../../../shared-logic/src/QueryAttributes/types';
|
|
4
4
|
import { Result as ResultType } from '../../../shared-logic/src/Result/types';
|
|
5
|
-
import { QueryEngineConfig } from '../../../shared-logic/src/QueryEngineConfig/types';
|
|
6
5
|
import { DashboardBehaviour, LabelFormat } from '../contexts/DashboardBehaviour/types';
|
|
7
6
|
import { ConditionalFormattingOption } from '../../../charts/src/Legend/Legend';
|
|
8
7
|
import { ConditionalFormattingBoundary } from './DataTable/buildConditionalFormattingBoundaries';
|
|
@@ -13,6 +12,7 @@ export declare type AxisLabelConfig = {
|
|
|
13
12
|
format: FormatType;
|
|
14
13
|
numberFormatOptions: DashboardBehaviour['numberFormatOptions'];
|
|
15
14
|
dateTimeFormatOptions: DashboardBehaviour['dateTimeFormatOptions'];
|
|
15
|
+
defaultFormats: DashboardBehaviour['defaultFormats'];
|
|
16
16
|
};
|
|
17
17
|
export declare const mergeProps: (explicitProps: any, remoteProps: any, defaultProps: any) => any;
|
|
18
18
|
export declare const shouldUpdate: (previousProps: any, nextProps: any) => boolean;
|
|
@@ -22,7 +22,7 @@ declare type Datum = {
|
|
|
22
22
|
export declare const getExplanationsOfConditionFormattingRulesThatApplyToSeries: (dimensions: QueryAttributesType.Dimension[], conditionalFormattingRules: ActualComponent.ConditionalFormatting.Rule[], seriesKey: string, supportedAggregates: DashboardBehaviour['queryEngineConfig']['supportedAggregates'], dataSet: DataSetType) => Array<ConditionalFormattingOption>;
|
|
23
23
|
export declare const applyConditionFormattingRules: (dimensions: QueryAttributesType.Dimension[], conditionalFormattingRules: ConditionalFormattingBoundary[], datum: Datum | undefined, key: string, dataSet: DataSetType) => ActualComponent.ConditionalFormatting.DisplayRule | undefined;
|
|
24
24
|
export declare function formattedFallbackDateTime(value: string | number | Date): string;
|
|
25
|
-
export declare const formatXAxisLabel: (timeDimension: QueryAttributesType.TimeDimension | null,
|
|
25
|
+
export declare const formatXAxisLabel: (timeDimension: QueryAttributesType.TimeDimension | null, axisLabelConfig: AxisLabelConfig, valueAlias?: DashboardBehaviour['valueAlias']) => (value: any, fieldId?: string | null | undefined) => string;
|
|
26
26
|
export declare const formatYAxisLabel: (textOverride: TextOverride, axisLabelConfig?: AxisLabelConfig | undefined) => (value: any) => string;
|
|
27
27
|
export declare const formatSeriesName: (result: ResultType | null | undefined, textOverride: TextOverride, type: ComponentType, id: string, labelFormat: LabelFormat) => (key: string) => string | undefined;
|
|
28
28
|
export declare const convertValueToFormat: (value: any, numberFormatOptions?: {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { Component } from '../../../../shared-logic/src/Component/types';
|
|
3
|
+
export declare const ClickSettingsModal: FunctionComponent<{
|
|
4
|
+
show: boolean;
|
|
5
|
+
componentAttributes: Component.Attributes;
|
|
6
|
+
onClose: (confirmed: boolean) => void;
|
|
7
|
+
}>;
|
|
@@ -10,7 +10,7 @@ export declare type ComboChartViewProps = Omit<VizzlyComponents.ViewProps<Compon
|
|
|
10
10
|
id: string;
|
|
11
11
|
idPrefix: IdPrefix;
|
|
12
12
|
};
|
|
13
|
-
declare const _default: React.MemoExoticComponent<(props: Pick<VizzlyComponents.ViewProps<Component.ComboChartAttributes>, "filter" | "order" | "offset" | "id" | "dataSetId" | "timeDimension" | "limit" | "type" | "viewId" | "displayTitle" | "displaySubject" | "protectedByOrganisation" | "tags" | "stacked" | "conditionalFormattingRules" | "xAxisPrefix" | "yAxisPrefix" | "xAxisPostfix" | "yAxisPostfix" | "xAxisFormat" | "yAxisFormat" | "approxXAxisLabelCount" | "approxYAxisLabelCount" | "legend" | "goalLines" | "axisTitles" | "barMeasure" | "lineMeasure" | "barDimension" | "lineDimension" | "dataSet" | "supportedAggregates" | "supportedTimeTruncFunctions" | "localFilters" | "queriesAreChanging" | "library" | "setLocalFilters" | "setParameterUpdate" | "sm"> & {
|
|
13
|
+
declare const _default: React.MemoExoticComponent<(props: Pick<VizzlyComponents.ViewProps<Component.ComboChartAttributes>, "filter" | "order" | "offset" | "id" | "dataSetId" | "timeDimension" | "limit" | "type" | "viewId" | "displayTitle" | "displaySubject" | "protectedByOrganisation" | "tags" | "stacked" | "conditionalFormattingRules" | "xAxisPrefix" | "yAxisPrefix" | "xAxisPostfix" | "yAxisPostfix" | "xAxisFormat" | "yAxisFormat" | "approxXAxisLabelCount" | "approxYAxisLabelCount" | "legend" | "goalLines" | "axisTitles" | "barMeasure" | "lineMeasure" | "barDimension" | "lineDimension" | "dataSet" | "supportedAggregates" | "supportedTimeTruncFunctions" | "localFilters" | "queriesAreChanging" | "library" | "defaultFormats" | "setLocalFilters" | "setParameterUpdate" | "sm"> & {
|
|
14
14
|
lineResult: ResultType | null;
|
|
15
15
|
barResult: ResultType | null;
|
|
16
16
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { VizzlyComponents } from '../../types';
|
|
3
|
-
import { Component as ComponentType } from '../../../../shared-logic/src/Component/types';
|
|
3
|
+
import { Component, Component as ComponentType } from '../../../../shared-logic/src/Component/types';
|
|
4
4
|
import { DataSet as DataSetType } from '../../../../shared-logic/src/DataSet/types';
|
|
5
5
|
import { Result as ResultType } from '../../../../shared-logic/src/Result/types';
|
|
6
6
|
import { DashboardBehaviour } from '../../contexts/DashboardBehaviour/types';
|
|
@@ -17,7 +17,7 @@ declare type Props = {
|
|
|
17
17
|
dashboardBehaviour: DashboardBehaviour;
|
|
18
18
|
displayColumns?: string[];
|
|
19
19
|
library?: boolean;
|
|
20
|
-
onViewClick?: (data:
|
|
20
|
+
onViewClick?: (data: Component.ChartOnViewClick, query?: Component.OnViewClickQuery) => void;
|
|
21
21
|
renderTableCell?: (data: ComponentType.RenderTableCell) => React.ReactNode | string | undefined;
|
|
22
22
|
};
|
|
23
23
|
export declare const DataTable: (props: Props) => JSX.Element | null;
|
|
@@ -24,7 +24,7 @@ export declare type DataTableViewProps = Omit<VizzlyComponents.ViewProps<Compone
|
|
|
24
24
|
dateTimeFormatOptions: DashboardBehaviour['dateTimeFormatOptions'];
|
|
25
25
|
onSetNumberFormat: TableColumnTypes['onSetNumberFormat'];
|
|
26
26
|
library?: boolean;
|
|
27
|
-
onViewClick?: (data: Component.
|
|
27
|
+
onViewClick?: (data: Component.ChartOnViewClick, query?: Component.OnViewClickQuery) => void;
|
|
28
28
|
renderTableCell?: (data: Component.RenderTableCell) => React.ReactNode | string | undefined;
|
|
29
29
|
supportedTimeTruncFunctions: QueryEngineConfig['supportedTimeTruncFunctions'];
|
|
30
30
|
drilldownInputProps?: DrilldownRowInputProps;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AdditionalFilter, Field } from '../../../../shared-logic/src/AdditionalFilter/types';
|
|
2
|
+
export declare const VIZZLY_DASHBOARD_FILTERS = "dashboard_global_filters";
|
|
3
|
+
export declare function buildStorableFilters(filters: AdditionalFilter[]): string;
|
|
4
|
+
export declare function prepareStoredFilters(response: any, globalFilters: AdditionalFilter[], validateFilters: (filter: AdditionalFilter[]) => AdditionalFilter[], checkAppliedToField: (appliesToFieldsOne: Field[], appliesToFieldsTwo: Field[]) => boolean, logErrorCallback: (message: string, data: any) => void, validate: (appliesToFields: Field[]) => string | undefined): {
|
|
5
|
+
validFilters: AdditionalFilter[];
|
|
6
|
+
};
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
import { AdditionalFilter } from '../../../../shared-logic/src/AdditionalFilter/types';
|
|
1
|
+
import { AdditionalFilter, Field } from '../../../../shared-logic/src/AdditionalFilter/types';
|
|
2
2
|
import { StateOptions } from '../../../../shared-logic/src/VizzlyState';
|
|
3
3
|
export declare function updateGlobalFilters(globalFilters: AdditionalFilter[], updateData: StateOptions): AdditionalFilter[];
|
|
4
|
+
export declare function pushStateFilterUpdatesToGlobalFilters(updateFilter: {
|
|
5
|
+
properties: Partial<Omit<AdditionalFilter, 'appliesToFields'>> & {
|
|
6
|
+
appliesToFields: Field[];
|
|
7
|
+
};
|
|
8
|
+
}, globalFilters: AdditionalFilter[], matchFound: boolean, updateData: StateOptions): true;
|
|
9
|
+
export declare function appliedToFieldsMatch(fields1: {
|
|
10
|
+
dataSetId: string;
|
|
11
|
+
fieldId: string;
|
|
12
|
+
}[], fields2: {
|
|
13
|
+
dataSetId: string;
|
|
14
|
+
fieldId: string;
|
|
15
|
+
}[]): boolean;
|