@platforma-sdk/ui-vue 1.91.0 → 1.92.0

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.
@@ -36,7 +36,7 @@ transforming...
36
36
  rendering chunks...
37
37
  
38
38
  [unplugin:dts] Start generate declaration files...
39
- [unplugin:dts] Declaration files built in 4666ms.
39
+ [unplugin:dts] Declaration files built in 4918ms.
40
40
  
41
41
  computing gzip size...
42
42
  dist/components/PlAnnotations/components/PlAnnotations.vue_vue_type_style_index_0_lang.css 0.04 kB │ gzip: 0.06 kB
@@ -108,7 +108,7 @@ dist/components/PlAgCellProgress/PlAgCellProgress.js
108
108
  dist/components/PlAgColumnHeader/PlAgColumnHeader.js 0.21 kB │ gzip: 0.16 kB │ map: 3.89 kB
109
109
  dist/plugins/Monetization/MonetizationSidebar.js 0.21 kB │ gzip: 0.16 kB │ map: 3.83 kB
110
110
  dist/components/PlAgDataTable/PlAgOverlayLoading.js 0.21 kB │ gzip: 0.16 kB │ map: 2.08 kB
111
- dist/components/PlDatasetSelector/PlDatasetSelector.js 0.21 kB │ gzip: 0.15 kB │ map: 6.52 kB
111
+ dist/components/PlDatasetSelector/PlDatasetSelector.js 0.21 kB │ gzip: 0.15 kB │ map: 6.53 kB
112
112
  dist/components/PlTableFastSearch/PlTableFastSearch.js 0.21 kB │ gzip: 0.16 kB │ map: 1.54 kB
113
113
  dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.js 0.22 kB │ gzip: 0.16 kB │ map: 2.05 kB
114
114
  dist/components/PlAgDataTable/sources/menu-items.js 0.23 kB │ gzip: 0.19 kB │ map: 0.48 kB
@@ -244,7 +244,7 @@ dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue_vue_
244
244
  dist/components/PlAgDataTable/compositions/useGrid.js 2.89 kB │ gzip: 1.28 kB │ map: 6.96 kB
245
245
  dist/components/PlAgDataTable/sources/row-number.js 2.99 kB │ gzip: 1.30 kB │ map: 8.15 kB
246
246
  dist/components/PlAgCsvExporter/export-csv.js 3.14 kB │ gzip: 1.40 kB │ map: 11.61 kB
247
- dist/components/PlDatasetSelector/PlDatasetSelector.vue_vue_type_script_setup_true_lang.js 3.18 kB │ gzip: 1.26 kB │ map: 8.99 kB
247
+ dist/components/PlDatasetSelector/PlDatasetSelector.vue_vue_type_script_setup_true_lang.js 3.18 kB │ gzip: 1.26 kB │ map: 9.00 kB
248
248
  dist/plugins/Monetization/LimitCard.vue_vue_type_script_setup_true_lang.js 3.28 kB │ gzip: 1.14 kB │ map: 9.80 kB
249
249
  dist/components/PlAgDataTable/PlAgDataTableSheets.vue_vue_type_script_setup_true_lang.js 3.30 kB │ gzip: 1.35 kB │ map: 7.89 kB
250
250
  dist/components/PlBlockDependencies/PlBlockDependencies.vue_vue_type_script_setup_true_lang.js 3.35 kB │ gzip: 1.42 kB │ map: 7.27 kB
@@ -267,10 +267,10 @@ dist/components/PlAdvancedFilter/PlAdvancedFilter.vue_vue_type_script_setup_true
267
267
  dist/components/PlAdvancedFilter/FilterEditor.vue_vue_type_script_setup_true_lang.js 11.71 kB │ gzip: 3.31 kB │ map: 28.56 kB
268
268
  dist/components/PlAgDataTable/PlAgDataTableV2.vue_vue_type_script_setup_true_lang.js 12.75 kB │ gzip: 4.05 kB │ map: 35.01 kB
269
269
 
270
- ✓ built in 5.43s
271
- [PLUGIN_TIMINGS] JavaScript callbacks ran for 5.4s of this 5.4s build (99%).
270
+ ✓ built in 5.74s
271
+ [PLUGIN_TIMINGS] JavaScript callbacks ran for 5.7s of this 5.7s build (99%).
272
272
  The slowest callbacks, timed inside each callback (the wait before a callback starts is excluded, the time it awaits is included):
273
- - plugin unplugin-dts buildStart (82%, 4.4s, 1 call)
273
+ - plugin unplugin-dts buildStart (81%, 4.7s, 1 call)
274
274
  Additional callback time came from the callbacks below and from callbacks under 1s.
275
275
  2 callbacks are listed without a time. Their calls overlapped, so the time inside one call includes work from other calls. To find their cost, profile the build with `node --cpu-prof`:
276
276
  - plugin sourcemaps load (144 calls)
@@ -6,5 +6,5 @@ Checking formatting...
6
6
  Checking formatting...
7
7
 
8
8
  All matched files use the correct format.
9
- Finished in 1192ms on 160 files using 16 threads.
9
+ Finished in 1259ms on 160 files using 16 threads.
10
10
  Format check completed successfully
@@ -4,5 +4,5 @@ $ ts-builder linter --check
4
4
  Linting project...
5
5
  ↳ oxlint --config /home/runner/_work/platforma/platforma/sdk/ui-vue/.oxlintrc.json --deny-warnings
6
6
  Found 0 warnings and 0 errors.
7
- Finished in 27ms on 143 files with 108 rules using 16 threads.
7
+ Finished in 26ms on 143 files with 108 rules using 16 threads.
8
8
  Linting completed successfully
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @platforma-sdk/ui-vue
2
2
 
3
+ ## 1.92.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 067b04b: A dataset's enrichment is named by its column id. `DatasetOption.enrichments` and `DatasetSelection.enrichments` hold `{ id, label }` entries (`DatasetEnrichment`), where `id` is the id of the discovered column. `tableBuilder.addColumn` / `addColumns` take a column id — a block output or a discovered column — and `{ id, label }` entries. `EnrichmentRef`, `EnrichmentStep`, `LabeledEnrichmentRef`, `createEnrichmentRef` and `isEnrichmentRef` are removed; `tableBuilder` no longer takes `{ __isEnrichment: "v1" }` maps. A dataset selection saved with enrichments in the old format has to be picked again.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [de76be5]
12
+ - Updated dependencies [067b04b]
13
+ - @platforma-sdk/model@1.92.0
14
+ - @milaboratories/pl-model-common@1.57.0
15
+ - @milaboratories/uikit@2.17.14
16
+ - @milaboratories/columns-collection-driver@0.3.1
17
+ - @milaboratories/pf-spec-driver@1.6.3
18
+
3
19
  ## 1.91.0
