An open source alternative to Tableau. Embeddable visual analytic
TypeScript bidatadata-analysisdata-miningdata-visualizationedak6skanarieslow-codepivot-tablereacttableautableau-alternativetypescriptvegavega-litevisualization
feat: remove vi and explains
jojocyse7f318027051
diff --git a/packages/graphic-walker/package.json b/packages/graphic-walker/package.jsonindex 1d09effc..a0779ce2 100644--- a/packages/graphic-walker/package.json+++ b/packages/graphic-walker/package.json@@ -1,6 +1,6 @@{"name": "@kanaries/graphic-walker",- "version": "0.2.16",+ "version": "0.2.18","scripts": {"dev:front_end": "vite --host","dev": "npm run dev:front_end",@@ -47,15 +47,13 @@"postinstall-postinstall": "^2.1.0","re-resizable": "^6.9.8","react-i18next": "^11.18.6",- "react-json-view": "^1.21.3","react-shadow": "^20.0.0","rxjs": "^7.3.0","tailwindcss": "^3.2.4","uuid": "^8.3.2","vega": "^5.22.1","vega-embed": "^6.21.0",- "vega-lite": "^5.6.0",- "visual-insights": "0.7.15"+ "vega-lite": "^5.6.0"},"devDependencies": {"@rollup/plugin-typescript": "^8.2.5",diff --git a/packages/graphic-walker/src/App.tsx b/packages/graphic-walker/src/App.tsxindex 6f23463a..4b72961c 100644--- a/packages/graphic-walker/src/App.tsx+++ b/packages/graphic-walker/src/App.tsx@@ -1,29 +1,23 @@-import React, { useState, useEffect, useRef, useMemo } from "react";-import { Specification } from "visual-insights";-import { observer } from "mobx-react-lite";-import { LightBulbIcon } from "@heroicons/react/24/outline";-import { toJS } from "mobx";-import { useTranslation } from "react-i18next";-import { IDarkMode, IMutField, IRow, ISegmentKey, IThemeKey } from "./interfaces";-import type { IReactVegaHandler } from "./vis/react-vega";-import VisualSettings from "./visualSettings";-import ClickMenu from "./components/clickMenu";-import InsightBoard from "./insightBoard/index";-import PosFields from "./fields/posFields";-import AestheticFields from "./fields/aestheticFields";-import DatasetFields from "./fields/datasetFields/index";-import ReactiveRenderer from "./renderer/index";-import DataSourceSegment from "./dataSource/index";-import { IGlobalStore, useGlobalStore } from "./store";-import { preAnalysis, destroyWorker } from "./services";-import VisNav from "./segments/visNav";-import { mergeLocaleRes, setLocaleLanguage } from "./locales/i18n";-import FilterField from "./fields/filterField";-import { guardDataKeys } from "./utils/dataPrep";-import SegmentNav from "./segments/segmentNav";-import DatasetConfig from "./dataSource/datasetConfig";-import { useCurrentMediaTheme } from "./utils/media";-import CodeExport from "./components/codeExport";+import React, { useEffect, useRef, useMemo } from 'react';+import { observer } from 'mobx-react-lite';+import { useTranslation } from 'react-i18next';+import { IDarkMode, IMutField, IRow, ISegmentKey, IThemeKey, Specification } from './interfaces';+import type { IReactVegaHandler } from './vis/react-vega';+import VisualSettings from './visualSettings';+import PosFields from './fields/posFields';+import AestheticFields from './fields/aestheticFields';+import DatasetFields from './fields/datasetFields/index';+import ReactiveRenderer from './renderer/index';+import DataSourceSegment from './dataSource/index';+import { IGlobalStore, useGlobalStore } from './store';+import VisNav from './segments/visNav';+import { mergeLocaleRes, setLocaleLanguage } from './locales/i18n';+import FilterField from './fields/filterField';+import { guardDataKeys } from './utils/dataPrep';+import SegmentNav from './segments/segmentNav';+import DatasetConfig from './dataSource/datasetConfig';+import { useCurrentMediaTheme } from './utils/media';+import CodeExport from './components/codeExport';export interface IGWProps {dataSource?: IRow[];@@ -43,22 +37,21 @@ export interface IGWProps {storeRef?: React.MutableRefObject<IGlobalStore | null>;}-const App = observer<IGWProps>(function App (props) {+const App = observer<IGWProps>(function App(props) {const {dataSource = [],rawFields = [],spec,- i18nLang = "en-US",+ i18nLang = 'en-US',i18nResources,hideDataSourceConfig,fieldKeyGuard = true,themeKey = 'vega',- dark = 'media'+ dark = 'media',} = props;const { commonStore, vizStore } = useGlobalStore();- const [insightReady, setInsightReady] = useState<boolean>(true);- const { currentDataset, datasets, vizEmbededMenu, segmentKey } = commonStore;+ const { datasets, segmentKey } = commonStore;const { t, i18n } = useTranslation();const curLang = i18n.language;@@ -93,53 +86,43 @@ const App = observer<IGWProps>(function App (props) {useEffect(() => {if (safeDataset.safeData.length > 0 && safeDataset.safeMetas.length > 0) {commonStore.addAndUseDS({- name: "context dataset",+ name: 'context dataset',dataSource: safeDataset.safeData,rawFields: safeDataset.safeMetas,});}}, [safeDataset]);- // do preparation analysis work when using a new datasetuseEffect(() => {- const ds = currentDataset;- if (ds && ds.dataSource.length > 0 && ds.rawFields.length > 0) {- setInsightReady(false);- preAnalysis({- dataSource: ds.dataSource,- fields: toJS(ds.rawFields),- }).then(() => {- setInsightReady(true);-- if (spec) {- vizStore.renderSpec(spec);- }- });+ if (safeDataset.safeData.length > 0 && safeDataset.safeMetas.length > 0 && spec) {+ vizStore.renderSpec(spec);}- return () => {- destroyWorker();- };- }, [currentDataset, spec]);+ }, [spec, safeDataset]);const darkMode = useCurrentMediaTheme(dark);const rendererRef = useRef<IReactVegaHandler>(null);return (- <div className={`${darkMode === 'dark' ? 'dark' : ''} App font-sans bg-white dark:bg-zinc-900 dark:text-white m-0 p-0`}>+ <div+ className={`${+ darkMode === 'dark' ? 'dark' : ''+ } App font-sans bg-white dark:bg-zinc-900 dark:text-white m-0 p-0`}+ >{/* <div className="grow-0"><PageNav /></div> */}<div className="bg-white dark:bg-zinc-900 dark:text-white">- {!hideDataSourceConfig && <DataSourceSegment preWorkDone={insightReady} />}+ {!hideDataSourceConfig && <DataSourceSegment />}<div className="px-2 mx-2"><SegmentNav />- {- segmentKey === ISegmentKey.vis && <VisNav />- }+ {segmentKey === ISegmentKey.vis && <VisNav />}</div>{segmentKey === ISegmentKey.vis && (- <div style={{ marginTop: "0em", borderTop: "none" }} className="m-4 p-4 border border-gray-200 dark:border-gray-700">+ <div+ style={{ marginTop: '0em', borderTop: 'none' }}+ className="m-4 p-4 border border-gray-200 dark:border-gray-700"+ ><VisualSettings rendererHandler={rendererRef} darkModePreference={dark} /><CodeExport /><div className="md:grid md:grid-cols-12 xl:grid-cols-6">@@ -156,17 +139,18 @@ const App = observer<IGWProps>(function App (props) {</div><divclassName="m-0.5 p-1 border border-gray-200 dark:border-gray-700"- style={{ minHeight: "600px", overflow: "auto" }}- onMouseLeave={() => {- vizEmbededMenu.show && commonStore.closeEmbededMenu();- }}- onClick={() => {- vizEmbededMenu.show && commonStore.closeEmbededMenu();- }}+ style={{ minHeight: '600px', overflow: 'auto' }}+ // onMouseLeave={() => {+ // vizEmbededMenu.show && commonStore.closeEmbededMenu();+ // }}+ // onClick={() => {+ // vizEmbededMenu.show && commonStore.closeEmbededMenu();+ // }}>- {datasets.length > 0 && <ReactiveRenderer ref={rendererRef} themeKey={themeKey} dark={dark} />}- <InsightBoard />- {vizEmbededMenu.show && (+ {datasets.length > 0 && (+ <ReactiveRenderer ref={rendererRef} themeKey={themeKey} dark={dark} />+ )}+ {/* {vizEmbededMenu.show && (<ClickMenu x={vizEmbededMenu.position[0]} y={vizEmbededMenu.position[1]}><divclassName="flex items-center whitespace-nowrap py-1 px-4 hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer"@@ -181,14 +165,17 @@ const App = observer<IGWProps>(function App (props) {<LightBulbIcon className="ml-1 w-3 flex-grow-0 flex-shrink-0" /></div></ClickMenu>- )}+ )} */}</div></div></div></div>)}{segmentKey === ISegmentKey.data && (- <div className="m-4 p-4 border border-gray-200 dark:border-gray-700" style={{ marginTop: "0em", borderTop: "none" }}>+ <div+ className="m-4 p-4 border border-gray-200 dark:border-gray-700"+ style={{ marginTop: '0em', borderTop: 'none' }}+ ><DatasetConfig /></div>)}diff --git a/packages/graphic-walker/src/dataSource/index.tsx b/packages/graphic-walker/src/dataSource/index.tsxindex ab2ec3f1..b1b5f589 100644--- a/packages/graphic-walker/src/dataSource/index.tsx+++ b/packages/graphic-walker/src/dataSource/index.tsx@@ -12,11 +12,9 @@ import DropdownSelect from "../components/dropdownSelect";import PrimaryButton from "../components/button/primary";interface DSSegmentProps {- preWorkDone: boolean;}const DataSourceSegment: React.FC<DSSegmentProps> = (props) => {- const { preWorkDone } = props;const { commonStore, vizStore } = useGlobalStore();const gwFileRef = useRef<HTMLInputElement>(null);const { t } = useTranslation();@@ -26,9 +24,6 @@ const DataSourceSegment: React.FC<DSSegmentProps> = (props) => {return (<div className="flex items-center m-4 p-4 border border-gray-200 dark:border-gray-700"><GwFile fileRef={gwFileRef} />- {!preWorkDone && (- <div className="animate-spin inline-block mr-2 ml-2 w-4 h-4 rounded-full border-t-2 border-l-2 border-blue-500"></div>- )}{/* <label className="text-xs mr-1 whitespace-nowrap self-center h-4">{t("DataSource.labels.cur_dataset")}</label> */}@@ -76,18 +71,6 @@ const DataSourceSegment: React.FC<DSSegmentProps> = (props) => {><DataSelection /></Modal>- {/* {showDSPanel && (- <Modal- title={t("DataSource.dialog.create_data_source")}- onClose={() => {- commonStore.setShowDSPanel(false);- }}- >- <DataSelection />- </Modal>- )} */}- {preWorkDone && <CheckCircleIcon className="text-green-500 w-5 inline-block ml-2" />}- {!preWorkDone && <ArrowPathIcon className="text-yellow-500 w-5 inline-block ml-2" />}</div>);};diff --git a/packages/graphic-walker/src/fields/aestheticFields.tsx b/packages/graphic-walker/src/fields/aestheticFields.tsxindex abfd54ba..c291a691 100644--- a/packages/graphic-walker/src/fields/aestheticFields.tsx+++ b/packages/graphic-walker/src/fields/aestheticFields.tsx@@ -2,10 +2,9 @@ import React from 'react';import { Droppable } from "@kanaries/react-beautiful-dnd";import { DRAGGABLE_STATE_KEYS } from './fieldsContext';import { AestheticFieldContainer } from './components'-import OBFieldContainer from './obComponents/obFContainer';import SingleEncodeEditor from './encodeFields/singleEncodeEditor';-const aestheticFields = DRAGGABLE_STATE_KEYS.filter(f => ['color', 'opacity', 'size', 'shape'].includes(f.id));+const aestheticFields = DRAGGABLE_STATE_KEYS.filter(f => ['color', 'opacity', 'size', 'shape', 'details'].includes(f.id));const AestheticFields: React.FC = props => {return <div>diff --git a/packages/graphic-walker/src/fields/encodeFields/singleEncodeEditor.tsx b/packages/graphic-walker/src/fields/encodeFields/singleEncodeEditor.tsxindex e680be6d..45692b00 100644--- a/packages/graphic-walker/src/fields/encodeFields/singleEncodeEditor.tsx+++ b/packages/graphic-walker/src/fields/encodeFields/singleEncodeEditor.tsx@@ -1,15 +1,14 @@-import React, { useMemo } from "react";-import { IDraggableStateKey } from "../../interfaces";-import { observer } from "mobx-react-lite";-import { useGlobalStore } from "../../store";-import DropdownSelect from "./singleEncodeDropDown";-import { DroppableProvided } from "react-beautiful-dnd";-import { ChevronUpDownIcon, TrashIcon } from "@heroicons/react/24/outline";-import { useTranslation } from "react-i18next";-import { COUNT_FIELD_ID } from "../../constants";-import DropdownContext from "../../components/dropdownContext";-import { AGGREGATOR_LIST } from "../fieldsContext";-import { Draggable, DroppableStateSnapshot } from "@kanaries/react-beautiful-dnd";+import React, { useMemo } from 'react';+import { IDraggableStateKey } from '../../interfaces';+import { observer } from 'mobx-react-lite';+import { useGlobalStore } from '../../store';+import { DroppableProvided } from 'react-beautiful-dnd';+import { ChevronUpDownIcon, TrashIcon } from '@heroicons/react/24/outline';+import { useTranslation } from 'react-i18next';+import { COUNT_FIELD_ID } from '../../constants';+import DropdownContext from '../../components/dropdownContext';+import { AGGREGATOR_LIST } from '../fieldsContext';+import { Draggable, DroppableStateSnapshot } from '@kanaries/react-beautiful-dnd';interface SingleEncodeEditorProps {dkey: IDraggableStateKey;diff --git a/packages/graphic-walker/src/fields/fieldsContext.tsx b/packages/graphic-walker/src/fields/fieldsContext.tsxindex 2d286b45..68e8b33d 100644--- a/packages/graphic-walker/src/fields/fieldsContext.tsx+++ b/packages/graphic-walker/src/fields/fieldsContext.tsx@@ -50,6 +50,7 @@ export const DRAGGABLE_STATE_KEYS: Readonly<IDraggableStateKey[]> = [{ id: 'theta', mode: 1 },{ id: 'radius', mode: 1 },{ id: 'filters', mode: 1 },+ { id: 'details', mode: 1 }] as const;export const AGGREGATOR_LIST: Readonly<string[]> = [diff --git a/packages/graphic-walker/src/insightBoard/index.tsx b/packages/graphic-walker/src/insightBoard/index.tsxdeleted file mode 100644index 28170743..00000000--- a/packages/graphic-walker/src/insightBoard/index.tsx+++ /dev/null@@ -1,31 +0,0 @@-import { toJS } from "mobx";-import { observer } from "mobx-react-lite";-import React, { useCallback } from "react";-import Modal from "../components/modal";-import { useGlobalStore } from "../store";-import InsightMainBoard from "./mainBoard";--const InsightBoard: React.FC = (props) => {- const { commonStore, vizStore } = useGlobalStore();- const { showInsightBoard, currentDataset, filters } = commonStore;- const { viewDimensions, viewMeasures, draggableFieldState } = vizStore;- const onCloseModal = useCallback(() => {- commonStore.setShowInsightBoard(false);- }, []);- if (!showInsightBoard) {- return null;- }- return (- <Modal onClose={onCloseModal} show={showInsightBoard}>- <InsightMainBoard- dataSource={currentDataset.dataSource}- fields={toJS(draggableFieldState.fields)}- viewDs={viewDimensions}- viewMs={viewMeasures}- filters={toJS(filters)}- />- </Modal>- );-};--export default observer(InsightBoard);diff --git a/packages/graphic-walker/src/insightBoard/mainBoard.tsx b/packages/graphic-walker/src/insightBoard/mainBoard.tsxdeleted file mode 100644index 0ad4a4e0..00000000--- a/packages/graphic-walker/src/insightBoard/mainBoard.tsx+++ /dev/null@@ -1,224 +0,0 @@-import React, { useEffect, useState, useMemo, useRef } from "react";-import embed from "vega-embed";-import { Insight, Utils, UnivariateSummary } from "visual-insights";-import ReactJson from "react-json-view";-import { IField, Filters, IMeasure, IRow } from "../interfaces";-import { IExplaination, IMeasureWithStat } from "../insights";-import { getExplaination, IVisSpace } from "../services";-import { baseVis, IReasonType } from "./std2vegaSpec";-import RadioGroupButtons from "./radioGroupButtons";-import { formatFieldName, mergeMeasures } from "./utils";-import { useTranslation } from "react-i18next";-import { useCurrentMediaTheme } from "../utils/media";-import { builtInThemes } from "../vis/theme";--const collection = Insight.IntentionWorkerCollection.init();--enum IReasonTypes {- selection_dim_distribution = "selection_dim_distribution",- selection_mea_distribution = "selection_mea_distribution",- children_major_factor = "children_major_factor",- children_outlier = "children_outlier",-}--collection.enable(Insight.DefaultIWorker.cluster, false);-interface SubSpace {- dimensions: string[];- measures: IMeasure[];-}--interface InsightMainBoardProps {- dataSource: IRow[];- fields: Readonly<IField[]>;- filters?: Filters;- viewDs: IField[];- viewMs: IField[];-}-const InsightMainBoard: React.FC<InsightMainBoardProps> = (props) => {- const { dataSource, fields, viewDs, viewMs, filters } = props;- const [recSpaces, setRecSpaces] = useState<IExplaination[]>([]);- const [visSpaces, setVisSpaces] = useState<IVisSpace[]>([]);- const [visIndex, setVisIndex] = useState<number>(0);- const [loading, setLoading] = useState<boolean>(false);- const [valueExp, setValueExp] = useState<IMeasureWithStat[]>([]);- const { t } = useTranslation();- const container = useRef<HTMLDivElement>(null);- const mediaTheme = useCurrentMediaTheme();- const themeConfig = builtInThemes['g2'][mediaTheme];-- const dimsWithTypes = useMemo(() => {- const dimensions = fields- .filter((f) => f.analyticType === "dimension")- .map((f) => f.fid)- .filter((f) => !Utils.isFieldUnique(dataSource, f));- return UnivariateSummary.getAllFieldTypes(dataSource, dimensions);- }, [fields, dataSource]);-- const measWithTypes = useMemo(() => {- const measures = fields.filter((f) => f.analyticType === "measure").map((f) => f.fid);- return measures.map((m) => ({- name: m,- type: "quantitative",- }));- }, [fields]);-- useEffect(() => {- if (dimsWithTypes.length > 0 && measWithTypes.length > 0 && dataSource.length > 0) {- const measures = fields.filter((f) => f.analyticType === "measure").map((f) => f.fid);- const dimensions = dimsWithTypes.map((d) => d.name);- const currentSpace: SubSpace = {- dimensions: viewDs.map((f) => f.fid),- measures: viewMs.map((f) => ({- key: f.fid,- op: f.aggName as any,- })),- };- setLoading(true);-- getExplaination({- dimensions,- measures,- dataSource,- currentSpace,- filters,- }).then(({ visSpaces, explainations, valueExp }) => {- setRecSpaces(explainations);- setVisSpaces(visSpaces);- setValueExp(valueExp);- setLoading(false);- });- }- }, [fields, viewDs, viewMs, measWithTypes, filters, dimsWithTypes, measWithTypes, dataSource]);-- useEffect(() => {- const RecSpace = recSpaces[visIndex];- const visSpec = visSpaces[visIndex];- if (container.current && RecSpace && visSpec) {- const usePredicates: boolean =- RecSpace.type === "selection_dim_distribution" || RecSpace.type === "selection_mea_distribution";- const mergedMeasures = mergeMeasures(RecSpace.measures, RecSpace.extendMs);- const _vegaSpec = baseVis(- visSpec.schema,- visSpec.schema.geomType && visSpec.schema.geomType[0] === "point" ? dataSource : visSpec.dataView,- // result.aggData,- [...RecSpace.dimensions, ...RecSpace.extendDs],- [...RecSpace.measures, ...RecSpace.extendMs].map((m) => m.key),- usePredicates ? RecSpace.predicates : null,- mergedMeasures.map((m) => ({- op: m.op,- field: m.key,- as: m.key,- })),- fields,- RecSpace.type as IReasonType,- true,- true- );- if (container.current) {- embed(container.current, _vegaSpec, {- actions: false,- config: themeConfig- });- }- }- }, [visIndex, recSpaces, visSpaces, fields, dataSource, themeConfig]);-- const FilterDesc = useMemo<React.ReactElement[]>(() => {- if (filters) {- const dimValues = Object.keys(filters)- .filter((k) => filters[k].length > 0)- .map((k, ki) => {- return (- <div key={`dim-${ki}`}>- <div className="inline bg-gray-400 py-0.5 px-2 mx-2 rounded-full underline text-white">- {formatFieldName(k, fields)}- </div>- <div className="inline text-lg ml-1 mr-1">=</div>- <div className="inline bg-blue-600 py-0.5 px-2 mx-2 rounded-full text-white">{filters[k]}</div>- </div>- );- });- return dimValues;- }- return [];- }, [filters]);-- const valueDesc = useMemo<React.ReactElement[]>(() => {- const meaStatus = valueExp.map((mea, mi) => (- <div key={`mea-${mi}`}>- <span className="bg-gray-400 py-0.5 px-2 mx-2 rounded-full underline text-white">- {formatFieldName(mea.key, fields)}({mea.op})- </span>- <span className="bg-red-500 py-0.5 px-2 mx-2 rounded-full text-white">- {mea.score === 1 ? t("explain.lg_than") : t("explain.sm_than")}- </span>- <span>{t("explain.expection")}{" "}</span>- </div>- ));- return meaStatus;- }, [valueExp]);-- return (- <div style={{ maxHeight: "80vh", minHeight: "200px", overflowY: "auto", maxWidth: "880px" }}>- <div className="text-xs">{FilterDesc}</div>- <div className="text-xs mt-2 mb-2">{valueDesc}</div>- {loading && (- <div className="animate-spin inline-block mr-2 ml-2 w-16 h-16 rounded-full border-t-2 border-l-2 border-blue-500"></div>- )}- <div style={{ display: "flex" }}>- <div style={{ flexBasis: "200px", flexShrink: 0, maxHeight: "800px", overflowY: "auto" }}>- <RadioGroupButtons- choosenIndex={visIndex}- options={recSpaces.map((s, i) => ({- value: s.type || "" + i,- label: `${- s.type ? t(`explain.reason.${IReasonTypes[s.type]}`) : t("explain.unrecognized")- }: ${s.score.toFixed(2)}`,- }))}- onChange={(v, i) => {- setVisIndex(i);- }}- />- </div>- <div className="p-4 text-sm">- <div ref={container}></div>- {recSpaces[visIndex] && (- <div>- {t("constant.analytic_type.dimension")} =- {recSpaces[visIndex].dimensions.map((f) => formatFieldName(f, fields)).join(", ")}- <br />- {t("constant.analytic_type.measure")} =- {recSpaces[visIndex].measures- .map((m) => m.key)- .map((f) => formatFieldName(f, fields))- .join(", ")}- <br />- {" " + t("explain.contains") + " "}- {recSpaces[visIndex].type- ? t(`explain.reason.${IReasonTypes[recSpaces[visIndex].type]}`)- : t("explain.unrecognized")}{" "}- ,{t("explain.score")}- {recSpaces[visIndex].score}- <br />- {recSpaces[visIndex].description &&- recSpaces[visIndex].description.intMeasures &&- FilterDesc +- recSpaces[visIndex].description.intMeasures- .map(- (mea: any) =>- `${formatFieldName(mea.key, fields)}(${mea.op})}${- mea.score === 1 ? t("explain.lg_than") : t("explain.sm_than")- }${t("explain.expection")}`- )- .join(", ")}- <br />- <ReactJson src={recSpaces[visIndex].description} />- </div>- )}- </div>- </div>- </div>- );-};--export default InsightMainBoard;diff --git a/packages/graphic-walker/src/insightBoard/radioGroupButtons.tsx b/packages/graphic-walker/src/insightBoard/radioGroupButtons.tsxdeleted file mode 100644index 9d261558..00000000--- a/packages/graphic-walker/src/insightBoard/radioGroupButtons.tsx+++ /dev/null@@ -1,57 +0,0 @@-import React from 'react';-import styled from 'styled-components';--const RGBContainer = styled.div`- font-size: 14px;- .option {- padding: 0.8em;- margin: 4px;- border: 1px solid #f0f0f0;- background-color: #f0f0f0;- cursor: pointer;- @media (prefers-color-scheme: dark) {- background-color: #000;- border: 1px solid #4b5563;- }- }- .choosen.option {- background-color: #fff;- @media (prefers-color-scheme: dark) {- background-color: #000;- }- }-`;--export interface RGBOption {- label: string;- value: any;-}--interface RadioGroupButtonsProps {- options: RGBOption[];- onChange?: (value: any, index: number) => void;- choosenIndex: number;-}--const RadioGroupButtons: React.FC<RadioGroupButtonsProps> = (props) => {- const { options, onChange, choosenIndex } = props;- return (- <RGBContainer>- {options.map((op, i) => (- <div- key={i}- className={`${choosenIndex === i ? 'choosen' : ''} option`}- onClick={() => {- if (onChange) {- onChange(op.value, i);- }- }}- >- {op.label}- </div>- ))}- </RGBContainer>- );-};--export default RadioGroupButtons;diff --git a/packages/graphic-walker/src/insightBoard/selectionSpec.ts b/packages/graphic-walker/src/insightBoard/selectionSpec.tsdeleted file mode 100644index 460a6646..00000000--- a/packages/graphic-walker/src/insightBoard/selectionSpec.ts+++ /dev/null@@ -1,113 +0,0 @@-import { Specification } from 'visual-insights';-import { IRow, SemanticType } from '../interfaces';-export const geomTypeMap: { [key: string]: any } = {- interval: 'bar',- line: 'line',- point: 'point',- // density: 'rect'- density: 'point',-};-export function selectionVis(- query: Specification,- dataSource: IRow[],- dimensions: string[],- measures: string[],- aggregatedMeasures: Array<{ op: string; field: string; as: string }>,- fieldFeatures: Array<{ name: string; type: SemanticType }>,- defaultAggregated?: boolean,- defaultStack?: boolean-) {- const {- position = [],- color = [],- size = [],- facets = [],- opacity = [],- geomType = [],- page = [],- } = query;-- function adjustField(fieldName: string): string {- if (defaultAggregated && measures.includes(fieldName)) {- let aggField = aggregatedMeasures.find((mea) => {- return mea.field === fieldName;- });- return aggField ? aggField.as : fieldName;- }- return fieldName;- }-- function getFieldType(field: string): SemanticType {- let targetField = fieldFeatures.find((f) => f.name === field);- return targetField ? targetField.type : 'nominal';- }-- let chartWidth = 500; //container.current ? container.current.offsetWidth * 0.8 : 600;- const fieldMap: any = {- x: position[0],- y: position[1],- color: color[0],- size: size[0],- opacity: opacity[0],- row: facets[0],- column: facets[1],- };- let spec: any = {- width: chartWidth,- data: {- values: dataSource,- },- };- let basicSpec: any = {- width: chartWidth,- mark: {- type: geomType[0] && geomTypeMap[geomType[0]] ? geomTypeMap[geomType[0]] : geomType[0],- tooltip: true,- },- encoding: {},- };- for (let channel in fieldMap) {- if (fieldMap[channel]) {- basicSpec.encoding[channel] = {- field: adjustField(fieldMap[channel]),- type: getFieldType(fieldMap[channel]),- };- if (- ['x', 'y'].includes(channel) &&- getFieldType(fieldMap[channel]) === 'quantitative' &&- !defaultStack- ) {- basicSpec.encoding[channel].stack = null;- }- }- }- if (!defaultStack && opacity.length === 0) {- basicSpec.encoding.opacity = { value: 0.7 };- }- if (page.length === 0) {- spec = {- ...spec,- ...basicSpec,- };- } else if (page.length > 0) {- basicSpec.transform = [- { filter: { selection: 'brush' } },- defaultAggregated- ? {- aggregate: aggregatedMeasures,- groupby: dimensions.filter((dim) => dim !== page[0]),- }- : null,- ].filter(Boolean);- let sliderSpec = {- width: chartWidth,- mark: 'tick',- selection: { brush: { encodings: ['x'], type: 'interval' } },- encoding: {- x: { field: page[0], type: getFieldType(page[0]) },- },- };- spec.vconcat = [basicSpec, sliderSpec];- }- return spec;-}diff --git a/packages/graphic-walker/src/insightBoard/std2vegaSpec.ts b/packages/graphic-walker/src/insightBoard/std2vegaSpec.tsdeleted file mode 100644index 061030b0..00000000--- a/packages/graphic-walker/src/insightBoard/std2vegaSpec.ts+++ /dev/null@@ -1,184 +0,0 @@-import { ISemanticType, Specification } from 'visual-insights';-import { IField, IRow } from '../interfaces';-import { Utils } from 'visual-insights';-import { IPredicate } from '../utils';-export type IReasonType = 'selection_dim_distribution' | 'selection_mea_distribution' | 'children_major_factor' | 'children_outlier';-export const geomTypeMap: { [key: string]: any } = {- interval: 'bar',- line: 'line',- point: 'point',- // density: 'rect'- density: 'point',-};-export function baseVis(- query: Specification,- dataSource: IRow[],- dimensions: string[],- measures: string[],- predicates: IPredicate[] | null,- aggregatedMeasures: Array<{ op: string; field: string; as: string }>,- fields: Readonly<IField[]>,- type: IReasonType,- defaultAggregated?: boolean,- defaultStack?: boolean-) {- const {- position = [],- color = [],- size = [],- facets = [],- opacity = [],- geomType = [],- page = [],- } = query;-- function adjustField(fieldName: string): string {- if (defaultAggregated && measures.includes(fieldName)) {- let aggField = aggregatedMeasures.find((mea) => {- return mea.field === fieldName;- });- return aggField ? aggField.as : fieldName;- }- return fieldName;- }-- function getFieldSemanticType(fid: string): ISemanticType {- let targetField = fields.find((f) => f.fid === fid);- return targetField ? targetField.semanticType : 'nominal';- }-- function getFieldLabel (fid: string): string {- let targetField = fields.find((f) => f.fid === fid);- return targetField ? targetField.name : fid;- }-- // let chartWidth = 500; //container.current ? container.current.offsetWidth * 0.8 : 600;- const fieldMap: any = {- x: position[0],- y: position[1],- color: color[0],- size: size[0],- opacity: opacity[0],- row: facets[0],- column: facets[1],- };- let spec: any = {- // width: chartWidth,- data: {- values: dataSource,- },- transform: [],- };- let basicSpec: any = {- // width: chartWidth,- transform: [],- mark: {- type: geomType[0] && geomTypeMap[geomType[0]] ? geomTypeMap[geomType[0]] : geomType[0],- tooltip: true,- },- encoding: {},- };- const dimInView: string[] = [];- Object.values(query).forEach(fields => {- fields.forEach((f: any) => {- if (dimensions.includes(f)) dimInView.push(f);- })- })- if (defaultAggregated && aggregatedMeasures.length > 0) {- basicSpec.transform.push({- aggregate: [],- groupby: dimInView,- });- }- const aggMap: Map<string, string> = new Map();- for (let channel in fieldMap) {- if (fieldMap[channel]) {- if (getFieldSemanticType(fieldMap[channel]) === 'quantitative' && defaultAggregated) {- const targetField = aggregatedMeasures.find((f) => f.field === fieldMap[channel]);- if (targetField) {- aggMap.set(targetField.field, `${targetField.op}_of_${targetField.field}`);- basicSpec.transform[0].aggregate.push({- op: targetField.op === 'count' ? 'sum' : targetField.op,- field: targetField.field,- as: `${targetField.op}_of_${targetField.field}`,- });- }- // const targetField = aggregatedMeasures.find((f) => f.field === fieldMap[channel]);- // basicSpec.encoding[channel].aggregate = targetField ? targetField.op : 'sum';- // basicSpec.encoding[channel].aggregate =- // basicSpec.encoding[channel].aggregate === 'count'- // ? 'sum'- // : basicSpec.encoding[channel].aggregate;- }- const adjField = adjustField(fieldMap[channel]);- basicSpec.encoding[channel] = {- field: aggMap.has(adjField) ? aggMap.get(adjField) : adjField,- type: getFieldSemanticType(fieldMap[channel]),- title: getFieldLabel(fieldMap[channel])- };- if (- ['x', 'y'].includes(channel) &&- getFieldSemanticType(fieldMap[channel]) === 'quantitative' &&- !defaultStack- ) {- basicSpec.encoding[channel].stack = null;- }- }- }- if (!defaultStack && opacity.length === 0) {- basicSpec.encoding.opacity = { value: 0.7 };- }- // 真TMD小学生代码- if (predicates === null) {- return {- ...spec,- ...basicSpec,- };- }- const basicSpecFilter = Utils.deepcopy(basicSpec);- basicSpec.mark.opacity = 0.9;- basicSpec.mark.color = '#8c8c8c';- // basicSpecFilter.mark.color = '#f5222d';- basicSpecFilter.mark.opacity = 0.8;- basicSpecFilter.mark.size = 10;- Object.values(basicSpecFilter.encoding).forEach((ch: any) => {- if (typeof ch.title === 'string') {- ch.title = ch.title + '(target)'- }- })- if (typeof basicSpecFilter.transform === 'undefined') {- basicSpecFilter.transform = [];- }- basicSpecFilter.transform = [- ...predicates.map((pre) => {- const filter: any = {- filter: {- field: pre.key,- },- };- if (pre.type === 'continuous') {- filter.filter.range = pre.range;- } else {- filter.filter.oneOf = [...pre.range.values()];- }- return filter;- }),- ...basicSpecFilter.transform,- ];- if (type !== 'selection_mea_distribution' && color.length + size.length + opacity.length + page.length > 0) {- spec = {- ...spec,- vconcat: [basicSpec, basicSpecFilter],- };- } else {- if (basicSpecFilter.encoding.color) {- basicSpecFilter.encoding.color = { value: 'grey' };- }- spec = {- ...spec,- layer: [basicSpec, basicSpecFilter],- "resolve": {"scale": {"y": "independent"}}- };- }- return spec;-}diff --git a/packages/graphic-walker/src/insightBoard/utils.ts b/packages/graphic-walker/src/insightBoard/utils.tsdeleted file mode 100644index abd3ad8f..00000000--- a/packages/graphic-walker/src/insightBoard/utils.ts+++ /dev/null@@ -1,32 +0,0 @@-import { IField, IMeasure } from "../interfaces";-/**- * 合并两个measures数组,若出现相同的key,使用measures2中的op替换1中的op- * @param measures1- * @param measures2- */-export function mergeMeasures(measures1: IMeasure[], measures2: IMeasure[]): IMeasure[] {- const measureKeys: Set<string> = new Set();- const merged: IMeasure[] = [];- for (let mea of measures1) {- measureKeys.add(mea.key);- merged.push(mea);- }- for (let mea of measures2) {- // measureKeys.add(mea.k)- if (measureKeys.has(mea.key)) {- const targetIndex = merged.findIndex(f => f.key === mea.key);- if (targetIndex > -1) {- merged[targetIndex] = mea;- }- } else {- measureKeys.add(mea.key);- merged.push(mea)- }- }- return merged;-}--export function formatFieldName(fid: string, fields: Readonly<IField[]>) {- const target = fields.find(f => f.fid === fid);- return target ? target.name : fid;-}\ No newline at end of filediff --git a/packages/graphic-walker/src/insights.ts b/packages/graphic-walker/src/insights.tsdeleted file mode 100644index 065be2dd..00000000--- a/packages/graphic-walker/src/insights.ts+++ /dev/null@@ -1,408 +0,0 @@-import { IMutField, Insight } from 'visual-insights';-import { IRow, IMeasure } from './interfaces';-import { checkMajorFactor, filterByPredicates, checkChildOutlier, IPredicate } from './utils';-import { normalizeWithParent, compareDistribution, normalizeByMeasures, getDistributionDifference } from './utils/normalization';-import { StatFuncName } from 'visual-insights/build/esm/statistics';-export interface IExplaination {- dimensions: string[];- measures: IMeasure[];- extendDs: string[];- extendMs: IMeasure[];- type: string;- score: number;- description: any;- predicates: IPredicate[];-}--export interface IMeasureWithStat extends IMeasure {- score: number;-}-export class DataExplainer {- public dataSource: IRow[];- private engine: Insight.VIEngine;- private defaultAggs: StatFuncName[] = ['min', 'max', 'sum', 'count', 'mean'];- constructor (dataSource: IRow[] = []) {- this.engine = new Insight.VIEngine();- this.dataSource = dataSource;- let keys: string[] = [];- if (dataSource.length > 0) {- keys = Object.keys(dataSource[0]);- }- this.engine.setData(dataSource)- // .setFieldKeys(keys)- // .buildfieldsSummary();- // const newKeys = this.engine.fields.filter(f => f.domain.size < 40).map(f => f.key);- // this.engine.setFieldKeys(keys);- // const keys = Object.keys(dataSource[0])- }- public setFields(fields: IMutField[]) {- this.engine.setFields(fields.map(f => ({- ...f,- // @ts-ignore- key: f.key || f.fid- })));- this.engine.univarSelection();- }- public preAnalysis() {- console.log('[graphic-walker:preAnalysis]start')- this.engine.buildGraph();- this.engine.dataGraph.DIMENSION_CORRELATION_THRESHOLD = 0.6;- this.engine.dataGraph.MEASURE_CORRELATION_THRESHOLD = 0.8;- console.log('[graphic-walker:preAnalysis]graph finish')- this.engine- .clusterFields();- console.log('[graphic-walker:preAnalysis]cluster finish')- this.engine.buildSubspaces({- MAX: 2,- MIN: 1- },- {- MAX: 2,- MIN: 1- }- );- console.log('[graphic-walker:preAnalysis]subspaces finsh. start build-cube')- this.engine.buildCube();- console.log('[graphic-walker:preAnalysis]cube finish')- return this;- }- public explain (predicates: IPredicate[], dimensions: string[], measures: IMeasure[], threshold: number = 0.3): IExplaination[] {- // const predicates = getPredicates(selection, dimensions, measures);- // 讨论:知道selection,但是分析的维度是什么?- this.explainConditionalValue(predicates, dimensions, measures);- const selectAll = dimensions.length === 0 || predicates.length === 0;-- const dimSelectionSpaces = selectAll ? [] : this.explainBySelection(- predicates,- dimensions,- measures,- 10- );- const meaSelectionSpaces = selectAll ? [] : this.explainByCorMeasures(- predicates,- dimensions,- measures,- 10- );- const childrenSpaces = this.explainByChildren(- [],- dimensions,- measures,- 10- );- const ansSpaces: IExplaination[] = [];- dimSelectionSpaces.forEach((space) => {- ansSpaces.push({- dimensions,- extendDs: space.dimensions,- measures,- extendMs: [],- score: space.score,- type: 'selection_dim_distribution',- description: space,- predicates- });- });- meaSelectionSpaces.forEach((space) => {- ansSpaces.push({- dimensions: dimensions,- extendDs: [],- extendMs: space.measures,- measures,- score: space.score,- type: 'selection_mea_distribution',- description: space,- predicates,- });- });- childrenSpaces.majorList.forEach((space) => {- ansSpaces.push({- dimensions,- extendDs: space.dimensions,- measures,- extendMs: [],- score: space.score,- type: 'children_major_factor',- description: space,- predicates- });- });- childrenSpaces.outlierList.forEach((space) => {- ansSpaces.push({- dimensions,- extendDs: space.dimensions,- measures,- extendMs: [],- score: space.score,- type: 'children_outlier',- description: space,- predicates- });- });- return ansSpaces.filter(space => space.score >= threshold);- }-- public explainConditionalValue(predicates: IPredicate[], dimensions: string[], measures: IMeasure[], K_Neighbor: number = 5) {- const knn = this.getGeneralizeKNN('dimension', dimensions, K_Neighbor, 0);- for (let extendDim of knn) {- const result = this.explainValue(predicates, [...dimensions, extendDim], measures);- }- }- public explainValue(predicates: IPredicate[], dimensions: string[], measures: IMeasure[]): number[] {- const measureNames = measures.map(m => m.key);- const measureOps = measures.map(m => m.op);- const data = this.engine.cube.getCuboid(dimensions).getAggregatedRows(measureNames, measureOps);- const selection = filterByPredicates(data, predicates);- const cmps: number[] = [];- for (let mea of measureNames) {- const values = data.map(r => r[mea]);- values.sort((a, b) => a - b);- const selectionValues = selection.map(r => r[mea])- const lowerBoundary: number = values[Math.floor(values.length * 0.15)];- const higherBoundary: number = values[Math.min(Math.ceil(values.length * 0.85), values.length - 1)];- if (selectionValues.some(v => v >= higherBoundary)) {- cmps.push(1);- } else if (selectionValues.some(v => v <= lowerBoundary)) {- cmps.push(-1);- } else {- cmps.push(0)- }- }- return cmps;- }- public explainByChildren(predicates: IPredicate[], dimensions: string[], measures: IMeasure[], K_Neighbor: number = 3) {- // 1. find most relative dimensions(topK)- // 2. for each dimension, we check all the dim member in it. find the member whos distribution is most close to current one.- // here we do not nomorlize all the dim member's distribution, we use the relative distribution instead.- // 3. the dim member we found can be used to explain current one as major factor.- // const predicates: IPredicate[] = selection === 'all' ? [] : getPredicates(selection, dimensions, []);- const parentCuboid = this.engine.cube.getCuboid(dimensions);- const measureNames = measures.map(m => m.key);- const ops = measures.map(m => m.op);- const parentData = filterByPredicates(parentCuboid.getAggregatedRows(measureNames, ops), predicates);- const knn = this.getGeneralizeKNN('dimension', dimensions, K_Neighbor, 0);-- const majorList: Array<{key: string; score: number; dimensions: string[]; measures: IMeasure[]}> = [];- const outlierList: Array<{key: string; score: number; dimensions: string[]; measures: IMeasure[]}> = [];- for (let extendDim of knn) {- const cuboid = this.engine.cube.getCuboid([...dimensions, extendDim]);- const data = filterByPredicates(cuboid.getAggregatedRows(measureNames, ops), predicates);- let groups: Map<any, IRow[]> = new Map();- for (let record of data) {- if (!groups.has(record[extendDim])) {- groups.set(record[extendDim], [])- }- groups.get(record[extendDim])?.push(record)- }- const { majorKey, majorSum } = checkMajorFactor(parentData, groups, dimensions, measureNames)- majorList.push({ key: majorKey, score: majorSum, dimensions: [extendDim], measures })- const { outlierKey, outlierSum } = checkChildOutlier(parentData, groups, dimensions, measureNames);- outlierList.push({ key: outlierKey, score: outlierSum, dimensions: [extendDim], measures })- }- majorList.sort((a, b) => a.score - b.score);- outlierList.sort((a, b) => b.score - a.score);- return {- majorList,- outlierList- };- }- public explainBySelection(predicates: IPredicate[], dimensions: string[], measures: IMeasure[], K_Neighbor: number = 3) {- // const predicates = getPredicates(selection, dimensions, []);- // const parentCuboid = this.engine.cube.getCuboid()- const measureNames = measures.map((m) => m.key);- const ops = measures.map((m) => m.op);- const knn = this.getGeneralizeKNN('dimension', dimensions, K_Neighbor, 0);- const outlierList: Array<{ score: number; dimensions: string[]; measures: IMeasure[] }> = [];- for (let extendDim of knn) {- const parentCuboid = this.engine.cube.getCuboid([extendDim])- const cuboid = this.engine.cube.getCuboid([...dimensions, extendDim])- const overallData = parentCuboid.getAggregatedRows(measureNames, ops);- const subData = filterByPredicates(cuboid.getAggregatedRows(measureNames, ops), predicates);-- let outlierNormalization = normalizeWithParent(subData, overallData, measureNames, false);-- let outlierScore = compareDistribution(- outlierNormalization.normalizedData,- outlierNormalization.normalizedParentData,- [extendDim],- measureNames- );- // outlierScore /= (measures.length * 2)- outlierList.push({- dimensions: [extendDim],- measures,- score: outlierScore- })- // compare overall and subdata. set score. (major and outlier)- }- outlierList.sort((a, b) => b.score - a.score)- return outlierList;- }- public explainByCorMeasures(predicates: IPredicate[], dimensions: string[], measures: IMeasure[], K_Neighbor: number = 3) {- // const predicates = getPredicates(selection, dimensions, []);- // const parentCuboid = this.engine.cube.getCuboid()- const measureNames = measures.map((m) => m.key);- const ops = measures.map((m) => m.op);- const knn = this.getGeneralizeKNN('measure', measureNames, K_Neighbor);- const allMeasureNames = [...measureNames, ...knn];- // const ops: StatFuncName[] = allMeasures.map(() => 'sum');- const ans: Array<{ score: number; dimensions: string[]; measures: IMeasure[]; max: number; min: number; intMeasures: IMeasureWithStat[] }> = [];- const cuboid = this.engine.cube.getCuboid(dimensions);- // const valueExp = this.explainValue(predicates, dimensions, measures);- for (let op of this.defaultAggs) {- const extendMeasureOps = knn.map(() => op);- const normalizedState = normalizeByMeasures(- cuboid.getAggregatedRows(allMeasureNames, [...ops, ...extendMeasureOps]),- allMeasureNames- );- for (let extendMea of allMeasureNames) {- const originMeasure = measures.find(m => m.key === extendMea);- if (originMeasure && originMeasure.op === op) continue;- const valueExpOfExtendMea = this.explainValue(predicates, dimensions, [{key: extendMea, op}])- const intMeasures: IMeasureWithStat[] = [];- for (let i = 0; i < valueExpOfExtendMea.length; i++) {- if (valueExpOfExtendMea[i] !== 0) {- intMeasures.push({- key: extendMea,- op,- score: valueExpOfExtendMea[i]- })- }- }- if (intMeasures.length === 0) continue;- if (originMeasure) {- const norStateWithNewOp = normalizeByMeasures(- cuboid.getAggregatedRows([extendMea], [op]),- [extendMea]- )- const mergedDataSource = normalizedState.map((record, rIndex) => {- return {- ...record,- [`__${extendMea}`]: norStateWithNewOp[rIndex][extendMea]- }- })- let maxDiff = 0;- let minDiff = 1;- for (let baseMeasure of measures) {- let diffScore =- getDistributionDifference(- mergedDataSource,- dimensions,- baseMeasure.key,- `__${extendMea}`- ) / 2;- maxDiff = Math.max(maxDiff, diffScore);- minDiff = Math.min(minDiff, diffScore);- }- ans.push({- dimensions,- score: Math.max(1 - minDiff, maxDiff),- measures: [{ key: extendMea, op }],- max: maxDiff,- min: minDiff,- intMeasures- });- } else {- let maxDiff = 0;- let minDiff = 1;- for (let baseMeasure of measures) {- let diffScore =- getDistributionDifference(- normalizedState,- dimensions,- baseMeasure.key,- extendMea- ) / 2;- maxDiff = Math.max(maxDiff, diffScore);- minDiff = Math.min(minDiff, diffScore);- }- ans.push({- dimensions,- score: Math.max(1 - minDiff, maxDiff),- measures: [{ key: extendMea, op }],- max: maxDiff,- min: minDiff,- intMeasures- });- }- // compare overall and subdata. set score. (major and outlier)- }- }- ans.sort((a, b) => b.score - a.score);- return ans;- }- public getGeneralizeKNN(type: 'dimension' | 'measure', fields: string[], K_Neighbor: number = 3, threshold = 0) {- if (fields.length === 0) return this.getCenterFields(type, K_Neighbor);- return this.getKNN(type, fields, K_Neighbor, threshold);- }- public getKNN(type: 'dimension' | 'measure', fields: string[], K_Neighbor: number = 3, threshold = 0) {- const adjMatrix = type === 'dimension' ? this.engine.dataGraph.DG : this.engine.dataGraph.MG;- const graphFields = type === 'dimension' ? this.engine.dataGraph.dimensions : this.engine.dataGraph.measures;- const fieldIndices = fields.map(field => {- let index = graphFields.indexOf(field);- return index;- });- const neighbors: Array<{dis: number, index: number, imp: number}> = [];- for (let fieldIndex of fieldIndices) {- for (let i = 0; i < adjMatrix[fieldIndex].length; i++) {- if (!fieldIndices.includes(i)) {- const dis = Math.abs(adjMatrix[fieldIndex][i]);- const fieldKey = graphFields[i];- const tf = this.engine.fields.find(f => f.key === fieldKey);- if (dis >= threshold) {- neighbors.push({- dis,- index: i,- imp: tf?.features.unique || Infinity,- });- }- }- }- }-- neighbors.sort((a, b) => b.dis / b.imp - a.dis / a.imp);- return neighbors.slice(0, K_Neighbor).map(f => graphFields[f.index]);- }- public getCenterFields (type: 'dimension' | 'measure', num: number = 5): string[] {- const adjMatrix = type === 'dimension' ? this.engine.dataGraph.DG : this.engine.dataGraph.MG;- const graphFields = type === 'dimension' ? this.engine.dataGraph.dimensions : this.engine.dataGraph.measures;- let fieldScores: Array<{field: string; score: number}> = adjMatrix.map((row, rIndex) => {- return {- field: graphFields[rIndex],- score: row.reduce((total, current) => total + Math.abs(current), 0)- }- })- fieldScores.sort((a, b) => b.score - a.score)- return fieldScores.map(f => f.field).slice(0, num);- }- public getVisSpec (spaces: IExplaination[]) {- const engine = this.engine;- return spaces.map(space => {- let visSpace: Insight.InsightSpace;- const measureNames = space.measures.map(m => m.key);- const extendMsNames = space.extendMs.map(m => m.key);- if (space.type === 'children_major_factor' || space.type === 'children_outlier') {- visSpace = {- dimensions: [...space.extendDs, ...space.dimensions],- measures: extendMsNames.length > 0 ? extendMsNames : measureNames,- significance: space.score,- score: space.score,- description: space.description,- };- } else {- visSpace = {- dimensions: space.extendDs.length > 0 ? space.extendDs : space.dimensions,- measures: extendMsNames.length > 0 ? extendMsNames : measureNames,- significance: space.score,- score: space.score,- description: space.description,- };- }- const allMeasures = [...space.measures, ...space.extendMs];- return {- schema: engine.specification(visSpace).schema,- dataView: engine.cube.getCuboid([...space.dimensions, ...space.extendDs]).getAggregatedRows(allMeasures.map(m => m.key), allMeasures.map(m => m.op))- };- })- }-}\ No newline at end of filediff --git a/packages/graphic-walker/src/interfaces.ts b/packages/graphic-walker/src/interfaces.tsindex 70fa664e..a3bd8c20 100644--- a/packages/graphic-walker/src/interfaces.ts+++ b/packages/graphic-walker/src/interfaces.ts@@ -1,19 +1,28 @@-import { StatFuncName } from "visual-insights/build/esm/statistics";-import { AggFC } from 'cube-core/built/types';-import { IAnalyticType, ISemanticType } from 'visual-insights';-export type DeepReadonly<T extends Record<keyof any, any>> = {readonly [K in keyof T]: T[K] extends Record<keyof any, any> ? DeepReadonly<T[K]> : T[K];};+export type ISemanticType = 'quantitative' | 'nominal' | 'ordinal' | 'temporal';+export type IDataType = 'number' | 'integer' | 'boolean' | 'date' | 'string';+export type IAnalyticType = 'dimension' | 'measure';export interface IRow {[key: string]: any;}-/**- * @deprecated- */-export type SemanticType = 'quantitative' | 'nominal' | 'ordinal' | 'temporal';+export type IAggregator = 'sum' | 'count' | 'max' | 'min' | 'mean' | 'median' | 'variance' | 'stdev';+export interface Specification {+ position?: string[];+ color?: string[];+ size?: string[];+ shape?: string[];+ opacity?: string[];+ facets?: string[];+ page?: string[];+ filter?: string[];+ highFacets?: string[];+ geomType?: string[];+ aggregate?: boolean;+}export interface Filters {[key: string]: any[];}@@ -25,7 +34,7 @@ export interface IMutField {disable?: boolean;semanticType: ISemanticType;analyticType: IAnalyticType;-};+}export interface IUncertainMutField {fid: string;@@ -36,21 +45,23 @@ export interface IUncertainMutField {analyticType: IAnalyticType | '?';}--export type IExpParamter = {- type: 'field';- value: string;-} | {- type: 'value';- value: any;-} | {- type: 'expression';- value: IExpression;-} | {- type: 'constant';- value: any;-}-+export type IExpParamter =+ | {+ type: 'field';+ value: string;+ }+ | {+ type: 'value';+ value: any;+ }+ | {+ type: 'expression';+ value: IExpression;+ }+ | {+ type: 'constant';+ value: any;+ };export interface IExpression {op: 'bin' | 'log2' | 'log10' | 'one' | 'binCount';@@ -83,13 +94,6 @@ export interface IViewField extends IField {sort?: 'none' | 'ascending' | 'descending';}-export interface Measure extends IField {- aggregator?: AggFC;- minWidth?: number;- formatter?: (value: number | undefined) => number | string;- [key: string]: any;-}-export interface DataSet {id: string;name: string;@@ -104,7 +108,20 @@ export interface IFieldNeighbor {export interface IMeasure {key: string;- op: StatFuncName+ op: IAggregator;+}++export interface IPredicate {+ key: string;+ type: "discrete" | "continuous";+ range: Set<any> | [number, number];+}++export interface IExplainProps {+ dataSource: IRow[];+ predicates: IPredicate[];+ viewFields: IField[];+ metas: IField[];}export interface IDataSet {@@ -119,12 +136,12 @@ export interface IDataSet {export interface IDataSetInfo {name: string;rawFields: IMutField[];- dataSource: IRow[]+ dataSource: IRow[];}export interface IDataSource {id: string;- data: IRow[]+ data: IRow[];}export interface IFilterField extends IViewField {@@ -149,39 +166,34 @@ export interface DraggableFieldState {export interface IDraggableStateKey {id: keyof DraggableFieldState;- mode: number-}--export type IFilterRule = {- type: 'range';- value: readonly [number, number];-} | {- type: 'temporal range';- value: readonly [number, number];-} | {- type: 'one of';- value: Set<string | number>;-};+ mode: number;+}-export const EXPLORATION_TYPES = [- 'none',- 'brush',- 'point',-] as const;+export type IFilterRule =+ | {+ type: 'range';+ value: readonly [number, number];+ }+ | {+ type: 'temporal range';+ value: readonly [number, number];+ }+ | {+ type: 'one of';+ value: Set<string | number>;+ };-export const BRUSH_DIRECTIONS = [- 'default',- 'x',- 'y',-] as const;+export const EXPLORATION_TYPES = ['none', 'brush', 'point'] as const;++export const BRUSH_DIRECTIONS = ['default', 'x', 'y'] as const;export type IStackMode = 'none' | 'stack' | 'normalize';-export type IExplorationType = (typeof EXPLORATION_TYPES)[number];-export type IBrushDirection = (typeof BRUSH_DIRECTIONS)[number];+export type IExplorationType = typeof EXPLORATION_TYPES[number];+export type IBrushDirection = typeof BRUSH_DIRECTIONS[number];export interface IVisualConfig {defaultAggregated: boolean;- geoms: string[];+ geoms: string[];stack: IStackMode;showActions: boolean;interactiveScale: boolean;@@ -190,7 +202,7 @@ export interface IVisualConfig {mode: 'auto' | 'fixed';width: number;height: number;- }+ };exploration: {mode: IExplorationType;/** works when mode is 'brush' */@@ -207,8 +219,8 @@ export interface IVisSpec {export enum ISegmentKey {vis = 'vis',- data = 'data'+ data = 'data',}export type IThemeKey = 'vega' | 'g2';-export type IDarkMode = 'media' | 'light' | 'dark';\ No newline at end of file+export type IDarkMode = 'media' | 'light' | 'dark';diff --git a/packages/graphic-walker/src/lib/inferMeta.ts b/packages/graphic-walker/src/lib/inferMeta.tsindex 5a000c3b..ef49affd 100644--- a/packages/graphic-walker/src/lib/inferMeta.ts+++ b/packages/graphic-walker/src/lib/inferMeta.ts@@ -1,5 +1,4 @@-import { IAnalyticType, ISemanticType, UnivariateSummary } from "visual-insights";-import { IMutField, IRow, IUncertainMutField } from "../interfaces";+import { IAnalyticType, IMutField, IRow, ISemanticType, IUncertainMutField } from '../interfaces';const COMMON_TIME_FORMAT: RegExp[] = [/^\d{4}-\d{2}-\d{2}$/, // YYYY-MM-DD@@ -8,13 +7,13 @@ const COMMON_TIME_FORMAT: RegExp[] = [/^\d{4}\/\d{2}\/\d{2}$/, // YYYY/MM/DD/^\d{4}\.\d{2}\.\d{2}$/, // YYYY.MM.DD/^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/, // YYYY-MM-DD HH:MM:SS- /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/ // YYYY-MM-DDTHH:MM:SS (ISO-8601)+ /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/, // YYYY-MM-DDTHH:MM:SS (ISO-8601)];/*** check if this array is a date time array based on some common date format* @param data string array- * @returns+ * @returns*/export function isDateTimeArray(data: string[]): boolean {let isDateTime = true;@@ -34,6 +33,19 @@ export function isDateTimeArray(data: string[]): boolean {return isDateTime;}+export function isNumericArray(data: any[]): boolean {+ return data.every((item) => {+ // Check if the item is already a number+ if (typeof item === 'number') {+ return true;+ }++ // Check if the item can be converted into a number+ const number = parseFloat(item);+ return !isNaN(number) && isFinite(item);+ });+}+function inferAnalyticTypeFromSemanticType(semanticType: ISemanticType): IAnalyticType {switch (semanticType) {case 'quantitative':@@ -43,37 +55,22 @@ function inferAnalyticTypeFromSemanticType(semanticType: ISemanticType): IAnalyt}}-/**- * 这里目前暂时包一层,是为了解耦具体的推断实现。后续这里要调整推断的逻辑。- * 需要讨论这一层是否和交互层有关,如果没有关系,这一层包裹可以不存在这里,而是在visual-insights中。- * @param data 原始数据- * @param fid 字段id- * @returns semantic type 列表- */export function inferSemanticType(data: IRow[], fid: string): ISemanticType {- let st = UnivariateSummary.getFieldType(data, fid);+ const values = data.map((row) => row[fid]);++ let st: ISemanticType = isNumericArray(values) ? 'quantitative' : 'nominal';if (st === 'nominal') {if (isDateTimeArray(data.map((row) => `${row[fid]}`))) st = 'temporal';- } else if (st === 'ordinal') {- const valueSet: Set<number> = new Set();- let _max = -Infinity;- let _min = Infinity;- for (let v of valueSet) {- _max = Math.max(_max, v);- _min = Math.max(_min, v);- }- if (_max - _min + 1 !== valueSet.size) {- st = 'quantitative';- }}return st;}-export function inferMeta (props: { dataSource: IRow[]; fields: IUncertainMutField[] }): IMutField[] {+export function inferMeta(props: { dataSource: IRow[]; fields: IUncertainMutField[] }): IMutField[] {const { dataSource, fields } = props;- const finalFieldMetas: IMutField[] = []+ const finalFieldMetas: IMutField[] = [];for (let field of fields) {- let semanticType: ISemanticType = field.semanticType === '?' ? inferSemanticType(dataSource, field.fid) : field.semanticType;+ let semanticType: ISemanticType =+ field.semanticType === '?' ? inferSemanticType(dataSource, field.fid) : field.semanticType;let analyticType: IAnalyticType = inferAnalyticTypeFromSemanticType(semanticType);finalFieldMetas.push({@@ -82,7 +79,7 @@ export function inferMeta (props: { dataSource: IRow[]; fields: IUncertainMutFiename: field.name ? field.name : field.fid,analyticType,semanticType,- })+ });}- return finalFieldMetas-}\ No newline at end of file+ return finalFieldMetas;+}diff --git a/packages/graphic-walker/src/lib/insights/explainByChildren.ts b/packages/graphic-walker/src/lib/insights/explainByChildren.tsnew file mode 100644index 00000000..ca7ca621--- /dev/null+++ b/packages/graphic-walker/src/lib/insights/explainByChildren.ts@@ -0,0 +1,50 @@+import { IMeasure, IRow } from '../../interfaces';+import { IPredicate, checkChildOutlier, checkMajorFactor, filterByPredicates } from '../../utils';+import { aggregate } from '../op/aggregate';++export function explainByChildren(+ dataSource: IRow[],+ predicates: IPredicate[],+ dimensions: string[],+ measures: IMeasure[]+) {+ // 1. find most relative dimensions(topK)+ // 2. for each dimension, we check all the dim member in it. find the member whos distribution is most close to current one.+ // here we do not nomorlize all the dim member's distribution, we use the relative distribution instead.+ // 3. the dim member we found can be used to explain current one as major factor.+ // const predicates: IPredicate[] = selection === 'all' ? [] : getPredicates(selection, dimensions, []);+ const viewData = aggregate(dataSource, {+ groupBy: dimensions,+ op: 'aggregate',+ agg: Object.fromEntries(measures.map((mea) => [mea.key, mea.op])),+ });+ const measureIds = measures.map((m) => m.key);+ const parentData = filterByPredicates(viewData, predicates);++ const majorList: Array<{ key: string; score: number; dimensions: string[]; measures: IMeasure[] }> = [];+ const outlierList: Array<{ key: string; score: number; dimensions: string[]; measures: IMeasure[] }> = [];+ for (let extendDim of dimensions) {+ const data = aggregate(dataSource, {+ groupBy: dimensions.concat(extendDim),+ op: 'aggregate',+ agg: Object.fromEntries(measures.map((mea) => [mea.key, mea.op])),+ });+ let groups: Map<any, IRow[]> = new Map();+ for (let record of data) {+ if (!groups.has(record[extendDim])) {+ groups.set(record[extendDim], []);+ }+ groups.get(record[extendDim])?.push(record);+ }+ const { majorKey, majorSum } = checkMajorFactor(parentData, groups, dimensions, measureIds);+ majorList.push({ key: majorKey, score: majorSum, dimensions: [extendDim], measures });+ const { outlierKey, outlierSum } = checkChildOutlier(parentData, groups, dimensions, measureIds);+ outlierList.push({ key: outlierKey, score: outlierSum, dimensions: [extendDim], measures });+ }+ majorList.sort((a, b) => a.score - b.score);+ outlierList.sort((a, b) => b.score - a.score);+ return {+ majorList,+ outlierList,+ };+}diff --git a/packages/graphic-walker/src/lib/insights/explainBySelection.ts b/packages/graphic-walker/src/lib/insights/explainBySelection.tsnew file mode 100644index 00000000..6236734e--- /dev/null+++ b/packages/graphic-walker/src/lib/insights/explainBySelection.ts@@ -0,0 +1,47 @@+import { IExplainProps, IField } from '../../interfaces';+import { filterByPredicates } from '../../utils';+import { compareDistribution, normalizeWithParent } from '../../utils/normalization';+import { aggregate } from '../op/aggregate';+import { complementaryFields, groupByAnalyticTypes, meaList2AggProps } from './utils';++export function explainBySelection(props: IExplainProps) {+ const { metas, dataSource, viewFields, predicates } = props;+ const { dimensions: dimsInView, measures: measInView } = groupByAnalyticTypes(viewFields);+ const complementaryDimensions = complementaryFields({+ all: metas.filter((f) => f.analyticType === 'dimension'),+ selection: dimsInView,+ });+ const outlierList: Array<{ score: number; viiewFields: IField[] }> = complementaryDimensions.map(extendDim => {+ const overallData = aggregate(dataSource, {+ groupBy: [extendDim.fid],+ op: 'aggregate',+ agg: meaList2AggProps(measInView),+ });+ const viewData = aggregate(dataSource, {+ groupBy: dimsInView.map((f) => f.fid),+ op: 'aggregate',+ agg: meaList2AggProps(measInView),+ });+ const subData = filterByPredicates(viewData, predicates);++ let outlierNormalization = normalizeWithParent(+ subData,+ overallData,+ measInView.map((mea) => mea.fid),+ false+ );++ let outlierScore = compareDistribution(+ outlierNormalization.normalizedData,+ outlierNormalization.normalizedParentData,+ [extendDim.fid],+ measInView.map((mea) => mea.fid)+ );+ return {+ viiewFields: measInView.concat(extendDim),+ score: outlierScore,+ }+ }).sort((a, b) => b.score - a.score)++ return outlierList;+}diff --git a/packages/graphic-walker/src/lib/insights/explainValue.ts b/packages/graphic-walker/src/lib/insights/explainValue.tsnew file mode 100644index 00000000..719a0014--- /dev/null+++ b/packages/graphic-walker/src/lib/insights/explainValue.ts@@ -0,0 +1,30 @@+import { IAggregator, IExplainProps } from '../../interfaces';+import { filterByPredicates } from '../../utils';+import { aggregate } from '../op/aggregate';+import { complementaryFields, groupByAnalyticTypes } from './utils';++export function explainValue(props: IExplainProps): number[] {+ const { viewFields, dataSource, predicates } = props;+ const { dimensions: dimsInView, measures: measInView } = groupByAnalyticTypes(viewFields);+ const viewData = aggregate(dataSource, {+ groupBy: dimsInView.map((f) => f.fid),+ op: 'aggregate',+ agg: Object.fromEntries(measInView.map((mea) => [mea.fid, (mea.aggName ?? 'sum') as IAggregator])),+ });+ const selection = filterByPredicates(viewData, predicates);+ const cmps: number[] = [];+ for (let mea of measInView) {+ const values = viewData.map((r) => r[mea.fid]).sort((a, b) => a - b);+ const selectionValues = selection.map((r) => r[mea.fid]);+ const lowerBoundary: number = values[Math.floor(values.length * 0.15)];+ const higherBoundary: number = values[Math.min(Math.ceil(values.length * 0.85), values.length - 1)];+ if (selectionValues.some((v) => v >= higherBoundary)) {+ cmps.push(1);+ } else if (selectionValues.some((v) => v <= lowerBoundary)) {+ cmps.push(-1);+ } else {+ cmps.push(0);+ }+ }+ return cmps;+}diff --git a/packages/graphic-walker/src/lib/insights/utils.ts b/packages/graphic-walker/src/lib/insights/utils.tsnew file mode 100644index 00000000..8ca02679--- /dev/null+++ b/packages/graphic-walker/src/lib/insights/utils.ts@@ -0,0 +1,21 @@+import { IAggregator, IField } from '../../interfaces';+import { IAggQuery } from '../interfaces';++export function groupByAnalyticTypes(fields: IField[]) {+ const dimensions = fields.filter((f) => f.analyticType === 'dimension');+ const measures = fields.filter((f) => f.analyticType === 'measure');+ return {+ dimensions,+ measures,+ };+}++export function meaList2AggProps(measures: IField[]): IAggQuery['agg'] {+ return Object.fromEntries(measures.map((mea) => [mea.fid, (mea.aggName ?? 'sum') as IAggregator]));+}++export function complementaryFields(props: { selection: IField[]; all: IField[] }): IField[] {+ return props.all+ .filter((f) => f.analyticType === 'dimension')+ .filter((f) => !props.selection.find((vf) => vf.fid === f.fid));+}diff --git a/packages/graphic-walker/src/lib/interfaces.ts b/packages/graphic-walker/src/lib/interfaces.tsindex c84fab41..5587d586 100644--- a/packages/graphic-walker/src/lib/interfaces.ts+++ b/packages/graphic-walker/src/lib/interfaces.ts@@ -1,16 +1,10 @@+import { IAggregator } from "../interfaces";+export interface IAggQuery {op: 'aggregate';groupBy: string[];agg: {- [field: string]:- | 'sum'- | 'count'- | 'max'- | 'min'- | 'mean'- | 'median'- | 'variance'- | 'stdev';+ [field: string]: IAggregator;};}diff --git a/packages/graphic-walker/src/lib/op/aggregate.ts b/packages/graphic-walker/src/lib/op/aggregate.tsindex e2aaeb55..832ecee2 100644--- a/packages/graphic-walker/src/lib/op/aggregate.ts+++ b/packages/graphic-walker/src/lib/op/aggregate.ts@@ -1,4 +1,4 @@-import { IRow } from "visual-insights";+import { IRow } from "../../interfaces";import { IAggQuery } from "../interfaces";import { sum, mean, median, stdev, variance, max, min, count } from "./stat";diff --git a/packages/graphic-walker/src/lib/op/bin.ts b/packages/graphic-walker/src/lib/op/bin.tsindex 277fca17..c03b871a 100644--- a/packages/graphic-walker/src/lib/op/bin.ts+++ b/packages/graphic-walker/src/lib/op/bin.ts@@ -1,4 +1,4 @@-import { IRow } from "visual-insights";+import { IRow } from "../../interfaces";import { IBinQuery } from "../interfaces";export function bin (dataSource: IRow[], query: IBinQuery): IRow[] {diff --git a/packages/graphic-walker/src/lib/op/fold.ts b/packages/graphic-walker/src/lib/op/fold.tsindex 4f062238..8ea26135 100644--- a/packages/graphic-walker/src/lib/op/fold.ts+++ b/packages/graphic-walker/src/lib/op/fold.ts@@ -1,4 +1,4 @@-import { IRow } from "visual-insights";+import { IRow } from "../../interfaces";import { IFoldQuery } from "../interfaces";export function fold (data: IRow[], query: IFoldQuery): IRow[] {diff --git a/packages/graphic-walker/src/lib/viewQuery.ts b/packages/graphic-walker/src/lib/viewQuery.tsindex b023d5d6..d39722a0 100644--- a/packages/graphic-walker/src/lib/viewQuery.ts+++ b/packages/graphic-walker/src/lib/viewQuery.ts@@ -1,5 +1,4 @@-import { IRow } from "visual-insights";-import { IMutField } from "../interfaces";+import { IMutField, IRow } from "../interfaces";import { aggregate } from "./op/aggregate";import { fold } from "./op/fold";import { IAggQuery, IBinQuery, IFoldQuery, IRawQuery } from "./interfaces";diff --git a/packages/graphic-walker/src/locales/en-US.json b/packages/graphic-walker/src/locales/en-US.jsonindex e008d293..1393f927 100644--- a/packages/graphic-walker/src/locales/en-US.json+++ b/packages/graphic-walker/src/locales/en-US.json@@ -58,7 +58,8 @@"shape": "Shape","theta": "Angle","radius": "Radius",- "filters": "Filters"+ "filters": "Filters",+ "details": "Details"},"aggregator": {"sum": "Sum",diff --git a/packages/graphic-walker/src/locales/zh-CN.json b/packages/graphic-walker/src/locales/zh-CN.jsonindex 96d13bdc..ea996669 100644--- a/packages/graphic-walker/src/locales/zh-CN.json+++ b/packages/graphic-walker/src/locales/zh-CN.json@@ -58,7 +58,8 @@"shape": "形状","theta": "角度","radius": "半径",- "filters": "筛选器"+ "filters": "筛选器",+ "details": "信息"},"aggregator": {"sum": "求和",diff --git a/packages/graphic-walker/src/main.tsx b/packages/graphic-walker/src/main.tsxindex c44bc13e..283f86f4 100644--- a/packages/graphic-walker/src/main.tsx+++ b/packages/graphic-walker/src/main.tsx@@ -1,11 +1,13 @@-import React, { useEffect } from "react";+import React from "react";import ReactDOM from "react-dom";import { GraphicWalker } from "./index";import { inject } from "@vercel/analytics";import "./index.css";-inject();+if (!import.meta.env.DEV) {+ inject();+}ReactDOM.render(<React.StrictMode>diff --git a/packages/graphic-walker/src/renderer/specRenderer.tsx b/packages/graphic-walker/src/renderer/specRenderer.tsxindex d1492933..0dd39213 100644--- a/packages/graphic-walker/src/renderer/specRenderer.tsx+++ b/packages/graphic-walker/src/renderer/specRenderer.tsx@@ -31,6 +31,7 @@ const SpecRenderer = forwardRef<IReactVegaHandler, SpecRendererProps>(function (const theta = draggableFieldState.theta;const radius = draggableFieldState.radius;const sizeChannel = draggableFieldState.size;+ const details = draggableFieldState.details;const rowLeftFacetFields = useMemo(() => rows.slice(0, -1).filter((f) => f.analyticType === 'dimension'), [rows]);const colLeftFacetFields = useMemo(@@ -102,6 +103,7 @@ const SpecRenderer = forwardRef<IReactVegaHandler, SpecRendererProps>(function (shape={shape[0]}opacity={opacity[0]}size={sizeChannel[0]}+ details={details}showActions={showActions}width={size.width - 12 * 4}height={size.height - 12 * 4}diff --git a/packages/graphic-walker/src/services.ts b/packages/graphic-walker/src/services.tsindex c69cf37a..4e2695d8 100644--- a/packages/graphic-walker/src/services.ts+++ b/packages/graphic-walker/src/services.ts@@ -1,6 +1,5 @@import { toJS } from 'mobx';-import { View, Specification } from 'visual-insights';-import { IRow, Filters, SemanticType, IMeasure, IMutField, IFilterField } from './interfaces';+import { IRow, IMutField, IFilterField, Specification } from './interfaces';/* eslint import/no-webpack-loader-syntax:0 */// @ts-ignore// eslint-disable-next-line@@ -8,20 +7,19 @@ import { IRow, Filters, SemanticType, IMeasure, IMutField, IFilterField } from '/* eslint import/no-webpack-loader-syntax:0 */// @ts-ignore// eslint-disable-next-line-import ExplainerWorker from './workers/explainer.worker?worker&inline';+// import ExplainerWorker from './workers/explainer.worker?worker&inline';import FilterWorker from './workers/filter.worker?worker&inline';import TransformDataWorker from './workers/transform.worker?worker&inline';import ViewQueryWorker from './workers/viewQuery.worker?worker&inline';-import { IExplaination, IMeasureWithStat } from './insights';-import { IViewQuery, queryView } from './lib/viewQuery';+import { IViewQuery } from './lib/viewQuery';-interface WorkerState {- eWorker: Worker | null;-}+// interface WorkerState {+// eWorker: Worker | null;+// }-const workerState: WorkerState = {- eWorker: null,-}+// const workerState: WorkerState = {+// eWorker: null,+// }function workerService<T, R>(worker: Worker, data: R): Promise<T> {return new Promise<T>((resolve, reject) => {@@ -38,72 +36,72 @@ function workerService<T, R>(worker: Worker, data: R): Promise<T> {});}-interface ExplainParams {- dimensions: string[];- measures: string[];- dataSource: IRow[];- filters?: Filters;- currentSpace: {- dimensions: string[];- measures: IMeasure[];- };-}+// interface ExplainParams {+// dimensions: string[];+// measures: string[];+// dataSource: IRow[];+// filters?: Filters;+// currentSpace: {+// dimensions: string[];+// measures: IMeasure[];+// };+// }export interface IVisSpace {dataView: IRow[];schema: Specification;}-interface ExplainReturns {- explainations: IExplaination[];- valueExp: IMeasureWithStat[];- visSpaces: IVisSpace[];- fieldsWithSemanticType: Array<{ key: string; type: SemanticType }>;-}-export async function getExplaination(props: ExplainParams) {- const worker = workerState.eWorker;- if (worker === null) throw new Error('init worker first.')- let result: ExplainReturns = {- explainations: [],- valueExp: [],- visSpaces: [],- fieldsWithSemanticType: [],- };- try {- result = await workerService<ExplainReturns, { type: string; data: ExplainParams }>(- worker,- {- type: 'getExplaination',- data: props- }- );- return result;- } catch (error) {- console.error(error);- }- return result;-}+// interface ExplainReturns {+// explainations: IExplaination[];+// valueExp: IMeasureWithStat[];+// visSpaces: IVisSpace[];+// fieldsWithSemanticType: Array<{ key: string; type: SemanticType }>;+// }+// export async function getExplaination(props: ExplainParams) {+// const worker = workerState.eWorker;+// if (worker === null) throw new Error('init worker first.')+// let result: ExplainReturns = {+// explainations: [],+// valueExp: [],+// visSpaces: [],+// fieldsWithSemanticType: [],+// };+// try {+// result = await workerService<ExplainReturns, { type: string; data: ExplainParams }>(+// worker,+// {+// type: 'getExplaination',+// data: props+// }+// );+// return result;+// } catch (error) {+// console.error(error);+// }+// return result;+// }interface PreAnalysisParams {fields: IMutField[];dataSource: IRow[];}-export async function preAnalysis(props: PreAnalysisParams) {- if (workerState.eWorker !== null) {- workerState.eWorker.terminate();- }- try {- workerState.eWorker = new ExplainerWorker() as Worker;- const tmp = await workerService<boolean, { type: string; data: PreAnalysisParams}>(workerState.eWorker, { type: 'preAnalysis', data: props });- } catch (error) {- console.error(error)- }-}+// export async function preAnalysis(props: PreAnalysisParams) {+// if (workerState.eWorker !== null) {+// workerState.eWorker.terminate();+// }+// try {+// workerState.eWorker = new ExplainerWorker() as Worker;+// const tmp = await workerService<boolean, { type: string; data: PreAnalysisParams}>(workerState.eWorker, { type: 'preAnalysis', data: props });+// } catch (error) {+// console.error(error)+// }+// }-export function destroyWorker() {- if (workerState.eWorker) {- workerState.eWorker.terminate();- workerState.eWorker = null;- }-}+// export function destroyWorker() {+// if (workerState.eWorker) {+// workerState.eWorker.terminate();+// workerState.eWorker = null;+// }+// }let filterWorker: Worker | null = null;let filterWorkerAutoTerminator: NodeJS.Timeout | null = null;diff --git a/packages/graphic-walker/src/store/visualSpecStore.ts b/packages/graphic-walker/src/store/visualSpecStore.tsindex 26c66967..46435f2c 100644--- a/packages/graphic-walker/src/store/visualSpecStore.ts+++ b/packages/graphic-walker/src/store/visualSpecStore.ts@@ -1,15 +1,12 @@import { IReactionDisposer, makeAutoObservable, observable, reaction, toJS } from "mobx";import produce from "immer";import { v4 as uuidv4 } from "uuid";-import { Specification } from "visual-insights";-import { DataSet, DraggableFieldState, IExpression, IFilterRule, IViewField, IVisSpec, IVisualConfig } from "../interfaces";+import { DataSet, DraggableFieldState, IFilterRule, IViewField, IVisSpec, IVisualConfig, Specification } from "../interfaces";import { CHANNEL_LIMIT, GEMO_TYPES, MetaFieldKeys } from "../config";-import { makeBinField, makeLogField } from "../utils/normalization";import { VisSpecWithHistory } from "../models/visSpecHistory";import { IStoInfo, dumpsGWPureSpec, parseGWContent, parseGWPureSpec, stringifyGWContent } from "../utils/save";import { CommonStore } from "./commonStore";import { createCountField } from "../utils";-import { IViewQuery } from "../lib/viewQuery";function getChannelSizeLimit(channel: string): number {if (typeof CHANNEL_LIMIT[channel] === "undefined") return Infinity;@@ -19,6 +16,7 @@ function getChannelSizeLimit(channel: string): number {function geomAdapter(geom: string) {switch (geom) {case "interval":+ case "bar":return "bar";case "line":return "line";@@ -649,6 +647,7 @@ export class VizSpecStore {// thi// const [xField, yField, ] = spec.position;this.clearState();+ this.setVisualConfig('defaultAggregated', Boolean(spec.aggregate));if ((spec.geomType?.length ?? 0) > 0) {this.setVisualConfig("geoms",diff --git a/packages/graphic-walker/src/utils/autoMark.ts b/packages/graphic-walker/src/utils/autoMark.tsindex 495310e5..040a0eb6 100644--- a/packages/graphic-walker/src/utils/autoMark.ts+++ b/packages/graphic-walker/src/utils/autoMark.ts@@ -1,4 +1,4 @@-import { ISemanticType } from "visual-insights";+import { ISemanticType } from "../interfaces";/***diff --git a/packages/graphic-walker/src/utils/dataPrep.ts b/packages/graphic-walker/src/utils/dataPrep.tsindex ab6c6113..d6cdedcf 100644--- a/packages/graphic-walker/src/utils/dataPrep.ts+++ b/packages/graphic-walker/src/utils/dataPrep.ts@@ -1,5 +1,4 @@-import { IRow } from "visual-insights";-import { IMutField } from "../interfaces";+import { IMutField, IRow } from "../interfaces";function updateRowKeys(data: IRow[], keyEncodeList: {from: string; to: string}[]): IRow[] {return data.map((row) => {diff --git a/packages/graphic-walker/src/vis/react-vega.tsx b/packages/graphic-walker/src/vis/react-vega.tsxindex f745527e..e7606e63 100644--- a/packages/graphic-walker/src/vis/react-vega.tsx+++ b/packages/graphic-walker/src/vis/react-vega.tsx@@ -40,6 +40,7 @@ interface ReactVegaProps {shape?: IViewField;theta?: IViewField;radius?: IViewField;+ details?: Readonly<IViewField[]>;showActions: boolean;layoutMode: string;width: number;@@ -97,6 +98,7 @@ const ReactVega = forwardRef<IReactVegaHandler, ReactVegaProps>(function ReactVeheight,selectEncoding,brushEncoding,+ details = [],themeKey = 'vega',dark = 'media'} = props;@@ -189,6 +191,7 @@ const ReactVega = forwardRef<IReactVegaHandler, ReactVegaProps>(function ReactVecolumn: colFacetField,xOffset: NULL_FIELD,yOffset: NULL_FIELD,+ details,defaultAggregated: defaultAggregate,stack,geomType,@@ -257,6 +260,7 @@ const ReactVega = forwardRef<IReactVegaHandler, ReactVegaProps>(function ReactVecolumn: colFacetField,xOffset: NULL_FIELD,yOffset: NULL_FIELD,+ details,defaultAggregated: defaultAggregate,stack,geomType,@@ -368,6 +372,7 @@ const ReactVega = forwardRef<IReactVegaHandler, ReactVegaProps>(function ReactVebrushEncoding,crossFilterTriggerIdx,themeConfig,+ details]);useImperativeHandle(ref, () => ({diff --git a/packages/graphic-walker/src/vis/spec/encode.ts b/packages/graphic-walker/src/vis/spec/encode.tsindex 5abc617c..164fcbb6 100644--- a/packages/graphic-walker/src/vis/spec/encode.ts+++ b/packages/graphic-walker/src/vis/spec/encode.ts@@ -14,6 +14,7 @@ export interface IEncodeProps {column: IViewField;theta: IViewField;radius: IViewField;+ details: Readonly<IViewField[]>;}function availableChannels(geomType: string): Set<string> {if (geomType === 'arc') {diff --git a/packages/graphic-walker/src/vis/spec/mark.ts b/packages/graphic-walker/src/vis/spec/mark.tsindex 495310e5..77b7fdd0 100644--- a/packages/graphic-walker/src/vis/spec/mark.ts+++ b/packages/graphic-walker/src/vis/spec/mark.ts@@ -1,4 +1,4 @@-import { ISemanticType } from "visual-insights";+import { ISemanticType } from "../../interfaces";/***diff --git a/packages/graphic-walker/src/vis/spec/tooltip.ts b/packages/graphic-walker/src/vis/spec/tooltip.tsnew file mode 100644index 00000000..b707dd09--- /dev/null+++ b/packages/graphic-walker/src/vis/spec/tooltip.ts@@ -0,0 +1,16 @@+import { IViewField } from "../../interfaces";++export function addTooltipEncode (encoding: {[key: string]: any}, details: Readonly<IViewField[]> = []) {+ const encs = Object.keys(encoding).filter(ck => ck !== 'tooltip').map(ck => {+ return {+ field: encoding[ck].field,+ type: encoding[ck].type,+ title: encoding[ck].title+ }+ }).concat(details.map(f => ({+ field: f.fid,+ title: f.name,+ type: f.semanticType+ })))+ encoding.tooltip = encs+}\ No newline at end of filediff --git a/packages/graphic-walker/src/vis/spec/view.ts b/packages/graphic-walker/src/vis/spec/view.tsindex 2a8f7cf8..6f02a391 100644--- a/packages/graphic-walker/src/vis/spec/view.ts+++ b/packages/graphic-walker/src/vis/spec/view.ts@@ -1,15 +1,14 @@-import { ISemanticType } from 'visual-insights';-import { IStackMode, IViewField } from '../../interfaces';+import { ISemanticType, IStackMode, IViewField } from '../../interfaces';import { autoMark } from './mark';import { NULL_FIELD } from './field';import { channelAggregate } from './aggregate';import { IEncodeProps, channelEncode } from './encode';-import { channelStack } from './stack'+import { channelStack } from './stack';+import { addTooltipEncode } from './tooltip';const BRUSH_SIGNAL_NAME = '__gw_brush__';const POINT_SIGNAL_NAME = '__gw_point__';export interface SingleViewProps extends IEncodeProps {-defaultAggregated: boolean;stack: IStackMode;enableCrossFilter: boolean;@@ -32,6 +31,7 @@ export function getSingleView(props: SingleViewProps) {column,xOffset,yOffset,+ details,defaultAggregated,stack,geomType,@@ -70,27 +70,25 @@ export function getSingleView(props: SingleViewProps) {yOffset,theta,radius,+ details});+ addTooltipEncode(encoding, details)if (defaultAggregated) {channelAggregate(encoding, fields);}channelStack(encoding, stack);+ const mark = {+ type: markType,+ opacity: 0.96,+ tooltip: { content: 'data' }+ };if (!enableCrossFilter || (brushEncoding === 'none' && selectEncoding === 'none')) {return {config,- mark: {- type: markType,- opacity: 0.96,- tooltip: true,- },+ mark,encoding,};}- const mark = {- type: markType,- opacity: 0.96,- tooltip: true,- };if (brushEncoding !== 'none') {return {diff --git a/packages/graphic-walker/src/workers/explainer.worker.js b/packages/graphic-walker/src/workers/explainer.worker.jsdeleted file mode 100644index 06f2af21..00000000--- a/packages/graphic-walker/src/workers/explainer.worker.js+++ /dev/null@@ -1,76 +0,0 @@-/* eslint no-restricted-globals: 0 */-/* eslint-disable */-// import { Record, Filters } from '../interfaces';-import { getPredicatesFromVegaSignals } from '../utils';-import { DataExplainer } from '../insights';-const state = {- de: null-};--function preAnalysis (props) {- const { fields, dataSource } = props; // as ReqData;- const de = new DataExplainer(dataSource);- de.setFields(fields);- de.preAnalysis();- state.de = de;- return true-}--function getFieldsSummary (props) {- const de = state.de;- if (de !== null) {- return de.engine.fields;- }- throw new Error('data explainer is not init.')-}-function getExplaination(props) {-- const { filters = {}, currentSpace } = props; // as ReqData;- const predicates = getPredicatesFromVegaSignals(filters, currentSpace.dimensions, []);- const de = state.de;- const ansSpaces = de.explain(predicates, currentSpace.dimensions, currentSpace.measures);- const visSpaces = de.getVisSpec(ansSpaces);- const valueExp = de.explainValue(predicates, currentSpace.dimensions, currentSpace.measures);- const measureStats = [];- for (let i = 0; i < valueExp.length; i++) {- if (valueExp[i] !== 0) {- measureStats.push({- ...currentSpace.measures[i],- score: valueExp[i]- })- }- }- const fields = de.engine.fields;- return {- explainations: ansSpaces,- visSpaces,- valueExp: measureStats,- fieldsWithSemanticType: fields.map(f => ({- key: f.key,- type: f.semanticType- }))- };-}--function main (e) {- const { type, data } = e.data;- let res = false;- try {- switch (type) {- case 'getExplaination':- res = getExplaination(data);- break;- case 'preAnalysis':- res = preAnalysis(data);- break;- default:- throw new Error(`type ${type} is not supported.`);- }- self.postMessage(res);- } catch (error) {- console.log(error)- self.postMessage(false)- }-}--self.addEventListener('message', main, false);diff --git a/yarn.lock b/yarn.lockindex d9873b28..bf981373 100644--- a/yarn.lock+++ b/yarn.lock@@ -208,7 +208,7 @@"@babel/plugin-syntax-jsx" "^7.18.6""@babel/types" "^7.21.0"-"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.14.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.2", "@babel/runtime@^7.19.0", "@babel/runtime@^7.9.2":+"@babel/runtime@^7.1.2", "@babel/runtime@^7.14.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.2", "@babel/runtime@^7.19.0", "@babel/runtime@^7.9.2":version "7.21.0"resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673"integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==@@ -749,21 +749,6 @@ arg@^5.0.2:resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c"integrity sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==-asap@~2.0.3:- version "2.0.6"- resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"- integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==--assert@^2.0.0:- version "2.0.0"- resolved "https://registry.yarnpkg.com/assert/-/assert-2.0.0.tgz#95fc1c616d48713510680f2eaf2d10dd22e02d32"- integrity sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==- dependencies:- es6-object-assign "^1.1.0"- is-nan "^1.2.1"- object-is "^1.0.1"- util "^0.12.0"-autoprefixer@^10.3.5:version "10.4.13"resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.13.tgz#b5136b59930209a321e9fa3dca2e7c4d223e83a8"@@ -776,18 +761,6 @@ autoprefixer@^10.3.5:picocolors "^1.0.0"postcss-value-parser "^4.2.0"-available-typed-arrays@^1.0.5:- version "1.0.5"- resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"- integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==--axios@^0.22.0:- version "0.22.0"- resolved "https://registry.yarnpkg.com/axios/-/axios-0.22.0.tgz#bf702c41fb50fbca4539589d839a077117b79b25"- integrity sha512-Z0U3uhqQeg1oNcihswf4ZD57O3NrR1+ZXhxaROaWpDmsDTx7T2HNBV2ulBtie2hwJptu8UvgnJoK+BIqdzh/1w==- dependencies:- follow-redirects "^1.14.4"-"babel-plugin-styled-components@>= 1.12.0":version "2.0.7"resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-2.0.7.tgz#c81ef34b713f9da2b7d3f5550df0d1e19e798086"@@ -804,11 +777,6 @@ babel-plugin-syntax-jsx@^6.18.0:resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946"integrity sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==-base16@^1.0.0:- version "1.0.0"- resolved "https://registry.yarnpkg.com/base16/-/base16-1.0.0.tgz#e297f60d7ec1014a7a971a39ebc8a98c0b681e70"- integrity sha512-pNdYkNPiJUnEhnfXV56+sQy8+AaPcG3POZAUnwr4EeqCUZFz4u2PePbo3e5Gj4ziYPCWGUZT9RHisvJKnwFuBQ==-binary-extensions@^2.0.0:version "2.2.0"resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"@@ -831,14 +799,6 @@ browserslist@^4.21.3, browserslist@^4.21.4:node-releases "^2.0.8"update-browserslist-db "^1.0.10"-call-bind@^1.0.0, call-bind@^1.0.2:- version "1.0.2"- resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c"- integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==- dependencies:- function-bind "^1.1.1"- get-intrinsic "^1.0.2"-camelcase-css@^2.0.1:version "2.0.1"resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5"@@ -943,13 +903,6 @@ copy-to-clipboard@^3.3.1:dependencies:toggle-selection "^1.0.6"-cross-fetch@^3.1.5:- version "3.1.5"- resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f"- integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==- dependencies:- node-fetch "2.6.7"-css-box-model@^1.2.0:version "1.2.1"resolved "https://registry.yarnpkg.com/css-box-model/-/css-box-model-1.2.1.tgz#59951d3b81fd6b2074a62d49444415b0d2b4d7c1"@@ -996,11 +949,6 @@ csstype@^3.0.2, csstype@^3.0.6:resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.1.tgz#841b532c45c758ee546a11d5bd7b7b473c8c30b9"integrity sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==-cube-core@^2.13.0:- version "2.13.0"- resolved "https://registry.yarnpkg.com/cube-core/-/cube-core-2.13.0.tgz#d64abcfccf0765879f226e892cc32b934c3580c6"- integrity sha512-hUUu//tVQmJ+sV9S61274iWUB/CIPRNwnALzVd5PVWtYk3d2KBRc/DTZn7JZB+UWFKqL7KHYf0wSnFy3lofuDw==-"d3-array@1 - 3", "d3-array@2 - 3", "[email protected] - 3", "[email protected] - 3", d3-array@^3.1.1:version "3.2.2"resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.2.2.tgz#f8ac4705c5b06914a7e0025bbf8d5f1513f6a86e"@@ -1137,14 +1085,6 @@ debug@^4.1.0:dependencies:ms "2.1.2"-define-properties@^1.1.3:- version "1.2.0"- resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5"- integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==- dependencies:- has-property-descriptors "^1.0.0"- object-keys "^1.1.1"-defined@^1.0.0:version "1.0.1"resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.1.tgz#c0b9db27bfaffd95d6f61399419b893df0f91ebf"@@ -1193,11 +1133,6 @@ error-stack-parser@^2.0.6:dependencies:stackframe "^1.3.4"-es6-object-assign@^1.1.0:- version "1.1.0"- resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c"- integrity sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==-version "0.15.18"resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.18.tgz#20a7ae1416c8eaade917fb2453c1259302c637a5"@@ -1417,31 +1352,6 @@ fastq@^1.6.0:dependencies:reusify "^1.0.4"-fbemitter@^3.0.0:- version "3.0.0"- resolved "https://registry.yarnpkg.com/fbemitter/-/fbemitter-3.0.0.tgz#00b2a1af5411254aab416cd75f9e6289bee4bff3"- integrity sha512-KWKaceCwKQU0+HPoop6gn4eOHk50bBv/VxjJtGMfwmJt3D29JpN4H4eisCtIPA+a8GVBam+ldMMpMjJUvpDyHw==- dependencies:- fbjs "^3.0.0"--fbjs-css-vars@^1.0.0:- version "1.0.2"- resolved "https://registry.yarnpkg.com/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz#216551136ae02fe255932c3ec8775f18e2c078b8"- integrity sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ==--fbjs@^3.0.0, fbjs@^3.0.1:- version "3.0.4"- resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-3.0.4.tgz#e1871c6bd3083bac71ff2da868ad5067d37716c6"- integrity sha512-ucV0tDODnGV3JCnnkmoszb5lf4bNpzjv80K41wd4k798Etq+UYD0y0TIfalLjZoKgjive6/adkRnszwapiDgBQ==- dependencies:- cross-fetch "^3.1.5"- fbjs-css-vars "^1.0.0"- loose-envify "^1.0.0"- object-assign "^4.1.0"- promise "^7.1.1"- setimmediate "^1.0.5"- ua-parser-js "^0.7.30"-fill-range@^7.0.1:version "7.0.1"resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"@@ -1449,26 +1359,6 @@ fill-range@^7.0.1:dependencies:to-regex-range "^5.0.1"-flux@^4.0.1:- version "4.0.3"- resolved "https://registry.yarnpkg.com/flux/-/flux-4.0.3.tgz#573b504a24982c4768fdfb59d8d2ea5637d72ee7"- integrity sha512-yKAbrp7JhZhj6uiT1FTuVMlIAT1J4jqEyBpFApi1kxpGZCvacMVc/t1pMQyotqHhAgvoE3bNvAykhCo2CLjnYw==- dependencies:- fbemitter "^3.0.0"- fbjs "^3.0.1"--follow-redirects@^1.14.4:- version "1.15.2"- resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13"- integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==--for-each@^0.3.3:- version "0.3.3"- resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e"- integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==- dependencies:- is-callable "^1.1.3"-fraction.js@^4.2.0:version "4.2.0"resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.2.0.tgz#448e5109a313a3527f5a3ab2119ec4cf0e0e2950"@@ -1494,15 +1384,6 @@ get-caller-file@^2.0.5:resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==-get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3:- version "1.2.0"- resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f"- integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==- dependencies:- function-bind "^1.1.1"- has "^1.0.3"- has-symbols "^1.0.3"-glob-parent@^5.1.2, glob-parent@~5.1.2:version "5.1.2"resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"@@ -1522,37 +1403,11 @@ globals@^11.1.0:resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==-gopd@^1.0.1:- version "1.0.1"- resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c"- integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==- dependencies:- get-intrinsic "^1.1.3"-has-flag@^3.0.0:version "3.0.0"resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==-has-property-descriptors@^1.0.0:- version "1.0.0"- resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861"- integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==- dependencies:- get-intrinsic "^1.1.1"--has-symbols@^1.0.2, has-symbols@^1.0.3:- version "1.0.3"- resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"- integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==--has-tostringtag@^1.0.0:- version "1.0.0"- resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25"- integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==- dependencies:- has-symbols "^1.0.2"-has@^1.0.3:version "1.0.3"resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"@@ -1610,11 +1465,6 @@ immer@^9.0.15:resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.19.tgz#67fb97310555690b5f9cd8380d38fc0aabb6b38b"integrity sha512-eY+Y0qcsB4TZKwgQzLaE/lqYMlKhv5J9dyd2RhhtGhNo2njPXDqU9XPfcNfa3MIDsdtZt5KlkIsirlo4dHsWdQ==-inherits@^2.0.3:- version "2.0.4"- resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"- integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==-inline-style-prefixer@^6.0.0:version "6.0.4"resolved "https://registry.yarnpkg.com/inline-style-prefixer/-/inline-style-prefixer-6.0.4.tgz#4290ed453ab0e4441583284ad86e41ad88384f44"@@ -1628,14 +1478,6 @@ inline-style-prefixer@^6.0.0:resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009"integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==-is-arguments@^1.0.4:- version "1.1.1"- resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b"- integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==- dependencies:- call-bind "^1.0.2"- has-tostringtag "^1.0.0"-is-binary-path@~2.1.0:version "2.1.0"resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"@@ -1643,11 +1485,6 @@ is-binary-path@~2.1.0:dependencies:binary-extensions "^2.0.0"-is-callable@^1.1.3:- version "1.2.7"- resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"- integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==-is-core-module@^2.9.0:version "2.11.0"resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144"@@ -1665,13 +1502,6 @@ is-fullwidth-code-point@^3.0.0:resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==-is-generator-function@^1.0.7:- version "1.0.10"- resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72"- integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==- dependencies:- has-tostringtag "^1.0.0"-is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1:version "4.0.3"resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"@@ -1679,30 +1509,11 @@ is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1:dependencies:is-extglob "^2.1.1"-is-nan@^1.2.1:- version "1.3.2"- resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d"- integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==- dependencies:- call-bind "^1.0.0"- define-properties "^1.1.3"-is-number@^7.0.0:version "7.0.0"resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==-is-typed-array@^1.1.10, is-typed-array@^1.1.3:- version "1.1.10"- resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f"- integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==- dependencies:- available-typed-arrays "^1.0.5"- call-bind "^1.0.2"- for-each "^0.3.3"- gopd "^1.0.1"- has-tostringtag "^1.0.0"-js-cookie@^2.2.1:version "2.2.1"resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8"@@ -1733,22 +1544,12 @@ lilconfig@^2.0.5, lilconfig@^2.0.6:resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.6.tgz#32a384558bd58af3d4c6e077dd1ad1d397bc69d4"integrity sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==-lodash.curry@^4.0.1:- version "4.1.1"- resolved "https://registry.yarnpkg.com/lodash.curry/-/lodash.curry-4.1.1.tgz#248e36072ede906501d75966200a86dab8b23170"- integrity sha512-/u14pXGviLaweY5JI0IUzgzF2J6Ne8INyzAZjImcryjgkZ+ebruBxy2/JaOOkTqScddcYtakjhSaeemV8lR0tA==--lodash.flow@^3.3.0:- version "3.5.0"- resolved "https://registry.yarnpkg.com/lodash.flow/-/lodash.flow-3.5.0.tgz#87bf40292b8cf83e4e8ce1a3ae4209e20071675a"- integrity sha512-ff3BX/tSioo+XojX4MOsOMhJw0nZoUEF011LX8g8d3gvjVbxd89cCio4BCXronjxcTUIJUoqKEUA+n4CqvvRPw==-lodash@^4.17.11:version "4.17.21"resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==-loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:+loose-envify@^1.1.0, loose-envify@^1.4.0:version "1.4.0"resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==@@ -1845,13 +1646,6 @@ nanoid@^3.3.4:resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==- version "2.6.7"- resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"- integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==- dependencies:- whatwg-url "^5.0.0"-node-fetch@^2.6.7:version "2.6.9"resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.9.tgz#7c7f744b5cc6eb5fd404e0c7a9fec630a55657e6"@@ -1874,7 +1668,7 @@ normalize-range@^0.1.2:resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==-object-assign@^4.1.0, object-assign@^4.1.1:+object-assign@^4.1.1:version "4.1.1"resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==@@ -1884,19 +1678,6 @@ object-hash@^3.0.0:resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9"integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==-object-is@^1.0.1:- version "1.1.5"- resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac"- integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==- dependencies:- call-bind "^1.0.2"- define-properties "^1.1.3"--object-keys@^1.1.1:- version "1.1.1"- resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"- integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==-papaparse@^5.1.1:version "5.3.2"resolved "https://registry.yarnpkg.com/papaparse/-/papaparse-5.3.2.tgz#d1abed498a0ee299f103130a6109720404fbd467"@@ -1980,13 +1761,6 @@ postinstall-postinstall@^2.1.0:resolved "https://registry.yarnpkg.com/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz#4f7f77441ef539d1512c40bd04c71b06a4704ca3"integrity sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ==-promise@^7.1.1:- version "7.3.1"- resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf"- integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==- dependencies:- asap "~2.0.3"-prop-types@^15.7.2:version "15.8.1"resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"@@ -1996,11 +1770,6 @@ prop-types@^15.7.2:object-assign "^4.1.1"react-is "^16.13.1"-pure-color@^1.2.0:- version "1.3.0"- resolved "https://registry.yarnpkg.com/pure-color/-/pure-color-1.3.0.tgz#1fe064fb0ac851f0de61320a8bf796836422f33e"- integrity sha512-QFADYnsVoBMw1srW7OVKEYjG+MbIa49s54w1MA1EDY6r2r/sTcKKYqRX1f4GYvnXP7eN/Pe9HFcX+hwzmrXRHA==-queue-microtask@^1.2.2:version "1.2.3"resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"@@ -2021,16 +1790,6 @@ re-resizable@^6.9.8:resolved "https://registry.yarnpkg.com/re-resizable/-/re-resizable-6.9.9.tgz#99e8b31c67a62115dc9c5394b7e55892265be216"integrity sha512-l+MBlKZffv/SicxDySKEEh42hR6m5bAHfNu3Tvxks2c4Ah+ldnWjfnVRwxo/nxF27SsUsxDS0raAzFuJNKABXA==-react-base16-styling@^0.6.0:- version "0.6.0"- resolved "https://registry.yarnpkg.com/react-base16-styling/-/react-base16-styling-0.6.0.tgz#ef2156d66cf4139695c8a167886cb69ea660792c"- integrity sha512-yvh/7CArceR/jNATXOKDlvTnPKPmGZz7zsenQ3jUwLzHkNUR0CvY3yGYJbWJ/nnxsL8Sgmt5cO3/SILVuPO6TQ==- dependencies:- base16 "^1.0.0"- lodash.curry "^4.0.1"- lodash.flow "^3.3.0"- pure-color "^1.2.0"-react-dom@^17.x:version "17.0.2"resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"@@ -2058,21 +1817,6 @@ react-is@^17.0.2:resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==-react-json-view@^1.21.3:- version "1.21.3"- resolved "https://registry.yarnpkg.com/react-json-view/-/react-json-view-1.21.3.tgz#f184209ee8f1bf374fb0c41b0813cff54549c475"- integrity sha512-13p8IREj9/x/Ye4WI/JpjhoIwuzEgUAtgJZNBJckfzJt1qyh24BdTm6UQNGnyTq9dapQdrqvquZTo3dz1X6Cjw==- dependencies:- flux "^4.0.1"- react-base16-styling "^0.6.0"- react-lifecycles-compat "^3.0.4"- react-textarea-autosize "^8.3.2"--react-lifecycles-compat@^3.0.4:- version "3.0.4"- resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"- integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==-react-redux@^7.2.0:version "7.2.9"resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.9.tgz#09488fbb9416a4efe3735b7235055442b042481d"@@ -2098,15 +1842,6 @@ react-shadow@^20.0.0:humps "^2.0.1"react-use "^17.0.0"-react-textarea-autosize@^8.3.2:- version "8.4.0"- resolved "https://registry.yarnpkg.com/react-textarea-autosize/-/react-textarea-autosize-8.4.0.tgz#4d0244d6a50caa897806b8c44abc0540a69bfc8c"- integrity sha512-YrTFaEHLgJsi8sJVYHBzYn+mkP3prGkmP2DKb/tm0t7CLJY5t1Rxix8070LAKb0wby7bl/lf2EeHkuMihMZMwQ==- dependencies:- "@babel/runtime" "^7.10.2"- use-composed-ref "^1.3.0"- use-latest "^1.2.1"-react-universal-interface@^0.6.2:version "0.6.2"resolved "https://registry.yarnpkg.com/react-universal-interface/-/react-universal-interface-0.6.2.tgz#5e8d438a01729a4dbbcbeeceb0b86be146fe2b3b"@@ -2270,21 +2005,11 @@ set-harmonic-interval@^1.0.1:resolved "https://registry.yarnpkg.com/set-harmonic-interval/-/set-harmonic-interval-1.0.1.tgz#e1773705539cdfb80ce1c3d99e7f298bb3995249"integrity sha512-AhICkFV84tBP1aWqPwLZqFvAwqEoVA9kxNMniGEUvzOlm4vLmOFLiTT3UZ6bziJTy4bOVpzWGTfSCbmaayGx8g==-setimmediate@^1.0.5:- version "1.0.5"- resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"- integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==-shallowequal@^1.1.0:version "1.1.0"resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==-simple-statistics@^7.1.0:- version "7.8.3"- resolved "https://registry.yarnpkg.com/simple-statistics/-/simple-statistics-7.8.3.tgz#62998dd7786ba14fa27b07f4f3cd498466f7961a"- integrity sha512-JFvMY00t6SBGtwMuJ+nqgsx9ylkMiJ5JlK9bkj8AdvniIe5615wWQYkKHXe84XtSuc40G/tlrPu0A5/NlJvv8A==-source-map-js@^1.0.2:version "1.0.2"resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"@@ -2466,11 +2191,6 @@ typescript@^4.3.2, typescript@^4.6.4:resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==-ua-parser-js@^0.7.30:- version "0.7.33"- resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.33.tgz#1d04acb4ccef9293df6f70f2c3d22f3030d8b532"- integrity sha512-s8ax/CeZdK9R/56Sui0WM6y9OFREJarMRHqLB2EwkovemBxNQ+Bqu8GAsUnVcXKgphb++ghr/B2BZx4mahujPw==-update-browserslist-db@^1.0.10:version "1.0.10"resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3"@@ -2479,23 +2199,6 @@ update-browserslist-db@^1.0.10:escalade "^3.1.1"picocolors "^1.0.0"-use-composed-ref@^1.3.0:- version "1.3.0"- resolved "https://registry.yarnpkg.com/use-composed-ref/-/use-composed-ref-1.3.0.tgz#3d8104db34b7b264030a9d916c5e94fbe280dbda"- integrity sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==--use-isomorphic-layout-effect@^1.1.1:- version "1.1.2"- resolved "https://registry.yarnpkg.com/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz#497cefb13d863d687b08477d9e5a164ad8c1a6fb"- integrity sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==--use-latest@^1.2.1:- version "1.2.1"- resolved "https://registry.yarnpkg.com/use-latest/-/use-latest-1.2.1.tgz#d13dfb4b08c28e3e33991546a2cee53e14038cf2"- integrity sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw==- dependencies:- use-isomorphic-layout-effect "^1.1.1"-use-memo-one@^1.1.1:version "1.1.3"resolved "https://registry.yarnpkg.com/use-memo-one/-/use-memo-one-1.1.3.tgz#2fd2e43a2169eabc7496960ace8c79efef975e99"@@ -2506,17 +2209,6 @@ util-deprecate@^1.0.2:resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==-util@^0.12.0:- version "0.12.5"- resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc"- integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==- dependencies:- inherits "^2.0.3"- is-arguments "^1.0.4"- is-generator-function "^1.0.7"- is-typed-array "^1.1.3"- which-typed-array "^1.1.2"-uuid@^8.3.2:version "8.3.2"resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"@@ -2888,16 +2580,6 @@ vega@^5.22.1:vega-voronoi "~4.2.0"vega-wordcloud "~4.1.3"- version "0.7.15"- resolved "https://registry.yarnpkg.com/visual-insights/-/visual-insights-0.7.15.tgz#04806c8c78739f7bb8a7ee60bb56ee8ddc7668a7"- integrity sha512-2ANCxqlVdTb6bwM4S/vVcmwsXDNl+cQdZazy0PDX6Li2JI+99wqO22xYll08CuSjMVUFZXoFPJSsa8xsCTl5zQ==- dependencies:- assert "^2.0.0"- axios "^0.22.0"- cube-core "^2.13.0"- simple-statistics "^7.1.0"-vite@^3.0.2:version "3.2.5"resolved "https://registry.yarnpkg.com/vite/-/vite-3.2.5.tgz#dee5678172a8a0ab3e547ad4148c3d547f90e86a"@@ -2940,18 +2622,6 @@ whatwg-url@^5.0.0:tr46 "~0.0.3"webidl-conversions "^3.0.0"-which-typed-array@^1.1.2:- version "1.1.9"- resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6"- integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==- dependencies:- available-typed-arrays "^1.0.5"- call-bind "^1.0.2"- for-each "^0.3.3"- gopd "^1.0.1"- has-tostringtag "^1.0.0"- is-typed-array "^1.1.10"-wrap-ansi@^7.0.0:version "7.0.0"resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"