@kanaries/graphic-walker 0.1.0 → 0.2.1

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/LICENSE +198 -12
  2. package/dist/App.d.ts +6 -2
  3. package/dist/assets/explainer.worker.c6f22bad.js.map +1 -0
  4. package/dist/assets/filter.worker.6216b48e.js.map +1 -0
  5. package/dist/components/container.d.ts +2 -2
  6. package/dist/components/dataTypeIcon.d.ts +2 -1
  7. package/dist/components/liteForm.d.ts +1 -1
  8. package/dist/components/sizeSetting.d.ts +9 -0
  9. package/dist/components/tabs/pureTab.d.ts +15 -0
  10. package/dist/config.d.ts +6 -4
  11. package/dist/constants.d.ts +1 -0
  12. package/dist/dataSource/config.d.ts +26 -0
  13. package/dist/dataSource/dataSelection/csvData.d.ts +5 -0
  14. package/dist/dataSource/dataSelection/index.d.ts +3 -0
  15. package/dist/dataSource/dataSelection/publicData.d.ts +5 -0
  16. package/dist/dataSource/utils.d.ts +3 -3
  17. package/dist/{Fields/AestheticFields.d.ts → fields/aestheticFields.d.ts} +0 -0
  18. package/dist/fields/components.d.ts +14 -0
  19. package/dist/{Fields → fields}/datasetFields/dimFields.d.ts +0 -0
  20. package/dist/fields/datasetFields/fieldPill.d.ts +5 -0
  21. package/dist/{Fields → fields}/datasetFields/index.d.ts +0 -0
  22. package/dist/{Fields → fields}/datasetFields/meaFields.d.ts +0 -0
  23. package/dist/{Fields → fields}/fieldsContext.d.ts +2 -5
  24. package/dist/fields/filterField/filterEditDialog.d.ts +3 -0
  25. package/dist/fields/filterField/filterPill.d.ts +8 -0
  26. package/dist/fields/filterField/index.d.ts +3 -0
  27. package/dist/fields/filterField/slider.d.ts +10 -0
  28. package/dist/fields/filterField/tabs.d.ts +21 -0
  29. package/dist/{Fields → fields}/obComponents/obFContainer.d.ts +0 -0
  30. package/dist/{Fields → fields}/obComponents/obPill.d.ts +0 -0
  31. package/dist/{InsightBoard → fields/posFields}/index.d.ts +0 -0
  32. package/dist/{Fields → fields}/select.d.ts +0 -0
  33. package/dist/{Fields → fields}/utils.d.ts +0 -0
  34. package/dist/graphic-walker.es.js +62525 -1282
  35. package/dist/graphic-walker.es.js.map +1 -1
  36. package/dist/graphic-walker.umd.js +502 -1309
  37. package/dist/graphic-walker.umd.js.map +1 -1
  38. package/dist/insightBoard/index.d.ts +3 -0
  39. package/dist/{InsightBoard → insightBoard}/mainBoard.d.ts +5 -5
  40. package/dist/{InsightBoard → insightBoard}/radioGroupButtons.d.ts +0 -0
  41. package/dist/{InsightBoard → insightBoard}/selectionSpec.d.ts +0 -0
  42. package/dist/{InsightBoard → insightBoard}/std2vegaSpec.d.ts +3 -6
  43. package/dist/{InsightBoard → insightBoard}/utils.d.ts +2 -1
  44. package/dist/insights.d.ts +1 -1
  45. package/dist/interfaces.d.ts +54 -23
  46. package/dist/locales/i18n.d.ts +5 -0
  47. package/dist/segments/visNav.d.ts +3 -0
  48. package/dist/services.d.ts +5 -4
  49. package/dist/store/commonStore.d.ts +1 -0
  50. package/dist/store/visualSpecStore.d.ts +116 -17
  51. package/dist/style.css +1 -1
  52. package/dist/utils/autoMark.d.ts +7 -0
  53. package/dist/utils/index.d.ts +5 -1
  54. package/dist/utils/normalization.d.ts +7 -1
  55. package/dist/vis/future-react-vega.d.ts +6 -6
  56. package/dist/vis/react-vega.d.ts +16 -7
  57. package/dist/visualSettings/index.d.ts +2 -3
  58. package/dist/visualSettings/menubar.d.ts +4 -0
  59. package/package.json +26 -12
  60. package/README.md +0 -43
  61. package/dist/Fields/components.d.ts +0 -17
  62. package/dist/Fields/posFields/index.d.ts +0 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter.worker.6216b48e.js","sources":["../src/workers/filter.worker.js"],"sourcesContent":["/* eslint no-restricted-globals: 0 */\n/* eslint-disable */ \n\n/**\n * @param {import('../interfaces').IRow[]} dataSource\n * @param {import('../interfaces').IFilterField[]} filters\n * @return {import('../interfaces').IRow[]}\n */\nconst filter = (dataSource, filters) => {\n return dataSource.filter(which => {\n for (const { rule, fid } of filters) {\n if (!rule) {\n continue;\n }\n\n switch (rule.type) {\n case 'one of': {\n if (rule.value.has(which[fid])) {\n break;\n } else {\n return false;\n }\n }\n case 'range': {\n if (rule.value[0] <= which[fid] && which[fid] <= rule.value[1]) {\n break;\n } else {\n return false;\n }\n }\n case 'temporal range': {\n try {\n const time = new Date(which[fid]).getTime();\n\n if (\n rule.value[0] <= time && time <= rule.value[1]\n ) {\n break;\n } else {\n return false;\n }\n } catch (error) {\n console.error(error);\n\n return false;\n }\n }\n default: {\n console.warn('Unresolvable filter rule', rule);\n continue;\n }\n }\n }\n\n return true;\n });\n};\n\n/**\n * @param {MessageEvent<{ dataSource: import('../interfaces').IRow[]; filters: import('../interfaces').IFilterField[] }>} e\n */\nconst main = e => {\n const { dataSource, filters } = e.data;\n\n const filtered = filter(dataSource, filters);\n\n self.postMessage(filtered);\n};\n\nself.addEventListener('message', main, false);\n"],"names":["filter","dataSource","filters","which","rule","fid","time","error","main","e","filtered"],"mappings":"yBAQA,MAAMA,EAAS,CAACC,EAAYC,IACjBD,EAAW,OAAOE,GAAS,CAC9B,SAAW,CAAE,KAAAC,EAAM,IAAAC,CAAG,IAAMH,EACxB,GAAI,EAACE,EAIL,OAAQA,EAAK,KAAI,CACb,IAAK,SAAU,CACX,GAAIA,EAAK,MAAM,IAAID,EAAME,EAAI,EACzB,MAEA,MAAO,EAEd,CACD,IAAK,QAAS,CACV,GAAID,EAAK,MAAM,IAAMD,EAAME,IAAQF,EAAME,IAAQD,EAAK,MAAM,GACxD,MAEA,MAAO,EAEd,CACD,IAAK,iBACD,GAAI,CACA,MAAME,EAAO,IAAI,KAAKH,EAAME,EAAI,EAAE,UAElC,GACID,EAAK,MAAM,IAAME,GAAQA,GAAQF,EAAK,MAAM,GAE5C,MAEA,MAAO,EAEd,OAAQG,EAAP,CACE,eAAQ,MAAMA,CAAK,EAEZ,EACV,CAEL,QAAS,CACL,QAAQ,KAAK,2BAA4BH,CAAI,EAC7C,QACH,CACJ,CAGL,MAAO,EACf,CAAK,EAMCI,EAAOC,GAAK,CACd,KAAM,CAAE,WAAAR,EAAY,QAAAC,GAAYO,EAAE,KAE5BC,EAAWV,EAAOC,EAAYC,CAAO,EAE3C,KAAK,YAAYQ,CAAQ,CAC7B,EAEA,KAAK,iBAAiB,UAAWF,EAAM,EAAK"}
