このコミットが含まれているのは:
2026-10-29 12:28:20 +09:00
コミット 7536330ecf
8個のファイルの変更、99行の追加、32行の削除
+5 -3
ファイルの表示
@@ -1,7 +1,7 @@
// Public URL grammar: space-delimited tokens and indexed scalar fields, never JSON.
export type QueryRecord = Record<string, string | number | boolean | null | undefined>
const schemas: Record<string, string[]> = {
conditions: ['field', 'operator', 'value', 'end', 'blank', 'input', 'values'],
conditions: ['field', 'operator', 'value', 'end', 'blank', 'input', 'values', 'grain', 'value_type'],
condition_values: ['condition', 'value', 'value_type'],
drill: ['field', 'grain', 'value', 'value_type'],
tag_refs: ['name', 'tag_id', 'external_tag_id', 'negative', 'missing'],
@@ -54,7 +54,8 @@ export const setQueryRecords = (
if (!schemas[key]?.includes (field)) continue
const name = `${key}.${index}.${field}`
if (field === 'value'
&& ['drill', 'measures', 'column_order', 'condition_values'].includes (key))
&& (['drill', 'measures', 'column_order', 'condition_values'].includes (key)
|| (key === 'conditions' && record.operator === 'axis_eq')))
params.set (`${key}.${index}.value_type`, value == null ? 'null' : typeof value)
if (value == null) continue
params.set (name, typeof value === 'boolean'
@@ -71,7 +72,8 @@ export const readCountState = <T,> (
key: string,
fallback: T,
): T => {
if (!params.has (key)) return fallback
if (!params.has (key) && ![...params.keys ()].some (name =>
name.startsWith (`${key}.`))) return fallback
if (key === 'rows' || key === 'cols')
return queryList (params.get (key)).map (token => {
const [field, grain] = token.split (':')