@vizzly/dashboard 0.6.3 → 0.6.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.
Files changed (62) hide show
  1. package/dist/charts/src/XYChart/Axis/XAxis.d.ts +2 -0
  2. package/dist/charts/src/XYChart/Axis/axis.d.ts +9 -1
  3. package/dist/charts/src/XYChart/AxisTitle.d.ts +1 -0
  4. package/dist/charts/src/XYChart/logic/constants.d.ts +1 -7
  5. package/dist/dashboard/src/index.d.ts +4 -4
  6. package/dist/dashboard/src/sdk.d.ts +2 -2
  7. package/dist/index.js +1 -1
  8. package/dist/shared-logic/src/Component/Component.d.ts +2 -2
  9. package/dist/shared-logic/src/Component/dumpable.d.ts +2 -1
  10. package/dist/shared-logic/src/Display/Display.d.ts +9 -6
  11. package/dist/shared-logic/src/Display/types.d.ts +6 -2
  12. package/dist/shared-logic/src/Display/upcast.d.ts +2 -2
  13. package/dist/shared-logic/src/Theme/Theme.d.ts +1 -0
  14. package/dist/shared-logic/src/Theme/types.d.ts +17 -1
  15. package/dist/shared-ui/src/base/Accordion/Accordion.styles.d.ts +1 -1
  16. package/dist/shared-ui/src/base/ActionSection/ActionSection.d.ts +3 -1
  17. package/dist/shared-ui/src/base/Alert/Alert.styles.d.ts +4 -4
  18. package/dist/shared-ui/src/base/AppStyles/AppStyles.styles.d.ts +1 -0
  19. package/dist/shared-ui/src/base/AppStyles/AppStyling.d.ts +0 -2
  20. package/dist/shared-ui/src/base/Button/Button.d.ts +2 -1
  21. package/dist/shared-ui/src/base/Button/Button.styles.d.ts +1 -1
  22. package/dist/shared-ui/src/base/DateTime/DateOptionsPopup.d.ts +1 -1
  23. package/dist/shared-ui/src/base/DateTime/DatePicker.styles.d.ts +7 -8
  24. package/dist/shared-ui/src/base/Dropdown/Dropdown.styles.d.ts +3 -3
  25. package/dist/shared-ui/src/base/Input/Input.styles.d.ts +1 -1
  26. package/dist/shared-ui/src/base/Label/Label.styles.d.ts +1 -1
  27. package/dist/shared-ui/src/base/ListView/List.styles.d.ts +6 -6
  28. package/dist/shared-ui/src/base/Modal/Modal.styles.d.ts +4 -4
  29. package/dist/shared-ui/src/base/Panel/Panel.styles.d.ts +1 -1
  30. package/dist/shared-ui/src/base/PopoverMenu/PopoverMenu.styles.d.ts +2 -2
  31. package/dist/shared-ui/src/base/Prompt/Prompt.styles.d.ts +1 -1
  32. package/dist/shared-ui/src/base/RadioGroup/RadioGroup.styles.d.ts +2 -2
  33. package/dist/shared-ui/src/base/Search/Search.styles.d.ts +2 -2
  34. package/dist/shared-ui/src/base/Select/Control.styles.d.ts +5 -5
  35. package/dist/shared-ui/src/base/Tab/Tab.styles.d.ts +2 -2
  36. package/dist/shared-ui/src/base/Table/Table.styles.d.ts +9 -9
  37. package/dist/shared-ui/src/base/Toolbar/Toolbar.d.ts +20 -0
  38. package/dist/shared-ui/src/base/layout/View.d.ts +1 -0
  39. package/dist/shared-ui/src/base/page/Page.d.ts +1 -0
  40. package/dist/shared-ui/src/base/styles/overlay.styles.d.ts +1 -1
  41. package/dist/shared-ui/src/components/Studio/AddContent/AddContent.d.ts +1 -0
  42. package/dist/shared-ui/src/components/Studio/StudioApp/Cell.styles.d.ts +1 -1
  43. package/dist/shared-ui/src/components/Studio/StudioApp/ComponentOptions.d.ts +6 -0
  44. package/dist/shared-ui/src/components/Studio/StudioApp/dashboardIconStyles.styles.d.ts +1 -1
  45. package/dist/shared-ui/src/components/ViewHeader/ViewHeader.styles.d.ts +3 -3
  46. package/dist/shared-ui/src/contexts/DashboardContext/reducer.d.ts +2 -2
  47. package/dist/shared-ui/src/contexts/DashboardContext/types.d.ts +12 -1
  48. package/dist/shared-ui/src/contexts/ThemeProvider/ThemeProvider.d.ts +0 -1
  49. package/dist/shared-ui/src/contexts/ThemeProvider/default.theme.d.ts +3 -1
  50. package/dist/shared-ui/src/library/Button/index.d.ts +2 -1
  51. package/dist/shared-ui/src/library/Dashboard/EditTitleModal.d.ts +9 -0
  52. package/dist/shared-ui/src/library/Dashboard/HeaderRow.d.ts +9 -0
  53. package/dist/shared-ui/src/library/DataPanel/CustomMetrics/FieldsUsedModal.d.ts +8 -0
  54. package/dist/shared-ui/src/library/DataPanel/CustomMetricsInput.d.ts +2 -0
  55. package/dist/shared-ui/src/library/DataPanel/FilterInput/FilterInputForm.d.ts +1 -1
  56. package/dist/shared-ui/src/library/DataPanel/index.d.ts +0 -1
  57. package/dist/shared-ui/src/library/Editor/Editor.styles.d.ts +1 -1
  58. package/dist/shared-ui/src/library/Library/Library.styles.d.ts +1 -1
  59. package/dist/shared-ui/src/library/ResizableRow/ResizableRow.styles.d.ts +1 -1
  60. package/dist/shared-ui/src/library/ResizableRow.d.ts +8 -5
  61. package/package.json +2 -3
  62. package/dist/shared-ui/src/library/DataPanel/LimitInput.d.ts +0 -10