@@ -1,2 +1,2 @@
1
- export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const NestContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ export declare const Container: any;
2
+ export declare const NestContainer: any;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { IMutField } from "../interfaces";
3
3
  declare const DataTypeIcon: React.FC<{
4
- dataType: IMutField['dataType'];
4
+ dataType: IMutField['semanticType'];
5
+ analyticType: IMutField['analyticType'];
5
6
  }>;
6
7
  export default DataTypeIcon;
@@ -1 +1 @@
1
- export declare const LiteForm: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ export declare const LiteForm: any;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface SizeSettingProps {
3
+ onWidthChange: (val: number) => void;
4
+ onHeightChange: (val: number) => void;
5
+ width: number;
6
+ height: number;
7
+ }
8
+ declare const SizeSetting: React.FC<SizeSettingProps>;
9
+ export default SizeSetting;
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ export interface ITabOption {
3
+ label: string;
4
+ key: string;
5
+ options?: Record<string, any>;
6
+ }
7
+ interface PureTabsProps {
8
+ tabs: ITabOption[];
9
+ selectedKey: string;
10
+ onSelected: (selectedKey: string, index: number) => void;
11
+ allowEdit?: boolean;
12
+ onEditLabel?: (label: string, index: number) => void;
13
+ }
14
+ export default function PureTabs(props: PureTabsProps): JSX.Element;
15
+ export {};
package/dist/config.d.ts CHANGED
@@ -1,8 +1,10 @@
1
- export declare const GEMO_TYPES: {
2
- value: string;
3
- label: string;
4
- }[];
1
+ import { IStackMode } from "./interfaces";
2
+ export declare const GEMO_TYPES: Readonly<string[]>;
3
+ export declare const STACK_MODE: Readonly<IStackMode[]>;
4
+ export declare const CHART_LAYOUT_TYPE: Readonly<string[]>;
5
5
  export declare const COLORS: {
6
6
  dimension: string;
7
7
  measure: string;
8
+ black: string;
9
+ white: string;
8
10
  };
