@kanaries/graphic-walker 0.2.9 → 0.2.10
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/App.d.ts +0 -2
- package/dist/components/callout.d.ts +7 -0
- package/dist/components/sizeSetting.d.ts +1 -0
- package/dist/components/toolbar/components.d.ts +11 -0
- package/dist/components/toolbar/index.d.ts +15 -0
- package/dist/components/toolbar/toolbar-button.d.ts +7 -0
- package/dist/components/toolbar/toolbar-item.d.ts +40 -0
- package/dist/components/toolbar/toolbar-select-button.d.ts +18 -0
- package/dist/components/toolbar/toolbar-toggle-button.d.ts +8 -0
- package/dist/components/tooltip.d.ts +13 -0
- package/dist/fields/datasetFields/dimFields.d.ts +1 -1
- package/dist/fields/datasetFields/meaFields.d.ts +1 -1
- package/dist/fields/filterField/filterPill.d.ts +1 -1
- package/dist/fields/obComponents/obFContainer.d.ts +1 -1
- package/dist/fields/obComponents/obPill.d.ts +1 -1
- package/dist/graphic-walker.es.js +56487 -55304
- package/dist/graphic-walker.es.js.map +1 -1
- package/dist/graphic-walker.umd.js +501 -288
- package/dist/graphic-walker.umd.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/style.css +0 -1
- package/dist/utils/throttle.d.ts +5 -0
- package/dist/visualSettings/menubar.d.ts +8 -0
- package/package.json +4 -2
- package/src/App.tsx +0 -4
- package/src/components/callout.tsx +58 -0
- package/src/components/sizeSetting.tsx +61 -49
- package/src/components/tabs/pureTab.tsx +7 -1
- package/src/components/toolbar/components.tsx +110 -0
- package/src/components/toolbar/index.tsx +57 -0
- package/src/components/toolbar/toolbar-button.tsx +28 -0
- package/src/components/toolbar/toolbar-item.tsx +218 -0
- package/src/components/toolbar/toolbar-select-button.tsx +196 -0
- package/src/components/toolbar/toolbar-toggle-button.tsx +70 -0
- package/src/components/tooltip.tsx +135 -0
- package/src/empty_sheet.css +9 -0
- package/src/fields/aestheticFields.tsx +1 -1
- package/src/fields/datasetFields/dimFields.tsx +3 -3
- package/src/fields/datasetFields/index.tsx +2 -2
- package/src/fields/datasetFields/meaFields.tsx +3 -3
- package/src/fields/fieldsContext.tsx +1 -1
- package/src/fields/filterField/filterPill.tsx +1 -1
- package/src/fields/filterField/index.tsx +1 -1
- package/src/fields/obComponents/obFContainer.tsx +1 -1
- package/src/fields/obComponents/obPill.tsx +1 -1
- package/src/fields/posFields/index.tsx +1 -1
- package/src/global.d.ts +7 -0
- package/src/index.tsx +47 -8
- package/src/store/visualSpecStore.ts +1 -1
- package/src/utils/throttle.ts +28 -0
- package/src/visualSettings/index.tsx +316 -321
- package/src/visualSettings/menubar.tsx +1 -1
package/dist/App.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Specification } from 'visual-insights';
|
|
3
3
|
import { IMutField, IRow } from './interfaces';
|
|
4
|
-
import "tailwindcss/tailwind.css";
|
|
5
|
-
import './index.css';
|
|
6
4
|
export interface EditorProps {
|
|
7
5
|
dataSource?: IRow[];
|
|
8
6
|
rawFields?: IMutField[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { KeyboardEvent, MouseEvent } from "react";
|
|
2
|
+
export declare const useHandlers: (action: () => void, disabled: boolean, triggerKeys?: string[], allowPropagation?: boolean) => {
|
|
3
|
+
onClick: (ev: MouseEvent) => void;
|
|
4
|
+
onKeyDown: (ev: KeyboardEvent) => void;
|
|
5
|
+
onMouseOut: (ev: MouseEvent) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const ToolbarContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const ToolbarSplitter: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export declare const ToolbarItemContainerElement: import("styled-components").StyledComponent<"div", any, {
|
|
10
|
+
split: boolean;
|
|
11
|
+
}, never>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { CSSProperties } from "react";
|
|
2
|
+
import { ToolbarItemProps } from "./toolbar-item";
|
|
3
|
+
export interface ToolbarProps {
|
|
4
|
+
items: ToolbarItemProps[];
|
|
5
|
+
styles?: Partial<{
|
|
6
|
+
root: CSSProperties & Record<string, string>;
|
|
7
|
+
container: CSSProperties & Record<string, string>;
|
|
8
|
+
item: CSSProperties & Record<string, string>;
|
|
9
|
+
icon: CSSProperties & Record<string, string>;
|
|
10
|
+
splitIcon: CSSProperties & Record<string, string>;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
declare const Toolbar: React.NamedExoticComponent<ToolbarProps>;
|
|
14
|
+
export default Toolbar;
|
|
15
|
+
export type { ToolbarItemProps };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IToolbarItem, IToolbarProps } from "./toolbar-item";
|
|
3
|
+
export interface ToolbarButtonItem extends IToolbarItem {
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
}
|
|
6
|
+
declare const ToolbarButton: React.NamedExoticComponent<IToolbarProps<ToolbarButtonItem>>;
|
|
7
|
+
export default ToolbarButton;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import { ToolbarButtonItem } from "./toolbar-button";
|
|
3
|
+
import { ToolbarToggleButtonItem } from "./toolbar-toggle-button";
|
|
4
|
+
import { ToolbarSelectButtonItem } from "./toolbar-select-button";
|
|
5
|
+
import { useHandlers } from "./components";
|
|
6
|
+
import { ToolbarProps } from ".";
|
|
7
|
+
export interface IToolbarItem {
|
|
8
|
+
key: string;
|
|
9
|
+
icon: (props: React.ComponentProps<'svg'> & {
|
|
10
|
+
title?: string;
|
|
11
|
+
titleId?: string;
|
|
12
|
+
}) => JSX.Element;
|
|
13
|
+
label: string;
|
|
14
|
+
/** @default false */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
menu?: ToolbarProps;
|
|
17
|
+
form?: JSX.Element;
|
|
18
|
+
}
|
|
19
|
+
export declare const ToolbarItemSplitter = "-";
|
|
20
|
+
export type ToolbarItemProps = (ToolbarButtonItem | ToolbarToggleButtonItem | ToolbarSelectButtonItem | typeof ToolbarItemSplitter);
|
|
21
|
+
export interface IToolbarProps<P extends Exclude<ToolbarItemProps, typeof ToolbarItemSplitter> = Exclude<ToolbarItemProps, typeof ToolbarItemSplitter>> {
|
|
22
|
+
item: P;
|
|
23
|
+
styles?: ToolbarProps['styles'];
|
|
24
|
+
openedKey: string | null;
|
|
25
|
+
setOpenedKey: (key: string | null) => void;
|
|
26
|
+
renderSlot: (node: ReactNode) => void;
|
|
27
|
+
}
|
|
28
|
+
export declare const ToolbarItemContainer: React.NamedExoticComponent<{
|
|
29
|
+
props: IToolbarProps;
|
|
30
|
+
handlers: ReturnType<typeof useHandlers> | null;
|
|
31
|
+
children: unknown;
|
|
32
|
+
} & React.HTMLAttributes<HTMLDivElement>>;
|
|
33
|
+
declare const ToolbarItem: React.NamedExoticComponent<{
|
|
34
|
+
item: ToolbarItemProps;
|
|
35
|
+
styles?: ToolbarProps['styles'];
|
|
36
|
+
openedKey: string | null;
|
|
37
|
+
setOpenedKey: (key: string | null) => void;
|
|
38
|
+
renderSlot: (node: ReactNode) => void;
|
|
39
|
+
}>;
|
|
40
|
+
export default ToolbarItem;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IToolbarItem, IToolbarProps } from "./toolbar-item";
|
|
3
|
+
export interface ToolbarSelectButtonItem<T extends string = string> extends IToolbarItem {
|
|
4
|
+
options: {
|
|
5
|
+
key: T;
|
|
6
|
+
icon: (props: React.SVGProps<SVGSVGElement> & {
|
|
7
|
+
title?: string | undefined;
|
|
8
|
+
titleId?: string | undefined;
|
|
9
|
+
}) => JSX.Element;
|
|
10
|
+
label: string;
|
|
11
|
+
/** @default false */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}[];
|
|
14
|
+
value: T;
|
|
15
|
+
onSelect: (value: T) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const ToolbarSelectButton: React.NamedExoticComponent<IToolbarProps<ToolbarSelectButtonItem<string>>>;
|
|
18
|
+
export default ToolbarSelectButton;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IToolbarItem, IToolbarProps } from "./toolbar-item";
|
|
3
|
+
export interface ToolbarToggleButtonItem extends IToolbarItem {
|
|
4
|
+
checked: boolean;
|
|
5
|
+
onChange: (checked: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const ToolbarToggleButton: React.NamedExoticComponent<IToolbarProps<ToolbarToggleButtonItem>>;
|
|
8
|
+
export default ToolbarToggleButton;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface TooltipProps {
|
|
3
|
+
children: JSX.Element;
|
|
4
|
+
content: string | JSX.Element | JSX.Element[];
|
|
5
|
+
/** @default 250 */
|
|
6
|
+
showDelay?: number;
|
|
7
|
+
/** @default 250 */
|
|
8
|
+
hideDelay?: number;
|
|
9
|
+
/** @default 3_000 */
|
|
10
|
+
autoHide?: number;
|
|
11
|
+
}
|
|
12
|
+
declare const Tooltip: React.NamedExoticComponent<TooltipProps>;
|
|
13
|
+
export default Tooltip;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DroppableProvided } from "react-beautiful-dnd";
|
|
2
|
+
import { DroppableProvided } from "@kanaries/react-beautiful-dnd";
|
|
3
3
|
import { IDraggableStateKey } from '../../interfaces';
|
|
4
4
|
interface FieldContainerProps {
|
|
5
5
|
provided: DroppableProvided;
|