@sqlrooms/deck 0.29.0-rc.6 → 0.29.0-rc.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"MapSettings.d.ts","sourceRoot":"","sources":["../src/MapSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAAiC,MAAM,OAAO,CAAC;AAOzD,OAAO,KAAK,EAAC,8BAA8B,EAAC,MAAM,kBAAkB,CAAC;AAwCrE,UAAU,qBAAqB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,8BAA8B,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAeD,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAuUtD,CAAC"}
1
+ {"version":3,"file":"MapSettings.d.ts","sourceRoot":"","sources":["../src/MapSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAAwB,MAAM,OAAO,CAAC;AAQhD,OAAO,KAAK,EAAC,8BAA8B,EAAC,MAAM,kBAAkB,CAAC;AAuCrE,UAAU,qBAAqB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,8BAA8B,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAeD,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAoUtD,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useCallback, useMemo, useState } from 'react';
3
- import { Field, ColumnSelector, ColumnsProvider, useStoreWithMosaicDashboard, } from '@sqlrooms/mosaic';
4
- import { useStoreWithDuckDb } from '@sqlrooms/duckdb';
2
+ import { useCallback, useState } from 'react';
3
+ import { Field, ColumnSelector, ColumnsProvider, useStoreWithMosaicDashboard, useDataTable, } from '@sqlrooms/mosaic';
5
4
  import { binnedNumericSchemes, categoricalSchemes, continuousDivergingSchemes, continuousSequentialSchemes, } from '@sqlrooms/color-scales';
6
5
  import { Button, Input, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Switch, } from '@sqlrooms/ui';
7
6
  import { XIcon } from 'lucide-react';
@@ -24,10 +23,9 @@ function getSchemeOptions(type) {
24
23
  export const MapSettingsPanel = ({ dashboardId, panel, onClose, }) => {
25
24
  const [layerIndex, setLayerIndex] = useState(0);
26
25
  const [colorAccessor, setColorAccessor] = useState('getFillColor');
27
- const tables = useStoreWithDuckDb((state) => state.db.tables);
28
26
  const tableName = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.config.dashboardsById[dashboardId]?.selectedTable);
27
+ const dataTable = useDataTable(tableName);
29
28
  const updatePanel = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.updatePanel);
30
- const currentTable = useMemo(() => tables.find((t) => t.table.table === tableName), [tables, tableName]);
31
29
  const mapConfig = panel.config;
32
30
  const layers = getDeckMapLayerRecords(mapConfig);
33
31
  const activeLayerIndex = Math.min(layerIndex, Math.max(layers.length - 1, 0));
@@ -45,7 +43,7 @@ export const MapSettingsPanel = ({ dashboardId, panel, onClose, }) => {
45
43
  : undefined;
46
44
  const colorScaleType = colorScale?.type ?? 'sequential';
47
45
  const schemeOptions = getSchemeOptions(colorScaleType);
48
- const firstColumnName = currentTable?.columns[0]?.name;
46
+ const firstColumnName = dataTable?.columns[0]?.name;
49
47
  const maxRows = mapConfig.dataPolicy?.maxRows ?? DEFAULT_DECK_MAP_MAX_DATA_POINTS;
50
48
  const applyConfig = useCallback((config) => {
51
49
  updatePanel(dashboardId, panel.id, {
@@ -78,9 +76,9 @@ export const MapSettingsPanel = ({ dashboardId, panel, onClose, }) => {
78
76
  return;
79
77
  }
80
78
  applyConfig(clearDeckMapLayerColorScale(mapConfig, activeLayerIndex, effectiveColorAccessor));
81
- }, disabled: !firstColumnName || !effectiveColorAccessor })] }), effectiveColorAccessor && (_jsx(Field, { label: "Color property", children: _jsxs(Select, { value: effectiveColorAccessor, onValueChange: (value) => setColorAccessor(value), children: [_jsx(SelectTrigger, { className: "w-full", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: colorAccessorOptions.map((option) => (_jsx(SelectItem, { value: option.value, children: option.label }, option.value))) })] }) })), colorScale && currentTable && (_jsx(ColumnsProvider, { columns: currentTable.columns, tableName: tableName, children: _jsx(Field, { label: "Color field", required: true, children: colorScaleType === 'categorical' ? (_jsx(ColumnSelector.Categorical, { value: colorScale.field, onChange: (field) => updateColorScale({ field }) })) : (_jsx(ColumnSelector.Quantitative, { value: colorScale.field, onChange: (field) => updateColorScale({ field }) })) }) })), colorScale && (_jsxs(_Fragment, { children: [_jsx(Field, { label: "Scale type", children: _jsxs(Select, { value: colorScaleType, onValueChange: (value) => updateColorScale({
79
+ }, disabled: !firstColumnName || !effectiveColorAccessor })] }), effectiveColorAccessor && (_jsx(Field, { label: "Color property", children: _jsxs(Select, { value: effectiveColorAccessor, onValueChange: (value) => setColorAccessor(value), children: [_jsx(SelectTrigger, { className: "w-full", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: colorAccessorOptions.map((option) => (_jsx(SelectItem, { value: option.value, children: option.label }, option.value))) })] }) })), colorScale && dataTable && (_jsx(ColumnsProvider, { columns: dataTable.columns, children: _jsx(Field, { label: "Color field", required: true, children: colorScaleType === 'categorical' ? (_jsx(ColumnSelector.Categorical, { value: colorScale.field, onChange: (field) => updateColorScale({ field }) })) : (_jsx(ColumnSelector.Quantitative, { value: colorScale.field, onChange: (field) => updateColorScale({ field }) })) }) })), colorScale && (_jsxs(_Fragment, { children: [_jsx(Field, { label: "Scale type", children: _jsxs(Select, { value: colorScaleType, onValueChange: (value) => updateColorScale({
82
80
  type: value,
83
- }), children: [_jsx(SelectTrigger, { className: "w-full", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: DECK_MAP_COLOR_SCALE_TYPE_OPTIONS.map((option) => (_jsx(SelectItem, { value: option.value, children: option.label }, option.value))) })] }) }), _jsx(Field, { label: "Scheme", children: _jsxs(Select, { value: colorScale.scheme, onValueChange: (value) => updateColorScale({ scheme: value }), children: [_jsx(SelectTrigger, { className: "w-full", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: schemeOptions.map((scheme) => (_jsx(SelectItem, { value: scheme, children: scheme }, scheme))) })] }) })] }))] })] })), currentTable && showGeometryColumnSetting && (_jsx(ColumnsProvider, { columns: currentTable.columns, tableName: tableName, children: _jsx(Field, { label: "Geometry column", required: true, children: _jsx(ColumnSelector, { value: activeLayerDataset?.geometryColumn, onChange: (geometryColumn) => applyConfig(setDeckMapLayerGeometryColumn(mapConfig, activeLayerIndex, geometryColumn)), placeholder: "Select geometry column..." }) }) })), currentTable && !showGeometryColumnSetting && (_jsxs(ColumnsProvider, { columns: currentTable.columns, tableName: tableName, children: [_jsx(Field, { label: "Latitude column", required: true, children: _jsx(LatitudeSelector, { dashboardId: dashboardId, panel: panel, currentTable: currentTable }) }), _jsx(Field, { label: "Longitude column", required: true, children: _jsx(LongitudeSelector, { dashboardId: dashboardId, panel: panel, currentTable: currentTable }) })] })), _jsx(Field, { label: "Max rows", children: _jsx(Input, { type: "number", min: 1, value: maxRows, className: "no-spinner", onChange: (event) => {
81
+ }), children: [_jsx(SelectTrigger, { className: "w-full", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: DECK_MAP_COLOR_SCALE_TYPE_OPTIONS.map((option) => (_jsx(SelectItem, { value: option.value, children: option.label }, option.value))) })] }) }), _jsx(Field, { label: "Scheme", children: _jsxs(Select, { value: colorScale.scheme, onValueChange: (value) => updateColorScale({ scheme: value }), children: [_jsx(SelectTrigger, { className: "w-full", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: schemeOptions.map((scheme) => (_jsx(SelectItem, { value: scheme, children: scheme }, scheme))) })] }) })] }))] })] })), dataTable && showGeometryColumnSetting && (_jsx(ColumnsProvider, { columns: dataTable.columns, children: _jsx(Field, { label: "Geometry column", required: true, children: _jsx(ColumnSelector, { value: activeLayerDataset?.geometryColumn, onChange: (geometryColumn) => applyConfig(setDeckMapLayerGeometryColumn(mapConfig, activeLayerIndex, geometryColumn)), placeholder: "Select geometry column..." }) }) })), dataTable && !showGeometryColumnSetting && (_jsxs(ColumnsProvider, { columns: dataTable.columns, children: [_jsx(Field, { label: "Latitude column", required: true, children: _jsx(LatitudeSelector, { dashboardId: dashboardId, panel: panel, currentTable: dataTable }) }), _jsx(Field, { label: "Longitude column", required: true, children: _jsx(LongitudeSelector, { dashboardId: dashboardId, panel: panel, currentTable: dataTable }) })] })), _jsx(Field, { label: "Max rows", children: _jsx(Input, { type: "number", min: 1, value: maxRows, className: "no-spinner", onChange: (event) => {
84
82
  const parsed = Number.parseInt(event.target.value, 10);
85
83
  if (!Number.isFinite(parsed) || parsed < 1)
86
84
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"MapSettings.js","sourceRoot":"","sources":["../src/MapSettings.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAK,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACzD,OAAO,EACL,KAAK,EACL,cAAc,EACd,eAAe,EACf,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,MAAM,EACN,KAAK,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,aAAa,EACb,WAAW,EACX,MAAM,GACP,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EA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AAY,EAAE,YAAY,GAC1B,GACI,IACQ,CACnB,EAED,KAAC,KAAK,IAAC,KAAK,EAAC,UAAU,YACrB,KAAC,KAAK,IACJ,IAAI,EAAC,QAAQ,EACb,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,OAAO,EACd,SAAS,EAAC,YAAY,EACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;gCAClB,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gCACvD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC;oCAAE,OAAO;gCACnD,WAAW,CAAC;oCACV,GAAG,SAAS;oCACZ,UAAU,EAAE;wCACV,GAAG,SAAS,CAAC,UAAU;wCACvB,OAAO,EAAE,MAAM;qCAChB;iCACF,CAAC,CAAC;4BACL,CAAC,EACD,WAAW,EAAE,MAAM,CAAC,gCAAgC,CAAC,GACrD,GACI,IACJ,IACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {FC, useCallback, useMemo, useState} from 'react';\nimport {\n Field,\n ColumnSelector,\n ColumnsProvider,\n useStoreWithMosaicDashboard,\n} from '@sqlrooms/mosaic';\nimport type {MosaicDashboardPanelConfigType} from '@sqlrooms/mosaic';\nimport {useStoreWithDuckDb} from '@sqlrooms/duckdb';\nimport {\n binnedNumericSchemes,\n categoricalSchemes,\n continuousDivergingSchemes,\n continuousSequentialSchemes,\n} from '@sqlrooms/color-scales';\nimport type {ColorScaleConfig, ColorScaleScheme} from '@sqlrooms/color-scales';\nimport {\n Button,\n Input,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n Switch,\n} from '@sqlrooms/ui';\nimport {XIcon} from 'lucide-react';\nimport {LatitudeSelector} from './LatitudeSelector';\nimport {LongitudeSelector} from './LongitudeSelector';\nimport type {DeckMapDashboardPanelConfig} from './dashboardConfig';\nimport {DEFAULT_DECK_MAP_MAX_DATA_POINTS} from './dashboardConfig';\nimport {\n clearDeckMapLayerColorScale,\n createDeckMapLayerColorScale,\n DECK_MAP_COLOR_SCALE_TYPE_OPTIONS,\n DECK_MAP_LAYER_TYPE_OPTIONS,\n getDeckMapColorAccessorOptions,\n getDeckMapLayerDatasetId,\n getDeckMapLayerColorScale,\n getDeckMapLayerRecords,\n setDeckMapLayerColorScale,\n setDeckMapLayerGeometryColumn,\n setDeckMapLayerType,\n type DeckMapLayerColorAccessor,\n usesGeometryColumnSetting,\n} from './mapLayerConfigUtils';\n\ninterface MapSettingsPanelProps {\n dashboardId: string;\n panel: MosaicDashboardPanelConfigType;\n onClose?: () => void;\n}\n\nfunction getSchemeOptions(type: ColorScaleConfig['type']) {\n if (type === 'categorical') {\n return categoricalSchemes;\n }\n if (type === 'diverging') {\n return continuousDivergingSchemes;\n }\n if (type === 'sequential') {\n return continuousSequentialSchemes;\n }\n return binnedNumericSchemes;\n}\n\nexport const MapSettingsPanel: FC<MapSettingsPanelProps> = ({\n dashboardId,\n panel,\n onClose,\n}) => {\n const [layerIndex, setLayerIndex] = useState(0);\n const [colorAccessor, setColorAccessor] =\n useState<DeckMapLayerColorAccessor>('getFillColor');\n const tables = useStoreWithDuckDb((state) => state.db.tables);\n const tableName = useStoreWithMosaicDashboard(\n (state) =>\n state.mosaicDashboard.config.dashboardsById[dashboardId]?.selectedTable,\n );\n const updatePanel = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.updatePanel,\n );\n const currentTable = useMemo(\n () => tables.find((t) => t.table.table === tableName),\n [tables, tableName],\n );\n const mapConfig = panel.config as DeckMapDashboardPanelConfig;\n const layers = getDeckMapLayerRecords(mapConfig);\n const activeLayerIndex = Math.min(layerIndex, Math.max(layers.length - 1, 0));\n const activeLayer = layers[activeLayerIndex];\n const activeLayerDatasetId = getDeckMapLayerDatasetId(activeLayer);\n const activeLayerDataset = activeLayerDatasetId\n ? mapConfig.datasets?.[activeLayerDatasetId]\n : undefined;\n const showGeometryColumnSetting = usesGeometryColumnSetting(\n activeLayer?.['@@type'],\n );\n const colorAccessorOptions = getDeckMapColorAccessorOptions(\n activeLayer?.['@@type'],\n );\n const effectiveColorAccessor =\n colorAccessorOptions.find((option) => option.value === colorAccessor)\n ?.value ?? colorAccessorOptions[0]?.value;\n const colorScale = effectiveColorAccessor\n ? getDeckMapLayerColorScale(activeLayer, effectiveColorAccessor)\n : undefined;\n const colorScaleType = colorScale?.type ?? 'sequential';\n const schemeOptions = getSchemeOptions(colorScaleType);\n const firstColumnName = currentTable?.columns[0]?.name;\n const maxRows =\n mapConfig.dataPolicy?.maxRows ?? DEFAULT_DECK_MAP_MAX_DATA_POINTS;\n\n const applyConfig = useCallback(\n (config: DeckMapDashboardPanelConfig) => {\n updatePanel(dashboardId, panel.id, {\n config: {...config, settingsOpen: mapConfig.settingsOpen} as any,\n });\n },\n [dashboardId, mapConfig.settingsOpen, panel.id, updatePanel],\n );\n\n const updateColorScale = (patch: {\n field?: string;\n type?: ColorScaleConfig['type'];\n scheme?: ColorScaleScheme;\n }) => {\n const field = patch.field ?? colorScale?.field ?? firstColumnName;\n if (!field || !effectiveColorAccessor) return;\n\n const type = patch.type ?? colorScale?.type ?? 'sequential';\n const scheme =\n patch.scheme ??\n (patch.type && patch.type !== colorScale?.type\n ? undefined\n : colorScale?.scheme);\n\n applyConfig(\n setDeckMapLayerColorScale(\n mapConfig,\n activeLayerIndex,\n effectiveColorAccessor,\n createDeckMapLayerColorScale({\n field,\n type,\n scheme,\n title: field,\n }),\n ),\n );\n };\n\n return (\n <div className=\"flex h-full flex-col\">\n <div className=\"flex items-center justify-between border-b px-3 py-1.5 text-xs font-medium\">\n <div className=\"flex items-center\">Map settings</div>\n {onClose && (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"h-5 w-5\"\n onClick={onClose}\n aria-label=\"Close\"\n >\n <XIcon className=\"h-3.5 w-3.5\" />\n </Button>\n )}\n </div>\n <div className=\"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-2\">\n {layers.length > 0 && (\n <div className=\"flex flex-col gap-3\">\n {layers.length > 1 && (\n <Field label=\"Layer\">\n <Select\n value={String(activeLayerIndex)}\n onValueChange={(value) => setLayerIndex(Number(value))}\n >\n <SelectTrigger className=\"w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {layers.map((layer, index) => (\n <SelectItem key={index} value={String(index)}>\n {String(layer.id ?? `Layer ${index + 1}`)}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </Field>\n )}\n\n <Field label=\"Layer type\">\n <Select\n value={\n typeof activeLayer?.['@@type'] === 'string'\n ? activeLayer['@@type']\n : undefined\n }\n onValueChange={(value) =>\n applyConfig(\n setDeckMapLayerType(mapConfig, activeLayerIndex, value),\n )\n }\n >\n <SelectTrigger className=\"w-full\">\n <SelectValue placeholder=\"Select layer type\" />\n </SelectTrigger>\n <SelectContent>\n {DECK_MAP_LAYER_TYPE_OPTIONS.map((option) => (\n <SelectItem key={option.value} value={option.value}>\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </Field>\n\n <div className=\"flex flex-col gap-2 rounded-md border p-2\">\n <div className=\"flex items-center justify-between gap-2\">\n <span className=\"text-xs font-medium\">Color scale</span>\n <Switch\n checked={Boolean(colorScale)}\n onCheckedChange={(checked) => {\n if (!effectiveColorAccessor) return;\n if (checked) {\n updateColorScale({});\n return;\n }\n applyConfig(\n clearDeckMapLayerColorScale(\n mapConfig,\n activeLayerIndex,\n effectiveColorAccessor,\n ),\n );\n }}\n disabled={!firstColumnName || !effectiveColorAccessor}\n />\n </div>\n\n {effectiveColorAccessor && (\n <Field label=\"Color property\">\n <Select\n value={effectiveColorAccessor}\n onValueChange={(value) =>\n setColorAccessor(value as DeckMapLayerColorAccessor)\n }\n >\n <SelectTrigger className=\"w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {colorAccessorOptions.map((option) => (\n <SelectItem key={option.value} value={option.value}>\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </Field>\n )}\n\n {colorScale && currentTable && (\n <ColumnsProvider\n columns={currentTable.columns}\n tableName={tableName}\n >\n <Field label=\"Color field\" required>\n {colorScaleType === 'categorical' ? (\n <ColumnSelector.Categorical\n value={colorScale.field}\n onChange={(field) => updateColorScale({field})}\n />\n ) : (\n <ColumnSelector.Quantitative\n value={colorScale.field}\n onChange={(field) => updateColorScale({field})}\n />\n )}\n </Field>\n </ColumnsProvider>\n )}\n\n {colorScale && (\n <>\n <Field label=\"Scale type\">\n <Select\n value={colorScaleType}\n onValueChange={(value) =>\n updateColorScale({\n type: value as ColorScaleConfig['type'],\n })\n }\n >\n <SelectTrigger className=\"w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {DECK_MAP_COLOR_SCALE_TYPE_OPTIONS.map((option) => (\n <SelectItem key={option.value} value={option.value}>\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </Field>\n\n <Field label=\"Scheme\">\n <Select\n value={colorScale.scheme}\n onValueChange={(value) =>\n updateColorScale({scheme: value as ColorScaleScheme})\n }\n >\n <SelectTrigger className=\"w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {schemeOptions.map((scheme) => (\n <SelectItem key={scheme} value={scheme}>\n {scheme}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </Field>\n </>\n )}\n </div>\n </div>\n )}\n\n {currentTable && showGeometryColumnSetting && (\n <ColumnsProvider columns={currentTable.columns} tableName={tableName}>\n <Field label=\"Geometry column\" required>\n <ColumnSelector\n value={activeLayerDataset?.geometryColumn}\n onChange={(geometryColumn) =>\n applyConfig(\n setDeckMapLayerGeometryColumn(\n mapConfig,\n activeLayerIndex,\n geometryColumn,\n ),\n )\n }\n placeholder=\"Select geometry column...\"\n />\n </Field>\n </ColumnsProvider>\n )}\n\n {currentTable && !showGeometryColumnSetting && (\n <ColumnsProvider columns={currentTable.columns} tableName={tableName}>\n <Field label=\"Latitude column\" required>\n <LatitudeSelector\n dashboardId={dashboardId}\n panel={panel}\n currentTable={currentTable}\n />\n </Field>\n <Field label=\"Longitude column\" required>\n <LongitudeSelector\n dashboardId={dashboardId}\n panel={panel}\n currentTable={currentTable}\n />\n </Field>\n </ColumnsProvider>\n )}\n\n <Field label=\"Max rows\">\n <Input\n type=\"number\"\n min={1}\n value={maxRows}\n className=\"no-spinner\"\n onChange={(event) => {\n const parsed = Number.parseInt(event.target.value, 10);\n if (!Number.isFinite(parsed) || parsed < 1) return;\n applyConfig({\n ...mapConfig,\n dataPolicy: {\n ...mapConfig.dataPolicy,\n maxRows: parsed,\n },\n });\n }}\n placeholder={String(DEFAULT_DECK_MAP_MAX_DATA_POINTS)}\n />\n </Field>\n </div>\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"MapSettings.js","sourceRoot":"","sources":["../src/MapSettings.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAK,WAAW,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAChD,OAAO,EACL,KAAK,EACL,cAAc,EACd,eAAe,EACf,2BAA2B,EAC3B,YAAY,GACb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,MAAM,EACN,KAAK,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,aAAa,EACb,WAAW,EACX,MAAM,GACP,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAC,gCAAgC,EAAC,MAAM,mBAAmB,CAAC;AACnE,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,iCAAiC,EACjC,2B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ACnD,WAAW,CAAC;oCACV,GAAG,SAAS;oCACZ,UAAU,EAAE;wCACV,GAAG,SAAS,CAAC,UAAU;wCACvB,OAAO,EAAE,MAAM;qCAChB;iCACF,CAAC,CAAC;4BACL,CAAC,EACD,WAAW,EAAE,MAAM,CAAC,gCAAgC,CAAC,GACrD,GACI,IACJ,IACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {FC, useCallback, useState} from 'react';\nimport {\n Field,\n ColumnSelector,\n ColumnsProvider,\n useStoreWithMosaicDashboard,\n useDataTable,\n} from '@sqlrooms/mosaic';\nimport type {MosaicDashboardPanelConfigType} from '@sqlrooms/mosaic';\nimport {\n binnedNumericSchemes,\n categoricalSchemes,\n continuousDivergingSchemes,\n continuousSequentialSchemes,\n} from '@sqlrooms/color-scales';\nimport type {ColorScaleConfig, ColorScaleScheme} from '@sqlrooms/color-scales';\nimport {\n Button,\n Input,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n Switch,\n} from '@sqlrooms/ui';\nimport {XIcon} from 'lucide-react';\nimport {LatitudeSelector} from './LatitudeSelector';\nimport {LongitudeSelector} from './LongitudeSelector';\nimport type {DeckMapDashboardPanelConfig} from './dashboardConfig';\nimport {DEFAULT_DECK_MAP_MAX_DATA_POINTS} from './dashboardConfig';\nimport {\n clearDeckMapLayerColorScale,\n createDeckMapLayerColorScale,\n DECK_MAP_COLOR_SCALE_TYPE_OPTIONS,\n DECK_MAP_LAYER_TYPE_OPTIONS,\n getDeckMapColorAccessorOptions,\n getDeckMapLayerDatasetId,\n getDeckMapLayerColorScale,\n getDeckMapLayerRecords,\n setDeckMapLayerColorScale,\n setDeckMapLayerGeometryColumn,\n setDeckMapLayerType,\n type DeckMapLayerColorAccessor,\n usesGeometryColumnSetting,\n} from './mapLayerConfigUtils';\n\ninterface MapSettingsPanelProps {\n dashboardId: string;\n panel: MosaicDashboardPanelConfigType;\n onClose?: () => void;\n}\n\nfunction getSchemeOptions(type: ColorScaleConfig['type']) {\n if (type === 'categorical') {\n return categoricalSchemes;\n }\n if (type === 'diverging') {\n return continuousDivergingSchemes;\n }\n if (type === 'sequential') {\n return continuousSequentialSchemes;\n }\n return binnedNumericSchemes;\n}\n\nexport const MapSettingsPanel: FC<MapSettingsPanelProps> = ({\n dashboardId,\n panel,\n onClose,\n}) => {\n const [layerIndex, setLayerIndex] = useState(0);\n const [colorAccessor, setColorAccessor] =\n useState<DeckMapLayerColorAccessor>('getFillColor');\n\n const tableName = useStoreWithMosaicDashboard(\n (state) =>\n state.mosaicDashboard.config.dashboardsById[dashboardId]?.selectedTable,\n );\n\n const dataTable = useDataTable(tableName);\n\n const updatePanel = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.updatePanel,\n );\n\n const mapConfig = panel.config as DeckMapDashboardPanelConfig;\n const layers = getDeckMapLayerRecords(mapConfig);\n const activeLayerIndex = Math.min(layerIndex, Math.max(layers.length - 1, 0));\n const activeLayer = layers[activeLayerIndex];\n const activeLayerDatasetId = getDeckMapLayerDatasetId(activeLayer);\n const activeLayerDataset = activeLayerDatasetId\n ? mapConfig.datasets?.[activeLayerDatasetId]\n : undefined;\n const showGeometryColumnSetting = usesGeometryColumnSetting(\n activeLayer?.['@@type'],\n );\n const colorAccessorOptions = getDeckMapColorAccessorOptions(\n activeLayer?.['@@type'],\n );\n const effectiveColorAccessor =\n colorAccessorOptions.find((option) => option.value === colorAccessor)\n ?.value ?? colorAccessorOptions[0]?.value;\n const colorScale = effectiveColorAccessor\n ? getDeckMapLayerColorScale(activeLayer, effectiveColorAccessor)\n : undefined;\n const colorScaleType = colorScale?.type ?? 'sequential';\n const schemeOptions = getSchemeOptions(colorScaleType);\n const firstColumnName = dataTable?.columns[0]?.name;\n const maxRows =\n mapConfig.dataPolicy?.maxRows ?? DEFAULT_DECK_MAP_MAX_DATA_POINTS;\n\n const applyConfig = useCallback(\n (config: DeckMapDashboardPanelConfig) => {\n updatePanel(dashboardId, panel.id, {\n config: {...config, settingsOpen: mapConfig.settingsOpen} as any,\n });\n },\n [dashboardId, mapConfig.settingsOpen, panel.id, updatePanel],\n );\n\n const updateColorScale = (patch: {\n field?: string;\n type?: ColorScaleConfig['type'];\n scheme?: ColorScaleScheme;\n }) => {\n const field = patch.field ?? colorScale?.field ?? firstColumnName;\n if (!field || !effectiveColorAccessor) return;\n\n const type = patch.type ?? colorScale?.type ?? 'sequential';\n const scheme =\n patch.scheme ??\n (patch.type && patch.type !== colorScale?.type\n ? undefined\n : colorScale?.scheme);\n\n applyConfig(\n setDeckMapLayerColorScale(\n mapConfig,\n activeLayerIndex,\n effectiveColorAccessor,\n createDeckMapLayerColorScale({\n field,\n type,\n scheme,\n title: field,\n }),\n ),\n );\n };\n\n return (\n <div className=\"flex h-full flex-col\">\n <div className=\"flex items-center justify-between border-b px-3 py-1.5 text-xs font-medium\">\n <div className=\"flex items-center\">Map settings</div>\n {onClose && (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"h-5 w-5\"\n onClick={onClose}\n aria-label=\"Close\"\n >\n <XIcon className=\"h-3.5 w-3.5\" />\n </Button>\n )}\n </div>\n <div className=\"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-2\">\n {layers.length > 0 && (\n <div className=\"flex flex-col gap-3\">\n {layers.length > 1 && (\n <Field label=\"Layer\">\n <Select\n value={String(activeLayerIndex)}\n onValueChange={(value) => setLayerIndex(Number(value))}\n >\n <SelectTrigger className=\"w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {layers.map((layer, index) => (\n <SelectItem key={index} value={String(index)}>\n {String(layer.id ?? `Layer ${index + 1}`)}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </Field>\n )}\n\n <Field label=\"Layer type\">\n <Select\n value={\n typeof activeLayer?.['@@type'] === 'string'\n ? activeLayer['@@type']\n : undefined\n }\n onValueChange={(value) =>\n applyConfig(\n setDeckMapLayerType(mapConfig, activeLayerIndex, value),\n )\n }\n >\n <SelectTrigger className=\"w-full\">\n <SelectValue placeholder=\"Select layer type\" />\n </SelectTrigger>\n <SelectContent>\n {DECK_MAP_LAYER_TYPE_OPTIONS.map((option) => (\n <SelectItem key={option.value} value={option.value}>\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </Field>\n\n <div className=\"flex flex-col gap-2 rounded-md border p-2\">\n <div className=\"flex items-center justify-between gap-2\">\n <span className=\"text-xs font-medium\">Color scale</span>\n <Switch\n checked={Boolean(colorScale)}\n onCheckedChange={(checked) => {\n if (!effectiveColorAccessor) return;\n if (checked) {\n updateColorScale({});\n return;\n }\n applyConfig(\n clearDeckMapLayerColorScale(\n mapConfig,\n activeLayerIndex,\n effectiveColorAccessor,\n ),\n );\n }}\n disabled={!firstColumnName || !effectiveColorAccessor}\n />\n </div>\n\n {effectiveColorAccessor && (\n <Field label=\"Color property\">\n <Select\n value={effectiveColorAccessor}\n onValueChange={(value) =>\n setColorAccessor(value as DeckMapLayerColorAccessor)\n }\n >\n <SelectTrigger className=\"w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {colorAccessorOptions.map((option) => (\n <SelectItem key={option.value} value={option.value}>\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </Field>\n )}\n\n {colorScale && dataTable && (\n <ColumnsProvider columns={dataTable.columns}>\n <Field label=\"Color field\" required>\n {colorScaleType === 'categorical' ? (\n <ColumnSelector.Categorical\n value={colorScale.field}\n onChange={(field) => updateColorScale({field})}\n />\n ) : (\n <ColumnSelector.Quantitative\n value={colorScale.field}\n onChange={(field) => updateColorScale({field})}\n />\n )}\n </Field>\n </ColumnsProvider>\n )}\n\n {colorScale && (\n <>\n <Field label=\"Scale type\">\n <Select\n value={colorScaleType}\n onValueChange={(value) =>\n updateColorScale({\n type: value as ColorScaleConfig['type'],\n })\n }\n >\n <SelectTrigger className=\"w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {DECK_MAP_COLOR_SCALE_TYPE_OPTIONS.map((option) => (\n <SelectItem key={option.value} value={option.value}>\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </Field>\n\n <Field label=\"Scheme\">\n <Select\n value={colorScale.scheme}\n onValueChange={(value) =>\n updateColorScale({scheme: value as ColorScaleScheme})\n }\n >\n <SelectTrigger className=\"w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {schemeOptions.map((scheme) => (\n <SelectItem key={scheme} value={scheme}>\n {scheme}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </Field>\n </>\n )}\n </div>\n </div>\n )}\n\n {dataTable && showGeometryColumnSetting && (\n <ColumnsProvider columns={dataTable.columns}>\n <Field label=\"Geometry column\" required>\n <ColumnSelector\n value={activeLayerDataset?.geometryColumn}\n onChange={(geometryColumn) =>\n applyConfig(\n setDeckMapLayerGeometryColumn(\n mapConfig,\n activeLayerIndex,\n geometryColumn,\n ),\n )\n }\n placeholder=\"Select geometry column...\"\n />\n </Field>\n </ColumnsProvider>\n )}\n\n {dataTable && !showGeometryColumnSetting && (\n <ColumnsProvider columns={dataTable.columns}>\n <Field label=\"Latitude column\" required>\n <LatitudeSelector\n dashboardId={dashboardId}\n panel={panel}\n currentTable={dataTable}\n />\n </Field>\n <Field label=\"Longitude column\" required>\n <LongitudeSelector\n dashboardId={dashboardId}\n panel={panel}\n currentTable={dataTable}\n />\n </Field>\n </ColumnsProvider>\n )}\n\n <Field label=\"Max rows\">\n <Input\n type=\"number\"\n min={1}\n value={maxRows}\n className=\"no-spinner\"\n onChange={(event) => {\n const parsed = Number.parseInt(event.target.value, 10);\n if (!Number.isFinite(parsed) || parsed < 1) return;\n applyConfig({\n ...mapConfig,\n dataPolicy: {\n ...mapConfig.dataPolicy,\n maxRows: parsed,\n },\n });\n }}\n placeholder={String(DEFAULT_DECK_MAP_MAX_DATA_POINTS)}\n />\n </Field>\n </div>\n </div>\n );\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sqlrooms/deck",
3
- "version": "0.29.0-rc.6",
3
+ "version": "0.29.0-rc.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/sqlrooms/sqlrooms.git"
@@ -37,10 +37,10 @@
37
37
  "@loaders.gl/gis": "^4.4.1",
38
38
  "@loaders.gl/wkt": "^4.4.1",
39
39
  "@paralleldrive/cuid2": "^3.0.0",
40
- "@sqlrooms/color-scales": "0.29.0-rc.6",
41
- "@sqlrooms/duckdb": "0.29.0-rc.6",
42
- "@sqlrooms/mosaic": "0.29.0-rc.6",
43
- "@sqlrooms/ui": "0.29.0-rc.6",
40
+ "@sqlrooms/color-scales": "0.29.0-rc.7",
41
+ "@sqlrooms/duckdb": "0.29.0-rc.7",
42
+ "@sqlrooms/mosaic": "0.29.0-rc.7",
43
+ "@sqlrooms/ui": "0.29.0-rc.7",
44
44
  "@uwdata/mosaic-core": "^0.21.0",
45
45
  "@uwdata/mosaic-sql": "^0.21.0",
46
46
  "ai": "^6.0.159",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "fbf5ee8897c5c06306b5433d26378cf658b5b298"
68
+ "gitHead": "db298360fd66dc7839d4a14c15b99ac4a4cbf8c5"
69
69
  }