@visactor/vseed 0.4.7 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/dataSelector/selector.d.ts +15 -1
- package/dist/esm/dataSelector/selector.js +16 -1
- package/dist/esm/dataSelector/selector.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipeline/pivotTable.js +2 -3
- package/dist/esm/pipeline/advanced/table/pipeline/pivotTable.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipes/default/index.d.ts +0 -1
- package/dist/esm/pipeline/advanced/table/pipes/default/index.js +1 -2
- package/dist/esm/pipeline/advanced/table/pipes/encoding/pivotTable.js +6 -3
- package/dist/esm/pipeline/advanced/table/pipes/encoding/pivotTable.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipes/index.d.ts +0 -1
- package/dist/esm/pipeline/advanced/table/pipes/index.js +0 -1
- package/dist/esm/pipeline/spec/table/pipeline/pivotTable.js +1 -1
- package/dist/esm/pipeline/spec/table/pipeline/pivotTable.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipeline/table.js +2 -1
- package/dist/esm/pipeline/spec/table/pipeline/table.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.d.ts +29 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.js +40 -3
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.js +39 -7
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.js +46 -6
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/columns/measuresToColumns.js +3 -0
- package/dist/esm/pipeline/spec/table/pipes/columns/measuresToColumns.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/columns/pivotColumns.js +2 -12
- package/dist/esm/pipeline/spec/table/pipes/columns/pivotColumns.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/corner/titleOnDimension.js +3 -2
- package/dist/esm/pipeline/spec/table/pipes/corner/titleOnDimension.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotDataConfig.js +3 -2
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotDataConfig.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotIndicators.js +20 -25
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotIndicators.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/rows/pivotRows.js +2 -12
- package/dist/esm/pipeline/spec/table/pipes/rows/pivotRows.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/bottomFrozenStyle.d.ts +2 -0
- package/dist/esm/pipeline/spec/table/pipes/theme/bottomFrozenStyle.js +51 -0
- package/dist/esm/pipeline/spec/table/pipes/theme/bottomFrozenStyle.js.map +1 -0
- package/dist/esm/pipeline/spec/table/pipes/theme/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/table/pipes/theme/index.js +1 -0
- package/dist/esm/theme/common/table.d.ts +35 -0
- package/dist/esm/theme/common/table.js +19 -3
- package/dist/esm/theme/common/table.js.map +1 -1
- package/dist/esm/types/chartType/area/zArea.d.ts +80 -0
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +80 -0
- package/dist/esm/types/chartType/bar/zBar.d.ts +48 -0
- package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +48 -0
- package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +48 -0
- package/dist/esm/types/chartType/boxPlot/zBoxPlot.d.ts +48 -0
- package/dist/esm/types/chartType/circlePacking/zCirclePacking.d.ts +8 -0
- package/dist/esm/types/chartType/column/zColumn.d.ts +48 -0
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +48 -0
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +48 -0
- package/dist/esm/types/chartType/donut/zDonut.d.ts +8 -0
- package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +96 -0
- package/dist/esm/types/chartType/funnel/zFunnel.d.ts +8 -0
- package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +8 -0
- package/dist/esm/types/chartType/histogram/zHistogram.d.ts +48 -0
- package/dist/esm/types/chartType/line/zLine.d.ts +64 -0
- package/dist/esm/types/chartType/pie/zPie.d.ts +8 -0
- package/dist/esm/types/chartType/pivotTable/pivotTable.d.ts +6 -0
- package/dist/esm/types/chartType/pivotTable/zPivotTable.d.ts +47 -4
- package/dist/esm/types/chartType/pivotTable/zPivotTable.js +1 -0
- package/dist/esm/types/chartType/pivotTable/zPivotTable.js.map +1 -1
- package/dist/esm/types/chartType/raceBar/zRaceBar.d.ts +48 -0
- package/dist/esm/types/chartType/raceColumn/zRaceColumn.d.ts +48 -0
- package/dist/esm/types/chartType/raceDonut/zRaceDonut.d.ts +8 -0
- package/dist/esm/types/chartType/raceLine/zRaceLine.d.ts +64 -0
- package/dist/esm/types/chartType/racePie/zRacePie.d.ts +8 -0
- package/dist/esm/types/chartType/raceScatter/zRaceScatter.d.ts +48 -0
- package/dist/esm/types/chartType/radar/zRadar.d.ts +8 -0
- package/dist/esm/types/chartType/rose/zRose.d.ts +8 -0
- package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +8 -0
- package/dist/esm/types/chartType/scatter/zScatter.d.ts +48 -0
- package/dist/esm/types/chartType/sunburst/zSunburst.d.ts +8 -0
- package/dist/esm/types/chartType/table/zTable.d.ts +46 -4
- package/dist/esm/types/chartType/treeMap/zTreeMap.d.ts +8 -0
- package/dist/esm/types/dataSelector/selector.d.ts +40 -0
- package/dist/esm/types/dataSelector/selector.js +9 -1
- package/dist/esm/types/dataSelector/selector.js.map +1 -1
- package/dist/esm/types/properties/annotation/annotation.d.ts +24 -0
- package/dist/esm/types/properties/annotation/zAnnotationArea.d.ts +4 -0
- package/dist/esm/types/properties/annotation/zAnnotationPoint.d.ts +8 -0
- package/dist/esm/types/properties/cellStyle/bodyCellStyle.d.ts +71 -5
- package/dist/esm/types/properties/cellStyle/bodyCellStyle.js +16 -4
- package/dist/esm/types/properties/cellStyle/bodyCellStyle.js.map +1 -1
- package/dist/esm/types/properties/cellStyle/cellStyle.d.ts +23 -2
- package/dist/esm/types/properties/config/annotation/zAnnotation.d.ts +8 -0
- package/dist/esm/types/properties/config/area.d.ts +24 -0
- package/dist/esm/types/properties/config/bar.d.ts +36 -0
- package/dist/esm/types/properties/config/boxplot.d.ts +12 -0
- package/dist/esm/types/properties/config/circlePacking.d.ts +8 -0
- package/dist/esm/types/properties/config/column.d.ts +36 -0
- package/dist/esm/types/properties/config/config.d.ts +328 -0
- package/dist/esm/types/properties/config/dualAxis.d.ts +12 -0
- package/dist/esm/types/properties/config/funnel.d.ts +8 -0
- package/dist/esm/types/properties/config/heatmap.d.ts +8 -0
- package/dist/esm/types/properties/config/histogram.d.ts +12 -0
- package/dist/esm/types/properties/config/label/zLabel.d.ts +8 -0
- package/dist/esm/types/properties/config/label/zPieLabel.d.ts +8 -0
- package/dist/esm/types/properties/config/line.d.ts +12 -0
- package/dist/esm/types/properties/config/pie.d.ts +24 -0
- package/dist/esm/types/properties/config/pivotTable.d.ts +10 -0
- package/dist/esm/types/properties/config/race.d.ts +72 -0
- package/dist/esm/types/properties/config/rose.d.ts +16 -0
- package/dist/esm/types/properties/config/scatter.d.ts +12 -0
- package/dist/esm/types/properties/config/sunburst.d.ts +8 -0
- package/dist/esm/types/properties/config/table.d.ts +10 -0
- package/dist/esm/types/properties/config/table.js +14 -1
- package/dist/esm/types/properties/config/table.js.map +1 -1
- package/dist/esm/types/properties/config/treeMap.d.ts +8 -0
- package/dist/esm/types/properties/markStyle/barStyle.d.ts +8 -0
- package/dist/esm/types/properties/markStyle/boxPlotStyle.d.ts +4 -0
- package/dist/esm/types/properties/markStyle/lineStyle.d.ts +8 -0
- package/dist/esm/types/properties/markStyle/markStyle.d.ts +80 -0
- package/dist/esm/types/properties/markStyle/outlierStyle.d.ts +4 -0
- package/dist/esm/types/properties/markStyle/pointStyle.d.ts +8 -0
- package/dist/esm/types/properties/markStyle/zAreaStyle.d.ts +8 -0
- package/dist/esm/types/properties/theme/customTheme.d.ts +656 -0
- package/dist/umd/index.js +24330 -23191
- package/dist/umd/index.js.map +1 -1
- package/package.json +3 -1
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureId.d.ts +0 -2
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureId.js +0 -19
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureId.js.map +0 -1
- package/dist/esm/pipeline/advanced/table/pipes/reshape/index.d.ts +0 -1
- package/dist/esm/pipeline/advanced/table/pipes/reshape/index.js +0 -2
- package/dist/esm/pipeline/advanced/table/pipes/reshape/reshapePivotTable.d.ts +0 -2
- package/dist/esm/pipeline/advanced/table/pipes/reshape/reshapePivotTable.js +0 -32
- package/dist/esm/pipeline/advanced/table/pipes/reshape/reshapePivotTable.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types/dataSelector/selector.js","sources":["webpack://@visactor/vseed/./src/types/dataSelector/selector.ts"],"sourcesContent":["import { z } from 'zod'\nimport { zDatum, type Datum } from '../properties'\n\nexport type ValueSelector = string | number\n\nexport type PartialDatumSelector = Datum\n\n/**\n * @description 指标选择器, 用于选择数据项中指标字段的值\n */\nexport type MeasureSelector = {\n /**\n * @description 指标字段, measures 某一项的 id\n */\n field: string\n /**\n * @description 操作符\n * - =: 选择数据项中指标字段的值等于 value 的数据项\n * - ==: 选择数据项中指标字段的值等于 value 的数据项\n * - !=: 选择数据项中指标字段的值不等于 value 的数据项\n * - >: 选择数据项中指标字段的值大于 value 的数据项\n * - <: 选择数据项中指标字段的值小于 value 的数据项\n * - >=: 选择数据项中指标字段的值大于等于 value 的数据项\n * - <=: 选择数据项中指标字段的值小于等于 value 的数据项\n * - between: 选择数据项中指标字段的值在 value 之间的 data item\n */\n operator?: '=' | '==' | '!=' | '>' | '<' | '>=' | '<=' | 'between'\n /**\n * @description 操作符\n * - =: 选择数据项中指标字段的值等于 value 的数据项, 会将值转换为字符串后进行比较, 因此 1 == \"1\" 为 true\n * - ==: 选择数据项中指标字段的值精准等于 value 的数据项, 不会做任何特殊处理, 因此 1 == \"1\" 为 false\n * - !=: 选择数据项中指标字段的值不等于 value 的数据项\n * - >: 选择数据项中指标字段的值大于 value 的数据项\n * - <: 选择数据项中指标字段的值小于 value 的数据项\n * - >=: 选择数据项中指标字段的值大于等于 value 的数据项\n * - <=: 选择数据项中指标字段的值小于等于 value 的数据项\n * - between: 选择数据项中指标字段的值在 value 之间的 data item\n * same as operator\n */\n op?: '=' | '==' | '!=' | '>' | '<' | '>=' | '<=' | 'between'\n /**\n * @description 选择数据项中指标字段的值\n * - 仅 op 为 between 时, value 为长度为2的数组, 数组中的元素为指标字段的最小值和最大值\n * - 其他情况, value 为指标字段的单个值\n */\n value: string | number | Array<string | number>\n // /**\n // * @description 是否使用原始数据进行数据匹配, 开启后会有更多的数据被匹配到\n // * 若下述数据, measures 仅设置了 value, field 为 isHigh 或 isLow, op 为 =, value 为 1,\n // * 关闭useOrigin时, 数据项并不会考虑measures之外的字段, 因此field为isHigh或isLow的字段会被忽略\n // * 开启useOrigin时, 会直接使用整个数据项进行匹配\n // * [\n // * {value: 100, isHigh: 1, isLow: 0},\n // * {value: 200, isHigh: 0, isLow: 1},\n // * {value: 300, isHigh: 1, isLow: 0},\n // * ]\n // * @default false\n // */\n // useOrigin?: boolean\n}\n\n/**\n * @description 维度选择器, 用于选择数据项中维度字段的值\n */\nexport type DimensionSelector = {\n /**\n * @description 维度字段, dimensions 某一项的 id\n */\n field: string\n /**\n * @description 操作符\n * - in: 选择数据项中维度字段的值在 value 中的数据项\n * - not in: 选择数据项中维度字段的值不在 value 中的数据项\n */\n operator?: 'in' | 'not in'\n /**\n * @description 操作符\n * - in: 选择数据项中维度字段的值在 value 中的数据项\n * - not in: 选择数据项中维度字段的值不在 value 中的数据项\n * same as operator\n */\n op?: 'in' | 'not in'\n /**\n * @description 选择数据项中维度字段的值, 支持数组\n */\n value: string | number | Array<string | number>\n // /**\n // * @description 是否使用原始数据进行数据匹配, 开启后会有更多的数据被匹配到\n // * 若下述数据, dimensions 仅设置了 name, field 为 name, op 为 =, value 为 \"high\",\n // * 关闭useOrigin时, 数据项并不会考虑dimensions之外的字段, 因此field为name的字段会被忽略\n // * 开启useOrigin时, 会直接使用整个数据项进行匹配\n // * [\n // * {name: \"low\", isHigh: \"false\", isLow: \"true\"},\n // * {name: \"low\", isHigh: \"false\", isLow: \"true\"},\n // * {name: \"high\", isHigh: \"true\", isLow: \"false\"},\n // * ]\n // * @default false\n // */\n // useOrigin?: boolean\n}\n\nexport type Selector = ValueSelector | PartialDatumSelector | MeasureSelector | DimensionSelector\n\nexport type AreaSelector = MeasureSelector | DimensionSelector\n\nexport type AreaSelectors = Array<AreaSelector>\n\nexport type Selectors = Array<Selector>\n\n/**\n * 行索引与字段组合的数据结构\n * @description 用于表示动态筛选器返回的结果,指向原始数据中特定行的特定字段\n */\nexport type RowWithFieldRes = {\n /**\n * 原始数据项的行索引\n * @description 从 0 开始计数,对应数据源中数据项的位置\n */\n __row_index: number\n /**\n * 字段名称\n * @description\n * - 具体字段名:表示该行中的某个特定字段\n * - '*':表示该行的所有字段(整行)\n */\n field: string | '*'\n}\n\n/**\n * 部分数据项结果\n * @description 用于表示动态筛选器返回的部分数据项\n */\nexport type PartialDatumRes = Datum\n\nexport type DynamicFilterExecutionResult<T> = {\n success: boolean\n data?: T[]\n error?: string\n}\n\n/**\n * 表格动态筛选器配置\n * @description 通过 AI 生成的 JavaScript 代码实现表格单元格级别的精确筛选\n * @environment 仅支持浏览器环境(需要 Web Worker),Node.js 环境将使用 fallback\n */\nexport interface TableDynamicFilter {\n type: 'row-with-field'\n /**\n * 用户的筛选需求描述(自然语言)\n * @example \"高亮销售额大于1000的单元格\"\n * @example \"高亮每行中最大值所在的单元格\"\n */\n description?: string\n\n /**\n * AI 生成的 JavaScript 筛选代码\n * @description\n * - 只能使用内置工具函数(通过 _ 或 R 访问)\n * - 输入参数: data (数组),每个 item 包含 _index 字段表示行号\n * - 必须返回单元格选择器数组: Array<{ __row_index: number, field: string }>\n * - field 为 \"*\" 时表示整行高亮\n * - 禁止使用: eval, Function, 异步操作, DOM API, 网络请求\n *\n * @example Top N 筛选\n * dynamicFilter = {\n * type: 'row-with-field',\n * description: '高亮销售额最高的前3个产品',\n * code: `\n * const sorted = _.sortBy(data, 'sales');\n * const reversed = [...sorted].reverse();\n * const result = _.take(reversed, 3);\n * return _.flatten(\n * _.map(result, item => [\n * { __row_index: item._index, field: 'product' },\n * { __row_index: item._index, field: 'sales' }\n * ])\n * );\n * `,\n * enabled: true\n * }\n *\n * @example 多条件筛选\n * dynamicFilter = {\n * type: 'row-with-field',\n * description: '高亮利润率大于20%且销售额超过5000的产品',\n * code: `\n * const matched = _.filter(data, item => {\n * const profitRate = (item.profit / item.sales) * 100;\n * return profitRate > 20 && item.sales > 5000;\n * });\n * return _.flatten(\n * _.map(matched, item => [\n * { __row_index: item._index, field: 'product' },\n * { __row_index: item._index, field: 'sales' }\n * ])\n * );\n * `,\n * enabled: true\n * }\n *\n * @example 相对值筛选\n * dynamicFilter = { *\n * type: 'row-with-field',\n * description: '高亮销售额高于平均值的产品',\n * code: `\n * const avgSales = _.meanBy(data, 'sales');\n * const matched = _.filter(data, item => item.sales > avgSales);\n * return _.flatten(\n * _.map(matched, item => [\n * { __row_index: item._index, field: 'product' },\n * { __row_index: item._index, field: 'sales' }\n * ])\n * );\n * `,\n * enabled: true\n * }\n *\n * @example 分组筛选\n * dynamicFilter = {\n * type: 'row-with-field',\n * description: '每个区域中销售额最高的产品',\n * code: `\n * const grouped = _.groupBy(data, 'region');\n * const topByRegion = _.map(_.values(grouped), group => _.maxBy(group, 'sales'));\n * return _.flatten(\n * _.map(topByRegion, item => [\n * { __row_index: item._index, field: 'product' },\n * { __row_index: item._index, field: 'sales' }\n * ])\n * );\n * `,\n * enabled: true\n * }\n *\n * @example 整行高亮\n * dynamicFilter = {\n * description: '高亮销售额大于利润的整行',\n * code: `\n * const matched = _.filter(data, item => item.sales > item.profit);\n * return matched.map(item => ({\n * __row_index: item._index,\n * field: '*'\n * }));\n * `,\n * enabled: true\n * }\n */\n code: string\n\n /**\n * 代码执行失败或环境不支持时的降级方案\n */\n fallback?: Selector | Selectors\n\n /**\n * 动态筛选执行结果(运行期字段)\n * @description prepare() 阶段写入,运行时只读\n */\n result?: DynamicFilterExecutionResult<RowWithFieldRes>\n}\n\n/**\n * 图表动态筛选器配置\n * @description 通过 AI 生成的 JavaScript 代码实现图表标记(柱子、点等)的筛选\n * @environment 仅支持浏览器环境(需要 Web Worker),Node.js 环境将使用 fallback\n */\nexport interface ChartDynamicFilter {\n type: 'row-with-field'\n /**\n * 用户的筛选需求描述(自然语言)\n * @example \"高亮销售额大于1000的柱子\"\n * @example \"高亮每个区域中利润率最高的柱子\"\n */\n description?: string\n\n /**\n * AI 生成的 JavaScript 筛选代码\n * @description\n * - 只能使用内置工具函数(通过 _ 或 R 访问)\n * - 输入参数: data (数组),每个 item 包含 __row_index 字段表示行号\n * - 必须返回行索引与字段组合的数组: Array<{ __row_index: number, field: string }>\n * - __row_index 表示原始数据项的行号,field 表示需要高亮的字段\n * - 禁止使用: eval, Function, 异步操作, DOM API, 网络请求\n *\n * @example 高亮销售额大于1000的数据项的 sales 字段\n * ```javascript\n * const filtered = _.filter(data, item => item.sales > 1000);\n * return _.map(filtered, item => ({\n * __row_index: item.__row_index,\n * field: 'sales'\n * }));\n * ```\n *\n * @example 高亮每个区域中利润率最高的数据项\n * ```javascript\n * const grouped = _.groupBy(data, 'area');\n * const maxItems = _.map(grouped, group =>\n * _.maxBy(group, item => item.profit / item.sales)\n * );\n * return _.flatten(\n * _.map(maxItems, item => [\n * { __row_index: item.__row_index, field: 'product' },\n * { __row_index: item.__row_index, field: 'profit' }\n * ])\n * );\n * ```\n *\n * @example 高亮多条件筛选的数据项\n * ```javascript\n * const filtered = _.filter(data, item => {\n * const profitRate = item.profit / item.sales;\n * return profitRate > 0.2 && item.sales > 5000;\n * });\n * return _.flatten(\n * _.map(filtered, item => [\n * { __row_index: item.__row_index, field: 'product' },\n * { __row_index: item.__row_index, field: 'sales' }\n * ])\n * );\n * ```\n */\n code: string\n\n /**\n * 代码执行失败或环境不支持时的降级方案\n */\n fallback?: Selector | Selectors\n\n /**\n * 动态筛选执行结果(运行期字段)\n * @description prepare() 阶段写入,运行时只读\n */\n result?: DynamicFilterExecutionResult<RowWithFieldRes>\n}\n\nexport interface ValueDynamicFilter {\n type: 'value'\n /**\n * 用户的筛选需求描述(自然语言)\n * @example \"获取销售额最高的值作为标注线参考\"\n * @example \"计算平均销售额用于标注线\"\n */\n description?: string\n\n /**\n * AI 生成的 JavaScript 筛选代码\n * @description\n * - 只能使用内置工具函数(通过 _ 或 R 访问)\n * - 输入参数: data (数组)\n * - 必须返回单个数值或字符串: number | string\n * - 适用场景:标注线(水平线、垂直线)需要的动态数值\n * - 禁止使用: eval, Function, 异步操作, DOM API, 网络请求\n *\n * @example 获取销售额最大值作为标注线值\n * ```javascript\n * const maxSales = _.maxBy(data, 'sales')?.sales;\n * return maxSales || 0;\n * ```\n *\n * @example 计算平均值用于标注线\n * ```javascript\n * const avgSales = _.meanBy(data, 'sales');\n * return _.round(avgSales, 2);\n * ```\n *\n * @example 获取分位数作为标注线\n * ```javascript\n * const sorted = _.sortBy(data, 'sales');\n * const index = Math.floor(sorted.length * 0.75);\n * return sorted[index]?.sales || 0;\n * ```\n *\n * @example 根据条件计算目标值\n * ```javascript\n * const currentYearTotal = _.sumBy(\n * _.filter(data, item => item.year === 2024),\n * 'sales'\n * );\n * return currentYearTotal;\n * ```\n */\n code: string\n\n /**\n * 代码执行失败或环境不支持时的降级方案\n */\n fallback?: string | number\n\n /**\n * 动态筛选执行结果(运行期字段)\n * @description prepare() 阶段写入,运行时只读\n */\n result?: {\n success: boolean\n data?: number | string\n }\n}\n\nexport const zPartialSelector = zDatum\nexport const zMeasureSelector = z.object({\n field: z.string(),\n operator: z.enum(['=', '==', '!=', '>', '<', '>=', '<=', 'between']).nullish(),\n op: z.enum(['=', '==', '!=', '>', '<', '>=', '<=', 'between']).nullish(),\n value: z.union([z.string(), z.number(), z.array(z.union([z.string(), z.number()]))]),\n})\n\nexport const zDimensionSelector = z.object({\n field: z.string(),\n operator: z.enum(['in', 'not in']).nullish(),\n op: z.enum(['in', 'not in']).nullish(),\n value: z.union([z.string(), z.number(), z.array(z.union([z.string(), z.number()]))]),\n})\n\nexport const zSelector = z.union([z.string(), z.number(), zMeasureSelector, zDimensionSelector, zPartialSelector])\n\nexport const zSelectors = z.array(zSelector)\n\nexport const zAreaSelector = z.union([zMeasureSelector, zDimensionSelector])\n\nexport const zAreaSelectors = z.array(zAreaSelector)\n\nexport const zCellSelector = z.object({\n __row_index: z.number(),\n field: z.union([z.string(), z.literal('*')]),\n})\n\nexport const zTableDynamicFilter = z.object({\n type: z.literal('row-with-field'),\n description: z.string().optional(),\n code: z.string(),\n fallback: z.union([zSelector, zSelectors]).optional(),\n result: z\n .object({\n success: z.boolean(),\n data: z.array(zCellSelector).optional(),\n })\n .optional(),\n})\n\nexport const zChartDynamicFilter = z.object({\n type: z.literal('row-with-field'),\n description: z.string().optional(),\n code: z.string(),\n fallback: z.union([zSelector, zSelectors]).optional(),\n result: z\n .object({\n success: z.boolean(),\n data: z.array(zCellSelector).optional(),\n })\n .optional(),\n})\n\nexport const zValueDynamicFilter = z.object({\n type: z.literal('value'),\n description: z.string().optional(),\n code: z.string(),\n fallback: z.union([z.string(), z.number()]).optional(),\n result: z\n .object({\n success: z.boolean(),\n data: z.union([z.number(), z.string()]).optional(),\n })\n .optional(),\n})\n\n/**\n * @deprecated 请使用 zTableDynamicFilter 或 zChartDynamicFilter\n */\nexport const zDynamicFilter = z.union([zTableDynamicFilter, zChartDynamicFilter])\n"],"names":["zPartialSelector","zDatum","zMeasureSelector","z","zDimensionSelector","zSelector","zSelectors","zAreaSelector","zAreaSelectors","zCellSelector","zTableDynamicFilter","zChartDynamicFilter","zValueDynamicFilter","zDynamicFilter"],"mappings":";;AA8YO,MAAMA,mBAAmBC;AACzB,MAAMC,mBAAmBC,EAAE,MAAM,CAAC;IACvC,OAAOA,EAAE,MAAM;IACf,UAAUA,CAAC,CAADA,OAAM,CAAC;QAAC;QAAK;QAAM;QAAM;QAAK;QAAK;QAAM;QAAM;KAAU,EAAE,OAAO;IAC5E,IAAIA,CAAC,CAADA,OAAM,CAAC;QAAC;QAAK;QAAM;QAAM;QAAK;QAAK;QAAM;QAAM;KAAU,EAAE,OAAO;IACtE,OAAOA,EAAE,KAAK,CAAC;QAACA,EAAE,MAAM;QAAIA,EAAE,MAAM;QAAIA,EAAE,KAAK,CAACA,EAAE,KAAK,CAAC;YAACA,EAAE,MAAM;YAAIA,EAAE,MAAM;SAAG;KAAG;AACrF;AAEO,MAAMC,qBAAqBD,EAAE,MAAM,CAAC;IACzC,OAAOA,EAAE,MAAM;IACf,UAAUA,CAAC,CAADA,OAAM,CAAC;QAAC;QAAM;KAAS,EAAE,OAAO;IAC1C,IAAIA,CAAC,CAADA,OAAM,CAAC;QAAC;QAAM;KAAS,EAAE,OAAO;IACpC,OAAOA,EAAE,KAAK,CAAC;QAACA,EAAE,MAAM;QAAIA,EAAE,MAAM;QAAIA,EAAE,KAAK,CAACA,EAAE,KAAK,CAAC;YAACA,EAAE,MAAM;YAAIA,EAAE,MAAM;SAAG;KAAG;AACrF;AAEO,MAAME,YAAYF,EAAE,KAAK,CAAC;IAACA,EAAE,MAAM;IAAIA,EAAE,MAAM;IAAID;IAAkBE;IAAoBJ;CAAiB;AAE1G,MAAMM,aAAaH,EAAE,KAAK,CAACE;AAE3B,MAAME,gBAAgBJ,EAAE,KAAK,CAAC;IAACD;IAAkBE;CAAmB;AAEpE,MAAMI,iBAAiBL,EAAE,KAAK,CAACI;AAE/B,MAAME,gBAAgBN,EAAE,MAAM,CAAC;IACpC,aAAaA,EAAE,MAAM;IACrB,OAAOA,EAAE,KAAK,CAAC;QAACA,EAAE,MAAM;QAAIA,EAAE,OAAO,CAAC;KAAK;AAC7C;AAEO,MAAMO,sBAAsBP,EAAE,MAAM,CAAC;IAC1C,MAAMA,EAAE,OAAO,CAAC;IAChB,aAAaA,EAAE,MAAM,GAAG,QAAQ;IAChC,MAAMA,EAAE,MAAM;IACd,UAAUA,EAAE,KAAK,CAAC;QAACE;QAAWC;KAAW,EAAE,QAAQ;IACnD,QAAQH,EAAAA,MACC,CAAC;QACN,SAASA,EAAE,OAAO;QAClB,MAAMA,EAAE,KAAK,CAACM,eAAe,QAAQ;IACvC,GACC,QAAQ;AACb;AAEO,MAAME,sBAAsBR,EAAE,MAAM,CAAC;IAC1C,MAAMA,EAAE,OAAO,CAAC;IAChB,aAAaA,EAAE,MAAM,GAAG,QAAQ;IAChC,MAAMA,EAAE,MAAM;IACd,UAAUA,EAAE,KAAK,CAAC;QAACE;QAAWC;KAAW,EAAE,QAAQ;IACnD,QAAQH,EAAAA,MACC,CAAC;QACN,SAASA,EAAE,OAAO;QAClB,MAAMA,EAAE,KAAK,CAACM,eAAe,QAAQ;IACvC,GACC,QAAQ;AACb;AAEO,MAAMG,sBAAsBT,EAAE,MAAM,CAAC;IAC1C,MAAMA,EAAE,OAAO,CAAC;IAChB,aAAaA,EAAE,MAAM,GAAG,QAAQ;IAChC,MAAMA,EAAE,MAAM;IACd,UAAUA,EAAE,KAAK,CAAC;QAACA,EAAE,MAAM;QAAIA,EAAE,MAAM;KAAG,EAAE,QAAQ;IACpD,QAAQA,EAAAA,MACC,CAAC;QACN,SAASA,EAAE,OAAO;QAClB,MAAMA,EAAE,KAAK,CAAC;YAACA,EAAE,MAAM;YAAIA,EAAE,MAAM;SAAG,EAAE,QAAQ;IAClD,GACC,QAAQ;AACb;AAKO,MAAMU,iBAAiBV,EAAE,KAAK,CAAC;IAACO;IAAqBC;CAAoB"}
|
|
1
|
+
{"version":3,"file":"types/dataSelector/selector.js","sources":["webpack://@visactor/vseed/./src/types/dataSelector/selector.ts"],"sourcesContent":["import { z } from 'zod'\nimport { zDatum, type Datum } from '../properties'\n\nexport type ValueSelector = string | number\n\nexport type PartialDatumSelector = Datum\n\n/**\n * @description 字段选择器,用于直接选择指定字段(列),不涉及条件判断\n */\nexport type FieldSelector = {\n /**\n * @description 字段名,可以是单个字段或多个字段数组\n * @example 单个字段\n * field: 'sales'\n * @example 多个字段\n * field: ['sales', 'profit', 'revenue']\n */\n field: string | string[]\n}\n\n/**\n * @description 指标选择器, 用于选择数据项中指标字段的值\n */\nexport type MeasureSelector = {\n /**\n * @description 指标字段, measures 某一项的 id\n */\n field: string\n /**\n * @description 操作符\n * - =: 选择数据项中指标字段的值等于 value 的数据项\n * - ==: 选择数据项中指标字段的值等于 value 的数据项\n * - !=: 选择数据项中指标字段的值不等于 value 的数据项\n * - >: 选择数据项中指标字段的值大于 value 的数据项\n * - <: 选择数据项中指标字段的值小于 value 的数据项\n * - >=: 选择数据项中指标字段的值大于等于 value 的数据项\n * - <=: 选择数据项中指标字段的值小于等于 value 的数据项\n * - between: 选择数据项中指标字段的值在 value 之间的 data item\n */\n operator?: '=' | '==' | '!=' | '>' | '<' | '>=' | '<=' | 'between'\n /**\n * @description 操作符\n * - =: 选择数据项中指标字段的值等于 value 的数据项, 会将值转换为字符串后进行比较, 因此 1 == \"1\" 为 true\n * - ==: 选择数据项中指标字段的值精准等于 value 的数据项, 不会做任何特殊处理, 因此 1 == \"1\" 为 false\n * - !=: 选择数据项中指标字段的值不等于 value 的数据项\n * - >: 选择数据项中指标字段的值大于 value 的数据项\n * - <: 选择数据项中指标字段的值小于 value 的数据项\n * - >=: 选择数据项中指标字段的值大于等于 value 的数据项\n * - <=: 选择数据项中指标字段的值小于等于 value 的数据项\n * - between: 选择数据项中指标字段的值在 value 之间的 data item\n * same as operator\n */\n op?: '=' | '==' | '!=' | '>' | '<' | '>=' | '<=' | 'between'\n /**\n * @description 选择数据项中指标字段的值\n * - 仅 op 为 between 时, value 为长度为2的数组, 数组中的元素为指标字段的最小值和最大值\n * - 其他情况, value 为指标字段的单个值\n */\n value: string | number | Array<string | number>\n // /**\n // * @description 是否使用原始数据进行数据匹配, 开启后会有更多的数据被匹配到\n // * 若下述数据, measures 仅设置了 value, field 为 isHigh 或 isLow, op 为 =, value 为 1,\n // * 关闭useOrigin时, 数据项并不会考虑measures之外的字段, 因此field为isHigh或isLow的字段会被忽略\n // * 开启useOrigin时, 会直接使用整个数据项进行匹配\n // * [\n // * {value: 100, isHigh: 1, isLow: 0},\n // * {value: 200, isHigh: 0, isLow: 1},\n // * {value: 300, isHigh: 1, isLow: 0},\n // * ]\n // * @default false\n // */\n // useOrigin?: boolean\n}\n\n/**\n * @description 维度选择器, 用于选择数据项中维度字段的值\n */\nexport type DimensionSelector = {\n /**\n * @description 维度字段, dimensions 某一项的 id\n */\n field: string\n /**\n * @description 操作符\n * - in: 选择数据项中维度字段的值在 value 中的数据项\n * - not in: 选择数据项中维度字段的值不在 value 中的数据项\n */\n operator?: 'in' | 'not in'\n /**\n * @description 操作符\n * - in: 选择数据项中维度字段的值在 value 中的数据项\n * - not in: 选择数据项中维度字段的值不在 value 中的数据项\n * same as operator\n */\n op?: 'in' | 'not in'\n /**\n * @description 选择数据项中维度字段的值, 支持数组\n */\n value: string | number | Array<string | number>\n // /**\n // * @description 是否使用原始数据进行数据匹配, 开启后会有更多的数据被匹配到\n // * 若下述数据, dimensions 仅设置了 name, field 为 name, op 为 =, value 为 \"high\",\n // * 关闭useOrigin时, 数据项并不会考虑dimensions之外的字段, 因此field为name的字段会被忽略\n // * 开启useOrigin时, 会直接使用整个数据项进行匹配\n // * [\n // * {name: \"low\", isHigh: \"false\", isLow: \"true\"},\n // * {name: \"low\", isHigh: \"false\", isLow: \"true\"},\n // * {name: \"high\", isHigh: \"true\", isLow: \"false\"},\n // * ]\n // * @default false\n // */\n // useOrigin?: boolean\n}\n\nexport type Selector = ValueSelector | PartialDatumSelector | MeasureSelector | DimensionSelector\n\nexport type AreaSelector = MeasureSelector | DimensionSelector\n\nexport type AreaSelectors = Array<AreaSelector>\n\nexport type Selectors = Array<Selector>\n\n/**\n * 行索引与字段组合的数据结构\n * @description 用于表示动态筛选器返回的结果,指向原始数据中特定行的特定字段\n */\nexport type RowWithFieldRes = {\n /**\n * 原始数据项的行索引\n * @description 从 0 开始计数,对应数据源中数据项的位置\n */\n __row_index: number\n /**\n * 字段名称\n * @description\n * - 具体字段名:表示该行中的某个特定字段\n * - '*':表示该行的所有字段(整行)\n */\n field: string | '*'\n}\n\n/**\n * 部分数据项结果\n * @description 用于表示动态筛选器返回的部分数据项\n */\nexport type PartialDatumRes = Datum\n\nexport type DynamicFilterExecutionResult<T> = {\n success: boolean\n data?: T[]\n error?: string\n}\n\n/**\n * 表格动态筛选器配置\n * @description 通过 AI 生成的 JavaScript 代码实现表格单元格级别的精确筛选\n * @environment 仅支持浏览器环境(需要 Web Worker),Node.js 环境将使用 fallback\n */\nexport interface TableDynamicFilter {\n type: 'row-with-field'\n /**\n * 用户的筛选需求描述(自然语言)\n * @example \"高亮销售额大于1000的单元格\"\n * @example \"高亮每行中最大值所在的单元格\"\n */\n description?: string\n\n /**\n * AI 生成的 JavaScript 筛选代码\n * @description\n * - 只能使用内置工具函数(通过 _ 或 R 访问)\n * - 输入参数: data (数组),每个 item 包含 _index 字段表示行号\n * - 必须返回单元格选择器数组: Array<{ __row_index: number, field: string }>\n * - field 为 \"*\" 时表示整行高亮\n * - 禁止使用: eval, Function, 异步操作, DOM API, 网络请求\n *\n * @example Top N 筛选\n * dynamicFilter = {\n * type: 'row-with-field',\n * description: '高亮销售额最高的前3个产品',\n * code: `\n * const sorted = _.sortBy(data, 'sales');\n * const reversed = [...sorted].reverse();\n * const result = _.take(reversed, 3);\n * return _.flatten(\n * _.map(result, item => [\n * { __row_index: item._index, field: 'product' },\n * { __row_index: item._index, field: 'sales' }\n * ])\n * );\n * `,\n * enabled: true\n * }\n *\n * @example 多条件筛选\n * dynamicFilter = {\n * type: 'row-with-field',\n * description: '高亮利润率大于20%且销售额超过5000的产品',\n * code: `\n * const matched = _.filter(data, item => {\n * const profitRate = (item.profit / item.sales) * 100;\n * return profitRate > 20 && item.sales > 5000;\n * });\n * return _.flatten(\n * _.map(matched, item => [\n * { __row_index: item._index, field: 'product' },\n * { __row_index: item._index, field: 'sales' }\n * ])\n * );\n * `,\n * enabled: true\n * }\n *\n * @example 相对值筛选\n * dynamicFilter = { *\n * type: 'row-with-field',\n * description: '高亮销售额高于平均值的产品',\n * code: `\n * const avgSales = _.meanBy(data, 'sales');\n * const matched = _.filter(data, item => item.sales > avgSales);\n * return _.flatten(\n * _.map(matched, item => [\n * { __row_index: item._index, field: 'product' },\n * { __row_index: item._index, field: 'sales' }\n * ])\n * );\n * `,\n * enabled: true\n * }\n *\n * @example 分组筛选\n * dynamicFilter = {\n * type: 'row-with-field',\n * description: '每个区域中销售额最高的产品',\n * code: `\n * const grouped = _.groupBy(data, 'region');\n * const topByRegion = _.map(_.values(grouped), group => _.maxBy(group, 'sales'));\n * return _.flatten(\n * _.map(topByRegion, item => [\n * { __row_index: item._index, field: 'product' },\n * { __row_index: item._index, field: 'sales' }\n * ])\n * );\n * `,\n * enabled: true\n * }\n *\n * @example 整行高亮\n * dynamicFilter = {\n * description: '高亮销售额大于利润的整行',\n * code: `\n * const matched = _.filter(data, item => item.sales > item.profit);\n * return matched.map(item => ({\n * __row_index: item._index,\n * field: '*'\n * }));\n * `,\n * enabled: true\n * }\n */\n code: string\n\n /**\n * 代码执行失败或环境不支持时的降级方案\n */\n fallback?: Selector | Selectors\n\n /**\n * 动态筛选执行结果(运行期字段)\n * @description prepare() 阶段写入,运行时只读\n */\n result?: DynamicFilterExecutionResult<RowWithFieldRes>\n}\n\n/**\n * 图表动态筛选器配置\n * @description 通过 AI 生成的 JavaScript 代码实现图表标记(柱子、点等)的筛选\n * @environment 仅支持浏览器环境(需要 Web Worker),Node.js 环境将使用 fallback\n */\nexport interface ChartDynamicFilter {\n type: 'row-with-field'\n /**\n * 用户的筛选需求描述(自然语言)\n * @example \"高亮销售额大于1000的柱子\"\n * @example \"高亮每个区域中利润率最高的柱子\"\n */\n description?: string\n\n /**\n * AI 生成的 JavaScript 筛选代码\n * @description\n * - 只能使用内置工具函数(通过 _ 或 R 访问)\n * - 输入参数: data (数组),每个 item 包含 __row_index 字段表示行号\n * - 必须返回行索引与字段组合的数组: Array<{ __row_index: number, field: string }>\n * - __row_index 表示原始数据项的行号,field 表示需要高亮的字段\n * - 禁止使用: eval, Function, 异步操作, DOM API, 网络请求\n *\n * @example 高亮销售额大于1000的数据项的 sales 字段\n * ```javascript\n * const filtered = _.filter(data, item => item.sales > 1000);\n * return _.map(filtered, item => ({\n * __row_index: item.__row_index,\n * field: 'sales'\n * }));\n * ```\n *\n * @example 高亮每个区域中利润率最高的数据项\n * ```javascript\n * const grouped = _.groupBy(data, 'area');\n * const maxItems = _.map(grouped, group =>\n * _.maxBy(group, item => item.profit / item.sales)\n * );\n * return _.flatten(\n * _.map(maxItems, item => [\n * { __row_index: item.__row_index, field: 'product' },\n * { __row_index: item.__row_index, field: 'profit' }\n * ])\n * );\n * ```\n *\n * @example 高亮多条件筛选的数据项\n * ```javascript\n * const filtered = _.filter(data, item => {\n * const profitRate = item.profit / item.sales;\n * return profitRate > 0.2 && item.sales > 5000;\n * });\n * return _.flatten(\n * _.map(filtered, item => [\n * { __row_index: item.__row_index, field: 'product' },\n * { __row_index: item.__row_index, field: 'sales' }\n * ])\n * );\n * ```\n */\n code: string\n\n /**\n * 代码执行失败或环境不支持时的降级方案\n */\n fallback?: Selector | Selectors\n\n /**\n * 动态筛选执行结果(运行期字段)\n * @description prepare() 阶段写入,运行时只读\n */\n result?: DynamicFilterExecutionResult<RowWithFieldRes>\n}\n\nexport interface ValueDynamicFilter {\n type: 'value'\n /**\n * 用户的筛选需求描述(自然语言)\n * @example \"获取销售额最高的值作为标注线参考\"\n * @example \"计算平均销售额用于标注线\"\n */\n description?: string\n\n /**\n * AI 生成的 JavaScript 筛选代码\n * @description\n * - 只能使用内置工具函数(通过 _ 或 R 访问)\n * - 输入参数: data (数组)\n * - 必须返回单个数值或字符串: number | string\n * - 适用场景:标注线(水平线、垂直线)需要的动态数值\n * - 禁止使用: eval, Function, 异步操作, DOM API, 网络请求\n *\n * @example 获取销售额最大值作为标注线值\n * ```javascript\n * const maxSales = _.maxBy(data, 'sales')?.sales;\n * return maxSales || 0;\n * ```\n *\n * @example 计算平均值用于标注线\n * ```javascript\n * const avgSales = _.meanBy(data, 'sales');\n * return _.round(avgSales, 2);\n * ```\n *\n * @example 获取分位数作为标注线\n * ```javascript\n * const sorted = _.sortBy(data, 'sales');\n * const index = Math.floor(sorted.length * 0.75);\n * return sorted[index]?.sales || 0;\n * ```\n *\n * @example 根据条件计算目标值\n * ```javascript\n * const currentYearTotal = _.sumBy(\n * _.filter(data, item => item.year === 2024),\n * 'sales'\n * );\n * return currentYearTotal;\n * ```\n */\n code: string\n\n /**\n * 代码执行失败或环境不支持时的降级方案\n */\n fallback?: string | number\n\n /**\n * 动态筛选执行结果(运行期字段)\n * @description prepare() 阶段写入,运行时只读\n */\n result?: {\n success: boolean\n data?: number | string\n }\n}\n\nexport const zPartialSelector = zDatum\n\nexport const zFieldSelector = z.object({\n field: z.union([z.string(), z.array(z.string())]),\n})\n\nexport const zMeasureSelector = z.object({\n field: z.string(),\n operator: z.enum(['=', '==', '!=', '>', '<', '>=', '<=', 'between']).nullish(),\n op: z.enum(['=', '==', '!=', '>', '<', '>=', '<=', 'between']).nullish(),\n value: z.union([z.string(), z.number(), z.array(z.union([z.string(), z.number()]))]),\n})\n\nexport const zDimensionSelector = z.object({\n field: z.string(),\n operator: z.enum(['in', 'not in']).nullish(),\n op: z.enum(['in', 'not in']).nullish(),\n value: z.union([z.string(), z.number(), z.array(z.union([z.string(), z.number()]))]),\n})\n\nexport const zSelector = z.union([\n z.string(),\n z.number(),\n zFieldSelector,\n zMeasureSelector,\n zDimensionSelector,\n zPartialSelector,\n])\n\nexport const zSelectors = z.array(zSelector)\n\nexport const zAreaSelector = z.union([zFieldSelector, zMeasureSelector, zDimensionSelector])\n\nexport const zAreaSelectors = z.array(zAreaSelector)\n\nexport const zCellSelector = z.object({\n __row_index: z.number(),\n field: z.union([z.string(), z.literal('*')]),\n})\n\nexport const zTableDynamicFilter = z.object({\n type: z.literal('row-with-field'),\n description: z.string().optional(),\n code: z.string(),\n fallback: z.union([zSelector, zSelectors]).optional(),\n result: z\n .object({\n success: z.boolean(),\n data: z.array(zCellSelector).optional(),\n })\n .optional(),\n})\n\nexport const zChartDynamicFilter = z.object({\n type: z.literal('row-with-field'),\n description: z.string().optional(),\n code: z.string(),\n fallback: z.union([zSelector, zSelectors]).optional(),\n result: z\n .object({\n success: z.boolean(),\n data: z.array(zCellSelector).optional(),\n })\n .optional(),\n})\n\nexport const zValueDynamicFilter = z.object({\n type: z.literal('value'),\n description: z.string().optional(),\n code: z.string(),\n fallback: z.union([z.string(), z.number()]).optional(),\n result: z\n .object({\n success: z.boolean(),\n data: z.union([z.number(), z.string()]).optional(),\n })\n .optional(),\n})\n\n/**\n * @deprecated 请使用 zTableDynamicFilter 或 zChartDynamicFilter\n */\nexport const zDynamicFilter = z.union([zTableDynamicFilter, zChartDynamicFilter])\n"],"names":["zPartialSelector","zDatum","zFieldSelector","z","zMeasureSelector","zDimensionSelector","zSelector","zSelectors","zAreaSelector","zAreaSelectors","zCellSelector","zTableDynamicFilter","zChartDynamicFilter","zValueDynamicFilter","zDynamicFilter"],"mappings":";;AA4ZO,MAAMA,mBAAmBC;AAEzB,MAAMC,iBAAiBC,EAAE,MAAM,CAAC;IACrC,OAAOA,EAAE,KAAK,CAAC;QAACA,EAAE,MAAM;QAAIA,EAAE,KAAK,CAACA,EAAE,MAAM;KAAI;AAClD;AAEO,MAAMC,mBAAmBD,EAAE,MAAM,CAAC;IACvC,OAAOA,EAAE,MAAM;IACf,UAAUA,CAAC,CAADA,OAAM,CAAC;QAAC;QAAK;QAAM;QAAM;QAAK;QAAK;QAAM;QAAM;KAAU,EAAE,OAAO;IAC5E,IAAIA,CAAC,CAADA,OAAM,CAAC;QAAC;QAAK;QAAM;QAAM;QAAK;QAAK;QAAM;QAAM;KAAU,EAAE,OAAO;IACtE,OAAOA,EAAE,KAAK,CAAC;QAACA,EAAE,MAAM;QAAIA,EAAE,MAAM;QAAIA,EAAE,KAAK,CAACA,EAAE,KAAK,CAAC;YAACA,EAAE,MAAM;YAAIA,EAAE,MAAM;SAAG;KAAG;AACrF;AAEO,MAAME,qBAAqBF,EAAE,MAAM,CAAC;IACzC,OAAOA,EAAE,MAAM;IACf,UAAUA,CAAC,CAADA,OAAM,CAAC;QAAC;QAAM;KAAS,EAAE,OAAO;IAC1C,IAAIA,CAAC,CAADA,OAAM,CAAC;QAAC;QAAM;KAAS,EAAE,OAAO;IACpC,OAAOA,EAAE,KAAK,CAAC;QAACA,EAAE,MAAM;QAAIA,EAAE,MAAM;QAAIA,EAAE,KAAK,CAACA,EAAE,KAAK,CAAC;YAACA,EAAE,MAAM;YAAIA,EAAE,MAAM;SAAG;KAAG;AACrF;AAEO,MAAMG,YAAYH,EAAE,KAAK,CAAC;IAC/BA,EAAE,MAAM;IACRA,EAAE,MAAM;IACRD;IACAE;IACAC;IACAL;CACD;AAEM,MAAMO,aAAaJ,EAAE,KAAK,CAACG;AAE3B,MAAME,gBAAgBL,EAAE,KAAK,CAAC;IAACD;IAAgBE;IAAkBC;CAAmB;AAEpF,MAAMI,iBAAiBN,EAAE,KAAK,CAACK;AAE/B,MAAME,gBAAgBP,EAAE,MAAM,CAAC;IACpC,aAAaA,EAAE,MAAM;IACrB,OAAOA,EAAE,KAAK,CAAC;QAACA,EAAE,MAAM;QAAIA,EAAE,OAAO,CAAC;KAAK;AAC7C;AAEO,MAAMQ,sBAAsBR,EAAE,MAAM,CAAC;IAC1C,MAAMA,EAAE,OAAO,CAAC;IAChB,aAAaA,EAAE,MAAM,GAAG,QAAQ;IAChC,MAAMA,EAAE,MAAM;IACd,UAAUA,EAAE,KAAK,CAAC;QAACG;QAAWC;KAAW,EAAE,QAAQ;IACnD,QAAQJ,EAAAA,MACC,CAAC;QACN,SAASA,EAAE,OAAO;QAClB,MAAMA,EAAE,KAAK,CAACO,eAAe,QAAQ;IACvC,GACC,QAAQ;AACb;AAEO,MAAME,sBAAsBT,EAAE,MAAM,CAAC;IAC1C,MAAMA,EAAE,OAAO,CAAC;IAChB,aAAaA,EAAE,MAAM,GAAG,QAAQ;IAChC,MAAMA,EAAE,MAAM;IACd,UAAUA,EAAE,KAAK,CAAC;QAACG;QAAWC;KAAW,EAAE,QAAQ;IACnD,QAAQJ,EAAAA,MACC,CAAC;QACN,SAASA,EAAE,OAAO;QAClB,MAAMA,EAAE,KAAK,CAACO,eAAe,QAAQ;IACvC,GACC,QAAQ;AACb;AAEO,MAAMG,sBAAsBV,EAAE,MAAM,CAAC;IAC1C,MAAMA,EAAE,OAAO,CAAC;IAChB,aAAaA,EAAE,MAAM,GAAG,QAAQ;IAChC,MAAMA,EAAE,MAAM;IACd,UAAUA,EAAE,KAAK,CAAC;QAACA,EAAE,MAAM;QAAIA,EAAE,MAAM;KAAG,EAAE,QAAQ;IACpD,QAAQA,EAAAA,MACC,CAAC;QACN,SAASA,EAAE,OAAO;QAClB,MAAMA,EAAE,KAAK,CAAC;YAACA,EAAE,MAAM;YAAIA,EAAE,MAAM;SAAG,EAAE,QAAQ;IAClD,GACC,QAAQ;AACb;AAKO,MAAMW,iBAAiBX,EAAE,KAAK,CAAC;IAACQ;IAAqBC;CAAoB"}
|
|
@@ -2,6 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const zAnnotation: z.ZodObject<{
|
|
3
3
|
annotationPoint: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
|
|
4
4
|
selector: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
5
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
6
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5
7
|
field: z.ZodString;
|
|
6
8
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
7
9
|
"=": "=";
|
|
@@ -36,6 +38,8 @@ export declare const zAnnotation: z.ZodObject<{
|
|
|
36
38
|
}>>>;
|
|
37
39
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
38
40
|
}, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
41
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
42
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
39
43
|
field: z.ZodString;
|
|
40
44
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
41
45
|
"=": "=";
|
|
@@ -75,6 +79,8 @@ export declare const zAnnotation: z.ZodObject<{
|
|
|
75
79
|
description: z.ZodOptional<z.ZodString>;
|
|
76
80
|
code: z.ZodString;
|
|
77
81
|
fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
82
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
83
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
78
84
|
field: z.ZodString;
|
|
79
85
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
80
86
|
"=": "=";
|
|
@@ -109,6 +115,8 @@ export declare const zAnnotation: z.ZodObject<{
|
|
|
109
115
|
}>>>;
|
|
110
116
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
111
117
|
}, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
118
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
119
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
112
120
|
field: z.ZodString;
|
|
113
121
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
114
122
|
"=": "=";
|
|
@@ -175,6 +183,8 @@ export declare const zAnnotation: z.ZodObject<{
|
|
|
175
183
|
offsetX: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodNumber>>>;
|
|
176
184
|
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
177
185
|
selector: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
186
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
187
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
178
188
|
field: z.ZodString;
|
|
179
189
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
180
190
|
"=": "=";
|
|
@@ -209,6 +219,8 @@ export declare const zAnnotation: z.ZodObject<{
|
|
|
209
219
|
}>>>;
|
|
210
220
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
211
221
|
}, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
222
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
223
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
212
224
|
field: z.ZodString;
|
|
213
225
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
214
226
|
"=": "=";
|
|
@@ -248,6 +260,8 @@ export declare const zAnnotation: z.ZodObject<{
|
|
|
248
260
|
description: z.ZodOptional<z.ZodString>;
|
|
249
261
|
code: z.ZodString;
|
|
250
262
|
fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
263
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
264
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
251
265
|
field: z.ZodString;
|
|
252
266
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
253
267
|
"=": "=";
|
|
@@ -282,6 +296,8 @@ export declare const zAnnotation: z.ZodObject<{
|
|
|
282
296
|
}>>>;
|
|
283
297
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
284
298
|
}, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
299
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
300
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
285
301
|
field: z.ZodString;
|
|
286
302
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
287
303
|
"=": "=";
|
|
@@ -527,6 +543,8 @@ export declare const zAnnotation: z.ZodObject<{
|
|
|
527
543
|
}, z.core.$strip>>]>>>;
|
|
528
544
|
annotationArea: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
|
|
529
545
|
selector: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
546
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
547
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
530
548
|
field: z.ZodString;
|
|
531
549
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
532
550
|
"=": "=";
|
|
@@ -561,6 +579,8 @@ export declare const zAnnotation: z.ZodObject<{
|
|
|
561
579
|
}>>>;
|
|
562
580
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
563
581
|
}, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
582
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
583
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
564
584
|
field: z.ZodString;
|
|
565
585
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
566
586
|
"=": "=";
|
|
@@ -634,6 +654,8 @@ export declare const zAnnotation: z.ZodObject<{
|
|
|
634
654
|
outerPadding: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodNumber>>>;
|
|
635
655
|
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
636
656
|
selector: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
657
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
658
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
637
659
|
field: z.ZodString;
|
|
638
660
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
639
661
|
"=": "=";
|
|
@@ -668,6 +690,8 @@ export declare const zAnnotation: z.ZodObject<{
|
|
|
668
690
|
}>>>;
|
|
669
691
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
670
692
|
}, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
693
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
694
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
671
695
|
field: z.ZodString;
|
|
672
696
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
673
697
|
"=": "=";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const zAnnotationArea: z.ZodObject<{
|
|
3
3
|
selector: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
4
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
5
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4
6
|
field: z.ZodString;
|
|
5
7
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
6
8
|
"=": "=";
|
|
@@ -35,6 +37,8 @@ export declare const zAnnotationArea: z.ZodObject<{
|
|
|
35
37
|
}>>>;
|
|
36
38
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
37
39
|
}, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
40
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
41
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
42
|
field: z.ZodString;
|
|
39
43
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
40
44
|
"=": "=";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const zAnnotationPoint: z.ZodObject<{
|
|
3
3
|
selector: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
4
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
5
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4
6
|
field: z.ZodString;
|
|
5
7
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
6
8
|
"=": "=";
|
|
@@ -35,6 +37,8 @@ export declare const zAnnotationPoint: z.ZodObject<{
|
|
|
35
37
|
}>>>;
|
|
36
38
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
37
39
|
}, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
40
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
41
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
42
|
field: z.ZodString;
|
|
39
43
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
40
44
|
"=": "=";
|
|
@@ -74,6 +78,8 @@ export declare const zAnnotationPoint: z.ZodObject<{
|
|
|
74
78
|
description: z.ZodOptional<z.ZodString>;
|
|
75
79
|
code: z.ZodString;
|
|
76
80
|
fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
81
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
82
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
83
|
field: z.ZodString;
|
|
78
84
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
79
85
|
"=": "=";
|
|
@@ -108,6 +114,8 @@ export declare const zAnnotationPoint: z.ZodObject<{
|
|
|
108
114
|
}>>>;
|
|
109
115
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
110
116
|
}, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
117
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
118
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
111
119
|
field: z.ZodString;
|
|
112
120
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
113
121
|
"=": "=";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { TableDynamicFilter } from '../../dataSelector';
|
|
2
|
+
import type { FieldSelector, TableDynamicFilter } from '../../dataSelector';
|
|
3
3
|
import { type Selector, type Selectors } from '../../dataSelector';
|
|
4
4
|
export type BodyCellStyle = {
|
|
5
5
|
/**
|
|
@@ -41,8 +41,15 @@ export type BodyCellStyle = {
|
|
|
41
41
|
* operator: 'between'
|
|
42
42
|
* value: [100, 300]
|
|
43
43
|
* }
|
|
44
|
+
* @example 字段列筛选
|
|
45
|
+
* selector = {
|
|
46
|
+
* field: 'category'
|
|
47
|
+
* }
|
|
48
|
+
* selector = {
|
|
49
|
+
* field: ['category', 'profit']
|
|
50
|
+
* }
|
|
44
51
|
*/
|
|
45
|
-
selector?: Selector | Selectors;
|
|
52
|
+
selector?: Selector | Selectors | FieldSelector;
|
|
46
53
|
/**
|
|
47
54
|
* 动态筛选器(代码驱动)
|
|
48
55
|
* @description
|
|
@@ -66,7 +73,45 @@ export type BodyCellStyle = {
|
|
|
66
73
|
*/
|
|
67
74
|
backgroundColor?: string;
|
|
68
75
|
/**
|
|
69
|
-
*
|
|
76
|
+
* 是否开启背景色的色阶配置(color scale)
|
|
77
|
+
*/
|
|
78
|
+
enableBackgroundColorScale?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* 单元格背景色scale映射,优先级高于backgroundColor
|
|
81
|
+
*/
|
|
82
|
+
backgroundColorScale?: {
|
|
83
|
+
/** 最小值,不配置时默认为当前数据列中的最小值 */
|
|
84
|
+
minValue?: number;
|
|
85
|
+
/** 最大值,不配置时默认为当前数据列中的最大值 */
|
|
86
|
+
maxValue?: number;
|
|
87
|
+
/** 最小值对应的颜色 */
|
|
88
|
+
minColor: string;
|
|
89
|
+
/** 最大值对应的颜色 */
|
|
90
|
+
maxColor: string;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* 是否开启背景数据条条(一个条形柱来显示当前单元格的大小)功能,默认不开启
|
|
94
|
+
*/
|
|
95
|
+
enableProgressBar?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* 当前单元格直为正数时的背景数据条颜色
|
|
98
|
+
*/
|
|
99
|
+
barPositiveColor?: string;
|
|
100
|
+
/**
|
|
101
|
+
* 数值为负数时的背景数据条条颜色
|
|
102
|
+
*/
|
|
103
|
+
barNegativeColor?: string;
|
|
104
|
+
/**
|
|
105
|
+
* 进度条最小值
|
|
106
|
+
* @description 未配置时自动计算列的最小值
|
|
107
|
+
*/
|
|
108
|
+
barMin?: number;
|
|
109
|
+
/**
|
|
110
|
+
* 进度条最大值
|
|
111
|
+
* @description 未配置时自动计算列的最大值
|
|
112
|
+
*/
|
|
113
|
+
barMax?: number;
|
|
114
|
+
/** * 单元格文字颜色
|
|
70
115
|
*/
|
|
71
116
|
textColor?: string;
|
|
72
117
|
/**
|
|
@@ -84,6 +129,8 @@ export type BodyCellStyle = {
|
|
|
84
129
|
};
|
|
85
130
|
export declare const zBodyCellStyle: z.ZodObject<{
|
|
86
131
|
selector: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
132
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
133
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
87
134
|
field: z.ZodString;
|
|
88
135
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
89
136
|
"=": "=";
|
|
@@ -118,6 +165,8 @@ export declare const zBodyCellStyle: z.ZodObject<{
|
|
|
118
165
|
}>>>;
|
|
119
166
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
120
167
|
}, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
168
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
169
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
121
170
|
field: z.ZodString;
|
|
122
171
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
123
172
|
"=": "=";
|
|
@@ -151,12 +200,16 @@ export declare const zBodyCellStyle: z.ZodObject<{
|
|
|
151
200
|
"not in": "not in";
|
|
152
201
|
}>>>;
|
|
153
202
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
154
|
-
}, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]
|
|
203
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>>, z.ZodObject<{
|
|
204
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
205
|
+
}, z.core.$strip>]>>>;
|
|
155
206
|
dynamicFilter: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
156
207
|
type: z.ZodLiteral<"row-with-field">;
|
|
157
208
|
description: z.ZodOptional<z.ZodString>;
|
|
158
209
|
code: z.ZodString;
|
|
159
210
|
fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
211
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
212
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
160
213
|
field: z.ZodString;
|
|
161
214
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
162
215
|
"=": "=";
|
|
@@ -191,6 +244,8 @@ export declare const zBodyCellStyle: z.ZodObject<{
|
|
|
191
244
|
}>>>;
|
|
192
245
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
193
246
|
}, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
247
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
248
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
194
249
|
field: z.ZodString;
|
|
195
250
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
196
251
|
"=": "=";
|
|
@@ -234,8 +289,19 @@ export declare const zBodyCellStyle: z.ZodObject<{
|
|
|
234
289
|
}, z.core.$strip>>;
|
|
235
290
|
}, z.core.$strip>>>;
|
|
236
291
|
backgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
237
|
-
|
|
292
|
+
enableBackgroundColorScale: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
293
|
+
backgroundColorScale: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
294
|
+
minValue: z.ZodOptional<z.ZodNumber>;
|
|
295
|
+
maxValue: z.ZodOptional<z.ZodNumber>;
|
|
296
|
+
minColor: z.ZodString;
|
|
297
|
+
maxColor: z.ZodString;
|
|
298
|
+
}, z.core.$strip>>>;
|
|
238
299
|
textFontSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
239
300
|
borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
240
301
|
borderLineWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
302
|
+
enableProgressBar: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
303
|
+
barMin: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
304
|
+
barMax: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
305
|
+
barPositiveColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
306
|
+
barNegativeColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
241
307
|
}, z.core.$strip>;
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { zSelector, zSelectors, zTableDynamicFilter } from "../../dataSelector/index.js";
|
|
2
|
+
import { zFieldSelector, zSelector, zSelectors, zTableDynamicFilter } from "../../dataSelector/index.js";
|
|
3
3
|
const zBodyCellStyle = z.object({
|
|
4
4
|
selector: z.union([
|
|
5
5
|
zSelector,
|
|
6
|
-
zSelectors
|
|
6
|
+
zSelectors,
|
|
7
|
+
zFieldSelector
|
|
7
8
|
]).nullish(),
|
|
8
9
|
dynamicFilter: zTableDynamicFilter.nullish(),
|
|
9
10
|
backgroundColor: z.string().nullish(),
|
|
10
|
-
|
|
11
|
+
enableBackgroundColorScale: z.boolean().nullish(),
|
|
12
|
+
backgroundColorScale: z.object({
|
|
13
|
+
minValue: z.number().optional(),
|
|
14
|
+
maxValue: z.number().optional(),
|
|
15
|
+
minColor: z.string(),
|
|
16
|
+
maxColor: z.string()
|
|
17
|
+
}).nullish(),
|
|
11
18
|
textFontSize: z.number().nullish(),
|
|
12
19
|
borderColor: z.string().nullish(),
|
|
13
|
-
borderLineWidth: z.number().nullish()
|
|
20
|
+
borderLineWidth: z.number().nullish(),
|
|
21
|
+
enableProgressBar: z.boolean().nullish(),
|
|
22
|
+
barMin: z.number().nullish(),
|
|
23
|
+
barMax: z.number().nullish(),
|
|
24
|
+
barPositiveColor: z.string().nullish(),
|
|
25
|
+
barNegativeColor: z.string().nullish()
|
|
14
26
|
});
|
|
15
27
|
export { zBodyCellStyle };
|
|
16
28
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types/properties/cellStyle/bodyCellStyle.js","sources":["webpack://@visactor/vseed/./src/types/properties/cellStyle/bodyCellStyle.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { TableDynamicFilter } from '../../dataSelector'\nimport {
|
|
1
|
+
{"version":3,"file":"types/properties/cellStyle/bodyCellStyle.js","sources":["webpack://@visactor/vseed/./src/types/properties/cellStyle/bodyCellStyle.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FieldSelector, TableDynamicFilter } from '../../dataSelector'\nimport {\n zFieldSelector,\n zSelector,\n zSelectors,\n zTableDynamicFilter,\n type Selector,\n type Selectors,\n} from '../../dataSelector'\n\nexport type BodyCellStyle = {\n /**\n * 数据选择器\n * @description\n * 若配置selector, 提供数值 selector, 局部数据 selector, 条件维度 selector, 条件指标 selector 共四类数据匹配能力\n * 若未配置selector, 则样式全局生效.\n *\n * 注意: selector 和 dynamicFilter 不能同时使用,dynamicFilter 优先级更高\n *\n * @type {Selector | Selectors}\n * @example 数值选择器\n * selector = \"tool\"\n * selector = [\"tool\", \"book\"]\n * selector = 100\n * selector = [100, 200]\n * @example 局部数据选择器\n * selector = { profit: 100 }\n * selector = [{ profit: 100 }, { profit: 200 }]\n * @example 条件维度选择器\n * selector = {\n * field: 'category',\n * operator: 'in',\n * value: 'tool'\n * }\n * selector = {\n * field: 'category',\n * operator: 'not in',\n * value: 'book'\n * }\n * @example 条件指标选择器\n * selector = {\n * field: 'profit',\n * operator: '>=',\n * value: 100\n * }\n * selector = {\n * field: 'profit',\n * operator: 'between'\n * value: [100, 300]\n * }\n * @example 字段列筛选\n * selector = {\n * field: 'category'\n * }\n * selector = {\n * field: ['category', 'profit']\n * }\n */\n selector?: Selector | Selectors | FieldSelector\n /**\n * 动态筛选器(代码驱动)\n * @description\n * 通过 AI 生成的 JavaScript 代码实现复杂数据筛选逻辑\n * 适用于 Top N、统计分析、复杂条件等静态 selector 难以表达的场景\n *\n * 核心能力:\n * - 支持任意复杂的数据筛选条件\n * - 使用 内置工具函数 进行数据操作\n * - 在浏览器环境中安全执行(Web Worker 沙箱)\n *\n * 环境要求: 仅支持浏览器环境,Node.js 环境将使用 fallback\n *\n * 注意: selector 和 dynamicFilter 不能同时使用,dynamicFilter 优先级更高\n *\n * @type {TableDynamicFilter}\n */\n dynamicFilter?: TableDynamicFilter\n /**\n * 单元格背景色\n */\n backgroundColor?: string\n /**\n * 是否开启背景色的色阶配置(color scale)\n */\n enableBackgroundColorScale?: boolean\n /**\n * 单元格背景色scale映射,优先级高于backgroundColor\n */\n backgroundColorScale?: {\n /** 最小值,不配置时默认为当前数据列中的最小值 */\n minValue?: number\n /** 最大值,不配置时默认为当前数据列中的最大值 */\n maxValue?: number\n /** 最小值对应的颜色 */\n minColor: string\n /** 最大值对应的颜色 */\n maxColor: string\n }\n /**\n * 是否开启背景数据条条(一个条形柱来显示当前单元格的大小)功能,默认不开启\n */\n enableProgressBar?: boolean\n /**\n * 当前单元格直为正数时的背景数据条颜色\n */\n barPositiveColor?: string\n /**\n * 数值为负数时的背景数据条条颜色\n */\n barNegativeColor?: string\n /**\n * 进度条最小值\n * @description 未配置时自动计算列的最小值\n */\n barMin?: number\n /**\n * 进度条最大值\n * @description 未配置时自动计算列的最大值\n */\n barMax?: number\n /** * 单元格文字颜色\n */\n textColor?: string\n /**\n * 单元格文字大小\n */\n textFontSize?: number\n /**\n * 单元格边框颜色\n */\n borderColor?: string\n /**\n * 单元格边框线宽\n */\n borderLineWidth?: number\n}\n\nexport const zBodyCellStyle = z.object({\n selector: z.union([zSelector, zSelectors, zFieldSelector]).nullish(),\n dynamicFilter: zTableDynamicFilter.nullish(),\n backgroundColor: z.string().nullish(),\n enableBackgroundColorScale: z.boolean().nullish(),\n backgroundColorScale: z\n .object({\n minValue: z.number().optional(),\n maxValue: z.number().optional(),\n minColor: z.string(),\n maxColor: z.string(),\n })\n .nullish(),\n textFontSize: z.number().nullish(),\n borderColor: z.string().nullish(),\n borderLineWidth: z.number().nullish(),\n enableProgressBar: z.boolean().nullish(),\n barMin: z.number().nullish(),\n barMax: z.number().nullish(),\n barPositiveColor: z.string().nullish(),\n barNegativeColor: z.string().nullish(),\n})\n"],"names":["zBodyCellStyle","z","zSelector","zSelectors","zFieldSelector","zTableDynamicFilter"],"mappings":";;AA0IO,MAAMA,iBAAiBC,EAAE,MAAM,CAAC;IACrC,UAAUA,EAAE,KAAK,CAAC;QAACC;QAAWC;QAAYC;KAAe,EAAE,OAAO;IAClE,eAAeC,oBAAoB,OAAO;IAC1C,iBAAiBJ,EAAE,MAAM,GAAG,OAAO;IACnC,4BAA4BA,EAAE,OAAO,GAAG,OAAO;IAC/C,sBAAsBA,EAAAA,MACb,CAAC;QACN,UAAUA,EAAE,MAAM,GAAG,QAAQ;QAC7B,UAAUA,EAAE,MAAM,GAAG,QAAQ;QAC7B,UAAUA,EAAE,MAAM;QAClB,UAAUA,EAAE,MAAM;IACpB,GACC,OAAO;IACV,cAAcA,EAAE,MAAM,GAAG,OAAO;IAChC,aAAaA,EAAE,MAAM,GAAG,OAAO;IAC/B,iBAAiBA,EAAE,MAAM,GAAG,OAAO;IACnC,mBAAmBA,EAAE,OAAO,GAAG,OAAO;IACtC,QAAQA,EAAE,MAAM,GAAG,OAAO;IAC1B,QAAQA,EAAE,MAAM,GAAG,OAAO;IAC1B,kBAAkBA,EAAE,MAAM,GAAG,OAAO;IACpC,kBAAkBA,EAAE,MAAM,GAAG,OAAO;AACtC"}
|
|
@@ -2,6 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const zCellStyle: z.ZodObject<{
|
|
3
3
|
bodyCellStyle: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
4
4
|
selector: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
5
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
6
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5
7
|
field: z.ZodString;
|
|
6
8
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
7
9
|
"=": "=";
|
|
@@ -36,6 +38,8 @@ export declare const zCellStyle: z.ZodObject<{
|
|
|
36
38
|
}>>>;
|
|
37
39
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
38
40
|
}, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
41
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
42
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
39
43
|
field: z.ZodString;
|
|
40
44
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
41
45
|
"=": "=";
|
|
@@ -69,12 +73,16 @@ export declare const zCellStyle: z.ZodObject<{
|
|
|
69
73
|
"not in": "not in";
|
|
70
74
|
}>>>;
|
|
71
75
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
72
|
-
}, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]
|
|
76
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>>, z.ZodObject<{
|
|
77
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
78
|
+
}, z.core.$strip>]>>>;
|
|
73
79
|
dynamicFilter: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
74
80
|
type: z.ZodLiteral<"row-with-field">;
|
|
75
81
|
description: z.ZodOptional<z.ZodString>;
|
|
76
82
|
code: z.ZodString;
|
|
77
83
|
fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
84
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
85
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
78
86
|
field: z.ZodString;
|
|
79
87
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
80
88
|
"=": "=";
|
|
@@ -109,6 +117,8 @@ export declare const zCellStyle: z.ZodObject<{
|
|
|
109
117
|
}>>>;
|
|
110
118
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
111
119
|
}, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
120
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
121
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
112
122
|
field: z.ZodString;
|
|
113
123
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
114
124
|
"=": "=";
|
|
@@ -152,10 +162,21 @@ export declare const zCellStyle: z.ZodObject<{
|
|
|
152
162
|
}, z.core.$strip>>;
|
|
153
163
|
}, z.core.$strip>>>;
|
|
154
164
|
backgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
155
|
-
|
|
165
|
+
enableBackgroundColorScale: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
166
|
+
backgroundColorScale: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
167
|
+
minValue: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
maxValue: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
minColor: z.ZodString;
|
|
170
|
+
maxColor: z.ZodString;
|
|
171
|
+
}, z.core.$strip>>>;
|
|
156
172
|
textFontSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
157
173
|
borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
158
174
|
borderLineWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
175
|
+
enableProgressBar: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
176
|
+
barMin: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
177
|
+
barMax: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
178
|
+
barPositiveColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
179
|
+
barNegativeColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
159
180
|
}, z.core.$strip>>>;
|
|
160
181
|
}, z.core.$strip>;
|
|
161
182
|
export type CellStyle = z.infer<typeof zCellStyle>;
|
|
@@ -5,6 +5,8 @@ export declare const zAnnotationPointConfig: z.ZodObject<{
|
|
|
5
5
|
description: z.ZodOptional<z.ZodString>;
|
|
6
6
|
code: z.ZodString;
|
|
7
7
|
fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
8
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
9
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8
10
|
field: z.ZodString;
|
|
9
11
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
10
12
|
"=": "=";
|
|
@@ -39,6 +41,8 @@ export declare const zAnnotationPointConfig: z.ZodObject<{
|
|
|
39
41
|
}>>>;
|
|
40
42
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
41
43
|
}, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
44
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
45
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
42
46
|
field: z.ZodString;
|
|
43
47
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
44
48
|
"=": "=";
|
|
@@ -170,6 +174,8 @@ export declare const zAnnotationConfig: z.ZodObject<{
|
|
|
170
174
|
description: z.ZodOptional<z.ZodString>;
|
|
171
175
|
code: z.ZodString;
|
|
172
176
|
fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
177
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
178
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
173
179
|
field: z.ZodString;
|
|
174
180
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
175
181
|
"=": "=";
|
|
@@ -204,6 +210,8 @@ export declare const zAnnotationConfig: z.ZodObject<{
|
|
|
204
210
|
}>>>;
|
|
205
211
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
|
206
212
|
}, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
213
|
+
field: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
214
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
207
215
|
field: z.ZodString;
|
|
208
216
|
operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
209
217
|
"=": "=";
|