@kanaries/graphic-walker 0.2.13 → 0.2.15
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 +6 -3
- package/dist/assets/explainer.worker-8428eb12.js.map +1 -1
- package/dist/components/button/base.d.ts +1 -0
- package/dist/components/button/defaultMini.d.ts +4 -0
- package/dist/components/button/primaryMini.d.ts +4 -0
- package/dist/components/callout.d.ts +2 -0
- package/dist/components/dropdownContext/index.d.ts +13 -0
- package/dist/components/dropdownSelect/index.d.ts +17 -0
- package/dist/components/modal.d.ts +1 -0
- package/dist/components/toolbar/components.d.ts +4 -1
- package/dist/components/toolbar/index.d.ts +2 -0
- package/dist/components/toolbar/toolbar-item.d.ts +4 -0
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/dataSource/dataSelection/config.d.ts +2 -0
- package/dist/dataSource/index.d.ts +1 -1
- package/dist/fields/components.d.ts +0 -1
- package/dist/fields/datasetFields/dimFields.d.ts +2 -2
- package/dist/fields/datasetFields/meaFields.d.ts +2 -2
- package/dist/fields/encodeFields/singleEncodeDropDown.d.ts +17 -0
- package/dist/fields/encodeFields/singleEncodeEditor.d.ts +11 -0
- package/dist/fields/filterField/filterEditDialog.d.ts +1 -1
- package/dist/fields/obComponents/obPill.d.ts +3 -3
- package/dist/graphic-walker.es.js +21205 -19397
- package/dist/graphic-walker.es.js.map +1 -1
- package/dist/graphic-walker.umd.js +181 -236
- package/dist/graphic-walker.umd.js.map +1 -1
- package/dist/insightBoard/index.d.ts +1 -1
- package/dist/interfaces.d.ts +3 -0
- package/dist/renderer/index.d.ts +7 -3
- package/dist/store/visualSpecStore.d.ts +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/media.d.ts +3 -0
- package/dist/vis/react-vega.d.ts +5 -1
- package/dist/vis/theme.d.ts +146 -0
- package/dist/visualSettings/index.d.ts +2 -1
- package/package.json +2 -1
- package/src/App.tsx +24 -16
- package/src/components/button/base.ts +1 -0
- package/src/components/button/default.tsx +6 -2
- package/src/components/button/defaultMini.tsx +17 -0
- package/src/components/button/primary.tsx +6 -2
- package/src/components/button/primaryMini.tsx +21 -0
- package/src/components/callout.tsx +9 -4
- package/src/components/clickMenu.tsx +1 -5
- package/src/components/dataTable/index.tsx +42 -52
- package/src/components/dataTable/pagination.tsx +4 -4
- package/src/components/dataTypeIcon.tsx +1 -1
- package/src/components/dropdownContext/index.tsx +64 -0
- package/src/components/dropdownSelect/index.tsx +92 -0
- package/src/components/modal.tsx +20 -22
- package/src/components/sizeSetting.tsx +2 -2
- package/src/components/tabs/defaultTab.tsx +4 -4
- package/src/components/tabs/editableTab.tsx +5 -5
- package/src/components/toolbar/components.tsx +10 -8
- package/src/components/toolbar/index.tsx +16 -4
- package/src/components/toolbar/toolbar-button.tsx +8 -2
- package/src/components/toolbar/toolbar-item.tsx +18 -9
- package/src/components/toolbar/toolbar-select-button.tsx +21 -8
- package/src/components/toolbar/toolbar-toggle-button.tsx +8 -2
- package/src/components/tooltip.tsx +10 -3
- package/src/dataSource/dataSelection/config.ts +28 -0
- package/src/dataSource/dataSelection/csvData.tsx +77 -32
- package/src/dataSource/dataSelection/gwFile.tsx +0 -8
- package/src/dataSource/dataSelection/index.tsx +1 -2
- package/src/dataSource/dataSelection/publicData.tsx +2 -3
- package/src/dataSource/index.tsx +80 -61
- package/src/fields/aestheticFields.tsx +3 -1
- package/src/fields/components.tsx +20 -38
- package/src/fields/datasetFields/dimFields.tsx +43 -35
- package/src/fields/datasetFields/index.tsx +3 -4
- package/src/fields/datasetFields/meaFields.tsx +73 -47
- package/src/fields/encodeFields/singleEncodeDropDown.tsx +92 -0
- package/src/fields/encodeFields/singleEncodeEditor.tsx +78 -0
- package/src/fields/filterField/filterEditDialog.tsx +63 -98
- package/src/fields/filterField/filterPill.tsx +1 -1
- package/src/fields/filterField/slider.tsx +2 -2
- package/src/fields/filterField/tabs.tsx +11 -21
- package/src/fields/obComponents/obPill.tsx +65 -35
- package/src/index.css +13 -0
- package/src/insightBoard/index.tsx +24 -23
- package/src/insightBoard/mainBoard.tsx +9 -2
- package/src/insightBoard/radioGroupButtons.tsx +7 -0
- package/src/interfaces.ts +5 -1
- package/src/lib/inferMeta.ts +1 -1
- package/src/locales/en-US.json +11 -5
- package/src/locales/i18n.ts +7 -0
- package/src/locales/ja-JP.json +195 -0
- package/src/locales/zh-CN.json +9 -3
- package/src/main.tsx +1 -1
- package/src/renderer/index.tsx +96 -70
- package/src/store/visualSpecStore.ts +16 -0
- package/src/utils/index.ts +19 -0
- package/src/utils/media.ts +31 -0
- package/src/utils/normalization.ts +2 -1
- package/src/vis/react-vega.tsx +36 -5
- package/src/vis/theme.ts +124 -0
- package/src/visualSettings/index.tsx +29 -33
- package/dist/components/container.d.ts +0 -2
- package/src/components/container.tsx +0 -16
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
|
+
import type { IDarkMode } from "../interfaces";
|
|
2
3
|
export interface CalloutProps {
|
|
3
4
|
target: string;
|
|
4
5
|
children: ReactNode;
|
|
6
|
+
darkModePreference?: IDarkMode;
|
|
5
7
|
}
|
|
6
8
|
declare const Callout: React.NamedExoticComponent<CalloutProps>;
|
|
7
9
|
export default Callout;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface IDropdownContextOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface IDropdownContextProps {
|
|
8
|
+
options?: IDropdownContextOption[];
|
|
9
|
+
disable?: boolean;
|
|
10
|
+
onSelect?: (value: string, index: number) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const DropdownContext: React.FC<IDropdownContextProps>;
|
|
13
|
+
export default DropdownContext;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface IDropdownSelectOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface IDropdownSelectProps {
|
|
8
|
+
options?: IDropdownSelectOption[];
|
|
9
|
+
disable?: boolean;
|
|
10
|
+
selectedKey: string;
|
|
11
|
+
onSelect?: (value: string) => void;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
buttonClassName?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const DropdownSelect: React.FC<IDropdownSelectProps>;
|
|
17
|
+
export default DropdownSelect;
|
|
@@ -4,8 +4,11 @@ export declare const useHandlers: (action: () => void, disabled: boolean, trigge
|
|
|
4
4
|
onKeyDown: (ev: KeyboardEvent) => void;
|
|
5
5
|
onMouseOut: (ev: MouseEvent) => void;
|
|
6
6
|
};
|
|
7
|
-
export declare const ToolbarContainer: import("styled-components").StyledComponent<"div", any, {
|
|
7
|
+
export declare const ToolbarContainer: import("styled-components").StyledComponent<"div", any, {
|
|
8
|
+
dark: boolean;
|
|
9
|
+
}, never>;
|
|
8
10
|
export declare const ToolbarSplitter: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
11
|
export declare const ToolbarItemContainerElement: import("styled-components").StyledComponent<"div", any, {
|
|
10
12
|
split: boolean;
|
|
13
|
+
dark: boolean;
|
|
11
14
|
}, never>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { CSSProperties } from "react";
|
|
2
|
+
import type { IDarkMode } from "../../interfaces";
|
|
2
3
|
import { ToolbarItemProps } from "./toolbar-item";
|
|
3
4
|
export interface ToolbarProps {
|
|
5
|
+
darkModePreference?: IDarkMode;
|
|
4
6
|
items: ToolbarItemProps[];
|
|
5
7
|
styles?: Partial<{
|
|
6
8
|
root: CSSProperties & Record<string, string>;
|
|
@@ -15,23 +15,27 @@ export interface IToolbarItem {
|
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
menu?: ToolbarProps;
|
|
17
17
|
form?: JSX.Element;
|
|
18
|
+
styles?: Partial<Pick<NonNullable<ToolbarProps['styles']>, 'item' | 'icon' | 'splitIcon'>>;
|
|
18
19
|
}
|
|
19
20
|
export declare const ToolbarItemSplitter = "-";
|
|
20
21
|
export type ToolbarItemProps = (ToolbarButtonItem | ToolbarToggleButtonItem | ToolbarSelectButtonItem | typeof ToolbarItemSplitter);
|
|
21
22
|
export interface IToolbarProps<P extends Exclude<ToolbarItemProps, typeof ToolbarItemSplitter> = Exclude<ToolbarItemProps, typeof ToolbarItemSplitter>> {
|
|
22
23
|
item: P;
|
|
24
|
+
darkModePreference: NonNullable<ToolbarProps['darkModePreference']>;
|
|
23
25
|
styles?: ToolbarProps['styles'];
|
|
24
26
|
openedKey: string | null;
|
|
25
27
|
setOpenedKey: (key: string | null) => void;
|
|
26
28
|
renderSlot: (node: ReactNode) => void;
|
|
27
29
|
}
|
|
28
30
|
export declare const ToolbarItemContainer: React.NamedExoticComponent<{
|
|
31
|
+
darkModePreference: NonNullable<ToolbarProps['darkModePreference']>;
|
|
29
32
|
props: IToolbarProps;
|
|
30
33
|
handlers: ReturnType<typeof useHandlers> | null;
|
|
31
34
|
children: unknown;
|
|
32
35
|
} & React.HTMLAttributes<HTMLDivElement>>;
|
|
33
36
|
declare const ToolbarItem: React.NamedExoticComponent<{
|
|
34
37
|
item: ToolbarItemProps;
|
|
38
|
+
darkModePreference: NonNullable<ToolbarProps['darkModePreference']>;
|
|
35
39
|
styles?: ToolbarProps['styles'];
|
|
36
40
|
openedKey: string | null;
|
|
37
41
|
setOpenedKey: (key: string | null) => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { IDarkMode } from "../interfaces";
|
|
2
3
|
export interface TooltipProps {
|
|
3
4
|
children: JSX.Element;
|
|
4
5
|
content: string | JSX.Element | JSX.Element[];
|
|
@@ -8,6 +9,7 @@ export interface TooltipProps {
|
|
|
8
9
|
hideDelay?: number;
|
|
9
10
|
/** @default 3_000 */
|
|
10
11
|
autoHide?: number;
|
|
12
|
+
darkModePreference: IDarkMode;
|
|
11
13
|
}
|
|
12
14
|
declare const Tooltip: React.NamedExoticComponent<TooltipProps>;
|
|
13
15
|
export default Tooltip;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface IDropdownSelectOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface IDropdownSelectProps {
|
|
8
|
+
options?: IDropdownSelectOption[];
|
|
9
|
+
disable?: boolean;
|
|
10
|
+
selectedKey: string;
|
|
11
|
+
onSelect?: (value: string) => void;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
buttonClassName?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const DropdownSelect: React.FC<IDropdownSelectProps>;
|
|
17
|
+
export default DropdownSelect;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IDraggableStateKey } from "../../interfaces";
|
|
3
|
+
import { DroppableProvided } from "react-beautiful-dnd";
|
|
4
|
+
import { DroppableStateSnapshot } from "@kanaries/react-beautiful-dnd";
|
|
5
|
+
interface SingleEncodeEditorProps {
|
|
6
|
+
dkey: IDraggableStateKey;
|
|
7
|
+
provided: DroppableProvided;
|
|
8
|
+
snapshot: DroppableStateSnapshot;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: React.FunctionComponent<SingleEncodeEditorProps>;
|
|
11
|
+
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { DraggableProvided } from
|
|
3
|
-
import { IDraggableStateKey } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DraggableProvided } from "@kanaries/react-beautiful-dnd";
|
|
3
|
+
import { IDraggableStateKey } from "../../interfaces";
|
|
4
4
|
interface PillProps {
|
|
5
5
|
provided: DraggableProvided;
|
|
6
6
|
fIndex: number;
|