@@ -1,6 +1,6 @@
1
1
  import { VizzlyTheming } from '../../../types';
2
2
  export declare const cellStyles: (() => null) & {
3
- emptyCell: (styles?: VizzlyTheming.Dashboard | undefined) => {
3
+ emptyCell: (themedStyles?: VizzlyTheming.Dashboard | undefined) => {
4
4
  (variantOptions: Object): string;
5
5
  toString: any;
6
6
  };
@@ -3,6 +3,10 @@ import { VizzlyComponents } from '../../../types';
3
3
  import { Component } from '../../../../../shared-logic/src/Component/types';
4
4
  import { DownloadType } from '../../../api/useQueryEffect/download';
5
5
  export declare const GenericComponentOptions: VizzlyComponents.ComponentOverrides.renderComponentOptions;
6
+ export declare const GenericComponentOptionsMenu: (props: {
7
+ cellOptions: VizzlyComponents.ComponentOverrides.Props.ComponentOptions.CellOption[];
8
+ chartLabel?: string;
9
+ }) => JSX.Element;
6
10
  export declare const PopulatedComponentOptions: (props: {
7
11
  component: Component;
8
12
  onRemove: () => void;
@@ -22,3 +26,5 @@ export declare const UnPopulatedComponentOptions: (props: {
22
26
  onRemoveCell: () => void;
23
27
  chartLabel?: string;
24
28
  }) => JSX.Element | null;
29
+ export declare const DeleteIcon: () => JSX.Element;
30
+ export declare const EditIcon: () => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { VizzlyTheming } from '../../../../../shared-logic/src/Theme/types';
2
- export declare const dashboardIconStyles: (theme?: VizzlyTheming.Dashboard | undefined) => {
2
+ export declare const dashboardIconStyles: (themedStyles?: VizzlyTheming.Dashboard | undefined) => {
3
3
  (variantOptions: Object): string;
4
4
  toString: any;
5
5
  };
@@ -1,14 +1,14 @@
1
1
  import { VizzlyTheming } from '../../types';
2
2
  export declare const componenHeaderStyle: (() => null) & {
3
- title: (charts?: VizzlyTheming.Charts | undefined) => {
3
+ title: (themedStyles?: VizzlyTheming.Charts | undefined) => {
4
4
  (variantOptions: Object): string;
5
5
  toString: any;
6
6
  };
7
- subject: (charts?: VizzlyTheming.Charts | undefined) => {
7
+ subject: (themedStyles?: VizzlyTheming.Charts | undefined) => {
8
8
  (variantOptions: Object): string;
9
9
  toString: any;
10
10
  };
11
- verified: (styles?: VizzlyTheming.Library | undefined) => {
11
+ verified: (themedStyles?: VizzlyTheming.Library | undefined) => {
12
12
  (variantOptions: Object): string;
13
13
  toString: any;
14
14
  };
@@ -1,5 +1,5 @@
1
1
  import { PipelineTransformationOptions, StudioAction, StudioState } from './types';
2
2
  import { Component as ComponentType } from '../../../../shared-logic/src/Component/types';
3
- import { EmptyCell } from '../../../../shared-logic/src/Display/types';
4
- export declare const _setComponentInDisplayHelper: (state: StudioState, component: ComponentType | EmptyCell, rowIndex: number, cellIndex: number) => StudioState;
3
+ import { EmptyCell, HeaderComponent } from '../../../../shared-logic/src/Display/types';
4
+ export declare const _setComponentInDisplayHelper: (state: StudioState, component: ComponentType | EmptyCell | HeaderComponent, rowIndex: number, cellIndex: number) => StudioState;
5
5
  export declare const reducer: (pipelineTransformationOptions: PipelineTransformationOptions) => (state: StudioState, action: StudioAction) => StudioState;
@@ -10,6 +10,7 @@ import { Report } from '../../../../shared-logic/src/Report/types';
10
10
  import { AdditionalFilter } from '../../../../shared-logic/src/AdditionalFilter/types';
11
11
  import { DashboardBehaviour } from '../DashboardBehaviour/types';
12
12
  import { UpdatedMetrics } from '../../../../shared-logic/src/Parameters';
13
+ import { HeaderComponent } from '../../../../shared-logic/src/Display/types';
13
14
  export declare type DisplayTarget = {
14
15
  rowIndex: number;
15
16
  cellIndex: number;
@@ -75,6 +76,10 @@ export declare type AppendCellAction = {
75
76
  type: 'appendCell';
76
77
  rowIndex: number;
77
78
  };
79
+ export declare type AddHeaderRowAction = {
80
+ type: 'addHeaderRow';
81
+ rowIndex: number;
82
+ };
78
83
  export declare type RemoveCellAction = {
79
84
  type: 'removeCell';
80
85
  rowIndex: number;
@@ -152,6 +157,12 @@ export declare type SetAttributesAction = {
152
157
  rowIndex: number;
153
158
  cellIndex: number;
154
159
  };
160
+ export declare type SetHeaderComponentAction = {
161
+ type: 'setHeaderComponent';
162
+ component: HeaderComponent;
163
+ rowIndex: number;
164
+ cellIndex: number;
165
+ };
155
166
  export declare type SetParameterBasedUpdateAction = {
156
167
  type: 'setParameterBasedUpdate';
157
168
  payload: UpdatedMetrics;
@@ -189,7 +200,7 @@ export declare type PickComponentFromLibraryForDisplayAction = {
189
200
  export declare type InitAction = {
190
201
  type: 'init';
191
202
  };
192
- export declare type StudioAction = InitAction | SetDashboardAction | SaveComponentAction | ClearModalAction | InsertRowAction | AppendCellAction | RemoveCellAction | ClearCellAction | RemoveRowAction | AddDataSetAction | RemoveDataSetAction | SetDataSetsAction | SetLocalFiltersAction | SetAttributesAction | UpdateEditorComponentAction | SetResultsForComponentInDisplayAction | SetResultsForComponentInEditorAction | SetResultsForComponentInLibraryAction | StartEditingComponentAction | StartPickingComponentFromLibraryForDisplayAction | PickComponentFromLibraryForDisplayAction | SetThemeAction | SetGlobalFiltersAction | ChangePreviewModeAction | UpdateDisplayComponentAttributesAction | UpdateComponentLibraryAttributesAction | RemoveComponentFromLibraryAction | AddCustomComponentAction | SetColSpansAction | SetRowHeightAction | SetComponentReportsAction | SwapComponentsAction | SetParameterBasedUpdateAction;
203
+ export declare type StudioAction = InitAction | SetDashboardAction | SaveComponentAction | ClearModalAction | InsertRowAction | AppendCellAction | AddHeaderRowAction | SetHeaderComponentAction | RemoveCellAction | ClearCellAction | RemoveRowAction | AddDataSetAction | RemoveDataSetAction | SetDataSetsAction | SetLocalFiltersAction | SetAttributesAction | UpdateEditorComponentAction | SetResultsForComponentInDisplayAction | SetResultsForComponentInEditorAction | SetResultsForComponentInLibraryAction | StartEditingComponentAction | StartPickingComponentFromLibraryForDisplayAction | PickComponentFromLibraryForDisplayAction | SetThemeAction | SetGlobalFiltersAction | ChangePreviewModeAction | UpdateDisplayComponentAttributesAction | UpdateComponentLibraryAttributesAction | RemoveComponentFromLibraryAction | AddCustomComponentAction | SetColSpansAction | SetRowHeightAction | SetComponentReportsAction | SwapComponentsAction | SetParameterBasedUpdateAction;
193
204
  export declare type PipelineTransformationOptions = {
194
205
  dashboardFilters: DashboardBehaviour['dashboardFilters'];
195
206
  onDashboardFilterChange: DashboardBehaviour['onDashboardFilterChange'];
@@ -7,4 +7,3 @@ export declare type ThemeProviderProps = {
7
7
  storedTheme?: Theme;
8
8
  };
9
9
  export declare const ThemeProvider: FunctionComponent<ThemeProviderProps>;
10
- export declare const chartTheme: (styles?: VizzlyTheming.Charts | undefined) => VizzlyTheming.Charts;
@@ -1,2 +1,4 @@
1
+ import { ThemeVersion } from '../../../../shared-logic/src/Theme/types';
1
2
  import { VizzlyTheming } from '../../types';
2
- export declare const defaultTheme: VizzlyTheming.Base;
3
+ export declare const loadDefaultTheme: (version: ThemeVersion) => VizzlyTheming.Base;
4
+ export declare const defaultThemeV2: VizzlyTheming.Base;
@@ -1,4 +1,4 @@
1
- import { VizzlyComponents } from '../../types';
1
+ import { VizzlyComponents, VizzlyTheming } from '../../types';
2
2
  export declare type Props = VizzlyComponents.ComponentOverrides.Props.Button & {
3
3
  autoFeedback?: boolean;
4
4
  testId?: string;
@@ -6,5 +6,6 @@ export declare type Props = VizzlyComponents.ComponentOverrides.Props.Button & {
6
6
  block?: boolean;
7
7
  internal?: boolean;
8
8
  className?: string;
9
+ themeOverride?: VizzlyTheming.ButtonType;
9
10
  };
10
11
  export declare const Button: (props: Props) => JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { HeaderComponent } from '../../../../shared-logic/src/Display/types';
3
+ export declare const EditTitleModal: FunctionComponent<{
4
+ show: boolean;
5
+ onClose: () => void;
6
+ component: HeaderComponent;
7
+ cellIndex: number;
8
+ rowIndex: number;
9
+ }>;
@@ -0,0 +1,9 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { HeaderComponent, Display as DisplayType } from '../../../../shared-logic/src/Display/types';
3
+ export declare const HeaderRow: FunctionComponent<{
4
+ component: HeaderComponent;
5
+ onRemove: () => void;
6
+ cellIndex: number;
7
+ rowIndex: number;
8
+ }>;
9
+ export declare function previousIsHeaderRow(display: DisplayType, rowIndex: number): boolean;
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { CustomField } from '../../../../../shared-logic/src/CustomField/types';
3
+ export declare const FieldsUsedModal: FunctionComponent<{
4
+ show: boolean;
5
+ onClose: (confirmed: boolean) => void;
6
+ fieldsUsedModal?: string[];
7
+ customFields: CustomField[];
8
+ }>;
@@ -1,4 +1,5 @@
1
1
  import { DataSet } from '../../../../shared-logic/src/DataSet/types';
2
+ import { CustomField } from '../../../../shared-logic/src/CustomField/types';
2
3
  import 'twin.macro';
3
4
  import { QueryEngineConfig } from '../../../../shared-logic/src/QueryEngineConfig/types';
4
5
  import { ComponentType } from '../../../../shared-logic/src/Component/types';
@@ -10,4 +11,5 @@ declare type Props = {
10
11
  componentType: ComponentType;
11
12
  };
12
13
  export declare const CustomMetricsInput: (props: Props) => JSX.Element | null;
14
+ export declare function checkIfFieldIsInARule(customFields: CustomField[], customField: CustomField): string[];
13
15
  export {};
@@ -4,7 +4,7 @@ import { WipFilter } from './types';
4
4
  import 'twin.macro';
5
5
  import { QueryEngineConfig } from '../../../../../shared-logic/src/QueryEngineConfig/types';
6
6
  export declare const FilterInputForm: (props: {
7
- fieldHeadingOverride?: "field" | "metric" | undefined;
7
+ fieldHeadingOverride?: "Field" | "Metric" | undefined;
8
8
  wipFilters: WipFilter[][];
9
9
  completedFilters: QueryAttributes.Filter[][];
10
10
  dataSet: DataSetType;
@@ -9,5 +9,4 @@ export * from './SortInput';
9
9
  export * from './CustomMetricsInput';
10
10
  export * from './FieldCollectorInput';
11
11
  export { FilterInput } from './FilterInput';
12
- export { LimitInput } from './LimitInput';
13
12
  export * from '../PanelInput/NumberInput';
@@ -1,5 +1,5 @@
1
1
  export declare const editorStyles: (() => null) & {
2
- panel: {
2
+ panel: (themeVersion?: 1 | 2 | undefined) => {
3
3
  (variantOptions: Object): string;
4
4
  toString: any;
5
5
  };
@@ -1,6 +1,6 @@
1
1
  import { VizzlyTheming } from '../../../../shared-logic/src/Theme/types';
2
2
  export declare const libraryStyles: (() => null) & {
3
- selectedComponent: (styles?: VizzlyTheming.Panel | undefined) => {
3
+ selectedComponent: (themedStyles?: VizzlyTheming.Panel | undefined) => {
4
4
  (variantOptions: Object): string;
5
5
  toString: any;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { VizzlyTheming } from '../../types';
2
2
  export declare const resizableRowStyles: (() => null) & {
3
- dragHandle: (styles?: VizzlyTheming.Dashboard | undefined) => {
3
+ dragHandle: (themedStyles?: VizzlyTheming.Dashboard | undefined) => {
4
4
  (variantOptions: Object): string;
5
5
  toString: any;
6
6
  };
@@ -1,11 +1,14 @@
1
+ import { FunctionComponent } from 'react';
1
2
  import { DisplayRow } from '../../../shared-logic/src/Display/types';
2
3
  import { ResizableRowCellProps } from './ResizableRowCell';
3
- declare type Props = Omit<ResizableRowCellProps, 'cellIndex' | 'isBeingSizeAdjusted' | 'downloadAsCsv'> & {
4
- rowHighlighted: boolean;
4
+ export declare const ResizableRow: FunctionComponent<Omit<ResizableRowCellProps, 'cellIndex' | 'isBeingSizeAdjusted' | 'downloadAsCsv'> & {
5
5
  displayRow: DisplayRow;
6
6
  onColSpanChange: (newColSpans: Array<{
7
7
  colSpan: number;
8
8
  }>) => void;
9
- };
10
- export declare const ResizableRow: (props: Props) => JSX.Element;
11
- export {};
9
+ canAddNewCells: boolean;
10
+ columns: string[];
11
+ onAppendCell: () => void;
12
+ onAddHeaderRow: () => void;
13
+ hideAddNewHeaderRow?: boolean;
14
+ }>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vizzly/dashboard",
3
3
  "author": "james@vizzly.co",
4
- "version": "0.6.3",
4
+ "version": "0.6.4",
5
5
  "source": "src/index.tsx",
6
6
  "types": "./dist/dashboard/src/index.d.ts",
7
7
  "main": "dist/index.js",
@@ -44,7 +44,7 @@
44
44
  "joi": "^17.7.0",
45
45
  "lodash": "^4.17.21",
46
46
  "lodash-es": "^4.17.21",
47
- "react-dates": "^21.8.0",
47
+ "react-dates-17": "22.0.4",
48
48
  "react-dnd": "^15.1",
49
49
  "react-dnd-html5-backend": "^15.0.1",
50
50
  "react-popper": "^2.3.0",
@@ -70,7 +70,6 @@
70
70
  "@types/jest": "^27.0.2",
71
71
  "@types/lodash": "^4.14.186",
72
72
  "@types/react": "^18.0.15",
73
- "@types/react-dates": "^21.8.3",
74
73
  "@types/react-dom": "^18.0.6",
75
74
  "@types/topojson-client": "^3.1.1",
76
75
  "@types/uuid": "^8.3.4",
@@ -1,10 +0,0 @@
1
- import { VizzlyComponents } from '../../types';
2
- import 'twin.macro';
3
- declare type ManagedProps = {
4
- limit?: number | undefined;
5
- };
6
- export declare type Props = VizzlyComponents.ManagePartialAttributes<ManagedProps> & {
7
- promptWhenLimitHit?: boolean;
8
- };
9
- export declare const LimitInput: (inputProps: Props) => JSX.Element;
10
- export {};