4
20
 
5
21
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"PlDatasetSelector.js","names":["_sfc_main","PlDatasetSelector_vue_vue_type_script_setup_true_lang_default","PlDatasetSelector_default"],"sources":["../../../src/components/PlDatasetSelector/PlDatasetSelector.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Select a dataset or one of its filters in a single dropdown, emitting a\n * {@link DatasetSelection}. Filter labels carry the dataset name as a\n * prefix (e.g. \"Bulk / Top 10\"), so no separate subtitle is rendered.\n * Enrichments from the matching `DatasetOption` are bundled into the\n * emitted value opaquely — block authors unbundle them in their args\n * resolver.\n */\nexport default {\n name: \"PlDatasetSelector\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport type {\n DatasetOption,\n DatasetSelection,\n LabeledEnrichmentRefs,\n PObjectId,\n PlRef,\n} from \"@platforma-sdk/model\";\nimport {\n createDatasetSelection,\n createGlobalPObjectId,\n createPrimaryRef,\n plRefsEqual,\n} from \"@platforma-sdk/model\";\nimport type { ListOption } from \"@milaboratories/uikit\";\nimport { PlDropdown } from \"@milaboratories/uikit\";\nimport { computed } from \"vue\";\nimport { useColumnLinksMissingValue } from \"../ValuePickers/columnLinksMissingValue\";\n\nconst slots = defineSlots<{\n tooltip?: () => unknown;\n}>();\n\nconst model = defineModel<DatasetSelection | undefined>();\n\nconst props = withDefaults(\n defineProps<{\n /** Available datasets, each optionally carrying compatible filter choices. */\n options?: Readonly<DatasetOption[]>;\n /** Label above the dropdown. */\n label?: string;\n /** Helper text below the dropdown (shown when there is no error). */\n helper?: string;\n /** Helper text shown while `options` is undefined (loading). */\n loadingOptionsHelper?: string;\n /** Error message displayed below the dropdown. */\n error?: unknown;\n /** Placeholder when nothing is selected. */\n placeholder?: string;\n /** Show a clear button. */\n clearable?: boolean;\n /** Mark the dropdown as required. */\n required?: boolean;\n /** Disable interaction. */\n disabled?: boolean;\n }>(),\n {\n options: undefined,\n label: undefined,\n helper: undefined,\n loadingOptionsHelper: undefined,\n error: undefined,\n placeholder: \"...\",\n clearable: false,\n required: false,\n disabled: false,\n },\n);\n\ntype Selection = { primary: PlRef; filter?: PlRef; enrichments?: LabeledEnrichmentRefs };\n\n// `deepEqual` (used by PlDropdown for matching) treats `{a, b: undefined}` and\n// `{a}` as different shapes, so the option list and the selection value must\n// agree on optional-key presence.\nfunction makeSelection(\n primary: PlRef,\n filter: PlRef | undefined,\n enrichments: LabeledEnrichmentRefs | undefined,\n): Selection {\n return {\n primary,\n ...(filter !== undefined && { filter }),\n ...(enrichments !== undefined && enrichments.length > 0 && { enrichments }),\n };\n}\n\nconst selectionValue = computed<Selection | undefined>(() => {\n const primary = model.value?.primary;\n if (primary === undefined) return undefined;\n // Read enrichments from the current option, not from `model.value`: the\n // stored enrichments are a snapshot at selection time and won't match\n // `dropdownOptions` after `props.options` recomputes (e.g. when the\n // result pool gains or loses an enrichment column).\n // The option's ref, not the stored one, for the same reason: a ref stored with\n // a different `requireEnrichments` flag than the options carry (e.g. saved\n // before a block changed its `buildDatasetOptions` mode) would not match any\n // option and the selection would show empty.\n const option = props.options?.find((o) => plRefsEqual(o.primary.ref, primary.column, true));\n return makeSelection(option?.primary.ref ?? primary.column, primary.filter, option?.enrichments);\n});\n\nconst dropdownOptions = computed<ListOption<Selection>[] | undefined>(() => {\n if (props.options === undefined) return undefined;\n const out: ListOption<Selection>[] = [];\n for (const o of props.options) {\n out.push({\n label: o.primary.label,\n value: makeSelection(o.primary.ref, undefined, o.enrichments),\n });\n for (const filter of o.filters ?? []) {\n out.push({\n label: filter.label,\n description: o.primary.label,\n value: makeSelection(o.primary.ref, filter.ref, o.enrichments),\n });\n }\n }\n return out;\n});\n\nconst columnLinks = useColumnLinksMissingValue();\n\n/**\n * The column a selection the options lack is shown and explained by: the dataset first, as the\n * filter of a missing dataset is missing with it, then the filter; `undefined` when the column\n * links tell nothing about either.\n */\nfunction explainedColumn(): PObjectId | undefined {\n const primary = model.value?.primary;\n if (columnLinks === undefined || primary === undefined) return undefined;\n const refs = primary.filter === undefined ? [primary.column] : [primary.column, primary.filter];\n return refs\n .map((ref) => createGlobalPObjectId(ref.blockId, ref.name))\n .find((column) => columnLinks.tooltip(column) !== undefined);\n}\n\nconst missingValueLabel = () => {\n const column = explainedColumn();\n return column === undefined ? undefined : columnLinks?.label(column);\n};\n\nconst missingValueTooltip = () => {\n const column = explainedColumn();\n return column === undefined ? undefined : columnLinks?.tooltip(column);\n};\n\nfunction onChange(selection: Selection | undefined) {\n if (selection === undefined) {\n model.value = undefined;\n return;\n }\n model.value = createDatasetSelection(\n createPrimaryRef(selection.primary, selection.filter),\n selection.enrichments,\n );\n}\n</script>\n\n<template>\n <PlDropdown\n data-testid=\"pl-dataset-selector\"\n :model-value=\"selectionValue\"\n :options=\"dropdownOptions\"\n :label=\"label\"\n :helper=\"helper\"\n :loading-options-helper=\"loadingOptionsHelper\"\n :error=\"error\"\n :placeholder=\"placeholder\"\n :clearable=\"clearable\"\n :required=\"required\"\n :disabled=\"disabled\"\n :missing-value-label=\"missingValueLabel\"\n :missing-value-tooltip=\"missingValueTooltip\"\n @update:model-value=\"onChange\"\n >\n <template v-if=\"slots.tooltip\" #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlDropdown>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PlDatasetSelector.js","names":["_sfc_main","PlDatasetSelector_vue_vue_type_script_setup_true_lang_default","PlDatasetSelector_default"],"sources":["../../../src/components/PlDatasetSelector/PlDatasetSelector.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Select a dataset or one of its filters in a single dropdown, emitting a\n * {@link DatasetSelection}. Filter labels carry the dataset name as a\n * prefix (e.g. \"Bulk / Top 10\"), so no separate subtitle is rendered.\n * Enrichments from the matching `DatasetOption` are bundled into the\n * emitted value opaquely — block authors unbundle them in their args\n * resolver.\n */\nexport default {\n name: \"PlDatasetSelector\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport type {\n DatasetEnrichment,\n DatasetOption,\n DatasetSelection,\n PObjectId,\n PlRef,\n} from \"@platforma-sdk/model\";\nimport {\n createDatasetSelection,\n createGlobalPObjectId,\n createPrimaryRef,\n plRefsEqual,\n} from \"@platforma-sdk/model\";\nimport type { ListOption } from \"@milaboratories/uikit\";\nimport { PlDropdown } from \"@milaboratories/uikit\";\nimport { computed } from \"vue\";\nimport { useColumnLinksMissingValue } from \"../ValuePickers/columnLinksMissingValue\";\n\nconst slots = defineSlots<{\n tooltip?: () => unknown;\n}>();\n\nconst model = defineModel<DatasetSelection | undefined>();\n\nconst props = withDefaults(\n defineProps<{\n /** Available datasets, each optionally carrying compatible filter choices. */\n options?: Readonly<DatasetOption[]>;\n /** Label above the dropdown. */\n label?: string;\n /** Helper text below the dropdown (shown when there is no error). */\n helper?: string;\n /** Helper text shown while `options` is undefined (loading). */\n loadingOptionsHelper?: string;\n /** Error message displayed below the dropdown. */\n error?: unknown;\n /** Placeholder when nothing is selected. */\n placeholder?: string;\n /** Show a clear button. */\n clearable?: boolean;\n /** Mark the dropdown as required. */\n required?: boolean;\n /** Disable interaction. */\n disabled?: boolean;\n }>(),\n {\n options: undefined,\n label: undefined,\n helper: undefined,\n loadingOptionsHelper: undefined,\n error: undefined,\n placeholder: \"...\",\n clearable: false,\n required: false,\n disabled: false,\n },\n);\n\ntype Selection = { primary: PlRef; filter?: PlRef; enrichments?: readonly DatasetEnrichment[] };\n\n// `deepEqual` (used by PlDropdown for matching) treats `{a, b: undefined}` and\n// `{a}` as different shapes, so the option list and the selection value must\n// agree on optional-key presence.\nfunction makeSelection(\n primary: PlRef,\n filter: PlRef | undefined,\n enrichments: readonly DatasetEnrichment[] | undefined,\n): Selection {\n return {\n primary,\n ...(filter !== undefined && { filter }),\n ...(enrichments !== undefined && enrichments.length > 0 && { enrichments }),\n };\n}\n\nconst selectionValue = computed<Selection | undefined>(() => {\n const primary = model.value?.primary;\n if (primary === undefined) return undefined;\n // Read enrichments from the current option, not from `model.value`: the\n // stored enrichments are a snapshot at selection time and won't match\n // `dropdownOptions` after `props.options` recomputes (e.g. when the\n // result pool gains or loses an enrichment column).\n // The option's ref, not the stored one, for the same reason: a ref stored with\n // a different `requireEnrichments` flag than the options carry (e.g. saved\n // before a block changed its `buildDatasetOptions` mode) would not match any\n // option and the selection would show empty.\n const option = props.options?.find((o) => plRefsEqual(o.primary.ref, primary.column, true));\n return makeSelection(option?.primary.ref ?? primary.column, primary.filter, option?.enrichments);\n});\n\nconst dropdownOptions = computed<ListOption<Selection>[] | undefined>(() => {\n if (props.options === undefined) return undefined;\n const out: ListOption<Selection>[] = [];\n for (const o of props.options) {\n out.push({\n label: o.primary.label,\n value: makeSelection(o.primary.ref, undefined, o.enrichments),\n });\n for (const filter of o.filters ?? []) {\n out.push({\n label: filter.label,\n description: o.primary.label,\n value: makeSelection(o.primary.ref, filter.ref, o.enrichments),\n });\n }\n }\n return out;\n});\n\nconst columnLinks = useColumnLinksMissingValue();\n\n/**\n * The column a selection the options lack is shown and explained by: the dataset first, as the\n * filter of a missing dataset is missing with it, then the filter; `undefined` when the column\n * links tell nothing about either.\n */\nfunction explainedColumn(): PObjectId | undefined {\n const primary = model.value?.primary;\n if (columnLinks === undefined || primary === undefined) return undefined;\n const refs = primary.filter === undefined ? [primary.column] : [primary.column, primary.filter];\n return refs\n .map((ref) => createGlobalPObjectId(ref.blockId, ref.name))\n .find((column) => columnLinks.tooltip(column) !== undefined);\n}\n\nconst missingValueLabel = () => {\n const column = explainedColumn();\n return column === undefined ? undefined : columnLinks?.label(column);\n};\n\nconst missingValueTooltip = () => {\n const column = explainedColumn();\n return column === undefined ? undefined : columnLinks?.tooltip(column);\n};\n\nfunction onChange(selection: Selection | undefined) {\n if (selection === undefined) {\n model.value = undefined;\n return;\n }\n model.value = createDatasetSelection(\n createPrimaryRef(selection.primary, selection.filter),\n selection.enrichments,\n );\n}\n</script>\n\n<template>\n <PlDropdown\n data-testid=\"pl-dataset-selector\"\n :model-value=\"selectionValue\"\n :options=\"dropdownOptions\"\n :label=\"label\"\n :helper=\"helper\"\n :loading-options-helper=\"loadingOptionsHelper\"\n :error=\"error\"\n :placeholder=\"placeholder\"\n :clearable=\"clearable\"\n :required=\"required\"\n :disabled=\"disabled\"\n :missing-value-label=\"missingValueLabel\"\n :missing-value-tooltip=\"missingValueTooltip\"\n @update:model-value=\"onChange\"\n >\n <template v-if=\"slots.tooltip\" #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlDropdown>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PlDatasetSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlDatasetSelector/PlDatasetSelector.vue"],"names":[],"mappings":"AA2LA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAIjB,MAAM,sBAAsB,CAAC;AAa9B;;;;;;;GAOG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY;IASd,8EAA8E;cACpE,QAAQ,CAAC,aAAa,EAAE,CAAC;IACnC,gCAAgC;YACxB,MAAM;IACd,qEAAqE;aAC5D,MAAM;IACf,gEAAgE;2BACzC,MAAM;IAC7B,kDAAkD;YAC1C,OAAO;IACf,4CAA4C;kBAC9B,MAAM;IACpB,2BAA2B;gBACf,OAAO;IACnB,qCAAqC;eAC1B,OAAO;IAClB,2BAA2B;eAChB,OAAO;;iBA2GT,gBAAgB,GAAG,SAAS;;;;IA5HrC,8EAA8E;cACpE,QAAQ,CAAC,aAAa,EAAE,CAAC;IACnC,gCAAgC;YACxB,MAAM;IACd,qEAAqE;aAC5D,MAAM;IACf,gEAAgE;2BACzC,MAAM;IAC7B,kDAAkD;YAC1C,OAAO;IACf,4CAA4C;kBAC9B,MAAM;IACpB,2BAA2B;gBACf,OAAO;IACnB,qCAAqC;eAC1B,OAAO;IAClB,2BAA2B;eAChB,OAAO;;iBA2GT,gBAAgB,GAAG,SAAS;;;;;WAzH7B,MAAM;aAFJ,QAAQ,CAAC,aAAa,EAAE,CAAC;YAI1B,MAAM;0BAEQ,MAAM;iBAIf,MAAM;eAER,OAAO;cAER,OAAO;cAEP,OAAO;;cAxBV,MAAM,OAAO;EA6OrB,CAAC;AAWL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"PlDatasetSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PlDatasetSelector/PlDatasetSelector.vue"],"names":[],"mappings":"AA2LA,OAAO,KAAK,EAEV,aAAa,EACb,gBAAgB,EAGjB,MAAM,sBAAsB,CAAC;AAa9B;;;;;;;GAOG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAKzC,QAAA,MAAM,YAAY;IASd,8EAA8E;cACpE,QAAQ,CAAC,aAAa,EAAE,CAAC;IACnC,gCAAgC;YACxB,MAAM;IACd,qEAAqE;aAC5D,MAAM;IACf,gEAAgE;2BACzC,MAAM;IAC7B,kDAAkD;YAC1C,OAAO;IACf,4CAA4C;kBAC9B,MAAM;IACpB,2BAA2B;gBACf,OAAO;IACnB,qCAAqC;eAC1B,OAAO;IAClB,2BAA2B;eAChB,OAAO;;iBA2GT,gBAAgB,GAAG,SAAS;;;;IA5HrC,8EAA8E;cACpE,QAAQ,CAAC,aAAa,EAAE,CAAC;IACnC,gCAAgC;YACxB,MAAM;IACd,qEAAqE;aAC5D,MAAM;IACf,gEAAgE;2BACzC,MAAM;IAC7B,kDAAkD;YAC1C,OAAO;IACf,4CAA4C;kBAC9B,MAAM;IACpB,2BAA2B;gBACf,OAAO;IACnB,qCAAqC;eAC1B,OAAO;IAClB,2BAA2B;eAChB,OAAO;;iBA2GT,gBAAgB,GAAG,SAAS;;;;;WAzH7B,MAAM;aAFJ,QAAQ,CAAC,aAAa,EAAE,CAAC;YAI1B,MAAM;0BAEQ,MAAM;iBAIf,MAAM;eAER,OAAO;cAER,OAAO;cAEP,OAAO;;cAxBV,MAAM,OAAO;EA6OrB,CAAC;AAWL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PlDatasetSelector.vue_vue_type_script_setup_true_lang.js","names":["_useSlots","_useModel","_openBlock","_createBlock","_unref","_createSlots","_withCtx","_renderSlot","PlDatasetSelector_vue_vue_type_script_setup_true_lang_default","\"modelValue\"","\"modelModifiers\"","slots","useSlots","model","useModel","__props","props","makeSelection","filter","enrichments","selectionValue","computed","primary","option","plRefsEqual","o","dropdownOptions","out","columnLinks","useColumnLinksMissingValue","explainedColumn","createGlobalPObjectId","ref","column","missingValueLabel","missingValueTooltip","onChange","selection","createDatasetSelection","createPrimaryRef","openBlock","createBlock","unref","PlDropdown","createSlots","withCtx","renderSlot","_ctx"],"sources":["../../../src/components/PlDatasetSelector/PlDatasetSelector.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Select a dataset or one of its filters in a single dropdown, emitting a\n * {@link DatasetSelection}. Filter labels carry the dataset name as a\n * prefix (e.g. \"Bulk / Top 10\"), so no separate subtitle is rendered.\n * Enrichments from the matching `DatasetOption` are bundled into the\n * emitted value opaquely — block authors unbundle them in their args\n * resolver.\n */\nexport default {\n name: \"PlDatasetSelector\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport type {\n DatasetOption,\n DatasetSelection,\n LabeledEnrichmentRefs,\n PObjectId,\n PlRef,\n} from \"@platforma-sdk/model\";\nimport {\n createDatasetSelection,\n createGlobalPObjectId,\n createPrimaryRef,\n plRefsEqual,\n} from \"@platforma-sdk/model\";\nimport type { ListOption } from \"@milaboratories/uikit\";\nimport { PlDropdown } from \"@milaboratories/uikit\";\nimport { computed } from \"vue\";\nimport { useColumnLinksMissingValue } from \"../ValuePickers/columnLinksMissingValue\";\n\nconst slots = defineSlots<{\n tooltip?: () => unknown;\n}>();\n\nconst model = defineModel<DatasetSelection | undefined>();\n\nconst props = withDefaults(\n defineProps<{\n /** Available datasets, each optionally carrying compatible filter choices. */\n options?: Readonly<DatasetOption[]>;\n /** Label above the dropdown. */\n label?: string;\n /** Helper text below the dropdown (shown when there is no error). */\n helper?: string;\n /** Helper text shown while `options` is undefined (loading). */\n loadingOptionsHelper?: string;\n /** Error message displayed below the dropdown. */\n error?: unknown;\n /** Placeholder when nothing is selected. */\n placeholder?: string;\n /** Show a clear button. */\n clearable?: boolean;\n /** Mark the dropdown as required. */\n required?: boolean;\n /** Disable interaction. */\n disabled?: boolean;\n }>(),\n {\n options: undefined,\n label: undefined,\n helper: undefined,\n loadingOptionsHelper: undefined,\n error: undefined,\n placeholder: \"...\",\n clearable: false,\n required: false,\n disabled: false,\n },\n);\n\ntype Selection = { primary: PlRef; filter?: PlRef; enrichments?: LabeledEnrichmentRefs };\n\n// `deepEqual` (used by PlDropdown for matching) treats `{a, b: undefined}` and\n// `{a}` as different shapes, so the option list and the selection value must\n// agree on optional-key presence.\nfunction makeSelection(\n primary: PlRef,\n filter: PlRef | undefined,\n enrichments: LabeledEnrichmentRefs | undefined,\n): Selection {\n return {\n primary,\n ...(filter !== undefined && { filter }),\n ...(enrichments !== undefined && enrichments.length > 0 && { enrichments }),\n };\n}\n\nconst selectionValue = computed<Selection | undefined>(() => {\n const primary = model.value?.primary;\n if (primary === undefined) return undefined;\n // Read enrichments from the current option, not from `model.value`: the\n // stored enrichments are a snapshot at selection time and won't match\n // `dropdownOptions` after `props.options` recomputes (e.g. when the\n // result pool gains or loses an enrichment column).\n // The option's ref, not the stored one, for the same reason: a ref stored with\n // a different `requireEnrichments` flag than the options carry (e.g. saved\n // before a block changed its `buildDatasetOptions` mode) would not match any\n // option and the selection would show empty.\n const option = props.options?.find((o) => plRefsEqual(o.primary.ref, primary.column, true));\n return makeSelection(option?.primary.ref ?? primary.column, primary.filter, option?.enrichments);\n});\n\nconst dropdownOptions = computed<ListOption<Selection>[] | undefined>(() => {\n if (props.options === undefined) return undefined;\n const out: ListOption<Selection>[] = [];\n for (const o of props.options) {\n out.push({\n label: o.primary.label,\n value: makeSelection(o.primary.ref, undefined, o.enrichments),\n });\n for (const filter of o.filters ?? []) {\n out.push({\n label: filter.label,\n description: o.primary.label,\n value: makeSelection(o.primary.ref, filter.ref, o.enrichments),\n });\n }\n }\n return out;\n});\n\nconst columnLinks = useColumnLinksMissingValue();\n\n/**\n * The column a selection the options lack is shown and explained by: the dataset first, as the\n * filter of a missing dataset is missing with it, then the filter; `undefined` when the column\n * links tell nothing about either.\n */\nfunction explainedColumn(): PObjectId | undefined {\n const primary = model.value?.primary;\n if (columnLinks === undefined || primary === undefined) return undefined;\n const refs = primary.filter === undefined ? [primary.column] : [primary.column, primary.filter];\n return refs\n .map((ref) => createGlobalPObjectId(ref.blockId, ref.name))\n .find((column) => columnLinks.tooltip(column) !== undefined);\n}\n\nconst missingValueLabel = () => {\n const column = explainedColumn();\n return column === undefined ? undefined : columnLinks?.label(column);\n};\n\nconst missingValueTooltip = () => {\n const column = explainedColumn();\n return column === undefined ? undefined : columnLinks?.tooltip(column);\n};\n\nfunction onChange(selection: Selection | undefined) {\n if (selection === undefined) {\n model.value = undefined;\n return;\n }\n model.value = createDatasetSelection(\n createPrimaryRef(selection.primary, selection.filter),\n selection.enrichments,\n );\n}\n</script>\n\n<template>\n <PlDropdown\n data-testid=\"pl-dataset-selector\"\n :model-value=\"selectionValue\"\n :options=\"dropdownOptions\"\n :label=\"label\"\n :helper=\"helper\"\n :loading-options-helper=\"loadingOptionsHelper\"\n :error=\"error\"\n :placeholder=\"placeholder\"\n :clearable=\"clearable\"\n :required=\"required\"\n :disabled=\"disabled\"\n :missing-value-label=\"missingValueLabel\"\n :missing-value-tooltip=\"missingValueTooltip\"\n @update:model-value=\"onChange\"\n >\n <template v-if=\"slots.tooltip\" #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlDropdown>\n</template>\n"],"mappings":";;;;;CAUE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBR,IAAMW,IAAQX,EAAA,GAIRa,IAAQZ,EAAyCc,GAAA,YAAC,GAElDC,IAAQD;EAuCd,SAASE,EACP,GACA,GACA,GACW;GACX,OAAO;IACL;IACA,GAAIC,MAAW,KAAA,KAAa,EAAE,UAAO;IACrC,GAAIC,MAAgB,KAAA,KAAaA,EAAY,SAAS,KAAK,EAAE,eAAY;GAC3E;EACF;EAEA,IAAMC,IAAiBC,QAAsC;GAC3D,IAAMC,IAAUT,EAAM,OAAO;GAC7B,IAAIS,MAAY,KAAA,GAAW;GAS3B,IAAMC,IAASP,EAAM,SAAS,MAAM,MAAMQ,EAAYC,EAAE,QAAQ,KAAKH,EAAQ,QAAQ,EAAI,CAAC;GAC1F,OAAOL,EAAcM,GAAQ,QAAQ,OAAOD,EAAQ,QAAQA,EAAQ,QAAQC,GAAQ,WAAW;EACjG,CAAC,GAEKG,IAAkBL,QAAoD;GAC1E,IAAIL,EAAM,YAAY,KAAA,GAAW;GACjC,IAAMW,IAA+B,CAAC;GACtC,KAAK,IAAMF,KAAKT,EAAM,SAAS;IAC7B,EAAI,KAAK;KACP,OAAOS,EAAE,QAAQ;KACjB,OAAOR,EAAcQ,EAAE,QAAQ,KAAK,KAAA,GAAWA,EAAE,WAAW;IAC9D,CAAC;IACD,KAAK,IAAMP,KAAUO,EAAE,WAAW,CAAC,GACjC,EAAI,KAAK;KACP,OAAOP,EAAO;KACd,aAAaO,EAAE,QAAQ;KACvB,OAAOR,EAAcQ,EAAE,QAAQ,KAAKP,EAAO,KAAKO,EAAE,WAAW;IAC/D,CAAC;GAEL;GACA,OAAOE;EACT,CAAC,GAEKC,IAAcC,EAA2B;EAO/C,SAASC,IAAyC;GAChD,IAAMR,IAAUT,EAAM,OAAO;GAC7B,IAAIe,MAAgB,KAAA,KAAaN,MAAY,KAAA,GAE7C,QADaA,EAAQ,WAAW,KAAA,IAAY,CAACA,EAAQ,MAAM,IAAI,CAACA,EAAQ,QAAQA,EAAQ,MAAM,EAAA,CAE3F,KAAK,MAAQS,EAAsBC,EAAI,SAASA,EAAI,IAAI,CAAC,CAAA,CACzD,MAAM,MAAWJ,EAAY,QAAQK,CAAM,MAAM,KAAA,CAAS;EAC/D;EAEA,IAAMC,UAA0B;GAC9B,IAAMD,IAASH,EAAgB;GAC/B,OAAOG,MAAW,KAAA,IAAY,KAAA,IAAYL,GAAa,MAAMK,CAAM;EACrE,GAEME,UAA4B;GAChC,IAAMF,IAASH,EAAgB;GAC/B,OAAOG,MAAW,KAAA,IAAY,KAAA,IAAYL,GAAa,QAAQK,CAAM;EACvE;EAEA,SAASG,EAAS,GAAkC;GAClD,AAAIC,MAAc,KAAA,IAChB,EAAM,QAAQ,KAAA,IAGhB,EAAM,QAAQC,EACZC,EAAiBF,EAAU,SAASA,EAAU,MAAM,GACpDA,EAAU,WACZ;EACF;E,kBAIEnC,EAAA,GAAAC,EAmBaC,EAAAuC,CAAA,GAAA;GAlBX,eAAY;GACX,eAAavB,EAAA;GACb,SAASM,EAAA;GACT,OAAOX,EAAA;GACP,QAAQA,EAAA;GACR,0BAAwBA,EAAA;GACxB,OAAOA,EAAA;GACP,aAAaA,EAAA;GACb,WAAWA,EAAA;GACX,UAAUA,EAAA;GACV,UAAUA,EAAA;GACV,uBAAqBmB;GACrB,yBAAuBC;GACvB,uBAAoBC;E,gBAELzB,EAAM,U;GAAU,MAAA;GAC9B,IAAAL,QAAuB,CAAvBC,EAAuBwC,EAAA,QAAA,SAAA,C"}
1
+ {"version":3,"file":"PlDatasetSelector.vue_vue_type_script_setup_true_lang.js","names":["_useSlots","_useModel","_openBlock","_createBlock","_unref","_createSlots","_withCtx","_renderSlot","PlDatasetSelector_vue_vue_type_script_setup_true_lang_default","\"modelValue\"","\"modelModifiers\"","slots","useSlots","model","useModel","__props","props","makeSelection","filter","enrichments","selectionValue","computed","primary","option","plRefsEqual","o","dropdownOptions","out","columnLinks","useColumnLinksMissingValue","explainedColumn","createGlobalPObjectId","ref","column","missingValueLabel","missingValueTooltip","onChange","selection","createDatasetSelection","createPrimaryRef","openBlock","createBlock","unref","PlDropdown","createSlots","withCtx","renderSlot","_ctx"],"sources":["../../../src/components/PlDatasetSelector/PlDatasetSelector.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Select a dataset or one of its filters in a single dropdown, emitting a\n * {@link DatasetSelection}. Filter labels carry the dataset name as a\n * prefix (e.g. \"Bulk / Top 10\"), so no separate subtitle is rendered.\n * Enrichments from the matching `DatasetOption` are bundled into the\n * emitted value opaquely — block authors unbundle them in their args\n * resolver.\n */\nexport default {\n name: \"PlDatasetSelector\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport type {\n DatasetEnrichment,\n DatasetOption,\n DatasetSelection,\n PObjectId,\n PlRef,\n} from \"@platforma-sdk/model\";\nimport {\n createDatasetSelection,\n createGlobalPObjectId,\n createPrimaryRef,\n plRefsEqual,\n} from \"@platforma-sdk/model\";\nimport type { ListOption } from \"@milaboratories/uikit\";\nimport { PlDropdown } from \"@milaboratories/uikit\";\nimport { computed } from \"vue\";\nimport { useColumnLinksMissingValue } from \"../ValuePickers/columnLinksMissingValue\";\n\nconst slots = defineSlots<{\n tooltip?: () => unknown;\n}>();\n\nconst model = defineModel<DatasetSelection | undefined>();\n\nconst props = withDefaults(\n defineProps<{\n /** Available datasets, each optionally carrying compatible filter choices. */\n options?: Readonly<DatasetOption[]>;\n /** Label above the dropdown. */\n label?: string;\n /** Helper text below the dropdown (shown when there is no error). */\n helper?: string;\n /** Helper text shown while `options` is undefined (loading). */\n loadingOptionsHelper?: string;\n /** Error message displayed below the dropdown. */\n error?: unknown;\n /** Placeholder when nothing is selected. */\n placeholder?: string;\n /** Show a clear button. */\n clearable?: boolean;\n /** Mark the dropdown as required. */\n required?: boolean;\n /** Disable interaction. */\n disabled?: boolean;\n }>(),\n {\n options: undefined,\n label: undefined,\n helper: undefined,\n loadingOptionsHelper: undefined,\n error: undefined,\n placeholder: \"...\",\n clearable: false,\n required: false,\n disabled: false,\n },\n);\n\ntype Selection = { primary: PlRef; filter?: PlRef; enrichments?: readonly DatasetEnrichment[] };\n\n// `deepEqual` (used by PlDropdown for matching) treats `{a, b: undefined}` and\n// `{a}` as different shapes, so the option list and the selection value must\n// agree on optional-key presence.\nfunction makeSelection(\n primary: PlRef,\n filter: PlRef | undefined,\n enrichments: readonly DatasetEnrichment[] | undefined,\n): Selection {\n return {\n primary,\n ...(filter !== undefined && { filter }),\n ...(enrichments !== undefined && enrichments.length > 0 && { enrichments }),\n };\n}\n\nconst selectionValue = computed<Selection | undefined>(() => {\n const primary = model.value?.primary;\n if (primary === undefined) return undefined;\n // Read enrichments from the current option, not from `model.value`: the\n // stored enrichments are a snapshot at selection time and won't match\n // `dropdownOptions` after `props.options` recomputes (e.g. when the\n // result pool gains or loses an enrichment column).\n // The option's ref, not the stored one, for the same reason: a ref stored with\n // a different `requireEnrichments` flag than the options carry (e.g. saved\n // before a block changed its `buildDatasetOptions` mode) would not match any\n // option and the selection would show empty.\n const option = props.options?.find((o) => plRefsEqual(o.primary.ref, primary.column, true));\n return makeSelection(option?.primary.ref ?? primary.column, primary.filter, option?.enrichments);\n});\n\nconst dropdownOptions = computed<ListOption<Selection>[] | undefined>(() => {\n if (props.options === undefined) return undefined;\n const out: ListOption<Selection>[] = [];\n for (const o of props.options) {\n out.push({\n label: o.primary.label,\n value: makeSelection(o.primary.ref, undefined, o.enrichments),\n });\n for (const filter of o.filters ?? []) {\n out.push({\n label: filter.label,\n description: o.primary.label,\n value: makeSelection(o.primary.ref, filter.ref, o.enrichments),\n });\n }\n }\n return out;\n});\n\nconst columnLinks = useColumnLinksMissingValue();\n\n/**\n * The column a selection the options lack is shown and explained by: the dataset first, as the\n * filter of a missing dataset is missing with it, then the filter; `undefined` when the column\n * links tell nothing about either.\n */\nfunction explainedColumn(): PObjectId | undefined {\n const primary = model.value?.primary;\n if (columnLinks === undefined || primary === undefined) return undefined;\n const refs = primary.filter === undefined ? [primary.column] : [primary.column, primary.filter];\n return refs\n .map((ref) => createGlobalPObjectId(ref.blockId, ref.name))\n .find((column) => columnLinks.tooltip(column) !== undefined);\n}\n\nconst missingValueLabel = () => {\n const column = explainedColumn();\n return column === undefined ? undefined : columnLinks?.label(column);\n};\n\nconst missingValueTooltip = () => {\n const column = explainedColumn();\n return column === undefined ? undefined : columnLinks?.tooltip(column);\n};\n\nfunction onChange(selection: Selection | undefined) {\n if (selection === undefined) {\n model.value = undefined;\n return;\n }\n model.value = createDatasetSelection(\n createPrimaryRef(selection.primary, selection.filter),\n selection.enrichments,\n );\n}\n</script>\n\n<template>\n <PlDropdown\n data-testid=\"pl-dataset-selector\"\n :model-value=\"selectionValue\"\n :options=\"dropdownOptions\"\n :label=\"label\"\n :helper=\"helper\"\n :loading-options-helper=\"loadingOptionsHelper\"\n :error=\"error\"\n :placeholder=\"placeholder\"\n :clearable=\"clearable\"\n :required=\"required\"\n :disabled=\"disabled\"\n :missing-value-label=\"missingValueLabel\"\n :missing-value-tooltip=\"missingValueTooltip\"\n @update:model-value=\"onChange\"\n >\n <template v-if=\"slots.tooltip\" #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlDropdown>\n</template>\n"],"mappings":";;;;;CAUE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBR,IAAMW,IAAQX,EAAA,GAIRa,IAAQZ,EAAyCc,GAAA,YAAC,GAElDC,IAAQD;EAuCd,SAASE,EACP,GACA,GACA,GACW;GACX,OAAO;IACL;IACA,GAAIC,MAAW,KAAA,KAAa,EAAE,UAAO;IACrC,GAAIC,MAAgB,KAAA,KAAaA,EAAY,SAAS,KAAK,EAAE,eAAY;GAC3E;EACF;EAEA,IAAMC,IAAiBC,QAAsC;GAC3D,IAAMC,IAAUT,EAAM,OAAO;GAC7B,IAAIS,MAAY,KAAA,GAAW;GAS3B,IAAMC,IAASP,EAAM,SAAS,MAAM,MAAMQ,EAAYC,EAAE,QAAQ,KAAKH,EAAQ,QAAQ,EAAI,CAAC;GAC1F,OAAOL,EAAcM,GAAQ,QAAQ,OAAOD,EAAQ,QAAQA,EAAQ,QAAQC,GAAQ,WAAW;EACjG,CAAC,GAEKG,IAAkBL,QAAoD;GAC1E,IAAIL,EAAM,YAAY,KAAA,GAAW;GACjC,IAAMW,IAA+B,CAAC;GACtC,KAAK,IAAMF,KAAKT,EAAM,SAAS;IAC7B,EAAI,KAAK;KACP,OAAOS,EAAE,QAAQ;KACjB,OAAOR,EAAcQ,EAAE,QAAQ,KAAK,KAAA,GAAWA,EAAE,WAAW;IAC9D,CAAC;IACD,KAAK,IAAMP,KAAUO,EAAE,WAAW,CAAC,GACjC,EAAI,KAAK;KACP,OAAOP,EAAO;KACd,aAAaO,EAAE,QAAQ;KACvB,OAAOR,EAAcQ,EAAE,QAAQ,KAAKP,EAAO,KAAKO,EAAE,WAAW;IAC/D,CAAC;GAEL;GACA,OAAOE;EACT,CAAC,GAEKC,IAAcC,EAA2B;EAO/C,SAASC,IAAyC;GAChD,IAAMR,IAAUT,EAAM,OAAO;GAC7B,IAAIe,MAAgB,KAAA,KAAaN,MAAY,KAAA,GAE7C,QADaA,EAAQ,WAAW,KAAA,IAAY,CAACA,EAAQ,MAAM,IAAI,CAACA,EAAQ,QAAQA,EAAQ,MAAM,EAAA,CAE3F,KAAK,MAAQS,EAAsBC,EAAI,SAASA,EAAI,IAAI,CAAC,CAAA,CACzD,MAAM,MAAWJ,EAAY,QAAQK,CAAM,MAAM,KAAA,CAAS;EAC/D;EAEA,IAAMC,UAA0B;GAC9B,IAAMD,IAASH,EAAgB;GAC/B,OAAOG,MAAW,KAAA,IAAY,KAAA,IAAYL,GAAa,MAAMK,CAAM;EACrE,GAEME,UAA4B;GAChC,IAAMF,IAASH,EAAgB;GAC/B,OAAOG,MAAW,KAAA,IAAY,KAAA,IAAYL,GAAa,QAAQK,CAAM;EACvE;EAEA,SAASG,EAAS,GAAkC;GAClD,AAAIC,MAAc,KAAA,IAChB,EAAM,QAAQ,KAAA,IAGhB,EAAM,QAAQC,EACZC,EAAiBF,EAAU,SAASA,EAAU,MAAM,GACpDA,EAAU,WACZ;EACF;E,kBAIEnC,EAAA,GAAAC,EAmBaC,EAAAuC,CAAA,GAAA;GAlBX,eAAY;GACX,eAAavB,EAAA;GACb,SAASM,EAAA;GACT,OAAOX,EAAA;GACP,QAAQA,EAAA;GACR,0BAAwBA,EAAA;GACxB,OAAOA,EAAA;GACP,aAAaA,EAAA;GACb,WAAWA,EAAA;GACX,UAAUA,EAAA;GACV,UAAUA,EAAA;GACV,uBAAqBmB;GACrB,yBAAuBC;GACvB,uBAAoBC;E,gBAELzB,EAAM,U;GAAU,MAAA;GAC9B,IAAAL,QAAuB,CAAvBC,EAAuBwC,EAAA,QAAA,SAAA,C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-sdk/ui-vue",
3
- "version": "1.91.0",
3
+ "version": "1.92.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -11,11 +11,11 @@
11
11
  }