@@ -0,0 +1 @@
1
+ export declare const COUNT_FIELD_ID = "gw_count_fid";
@@ -0,0 +1,26 @@
1
+ export declare const DemoDataAssets: {
2
+ CARS: string;
3
+ STUDENTS: string;
4
+ BTC_GOLD: string;
5
+ BIKE_SHARING: string;
6
+ CAR_SALES: string;
7
+ COLLAGE: string;
8
+ TITANIC: string;
9
+ KELPER: string;
10
+ } | {
11
+ readonly CARS: "/datasets/ds-cars-service.json";
12
+ readonly STUDENTS: "/datasets/ds-students-service.json";
13
+ readonly BTC_GOLD: "/datasets/ds_btc_gold_service.json";
14
+ readonly BIKE_SHARING: "/datasets/ds-bikesharing-service.json";
15
+ readonly CAR_SALES: "/datasets/ds-carsales-service.json";
16
+ readonly COLLAGE: "/datasets/ds-collage-service.json";
17
+ readonly TITANIC: "/datasets/ds-titanic-service.json";
18
+ readonly KELPER: "/datasets/ds-kelper-service.json";
19
+ };
20
+ interface IPublicData {
21
+ key: string;
22
+ title: string;
23
+ desc?: string;
24
+ }
25
+ export declare const PUBLIC_DATA_LIST: IPublicData[];
26
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ interface ICSVData {
3
+ }
4
+ declare const _default: React.FunctionComponent<ICSVData>;
5
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const DataSelection: React.FC;
3
+ export default DataSelection;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ interface IPublicDataProps {
3
+ }
4
+ declare const _default: React.FunctionComponent<IPublicDataProps>;
5
+ export default _default;
@@ -1,5 +1,5 @@
1
- import { Record, IMutField } from '../interfaces';
2
- export declare function transData(dataSource: Record[]): {
3
- dataSource: Record[];
1
+ import { IRow, IMutField } from '../interfaces';
2
+ export declare function transData(dataSource: IRow[]): {
3
+ dataSource: IRow[];
4
4
  fields: IMutField[];
5
5
  };
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ export declare const AestheticSegment: any;
3
+ export declare const FieldListContainer: React.FC<{
4
+ name: string;
5
+ }>;
6
+ export declare const AestheticFieldContainer: React.FC<{
7
+ name: string;
8
+ }>;
9
+ export declare const FilterFieldContainer: React.FC;
10
+ export declare const FieldsContainer: any;
11
+ export declare const FilterFieldsContainer: any;
12
+ export declare const FieldListSegment: any;
13
+ export declare const FilterFieldSegment: any;
14
+ export declare const Pill: any;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * react-beautiful-dnd v13.1.0 bug
3
+ * https://github.com/atlassian/react-beautiful-dnd/issues/2361
4
+ */
5
+ export declare const FieldPill: any;
File without changes
@@ -2,8 +2,5 @@ import React from 'react';
2
2
  import { IDraggableStateKey } from '../interfaces';
3
3
  export declare const FieldsContextWrapper: React.FC;
4
4
  export default FieldsContextWrapper;
5
- export declare const DRAGGABLE_STATE_KEYS: Array<IDraggableStateKey>;
6
- export declare const AGGREGATOR_LIST: {
7
- value: string;
8
- label: string;
9
- }[];
5
+ export declare const DRAGGABLE_STATE_KEYS: Readonly<IDraggableStateKey[]>;
6
+ export declare const AGGREGATOR_LIST: Readonly<string[]>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const FilterEditDialog: React.FC;
3
+ export default FilterEditDialog;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { DraggableProvided } from "react-beautiful-dnd";
3
+ interface FilterPillProps {
4
+ provided: DraggableProvided;
5
+ fIndex: number;
6
+ }
7
+ declare const FilterPill: React.FC<FilterPillProps>;
8
+ export default FilterPill;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const FilterField: React.FC;
3
+ export default FilterField;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface SliderProps {
3
+ min: number;
4
+ max: number;
5
+ value: readonly [number, number];
6
+ onChange: (value: readonly [number, number]) => void;
7
+ isDateTime?: boolean;
8
+ }
9
+ declare const Slider: React.FC<SliderProps>;
10
+ export default Slider;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import type { IFilterField, IFilterRule } from '../../interfaces';
3
+ export declare type RuleFormProps = {
4
+ field: IFilterField;
5
+ onChange: (rule: IFilterRule) => void;
6
+ };
7
+ export declare const Button: any;
8
+ export declare const FilterOneOfRule: React.FC<RuleFormProps & {
9
+ active: boolean;
10
+ }>;
11
+ export declare const FilterTemporalRangeRule: React.FC<RuleFormProps & {
12
+ active: boolean;
13
+ }>;
14
+ export declare const FilterRangeRule: React.FC<RuleFormProps & {
15
+ active: boolean;
16
+ }>;
17
+ export interface TabsProps extends RuleFormProps {
18
+ tabs: IFilterRule['type'][];
19
+ }
20
+ declare const Tabs: React.FC<TabsProps>;
21
+ export default Tabs;
File without changes
File without changes
File without changes