12
12
  },
13
13
  "dependencies": {
14
- "@milaboratories/columns-collection-driver": "0.3.0",
15
- "@milaboratories/pf-spec-driver": "1.6.2",
16
- "@milaboratories/pl-model-common": "1.56.0",
17
- "@milaboratories/uikit": "2.17.13",
18
- "@platforma-sdk/model": "1.91.0",
14
+ "@milaboratories/columns-collection-driver": "0.3.1",
15
+ "@milaboratories/pf-spec-driver": "1.6.3",
16
+ "@milaboratories/pl-model-common": "1.57.0",
17
+ "@milaboratories/uikit": "2.17.14",
18
+ "@platforma-sdk/model": "1.92.0",
19
19
  "@types/d3-format": "^3.0.4",
20
20
  "@types/node": "~24.19.2",
21
21
  "@types/semver": "^7.7.0",
@@ -14,9 +14,9 @@ export default {
14
14
 
15
15
  <script lang="ts" setup>
16
16
  import type {
17
+ DatasetEnrichment,
17
18
  DatasetOption,
18
19
  DatasetSelection,
19
- LabeledEnrichmentRefs,
20
20
  PObjectId,
21
21
  PlRef,
22
22
  } from "@platforma-sdk/model";
@@ -71,7 +71,7 @@ const props = withDefaults(
71
71
  },
72
72
  );
73
73
 
74
- type Selection = { primary: PlRef; filter?: PlRef; enrichments?: LabeledEnrichmentRefs };
74
+ type Selection = { primary: PlRef; filter?: PlRef; enrichments?: readonly DatasetEnrichment[] };
75
75
 
76
76
  // `deepEqual` (used by PlDropdown for matching) treats `{a, b: undefined}` and
77
77
  // `{a}` as different shapes, so the option list and the selection value must
@@ -79,7 +79,7 @@ type Selection = { primary: PlRef; filter?: PlRef; enrichments?: LabeledEnrichme
79
79
  function makeSelection(
80
80
  primary: PlRef,
81
81
  filter: PlRef | undefined,
82
- enrichments: LabeledEnrichmentRefs | undefined,
82
+ enrichments: readonly DatasetEnrichment[] | undefined,
83
83
  ): Selection {
84
84
  return {
85
85
  primary,
@@ -1,6 +1,12 @@
1
1
  import { flushPromises, mount } from "@vue/test-utils";
2
- import type { DatasetOption, DatasetSelection } from "@platforma-sdk/model";
3
- import { createDatasetSelection, createPlRef, createPrimaryRef } from "@platforma-sdk/model";
2
+ import type { DatasetEnrichment, DatasetOption, DatasetSelection } from "@platforma-sdk/model";
3
+ import {
4
+ createColumnDiscoveredId,
5
+ createDatasetSelection,
6
+ createGlobalPObjectId,
7
+ createPlRef,
8
+ createPrimaryRef,
9
+ } from "@platforma-sdk/model";
4
10
  import { describe, expect, it } from "vitest";
5
11
  import PlDatasetSelector from "../PlDatasetSelector.vue";
6
12
 
@@ -9,10 +15,14 @@ const datasetB = createPlRef("2", "out-b", true);
9
15
  const filterA1 = createPlRef("1", "filter-a1");
10
16
  const filterA2 = createPlRef("1", "filter-a2");
11
17
 
12
- import type { PObjectId } from "@platforma-sdk/model";
13
- const enrichmentA = "enrichment-a" as PObjectId;
14
- const enrichmentsA = [
15
- { ref: { __isEnrichment: "v1" as const, hit: enrichmentA }, label: "Enrichment A" },
18
+ const enrichmentsA: DatasetEnrichment[] = [
19
+ {
20
+ id: createColumnDiscoveredId({
21
+ column: createGlobalPObjectId("3", "enrichment-a"),
22
+ path: [{ type: "linker", column: createGlobalPObjectId("3", "linker-a") }],
23
+ }),
24
+ label: "Enrichment A",
25
+ },
16
26
  ];
17
27
 
18
28
  const optionsWithFilters: DatasetOption[] = [