@platforma-sdk/model 1.65.9 → 1.66.2

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.
Files changed (121) hide show
  1. package/dist/block_model.cjs +8 -11
  2. package/dist/block_model.cjs.map +1 -1
  3. package/dist/block_model.d.ts.map +1 -1
  4. package/dist/block_model.js +8 -10
  5. package/dist/block_model.js.map +1 -1
  6. package/dist/columns/column_collection_builder.cjs +61 -74
  7. package/dist/columns/column_collection_builder.cjs.map +1 -1
  8. package/dist/columns/column_collection_builder.d.ts +16 -22
  9. package/dist/columns/column_collection_builder.d.ts.map +1 -1
  10. package/dist/columns/column_collection_builder.js +62 -75
  11. package/dist/columns/column_collection_builder.js.map +1 -1
  12. package/dist/columns/column_selector.cjs.map +1 -1
  13. package/dist/columns/column_selector.d.ts +1 -1
  14. package/dist/columns/column_selector.js.map +1 -1
  15. package/dist/columns/column_snapshot.cjs.map +1 -1
  16. package/dist/columns/column_snapshot.d.ts +4 -4
  17. package/dist/columns/column_snapshot.d.ts.map +1 -1
  18. package/dist/columns/column_snapshot.js.map +1 -1
  19. package/dist/columns/ctx_column_sources.cjs.map +1 -1
  20. package/dist/columns/ctx_column_sources.d.ts +1 -1
  21. package/dist/columns/ctx_column_sources.d.ts.map +1 -1
  22. package/dist/columns/ctx_column_sources.js.map +1 -1
  23. package/dist/components/PlDataTable/createPlDataTable/createPTableDefV2.cjs +2 -2
  24. package/dist/components/PlDataTable/createPlDataTable/createPTableDefV2.cjs.map +1 -1
  25. package/dist/components/PlDataTable/createPlDataTable/createPTableDefV2.js +2 -2
  26. package/dist/components/PlDataTable/createPlDataTable/createPTableDefV2.js.map +1 -1
  27. package/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.cjs +17 -18
  28. package/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.cjs.map +1 -1
  29. package/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.js +17 -18
  30. package/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.js.map +1 -1
  31. package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.cjs +99 -91
  32. package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.cjs.map +1 -1
  33. package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.d.ts +16 -16
  34. package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.d.ts.map +1 -1
  35. package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.js +102 -94
  36. package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.js.map +1 -1
  37. package/dist/components/PlDataTable/createPlDataTable/discoverColumns.cjs +32 -23
  38. package/dist/components/PlDataTable/createPlDataTable/discoverColumns.cjs.map +1 -1
  39. package/dist/components/PlDataTable/createPlDataTable/discoverColumns.d.ts +5 -5
  40. package/dist/components/PlDataTable/createPlDataTable/discoverColumns.d.ts.map +1 -1
  41. package/dist/components/PlDataTable/createPlDataTable/discoverColumns.js +33 -24
  42. package/dist/components/PlDataTable/createPlDataTable/discoverColumns.js.map +1 -1
  43. package/dist/components/PlDataTable/createPlDataTable/index.cjs.map +1 -1
  44. package/dist/components/PlDataTable/createPlDataTable/index.d.ts +2 -3
  45. package/dist/components/PlDataTable/createPlDataTable/index.d.ts.map +1 -1
  46. package/dist/components/PlDataTable/createPlDataTable/index.js.map +1 -1
  47. package/dist/components/PlDataTable/createPlDataTable/utils.cjs +133 -16
  48. package/dist/components/PlDataTable/createPlDataTable/utils.cjs.map +1 -1
  49. package/dist/components/PlDataTable/createPlDataTable/utils.d.ts +8 -6
  50. package/dist/components/PlDataTable/createPlDataTable/utils.d.ts.map +1 -1
  51. package/dist/components/PlDataTable/createPlDataTable/utils.js +130 -17
  52. package/dist/components/PlDataTable/createPlDataTable/utils.js.map +1 -1
  53. package/dist/components/PlDataTable/labels.cjs +1 -2
  54. package/dist/components/PlDataTable/labels.cjs.map +1 -1
  55. package/dist/components/PlDataTable/labels.js +1 -2
  56. package/dist/components/PlDataTable/labels.js.map +1 -1
  57. package/dist/filters/distill.cjs +73 -30
  58. package/dist/filters/distill.cjs.map +1 -1
  59. package/dist/filters/distill.d.ts.map +1 -1
  60. package/dist/filters/distill.js +73 -30
  61. package/dist/filters/distill.js.map +1 -1
  62. package/dist/index.cjs +19 -15
  63. package/dist/index.d.ts +4 -2
  64. package/dist/index.js +6 -4
  65. package/dist/labels/derive_distinct_tooltips.cjs +85 -0
  66. package/dist/labels/derive_distinct_tooltips.cjs.map +1 -0
  67. package/dist/labels/derive_distinct_tooltips.d.ts +17 -0
  68. package/dist/labels/derive_distinct_tooltips.d.ts.map +1 -0
  69. package/dist/labels/derive_distinct_tooltips.js +84 -0
  70. package/dist/labels/derive_distinct_tooltips.js.map +1 -0
  71. package/dist/labels/index.cjs +1 -0
  72. package/dist/labels/index.d.ts +2 -1
  73. package/dist/labels/index.js +1 -0
  74. package/dist/package.cjs +1 -1
  75. package/dist/package.js +1 -1
  76. package/dist/render/api.cjs +8 -13
  77. package/dist/render/api.cjs.map +1 -1
  78. package/dist/render/api.d.ts +8 -11
  79. package/dist/render/api.d.ts.map +1 -1
  80. package/dist/render/api.js +8 -13
  81. package/dist/render/api.js.map +1 -1
  82. package/dist/services/get_services.cjs +19 -0
  83. package/dist/services/get_services.cjs.map +1 -0
  84. package/dist/services/get_services.d.ts +7 -0
  85. package/dist/services/get_services.d.ts.map +1 -0
  86. package/dist/services/get_services.js +19 -0
  87. package/dist/services/get_services.js.map +1 -0
  88. package/dist/services/index.cjs +1 -0
  89. package/dist/services/index.d.ts +2 -1
  90. package/dist/services/index.js +1 -0
  91. package/dist/services/service_bridge.cjs +4 -4
  92. package/dist/services/service_bridge.cjs.map +1 -1
  93. package/dist/services/service_bridge.d.ts +4 -4
  94. package/dist/services/service_bridge.d.ts.map +1 -1
  95. package/dist/services/service_bridge.js +4 -4
  96. package/dist/services/service_bridge.js.map +1 -1
  97. package/package.json +6 -6
  98. package/src/block_model.ts +8 -11
  99. package/src/columns/column_collection_builder.test.ts +75 -30
  100. package/src/columns/column_collection_builder.ts +96 -133
  101. package/src/columns/column_selector.ts +1 -1
  102. package/src/columns/column_snapshot.ts +7 -4
  103. package/src/columns/ctx_column_sources.ts +1 -3
  104. package/src/components/PFrameForGraphs.test.ts +4 -4
  105. package/src/components/PlDataTable/createPlDataTable/createPTableDefV2.ts +2 -2
  106. package/src/components/PlDataTable/createPlDataTable/createPTableDefV3.ts +44 -21
  107. package/src/components/PlDataTable/createPlDataTable/createPlDataTableV3.ts +202 -218
  108. package/src/components/PlDataTable/createPlDataTable/discoverColumns.ts +69 -56
  109. package/src/components/PlDataTable/createPlDataTable/index.ts +6 -7
  110. package/src/components/PlDataTable/createPlDataTable/utils.test.ts +97 -1
  111. package/src/components/PlDataTable/createPlDataTable/utils.ts +190 -35
  112. package/src/components/PlDataTable/labels.ts +3 -7
  113. package/src/filters/distill.test.ts +91 -0
  114. package/src/filters/distill.ts +102 -46
  115. package/src/labels/derive_distinct_tooltips.test.ts +233 -0
  116. package/src/labels/derive_distinct_tooltips.ts +130 -0
  117. package/src/labels/index.ts +1 -0
  118. package/src/render/api.ts +15 -50
  119. package/src/services/get_services.ts +28 -0
  120. package/src/services/index.ts +1 -0
  121. package/src/services/service_bridge.ts +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"distill.js","names":[],"sources":["../../src/filters/distill.ts"],"sourcesContent":["import { DistributiveKeys, UnionToTuples } from \"@milaboratories/helpers\";\nimport {\n RootFilterSpec,\n type FilterSpec,\n type FilterSpecLeaf,\n} from \"@milaboratories/pl-model-common\";\nimport { traverseFilterSpec } from \"./traverse\";\nimport { InferFilterSpecLeaf } from \"@milaboratories/pl-model-common\";\nimport { isEmpty } from \"es-toolkit/compat\";\n\n/** All possible field names that can appear in any FilterSpecLeaf variant. */\ntype FilterSpecLeafKey = DistributiveKeys<FilterSpecLeaf<string>>;\n\n/** Compile-time check: every key in the tuple is a valid leaf key (via satisfies). */\nconst KNOWN_LEAF_KEYS_TUPLE: UnionToTuples<FilterSpecLeafKey> = [\n \"n\",\n \"x\",\n \"rhs\",\n \"type\",\n \"value\",\n \"column\",\n \"minDiff\",\n \"maxEdits\",\n \"wildcard\",\n \"replacement\",\n \"substitutionsOnly\",\n];\nconst KNOWN_LEAF_KEYS: Set<FilterSpecLeafKey> = new Set(KNOWN_LEAF_KEYS_TUPLE);\n\n/** Returns true if the leaf is filled type is defined and no required fields are undefined. */\nfunction isFilledLeaf<T>(node: FilterSpecLeaf<T>): boolean {\n if (node.type == null) return false;\n return !Object.values(node).some((value) => {\n switch (typeof value) {\n case \"number\":\n case \"boolean\":\n return false;\n case \"string\":\n return value.trim() === \"\";\n default: // undefined, null, empty objects/arrays\n return isEmpty(value);\n }\n });\n}\n\nfunction distillLeaf<T>(node: FilterSpecLeaf<T>): FilterSpecLeaf<T> {\n const result: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(node)) {\n if (KNOWN_LEAF_KEYS.has(key as FilterSpecLeafKey)) {\n result[key] = value;\n }\n }\n return result as FilterSpecLeaf<T>;\n}\n\n/**\n * Strips non-FilterSpec metadata (whitelist approach) and removes\n * unfilled leaves (type is undefined or any required field is undefined).\n */\nexport function distillFilterSpec<\n FS extends FilterSpec<FilterSpecLeaf<unknown>, unknown, unknown>,\n R extends FS extends RootFilterSpec<FilterSpecLeaf<unknown>, unknown, unknown>\n ? RootFilterSpec<InferFilterSpecLeaf<FS>>\n : FilterSpec<InferFilterSpecLeaf<FS>>,\n>(filter: null | undefined | FS): null | R {\n if (filter == null) return null;\n return traverseFilterSpec<FS, null | R>(filter, {\n leaf: (leaf) => {\n const distilled = distillLeaf(leaf);\n return isFilledLeaf(distilled) ? (distilled as R) : null;\n },\n and: (results) => {\n const filtered = results.filter((f): f is NonNullable<typeof f> => f !== null);\n return filtered.length === 0 ? null : ({ type: \"and\", filters: filtered } as R);\n },\n or: (results) => {\n const filtered = results.filter((f): f is NonNullable<typeof f> => f !== null);\n return filtered.length === 0 ? null : ({ type: \"or\", filters: filtered } as R);\n },\n not: (result) => (result === null ? null : ({ type: \"not\", filter: result } as R)),\n });\n}\n"],"mappings":";;;AA2BA,MAAM,kBAA0C,IAAI,IAbY;CAC9D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAC6E;;AAG9E,SAAS,aAAgB,MAAkC;AACzD,KAAI,KAAK,QAAQ,KAAM,QAAO;AAC9B,QAAO,CAAC,OAAO,OAAO,KAAK,CAAC,MAAM,UAAU;AAC1C,UAAQ,OAAO,OAAf;GACE,KAAK;GACL,KAAK,UACH,QAAO;GACT,KAAK,SACH,QAAO,MAAM,MAAM,KAAK;GAC1B,QACE,QAAO,QAAQ,MAAM;;GAEzB;;AAGJ,SAAS,YAAe,MAA4C;CAClE,MAAM,SAAkC,EAAE;AAC1C,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,KAAK,CAC7C,KAAI,gBAAgB,IAAI,IAAyB,CAC/C,QAAO,OAAO;AAGlB,QAAO;;;;;;AAOT,SAAgB,kBAKd,QAAyC;AACzC,KAAI,UAAU,KAAM,QAAO;AAC3B,QAAO,mBAAiC,QAAQ;EAC9C,OAAO,SAAS;GACd,MAAM,YAAY,YAAY,KAAK;AACnC,UAAO,aAAa,UAAU,GAAI,YAAkB;;EAEtD,MAAM,YAAY;GAChB,MAAM,WAAW,QAAQ,QAAQ,MAAkC,MAAM,KAAK;AAC9E,UAAO,SAAS,WAAW,IAAI,OAAQ;IAAE,MAAM;IAAO,SAAS;IAAU;;EAE3E,KAAK,YAAY;GACf,MAAM,WAAW,QAAQ,QAAQ,MAAkC,MAAM,KAAK;AAC9E,UAAO,SAAS,WAAW,IAAI,OAAQ;IAAE,MAAM;IAAM,SAAS;IAAU;;EAE1E,MAAM,WAAY,WAAW,OAAO,OAAQ;GAAE,MAAM;GAAO,QAAQ;GAAQ;EAC5E,CAAC"}
1
+ {"version":3,"file":"distill.js","names":[],"sources":["../../src/filters/distill.ts"],"sourcesContent":["import { DistributiveKeys, isNil, UnionToTuples } from \"@milaboratories/helpers\";\nimport {\n RootFilterSpec,\n type FilterSpec,\n type FilterSpecLeaf,\n} from \"@milaboratories/pl-model-common\";\nimport { traverseFilterSpec } from \"./traverse\";\nimport { InferFilterSpecLeaf } from \"@milaboratories/pl-model-common\";\nimport { isEmpty } from \"es-toolkit/compat\";\n\n/**\n * Strips non-FilterSpec metadata (whitelist approach) and removes\n * unfilled leaves (type is undefined or any required field is undefined).\n */\nexport function distillFilterSpec<\n FS extends FilterSpec<FilterSpecLeaf<unknown>, unknown, unknown>,\n R extends FS extends RootFilterSpec<FilterSpecLeaf<unknown>, unknown, unknown>\n ? RootFilterSpec<InferFilterSpecLeaf<FS>>\n : FilterSpec<InferFilterSpecLeaf<FS>>,\n>(filter: null | undefined | FS): null | R {\n if (filter == null) return null;\n return traverseFilterSpec<FS, null | R>(filter, {\n leaf: (leaf) => {\n const distilled = distillLeaf(leaf);\n return isFilledLeaf(distilled) ? (distilled as R) : null;\n },\n and: (results) => {\n const filtered = results.filter((f): f is NonNullable<typeof f> => f !== null);\n return filtered.length === 0 ? null : ({ type: \"and\", filters: filtered } as R);\n },\n or: (results) => {\n const filtered = results.filter((f): f is NonNullable<typeof f> => f !== null);\n return filtered.length === 0 ? null : ({ type: \"or\", filters: filtered } as R);\n },\n not: (result) => (result === null ? null : ({ type: \"not\", filter: result } as R)),\n });\n}\n\nfunction distillLeaf<T>(node: FilterSpecLeaf<T>): FilterSpecLeaf<T> {\n const result: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(node)) {\n if (KNOWN_LEAF_KEYS.has(key as FilterSpecLeafKey)) {\n result[key] = value;\n }\n }\n return result as FilterSpecLeaf<T>;\n}\n\n/** Returns true if the leaf is filled type is defined and every required field per-type is filled. */\nfunction isFilledLeaf<T>(node: FilterSpecLeaf<T>): boolean {\n if (isNil(node.type)) return false;\n const required = REQUIRED_KEYS_BY_TYPE[node.type];\n const record = node as Record<string, unknown>;\n return required.every((key) => isFilledValue(record[key]));\n}\n\n/**\n * Returns true if the value is considered \"filled\":\n * - primitives (number, boolean): always true\n * - string: non-empty after trim\n * - array: non-empty AND every item is filled\n * - plain object: non-empty AND every field value is filled\n * - null/undefined: false\n */\nfunction isFilledValue(value: unknown): boolean {\n if (isNil(value)) return false;\n switch (typeof value) {\n case \"number\":\n case \"boolean\":\n return true;\n case \"string\":\n return value.trim() !== \"\";\n default:\n if (isEmpty(value)) return false;\n if (Array.isArray(value)) return value.every(isFilledValue);\n return Object.values(value as Record<string, unknown>).every(isFilledValue);\n }\n}\n\n/** All possible field names that can appear in any FilterSpecLeaf variant. */\ntype FilterSpecLeafKey = DistributiveKeys<FilterSpecLeaf<string>>;\n\n/** Leaf type discriminators (excludes the placeholder `undefined` variant). */\ntype FilterSpecLeafType = Exclude<FilterSpecLeaf<unknown>, { type: undefined }>[\"type\"];\n\ntype LeafOfType<T extends FilterSpecLeafType> = Extract<FilterSpecLeaf<unknown>, { type: T }>;\n\ntype RequiredKeys<O> = { [K in keyof O]-?: {} extends Pick<O, K> ? never : K }[keyof O];\n\n/** Required field keys of a given leaf variant (excluding the `type` discriminator). */\ntype RequiredLeafKeys<T extends FilterSpecLeafType> = Exclude<RequiredKeys<LeafOfType<T>>, \"type\">;\n\n/** Exact per-type shape — adding a key not required by that variant becomes a type error. */\ntype RequiredKeysByType = { readonly [T in FilterSpecLeafType]: readonly RequiredLeafKeys<T>[] };\n\n/** Compile-time check: every key in the tuple is a valid leaf key (via satisfies). */\nconst KNOWN_LEAF_KEYS_TUPLE: UnionToTuples<FilterSpecLeafKey> = [\n \"n\",\n \"x\",\n \"rhs\",\n \"type\",\n \"value\",\n \"column\",\n \"minDiff\",\n \"maxEdits\",\n \"wildcard\",\n \"replacement\",\n \"substitutionsOnly\",\n];\nconst KNOWN_LEAF_KEYS: Set<FilterSpecLeafKey> = new Set(KNOWN_LEAF_KEYS_TUPLE);\n\n/** Required fields per leaf type. Optional fields (e.g. minDiff, maxEdits) excluded. */\nconst REQUIRED_KEYS_BY_TYPE = {\n isNA: [\"column\"],\n isNotNA: [\"column\"],\n ifNa: [\"column\", \"replacement\"],\n patternEquals: [\"column\", \"value\"],\n patternNotEquals: [\"column\", \"value\"],\n patternContainSubsequence: [\"column\", \"value\"],\n patternNotContainSubsequence: [\"column\", \"value\"],\n patternMatchesRegularExpression: [\"column\", \"value\"],\n patternFuzzyContainSubsequence: [\"column\", \"value\"],\n inSet: [\"column\", \"value\"],\n notInSet: [\"column\", \"value\"],\n topN: [\"column\", \"n\"],\n bottomN: [\"column\", \"n\"],\n equal: [\"column\", \"x\"],\n notEqual: [\"column\", \"x\"],\n lessThan: [\"column\", \"x\"],\n greaterThan: [\"column\", \"x\"],\n lessThanOrEqual: [\"column\", \"x\"],\n greaterThanOrEqual: [\"column\", \"x\"],\n equalToColumn: [\"column\", \"rhs\"],\n lessThanColumn: [\"column\", \"rhs\"],\n greaterThanColumn: [\"column\", \"rhs\"],\n lessThanColumnOrEqual: [\"column\", \"rhs\"],\n greaterThanColumnOrEqual: [\"column\", \"rhs\"],\n} as const satisfies RequiredKeysByType;\n"],"mappings":";;;;;;;;AAcA,SAAgB,kBAKd,QAAyC;AACzC,KAAI,UAAU,KAAM,QAAO;AAC3B,QAAO,mBAAiC,QAAQ;EAC9C,OAAO,SAAS;GACd,MAAM,YAAY,YAAY,KAAK;AACnC,UAAO,aAAa,UAAU,GAAI,YAAkB;;EAEtD,MAAM,YAAY;GAChB,MAAM,WAAW,QAAQ,QAAQ,MAAkC,MAAM,KAAK;AAC9E,UAAO,SAAS,WAAW,IAAI,OAAQ;IAAE,MAAM;IAAO,SAAS;IAAU;;EAE3E,KAAK,YAAY;GACf,MAAM,WAAW,QAAQ,QAAQ,MAAkC,MAAM,KAAK;AAC9E,UAAO,SAAS,WAAW,IAAI,OAAQ;IAAE,MAAM;IAAM,SAAS;IAAU;;EAE1E,MAAM,WAAY,WAAW,OAAO,OAAQ;GAAE,MAAM;GAAO,QAAQ;GAAQ;EAC5E,CAAC;;AAGJ,SAAS,YAAe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B,UAAU,CAAC,UAAU,IAAI;CACzB,UAAU,CAAC,UAAU,IAAI;CACzB,aAAa,CAAC,UAAU,IAAI;CAC5B,iBAAiB,CAAC,UAAU,IAAI;CAChC,oBAAoB,CAAC,UAAU,IAAI;CACnC,eAAe,CAAC,UAAU,MAAM;CAChC,gBAAgB,CAAC,UAAU,MAAM;CACjC,mBAAmB,CAAC,UAAU,MAAM;CACpC,uBAAuB,CAAC,UAAU,MAAM;CACxC,0BAA0B,CAAC,UAAU,MAAM;CAC5C"}
package/dist/index.cjs CHANGED
@@ -14,6 +14,10 @@ const require_derive_distinct_labels = require("./labels/derive_distinct_labels.
14
14
  const require_label = require("./render/util/label.cjs");
15
15
  const require_pcolumn_data = require("./render/util/pcolumn_data.cjs");
16
16
  const require_column_collection = require("./render/util/column_collection.cjs");
17
+ const require_block_services = require("./services/block_services.cjs");
18
+ const require_service_bridge = require("./services/service_bridge.cjs");
19
+ const require_get_services = require("./services/get_services.cjs");
20
+ require("./services/index.cjs");
17
21
  const require_api = require("./render/api.cjs");
18
22
  require("./render/index.cjs");
19
23
  const require_version = require("./version.cjs");
@@ -21,7 +25,6 @@ const require_types = require("./bconfig/types.cjs");
21
25
  const require_normalization = require("./bconfig/normalization.cjs");
22
26
  require("./bconfig/index.cjs");
23
27
  const require_block_model_legacy = require("./block_model_legacy.cjs");
24
- const require_block_services = require("./services/block_services.cjs");
25
28
  const require_plugin_model = require("./plugin_model.cjs");
26
29
  const require_block_model = require("./block_model.cjs");
27
30
  const require_axes = require("./pframe_utils/axes.cjs");
@@ -41,11 +44,12 @@ const require_column_collection_builder = require("./columns/column_collection_b
41
44
  const require_ctx_column_sources = require("./columns/ctx_column_sources.cjs");
42
45
  const require_expand_by_partition = require("./columns/expand_by_partition.cjs");
43
46
  require("./columns/index.cjs");
47
+ const require_derive_distinct_tooltips = require("./labels/derive_distinct_tooltips.cjs");
44
48
  const require_utils = require("./components/PlDataTable/createPlDataTable/utils.cjs");
45
49
  const require_createPlDataTableV2 = require("./components/PlDataTable/createPlDataTable/createPlDataTableV2.cjs");
46
50
  const require_discoverColumns = require("./components/PlDataTable/createPlDataTable/discoverColumns.cjs");
47
51
  const require_createPlDataTableV3 = require("./components/PlDataTable/createPlDataTable/createPlDataTableV3.cjs");
48
- const require_index$5 = require("./components/PlDataTable/createPlDataTable/index.cjs");
52
+ const require_index$6 = require("./components/PlDataTable/createPlDataTable/index.cjs");
49
53
  const require_PlMultiSequenceAlignment = require("./components/PlMultiSequenceAlignment.cjs");
50
54
  const require_PlSelectionModel = require("./components/PlSelectionModel.cjs");
51
55
  require("./components/index.cjs");
@@ -55,9 +59,7 @@ const require_ref_util = require("./ref_util.cjs");
55
59
  const require_raw_globals = require("./raw_globals.cjs");
56
60
  const require_converter = require("./annotations/converter.cjs");
57
61
  require("./annotations/index.cjs");
58
- const require_index$9 = require("./pframe_utils/index.cjs");
59
- const require_service_bridge = require("./services/service_bridge.cjs");
60
- require("./services/index.cjs");
62
+ const require_index$10 = require("./pframe_utils/index.cjs");
61
63
  const require_env_value = require("./env_value.cjs");
62
64
  exports.Args = require_actions.Args;
63
65
  exports.ArrayColumnProvider = require_column_snapshot_provider.ArrayColumnProvider;
@@ -125,9 +127,8 @@ exports.convertRelaxedColumnSelectorToMultiColumnSelector = require_column_selec
125
127
  exports.createBlockStorage = require_block_storage.createBlockStorage;
126
128
  exports.createColumnSnapshot = require_column_snapshot.createColumnSnapshot;
127
129
  exports.createDefaultPTableParams = require_state_migration.createDefaultPTableParams;
128
- exports.createNodeServiceProxy = require_service_bridge.createNodeServiceProxy;
129
130
  exports.createPFrameForGraphs = require_PFrameForGraphs.createPFrameForGraphs;
130
- exports.createPlDataTable = require_index$5.createPlDataTable;
131
+ exports.createPlDataTable = require_index$6.createPlDataTable;
131
132
  exports.createPlDataTableSheet = require_createPlDataTableSheet.createPlDataTableSheet;
132
133
  exports.createPlDataTableStateV2 = require_state_migration.createPlDataTableStateV2;
133
134
  exports.createPlDataTableV2 = require_createPlDataTableV2.createPlDataTableV2;
@@ -135,8 +136,10 @@ exports.createPlDataTableV3 = require_createPlDataTableV3.createPlDataTableV3;
135
136
  exports.createPlSelectionModel = require_PlSelectionModel.createPlSelectionModel;
136
137
  exports.createReadyColumnData = require_column_snapshot.createReadyColumnData;
137
138
  exports.createRowSelectionColumn = require_PlMultiSequenceAlignment.createRowSelectionColumn;
139
+ exports.createServiceProxy = require_service_bridge.createServiceProxy;
138
140
  exports.deriveDataFromStorage = require_block_storage.deriveDataFromStorage;
139
141
  exports.deriveDistinctLabels = require_derive_distinct_labels.deriveDistinctLabels;
142
+ exports.deriveDistinctTooltips = require_derive_distinct_tooltips.deriveDistinctTooltips;
140
143
  exports.deriveLabels = require_label.deriveLabels;
141
144
  exports.discoverTableColumnSnaphots = require_discoverColumns.discoverTableColumnSnaphots;
142
145
  exports.distillFilterSpec = require_distill.distillFilterSpec;
@@ -152,14 +155,14 @@ exports.fromPlOption = require_ref_util.fromPlOption;
152
155
  exports.fromPlRef = require_ref_util.fromPlRef;
153
156
  exports.getAllRelatedColumns = require_columns.getAllRelatedColumns;
154
157
  exports.getAvailableWithLinkersAxes = require_axes.getAvailableWithLinkersAxes;
155
- exports.getAxisUniqueValues = require_index$9.getAxisUniqueValues;
158
+ exports.getAxisUniqueValues = require_index$10.getAxisUniqueValues;
156
159
  exports.getBlobContent = require_actions.getBlobContent;
157
160
  exports.getBlobContentAsJson = require_actions.getBlobContentAsJson;
158
161
  exports.getBlobContentAsString = require_actions.getBlobContentAsString;
159
- exports.getColumnOrAxisValueLabelsId = require_index$9.getColumnOrAxisValueLabelsId;
160
- exports.getColumnSpecById = require_index$9.getColumnSpecById;
161
- exports.getColumnUniqueValues = require_index$9.getColumnUniqueValues;
162
- exports.getColumnsFull = require_index$9.getColumnsFull;
162
+ exports.getColumnOrAxisValueLabelsId = require_index$10.getColumnOrAxisValueLabelsId;
163
+ exports.getColumnSpecById = require_index$10.getColumnSpecById;
164
+ exports.getColumnUniqueValues = require_index$10.getColumnUniqueValues;
165
+ exports.getColumnsFull = require_index$10.getColumnsFull;
163
166
  exports.getDownloadedBlobContent = require_actions.getDownloadedBlobContent;
164
167
  exports.getEffectiveVisibility = require_utils.getEffectiveVisibility;
165
168
  exports.getEnvironmentValue = require_env_value.getEnvironmentValue;
@@ -178,13 +181,14 @@ exports.getProgressLog = require_actions.getProgressLog;
178
181
  exports.getProgressLogWithInfo = require_actions.getProgressLogWithInfo;
179
182
  exports.getRawPlatformaInstance = require_raw_globals.getRawPlatformaInstance;
180
183
  exports.getRelatedColumns = require_columns.getRelatedColumns;
181
- exports.getRequestColumnsFromSelectedSources = require_index$9.getRequestColumnsFromSelectedSources;
184
+ exports.getRequestColumnsFromSelectedSources = require_index$10.getRequestColumnsFromSelectedSources;
182
185
  exports.getResourceField = require_actions.getResourceField;
183
186
  exports.getResourceValueAsJson = require_actions.getResourceValueAsJson;
184
- exports.getSingleColumnData = require_index$9.getSingleColumnData;
187
+ exports.getService = require_get_services.getService;
188
+ exports.getSingleColumnData = require_index$10.getSingleColumnData;
185
189
  exports.getStorageData = require_block_storage.getStorageData;
186
190
  exports.getUniquePartitionKeys = require_pcolumn_data.getUniquePartitionKeys;
187
- exports.getUniqueSourceValuesWithLabels = require_index$9.getUniqueSourceValuesWithLabels;
191
+ exports.getUniqueSourceValuesWithLabels = require_index$10.getUniqueSourceValuesWithLabels;
188
192
  exports.ifDef = require_accessor.ifDef;
189
193
  exports.isBlockStorage = require_block_storage.isBlockStorage;
190
194
  exports.isColumnHidden = require_utils.isColumnHidden;
package/dist/index.d.ts CHANGED
@@ -61,12 +61,14 @@ import { getEffectiveVisibility, getOrderPriority, isColumnHidden, isColumnOptio
61
61
  import { PTableKey, PlSelectionModel, createPlSelectionModel } from "./components/PlSelectionModel.js";
62
62
  import { PColumnPredicate, PlMultiSequenceAlignmentColorSchemeOption, PlMultiSequenceAlignmentModel, PlMultiSequenceAlignmentSettings, PlMultiSequenceAlignmentWidget, createRowSelectionColumn } from "./components/PlMultiSequenceAlignment.js";
63
63
  import { PFrameImpl } from "./pframe.js";
64
+ import { TooltipEntry, deriveDistinctTooltips } from "./labels/derive_distinct_tooltips.js";
64
65
  import { fromPlOption, fromPlRef } from "./ref_util.js";
65
66
  import { getPlatformaApiVersion, getRawPlatformaInstance } from "./raw_globals.js";
66
67
  import { getAllRelatedColumns, getRelatedColumns } from "./pframe_utils/columns.js";
67
68
  import { getAxisUniqueValues, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getRequestColumnsFromSelectedSources, getSingleColumnData, getUniqueSourceValuesWithLabels } from "./pframe_utils/index.js";
68
- import { NodeServiceProxy, buildServices, createNodeServiceProxy } from "./services/service_bridge.js";
69
+ import { ServiceProxy, buildServices, createServiceProxy } from "./services/service_bridge.js";
70
+ import { getService } from "./services/get_services.js";
69
71
  import { getEnvironmentValue } from "./env_value.js";
70
72
  export * from "@milaboratories/pl-model-common";
71
73
  export * from "@milaboratories/pl-error-like";
72
- export { ActAnd, ActExtractArchiveAndGetURL, ActFlatten, ActGetBlobContent, ActGetBlobContentAsJson, ActGetBlobContentAsString, ActGetDownloadedBlobContent, ActGetField, ActGetFromCtx, ActGetImmediate, ActGetLastLogs, ActGetLogHandle, ActGetOnDemandBlobContent, ActGetProgressLog, ActGetProgressLogWithInfo, ActGetResourceField, ActGetResourceValueAsJson, ActImportProgress, ActIsEmpty, ActIsolate, ActMakeArray, ActMakeObject, ActMapArrayValues, ActMapRecordValues, ActMapResourceFields, ActNot, ActOr, ActionResult, AnchorEntry, AnchoredBuildOptions, AnchoredColumnCollection, AnchoredFindColumnsOptions, AndFilter, AnnotationFilter, AnnotationMode, AnnotationScript, AnnotationScript2, AnnotationScriptUi, AnnotationSpec, AnnotationSpecUi, AnnotationStep, AnnotationStepUi, AnyForm, Args, ArrayColumnProvider, AxesVault, AxisLabelProvider, BLOCK_SERVICE_FLAGS, BLOCK_STORAGE_FACADE_VERSION, BlockApiV1, BlockApiV2, BlockConfig, BlockConfigV3, BlockConfigV4, BlockDefaultModelServices, BlockDefaultUiServices, BlockModel, BlockModelInfo, BlockModelV3, BlockRenderCtx, BlockServiceFlags, BlockStatePatch, type BlockStorage, BlockStorageFacade, BlockStorageFacadeCallbacks, BlockStorageFacadeHandles, type BlockStorageSchemaVersion, BuildOptions, CancelSubscription, Cfg, CfgAnd, CfgBlobContent, CfgBlobContentAsJson, CfgBlobContentAsString, CfgDownloadedBlobContent, CfgExtractArchiveAndGetURL, CfgFlatten, CfgGetFromCtx, CfgGetJsonField, CfgGetResourceField, CfgImmediate, CfgImportProgress, CfgIsEmpty, CfgIsolate, CfgLastLogs, CfgLogHandle, CfgMakeArray, CfgMakeObject, CfgMapArrayValues, CfgMapRecordValues, CfgMapResourceFields, CfgNot, CfgOnDemandBlobContent, CfgOr, CfgProgressLog, CfgProgressLogWithInfo, CfgRenderingMode, CfgResourceValueAsJson, Checked, ColumnCollection, ColumnCollectionBuilder, ColumnData, ColumnDataStatus, ColumnMatch, ColumnMatcher, ColumnOrderRule, ColumnProvider, ColumnSelector, ColumnSnapshot, ColumnSnapshotProvider, ColumnSource, ColumnVisibilityRule, ColumnsDisplayOptions, ColumnsSelectorConfig, CommonFieldTraverseOps, CommonTraversalOps, ConfAction, ConfigRenderLambda, ConfigRenderLambdaFlags, ConfigResult, CurrentSdkInfo, DataModel, DataModelBuilder, DeriveHref, DeriveLabelsOptions, Entry, ExpandByPartitionOpts, ExpandByPartitionResult, ExpressionSpec, ExtractAction, ExtractFunctionHandleReturn, ExtractFutureRefType, FieldTraversalStep, FieldType, FilterSpec, FilterSpecLeaf, FilterSpecNode, FilterSpecOfType, FilterSpecType, FilterSpecUi, FilterUi, FilterUiOfType, FilterUiType, FindColumnsOptions, FormField, FutureRef, GetFieldStep, InferArgsType, InferBlockState, InferBlockStatePatch, InferDataType, InferFactoryData, InferFactoryModelServices, InferFactoryOutputs, InferFactoryParams, InferFactoryUiServices, InferHrefType, InferOutputType, InferOutputsFromConfigs, InferOutputsFromLambdas, InferOutputsType, InferPluginData, InferPluginHandle, InferPluginHandles, InferPluginNames, InferRenderFunctionReturn, InferUiState, InferVarTypeSafe, IsNA, It, internal_d_exports as JsRenderInternal, DeriveLabelsOptions as LabelDerivationOps, Log10, MainOutputs, MatchQualifications, MatchVariant, MatchingMode, type MigrateBlockStorageConfig, type MigrationFailure, type MigrationResult, type MigrationSuccess, ModelServices, type MutateStoragePayload, NodeServiceProxy, NotFilter, NumericalComparisonFilter, OptionalPlResourceEntry, OrFilter, OutputColumnProvider, OutputColumnProviderOpts, OutputError, PColumnCollection, PColumnDataUniversal, PColumnEntryUniversal, PColumnEntryWithLabel, PColumnKeyList, PColumnLazyUniversal, PColumnLazyWithLabel, PColumnPredicate, PColumnResourceMapData, PColumnResourceMapEntry, PFrameImpl, POCExtractAction, PTableKey, PTableParamsV2, type ParamsInput, Patch, PatternFilter, PatternPredicate, PatternPredicateContainSubsequence, PatternPredicateEquals, PlDataTableFilterMeta, PlDataTableFilterSpecLeaf, PlDataTableFilters, PlDataTableFiltersWithMeta, PlDataTableGridStateCore, PlDataTableModel, PlDataTableSheet, PlDataTableSheetState, PlDataTableStateV2, PlDataTableStateV2CacheEntry, PlDataTableStateV2Normalized, PlMultiSequenceAlignmentColorSchemeOption, PlMultiSequenceAlignmentModel, PlMultiSequenceAlignmentSettings, PlMultiSequenceAlignmentWidget, PlResourceEntry, PlSelectionModel, PlTableColumnId, PlTableColumnIdJson, Platforma, PlatformaApiVersion, PlatformaExtended, PlatformaFactory, PlatformaSDKVersion, PlatformaV1, PlatformaV2, PlatformaV3, type PluginConfig, type PluginData, PluginDataModel, PluginDataModelBuilder, type PluginDataModelVersions, type PluginFactory, PluginFactoryLike, PluginHandle, PluginInstance, PluginModel, type PluginName, type PluginOutputs, type PluginParams, type PluginRecord, type PluginRegistry, PluginRenderCtx, PrimitiveOrConfig, PrimitiveToCfg, RT_BINARY_PARTITIONED, RT_BINARY_SUPER_PARTITIONED, RT_JSON_PARTITIONED, RT_JSON_SUPER_PARTITIONED, RT_PARQUET_PARTITIONED, RT_PARQUET_SUPER_PARTITIONED, RT_RESOURCE_MAP, RT_RESOURCE_MAP_PARTITIONED, RelaxedAxisSelector, RelaxedColumnSelector, RelaxedRecord, RelaxedStringMatchers, RenderCtx, RenderCtxBase, RenderCtxLegacy, RenderFunction, RenderFunctionLegacy, ResolveCfgType, ResolveModelServices, ResolveUiServices, ResourceTraversalOps, ResourceType, ResultPool, ResultPoolColumnSnapshotProvider, SdkInfo, SimplifiedPColumnSpec, SimplifiedUniversalPColumnEntry, SnapshotColumnProvider, SortedCumulativeSum, Entry as SpecExtractorResult, SplitAxis, StagingOutputs, StdCtx, StdCtxArgsOnly, StringMatcher, Trace, TraceEntry, TransformedColumn, TreeNodeAccessor, TypeField, TypeFieldRecord, TypeForm, TypeToLiteral, TypedConfig, TypedConfigOrConfigLambda, TypedConfigOrString, UiServices, UiState, Unionize, UniversalColumnOption, UnwrapFutureRef, ValueRank, type VersionedData, allPColumnsReady, and, blockServiceNames, buildServices, collectCtxColumnSnapshotProviders, compileAnnotationScript, compileFilter, compileFilters, convertColumnSelectorToMultiColumnSelector, convertFilterSpecsToExpressionSpecs, convertFilterUiToExpressionImpl, convertFilterUiToExpressions, convertOrParsePColumnData, convertRelaxedAxisSelectorToMultiAxisSelector, convertRelaxedColumnSelectorToMultiColumnSelector, createBlockStorage, createColumnSnapshot, createDefaultPTableParams, createNodeServiceProxy, createPFrameForGraphs, createPlDataTable, createPlDataTableOptionsV3, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createReadyColumnData, createRowSelectionColumn, deriveDataFromStorage, deriveDistinctLabels, deriveLabels, discoverTableColumnSnaphots, distillFilterSpec, downgradeCfgOrLambda, enrichCompatible, expandByPartition, extractArchiveAndGetURL, extractConfig, filterDataInfoEntries, filterSpecToSpecQueryExpr, flatten, fromPlOption, fromPlRef, getAllRelatedColumns, getAvailableWithLinkersAxes, getAxisUniqueValues, getBlobContent, getBlobContentAsJson, getBlobContentAsString, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getDownloadedBlobContent, getEffectiveVisibility, getEnvironmentValue, getFromCfg, getImmediate, getImportProgress, getJsonField, getLastLogs, getLogHandle, getOnDemandBlobContent, getOrderPriority, getPartitionKeysList, getPlatformaApiVersion, getPluginData, getProgressLog, getProgressLogWithInfo, getRawPlatformaInstance, getRelatedColumns, getRequestColumnsFromSelectedSources, getResourceField, getResourceValueAsJson, getSingleColumnData, getStorageData, getUniquePartitionKeys, getUniqueSourceValuesWithLabels, ifDef, isBlockStorage, isColumnHidden, isColumnOptional, isColumnSnapshotProvider, isConfigLambda, isEmpty, isHiddenFromGraphColumn, isHiddenFromUIColumn, isPColumnReady, isPluginOutputKey, isolate, makeArray, makeObject, mapArrayValues, mapRecordValues, mapResourceFields, migrateBlockStorage, normalizeBlockStorage, not, or, parsePColumnData, parseResourceMap, pluginOutputKey, pluginOutputPrefix, readOutput, registerFacadeCallbacks, toColumnSnapshotProvider, unreachable, updateStorageData, upgradePlDataTableStateV2, wrapOutputs };
74
+ export { ActAnd, ActExtractArchiveAndGetURL, ActFlatten, ActGetBlobContent, ActGetBlobContentAsJson, ActGetBlobContentAsString, ActGetDownloadedBlobContent, ActGetField, ActGetFromCtx, ActGetImmediate, ActGetLastLogs, ActGetLogHandle, ActGetOnDemandBlobContent, ActGetProgressLog, ActGetProgressLogWithInfo, ActGetResourceField, ActGetResourceValueAsJson, ActImportProgress, ActIsEmpty, ActIsolate, ActMakeArray, ActMakeObject, ActMapArrayValues, ActMapRecordValues, ActMapResourceFields, ActNot, ActOr, ActionResult, AnchorEntry, AnchoredBuildOptions, AnchoredColumnCollection, AnchoredFindColumnsOptions, AndFilter, AnnotationFilter, AnnotationMode, AnnotationScript, AnnotationScript2, AnnotationScriptUi, AnnotationSpec, AnnotationSpecUi, AnnotationStep, AnnotationStepUi, AnyForm, Args, ArrayColumnProvider, AxesVault, AxisLabelProvider, BLOCK_SERVICE_FLAGS, BLOCK_STORAGE_FACADE_VERSION, BlockApiV1, BlockApiV2, BlockConfig, BlockConfigV3, BlockConfigV4, BlockDefaultModelServices, BlockDefaultUiServices, BlockModel, BlockModelInfo, BlockModelV3, BlockRenderCtx, BlockServiceFlags, BlockStatePatch, type BlockStorage, BlockStorageFacade, BlockStorageFacadeCallbacks, BlockStorageFacadeHandles, type BlockStorageSchemaVersion, BuildOptions, CancelSubscription, Cfg, CfgAnd, CfgBlobContent, CfgBlobContentAsJson, CfgBlobContentAsString, CfgDownloadedBlobContent, CfgExtractArchiveAndGetURL, CfgFlatten, CfgGetFromCtx, CfgGetJsonField, CfgGetResourceField, CfgImmediate, CfgImportProgress, CfgIsEmpty, CfgIsolate, CfgLastLogs, CfgLogHandle, CfgMakeArray, CfgMakeObject, CfgMapArrayValues, CfgMapRecordValues, CfgMapResourceFields, CfgNot, CfgOnDemandBlobContent, CfgOr, CfgProgressLog, CfgProgressLogWithInfo, CfgRenderingMode, CfgResourceValueAsJson, Checked, ColumnCollection, ColumnCollectionBuilder, ColumnData, ColumnDataStatus, ColumnMatch, ColumnMatcher, ColumnOrderRule, ColumnProvider, ColumnSelector, ColumnSnapshot, ColumnSnapshotProvider, ColumnSource, ColumnVisibilityRule, ColumnsDisplayOptions, ColumnsSelectorConfig, CommonFieldTraverseOps, CommonTraversalOps, ConfAction, ConfigRenderLambda, ConfigRenderLambdaFlags, ConfigResult, CurrentSdkInfo, DataModel, DataModelBuilder, DeriveHref, DeriveLabelsOptions, Entry, ExpandByPartitionOpts, ExpandByPartitionResult, ExpressionSpec, ExtractAction, ExtractFunctionHandleReturn, ExtractFutureRefType, FieldTraversalStep, FieldType, FilterSpec, FilterSpecLeaf, FilterSpecNode, FilterSpecOfType, FilterSpecType, FilterSpecUi, FilterUi, FilterUiOfType, FilterUiType, FindColumnsOptions, FormField, FutureRef, GetFieldStep, InferArgsType, InferBlockState, InferBlockStatePatch, InferDataType, InferFactoryData, InferFactoryModelServices, InferFactoryOutputs, InferFactoryParams, InferFactoryUiServices, InferHrefType, InferOutputType, InferOutputsFromConfigs, InferOutputsFromLambdas, InferOutputsType, InferPluginData, InferPluginHandle, InferPluginHandles, InferPluginNames, InferRenderFunctionReturn, InferUiState, InferVarTypeSafe, IsNA, It, internal_d_exports as JsRenderInternal, DeriveLabelsOptions as LabelDerivationOps, Log10, MainOutputs, MatchQualifications, MatchVariant, MatchingMode, type MigrateBlockStorageConfig, type MigrationFailure, type MigrationResult, type MigrationSuccess, ModelServices, type MutateStoragePayload, NotFilter, NumericalComparisonFilter, OptionalPlResourceEntry, OrFilter, OutputColumnProvider, OutputColumnProviderOpts, OutputError, PColumnCollection, PColumnDataUniversal, PColumnEntryUniversal, PColumnEntryWithLabel, PColumnKeyList, PColumnLazyUniversal, PColumnLazyWithLabel, PColumnPredicate, PColumnResourceMapData, PColumnResourceMapEntry, PFrameImpl, POCExtractAction, PTableKey, PTableParamsV2, type ParamsInput, Patch, PatternFilter, PatternPredicate, PatternPredicateContainSubsequence, PatternPredicateEquals, PlDataTableFilterMeta, PlDataTableFilterSpecLeaf, PlDataTableFilters, PlDataTableFiltersWithMeta, PlDataTableGridStateCore, PlDataTableModel, PlDataTableSheet, PlDataTableSheetState, PlDataTableStateV2, PlDataTableStateV2CacheEntry, PlDataTableStateV2Normalized, PlMultiSequenceAlignmentColorSchemeOption, PlMultiSequenceAlignmentModel, PlMultiSequenceAlignmentSettings, PlMultiSequenceAlignmentWidget, PlResourceEntry, PlSelectionModel, PlTableColumnId, PlTableColumnIdJson, Platforma, PlatformaApiVersion, PlatformaExtended, PlatformaFactory, PlatformaSDKVersion, PlatformaV1, PlatformaV2, PlatformaV3, type PluginConfig, type PluginData, PluginDataModel, PluginDataModelBuilder, type PluginDataModelVersions, type PluginFactory, PluginFactoryLike, PluginHandle, PluginInstance, PluginModel, type PluginName, type PluginOutputs, type PluginParams, type PluginRecord, type PluginRegistry, PluginRenderCtx, PrimitiveOrConfig, PrimitiveToCfg, RT_BINARY_PARTITIONED, RT_BINARY_SUPER_PARTITIONED, RT_JSON_PARTITIONED, RT_JSON_SUPER_PARTITIONED, RT_PARQUET_PARTITIONED, RT_PARQUET_SUPER_PARTITIONED, RT_RESOURCE_MAP, RT_RESOURCE_MAP_PARTITIONED, RelaxedAxisSelector, RelaxedColumnSelector, RelaxedRecord, RelaxedStringMatchers, RenderCtx, RenderCtxBase, RenderCtxLegacy, RenderFunction, RenderFunctionLegacy, ResolveCfgType, ResolveModelServices, ResolveUiServices, ResourceTraversalOps, ResourceType, ResultPool, ResultPoolColumnSnapshotProvider, SdkInfo, ServiceProxy, SimplifiedPColumnSpec, SimplifiedUniversalPColumnEntry, SnapshotColumnProvider, SortedCumulativeSum, Entry as SpecExtractorResult, SplitAxis, StagingOutputs, StdCtx, StdCtxArgsOnly, StringMatcher, TooltipEntry, Trace, TraceEntry, TransformedColumn, TreeNodeAccessor, TypeField, TypeFieldRecord, TypeForm, TypeToLiteral, TypedConfig, TypedConfigOrConfigLambda, TypedConfigOrString, UiServices, UiState, Unionize, UniversalColumnOption, UnwrapFutureRef, ValueRank, type VersionedData, allPColumnsReady, and, blockServiceNames, buildServices, collectCtxColumnSnapshotProviders, compileAnnotationScript, compileFilter, compileFilters, convertColumnSelectorToMultiColumnSelector, convertFilterSpecsToExpressionSpecs, convertFilterUiToExpressionImpl, convertFilterUiToExpressions, convertOrParsePColumnData, convertRelaxedAxisSelectorToMultiAxisSelector, convertRelaxedColumnSelectorToMultiColumnSelector, createBlockStorage, createColumnSnapshot, createDefaultPTableParams, createPFrameForGraphs, createPlDataTable, createPlDataTableOptionsV3, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createReadyColumnData, createRowSelectionColumn, createServiceProxy, deriveDataFromStorage, deriveDistinctLabels, deriveDistinctTooltips, deriveLabels, discoverTableColumnSnaphots, distillFilterSpec, downgradeCfgOrLambda, enrichCompatible, expandByPartition, extractArchiveAndGetURL, extractConfig, filterDataInfoEntries, filterSpecToSpecQueryExpr, flatten, fromPlOption, fromPlRef, getAllRelatedColumns, getAvailableWithLinkersAxes, getAxisUniqueValues, getBlobContent, getBlobContentAsJson, getBlobContentAsString, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getDownloadedBlobContent, getEffectiveVisibility, getEnvironmentValue, getFromCfg, getImmediate, getImportProgress, getJsonField, getLastLogs, getLogHandle, getOnDemandBlobContent, getOrderPriority, getPartitionKeysList, getPlatformaApiVersion, getPluginData, getProgressLog, getProgressLogWithInfo, getRawPlatformaInstance, getRelatedColumns, getRequestColumnsFromSelectedSources, getResourceField, getResourceValueAsJson, getService, getSingleColumnData, getStorageData, getUniquePartitionKeys, getUniqueSourceValuesWithLabels, ifDef, isBlockStorage, isColumnHidden, isColumnOptional, isColumnSnapshotProvider, isConfigLambda, isEmpty, isHiddenFromGraphColumn, isHiddenFromUIColumn, isPColumnReady, isPluginOutputKey, isolate, makeArray, makeObject, mapArrayValues, mapRecordValues, mapResourceFields, migrateBlockStorage, normalizeBlockStorage, not, or, parsePColumnData, parseResourceMap, pluginOutputKey, pluginOutputPrefix, readOutput, registerFacadeCallbacks, toColumnSnapshotProvider, unreachable, updateStorageData, upgradePlDataTableStateV2, wrapOutputs };
package/dist/index.js CHANGED
@@ -13,6 +13,10 @@ import { deriveDistinctLabels } from "./labels/derive_distinct_labels.js";
13
13
  import { deriveLabels } from "./render/util/label.js";
14
14
  import { RT_BINARY_PARTITIONED, RT_BINARY_SUPER_PARTITIONED, RT_JSON_PARTITIONED, RT_JSON_SUPER_PARTITIONED, RT_PARQUET_PARTITIONED, RT_PARQUET_SUPER_PARTITIONED, RT_RESOURCE_MAP, RT_RESOURCE_MAP_PARTITIONED, allPColumnsReady, convertOrParsePColumnData, getPartitionKeysList, getUniquePartitionKeys, isPColumnReady, parsePColumnData, parseResourceMap } from "./render/util/pcolumn_data.js";
15
15
  import { PColumnCollection } from "./render/util/column_collection.js";
16
+ import { BLOCK_SERVICE_FLAGS, blockServiceNames } from "./services/block_services.js";
17
+ import { buildServices, createServiceProxy } from "./services/service_bridge.js";
18
+ import { getService } from "./services/get_services.js";
19
+ import "./services/index.js";
16
20
  import { BlockRenderCtx, PluginRenderCtx, RenderCtxBase, RenderCtxLegacy, ResultPool } from "./render/api.js";
17
21
  import "./render/index.js";
18
22
  import { CurrentSdkInfo, PlatformaSDKVersion } from "./version.js";
@@ -20,7 +24,6 @@ import { isConfigLambda } from "./bconfig/types.js";
20
24
  import { downgradeCfgOrLambda, extractConfig } from "./bconfig/normalization.js";
21
25
  import "./bconfig/index.js";
22
26
  import { BlockModel } from "./block_model_legacy.js";
23
- import { BLOCK_SERVICE_FLAGS, blockServiceNames } from "./services/block_services.js";
24
27
  import { PluginDataModel, PluginDataModelBuilder, PluginInstance, PluginModel } from "./plugin_model.js";
25
28
  import { BlockModelV3 } from "./block_model.js";
26
29
  import { enrichCompatible, getAvailableWithLinkersAxes } from "./pframe_utils/axes.js";
@@ -40,6 +43,7 @@ import { ColumnCollectionBuilder } from "./columns/column_collection_builder.js"
40
43
  import { ResultPoolColumnSnapshotProvider, collectCtxColumnSnapshotProviders } from "./columns/ctx_column_sources.js";
41
44
  import { expandByPartition } from "./columns/expand_by_partition.js";
42
45
  import "./columns/index.js";
46
+ import { deriveDistinctTooltips } from "./labels/derive_distinct_tooltips.js";
43
47
  import { getEffectiveVisibility, getOrderPriority, isColumnHidden, isColumnOptional } from "./components/PlDataTable/createPlDataTable/utils.js";
44
48
  import { createPlDataTableV2 } from "./components/PlDataTable/createPlDataTable/createPlDataTableV2.js";
45
49
  import { discoverTableColumnSnaphots } from "./components/PlDataTable/createPlDataTable/discoverColumns.js";
@@ -55,9 +59,7 @@ import { getPlatformaApiVersion, getRawPlatformaInstance } from "./raw_globals.j
55
59
  import { convertFilterSpecsToExpressionSpecs } from "./annotations/converter.js";
56
60
  import "./annotations/index.js";
57
61
  import { getAxisUniqueValues, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getRequestColumnsFromSelectedSources, getSingleColumnData, getUniqueSourceValuesWithLabels } from "./pframe_utils/index.js";
58
- import { buildServices, createNodeServiceProxy } from "./services/service_bridge.js";
59
- import "./services/index.js";
60
62
  import { getEnvironmentValue } from "./env_value.js";
61
63
  export * from "@milaboratories/pl-model-common";
62
64
  export * from "@milaboratories/pl-error-like";
63
- export { Args, ArrayColumnProvider, BLOCK_SERVICE_FLAGS, BLOCK_STORAGE_FACADE_VERSION, BlockModel, BlockModelV3, BlockRenderCtx, BlockStorageFacadeCallbacks, BlockStorageFacadeHandles, ColumnCollectionBuilder, CurrentSdkInfo, DataModel, DataModelBuilder, FutureRef, It, internal_exports as JsRenderInternal, MainOutputs, OutputColumnProvider, OutputError, PColumnCollection, PFrameImpl, PlatformaSDKVersion, PluginDataModel, PluginDataModelBuilder, PluginInstance, PluginModel, PluginRenderCtx, RT_BINARY_PARTITIONED, RT_BINARY_SUPER_PARTITIONED, RT_JSON_PARTITIONED, RT_JSON_SUPER_PARTITIONED, RT_PARQUET_PARTITIONED, RT_PARQUET_SUPER_PARTITIONED, RT_RESOURCE_MAP, RT_RESOURCE_MAP_PARTITIONED, RenderCtxBase, RenderCtxLegacy, ResultPool, ResultPoolColumnSnapshotProvider, SnapshotColumnProvider, StagingOutputs, TreeNodeAccessor, UiState, allPColumnsReady, and, blockServiceNames, buildServices, collectCtxColumnSnapshotProviders, compileAnnotationScript, compileFilter, compileFilters, convertColumnSelectorToMultiColumnSelector, convertFilterSpecsToExpressionSpecs, convertFilterUiToExpressionImpl, convertFilterUiToExpressions, convertOrParsePColumnData, convertRelaxedAxisSelectorToMultiAxisSelector, convertRelaxedColumnSelectorToMultiColumnSelector, createBlockStorage, createColumnSnapshot, createDefaultPTableParams, createNodeServiceProxy, createPFrameForGraphs, createPlDataTable, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createReadyColumnData, createRowSelectionColumn, deriveDataFromStorage, deriveDistinctLabels, deriveLabels, discoverTableColumnSnaphots, distillFilterSpec, downgradeCfgOrLambda, enrichCompatible, expandByPartition, extractArchiveAndGetURL, extractConfig, filterDataInfoEntries, filterSpecToSpecQueryExpr, flatten, fromPlOption, fromPlRef, getAllRelatedColumns, getAvailableWithLinkersAxes, getAxisUniqueValues, getBlobContent, getBlobContentAsJson, getBlobContentAsString, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getDownloadedBlobContent, getEffectiveVisibility, getEnvironmentValue, getFromCfg, getImmediate, getImportProgress, getJsonField, getLastLogs, getLogHandle, getOnDemandBlobContent, getOrderPriority, getPartitionKeysList, getPlatformaApiVersion, getPluginData, getProgressLog, getProgressLogWithInfo, getRawPlatformaInstance, getRelatedColumns, getRequestColumnsFromSelectedSources, getResourceField, getResourceValueAsJson, getSingleColumnData, getStorageData, getUniquePartitionKeys, getUniqueSourceValuesWithLabels, ifDef, isBlockStorage, isColumnHidden, isColumnOptional, isColumnSnapshotProvider, isConfigLambda, isEmpty, isHiddenFromGraphColumn, isHiddenFromUIColumn, isPColumnReady, isPluginOutputKey, isolate, makeArray, makeObject, mapArrayValues, mapRecordValues, mapResourceFields, migrateBlockStorage, normalizeBlockStorage, not, or, parsePColumnData, parseResourceMap, pluginOutputKey, pluginOutputPrefix, readOutput, registerFacadeCallbacks, toColumnSnapshotProvider, unreachable, updateStorageData, upgradePlDataTableStateV2, wrapOutputs };
65
+ export { Args, ArrayColumnProvider, BLOCK_SERVICE_FLAGS, BLOCK_STORAGE_FACADE_VERSION, BlockModel, BlockModelV3, BlockRenderCtx, BlockStorageFacadeCallbacks, BlockStorageFacadeHandles, ColumnCollectionBuilder, CurrentSdkInfo, DataModel, DataModelBuilder, FutureRef, It, internal_exports as JsRenderInternal, MainOutputs, OutputColumnProvider, OutputError, PColumnCollection, PFrameImpl, PlatformaSDKVersion, PluginDataModel, PluginDataModelBuilder, PluginInstance, PluginModel, PluginRenderCtx, RT_BINARY_PARTITIONED, RT_BINARY_SUPER_PARTITIONED, RT_JSON_PARTITIONED, RT_JSON_SUPER_PARTITIONED, RT_PARQUET_PARTITIONED, RT_PARQUET_SUPER_PARTITIONED, RT_RESOURCE_MAP, RT_RESOURCE_MAP_PARTITIONED, RenderCtxBase, RenderCtxLegacy, ResultPool, ResultPoolColumnSnapshotProvider, SnapshotColumnProvider, StagingOutputs, TreeNodeAccessor, UiState, allPColumnsReady, and, blockServiceNames, buildServices, collectCtxColumnSnapshotProviders, compileAnnotationScript, compileFilter, compileFilters, convertColumnSelectorToMultiColumnSelector, convertFilterSpecsToExpressionSpecs, convertFilterUiToExpressionImpl, convertFilterUiToExpressions, convertOrParsePColumnData, convertRelaxedAxisSelectorToMultiAxisSelector, convertRelaxedColumnSelectorToMultiColumnSelector, createBlockStorage, createColumnSnapshot, createDefaultPTableParams, createPFrameForGraphs, createPlDataTable, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createReadyColumnData, createRowSelectionColumn, createServiceProxy, deriveDataFromStorage, deriveDistinctLabels, deriveDistinctTooltips, deriveLabels, discoverTableColumnSnaphots, distillFilterSpec, downgradeCfgOrLambda, enrichCompatible, expandByPartition, extractArchiveAndGetURL, extractConfig, filterDataInfoEntries, filterSpecToSpecQueryExpr, flatten, fromPlOption, fromPlRef, getAllRelatedColumns, getAvailableWithLinkersAxes, getAxisUniqueValues, getBlobContent, getBlobContentAsJson, getBlobContentAsString, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getDownloadedBlobContent, getEffectiveVisibility, getEnvironmentValue, getFromCfg, getImmediate, getImportProgress, getJsonField, getLastLogs, getLogHandle, getOnDemandBlobContent, getOrderPriority, getPartitionKeysList, getPlatformaApiVersion, getPluginData, getProgressLog, getProgressLogWithInfo, getRawPlatformaInstance, getRelatedColumns, getRequestColumnsFromSelectedSources, getResourceField, getResourceValueAsJson, getService, getSingleColumnData, getStorageData, getUniquePartitionKeys, getUniqueSourceValuesWithLabels, ifDef, isBlockStorage, isColumnHidden, isColumnOptional, isColumnSnapshotProvider, isConfigLambda, isEmpty, isHiddenFromGraphColumn, isHiddenFromUIColumn, isPColumnReady, isPluginOutputKey, isolate, makeArray, makeObject, mapArrayValues, mapRecordValues, mapResourceFields, migrateBlockStorage, normalizeBlockStorage, not, or, parsePColumnData, parseResourceMap, pluginOutputKey, pluginOutputPrefix, readOutput, registerFacadeCallbacks, toColumnSnapshotProvider, unreachable, updateStorageData, upgradePlDataTableStateV2, wrapOutputs };
@@ -0,0 +1,85 @@
1
+ require("../_virtual/_rolldown/runtime.cjs");
2
+ let _milaboratories_pl_model_common = require("@milaboratories/pl-model-common");
3
+ let es_toolkit = require("es-toolkit");
4
+ //#region src/labels/derive_distinct_tooltips.ts
5
+ /** Format tooltip strings for each entry. Returns `undefined` when nothing useful. */
6
+ function deriveDistinctTooltips(entries) {
7
+ return entries.map(formatTooltip);
8
+ }
9
+ function formatTooltip(entry) {
10
+ const sections = [];
11
+ const header = formatHeader(entry);
12
+ if (header !== void 0) sections.push(header);
13
+ const origin = formatOriginPath(entry);
14
+ if (origin !== void 0) sections.push(origin);
15
+ const anchors = formatAnchors(entry.qualifications);
16
+ if (anchors !== void 0) sections.push(anchors);
17
+ const hit = formatHit(entry.qualifications);
18
+ if (hit !== void 0) sections.push(hit);
19
+ const distinctive = formatDistinctive(entry.distinctiveQualifications);
20
+ if (distinctive !== void 0) sections.push(distinctive);
21
+ if (sections.length <= 1) return void 0;
22
+ return sections.join("\n\n");
23
+ }
24
+ const BULLET_1 = " • ";
25
+ const SUB_BULLET = " ";
26
+ function formatHeader(entry) {
27
+ const lines = [];
28
+ if (entry.variantCount !== void 0 && entry.variantCount > 1) lines.push(`Variant: ${entry.variantIndex ?? "?"} of ${entry.variantCount}`);
29
+ return lines.join("\n");
30
+ }
31
+ function formatOriginPath(entry) {
32
+ const path = entry.linkerPath ?? [];
33
+ if (path.length === 0) return void 0;
34
+ const lines = ["Origin path"];
35
+ path.forEach((step, i) => {
36
+ const label = (0, _milaboratories_pl_model_common.readAnnotation)(step.linker.spec, _milaboratories_pl_model_common.Annotation.LinkLabel) ?? (0, _milaboratories_pl_model_common.readAnnotation)(step.linker.spec, _milaboratories_pl_model_common.Annotation.Label) ?? step.linker.spec.name;
37
+ lines.push(`${BULLET_1}linker ${i + 1}: ${label}`);
38
+ const qs = formatAxisQualifications(step.qualifications);
39
+ if (qs !== void 0) lines.push(`${SUB_BULLET}qualifies: ${qs}`);
40
+ });
41
+ const hitName = (0, _milaboratories_pl_model_common.readAnnotation)(entry.spec, _milaboratories_pl_model_common.Annotation.Label) ?? entry.spec.name;
42
+ lines.push(`${BULLET_1}hit column: ${hitName}`);
43
+ return lines.join("\n");
44
+ }
45
+ function formatAnchors(q) {
46
+ if ((0, es_toolkit.isNil)(q)) return void 0;
47
+ const ids = Object.keys(q.forQueries);
48
+ if (ids.length === 0) return void 0;
49
+ const lines = [];
50
+ for (const id of ids) {
51
+ const item = q.forQueries[id];
52
+ if (item.length === 0) continue;
53
+ const rendered = formatAxisQualifications(item);
54
+ lines.push(`${BULLET_1}${id}${rendered !== void 0 ? ` ${rendered}` : ""}`);
55
+ }
56
+ return lines.length > 0 ? ["Anchors (bound via this variant)"].concat(lines).join("\n") : void 0;
57
+ }
58
+ function formatHit(q) {
59
+ if ((0, es_toolkit.isNil)(q) || q.forHit.length === 0) return void 0;
60
+ const rendered = formatAxisQualifications(q.forHit);
61
+ if (rendered === void 0) return void 0;
62
+ return ["Hit column qualifications", `${BULLET_1}${rendered}`].join("\n");
63
+ }
64
+ function formatDistinctive(q) {
65
+ if ((0, es_toolkit.isNil)(q)) return void 0;
66
+ const bullets = [];
67
+ for (const id of Object.keys(q.forQueries)) for (const item of q.forQueries[id]) bullets.push(`${BULLET_1}${id}: ${formatQualification(item)}`);
68
+ for (const item of q.forHit) bullets.push(`${BULLET_1}hit: ${formatQualification(item)}`);
69
+ if (bullets.length === 0) return void 0;
70
+ return ["Distinctive (what separates this variant)", ...bullets].join("\n");
71
+ }
72
+ function formatAxisQualifications(qs) {
73
+ if (qs.length === 0) return void 0;
74
+ return qs.map(formatQualification).join("; ");
75
+ }
76
+ function formatQualification(q) {
77
+ const axisName = typeof q.axis === "string" ? q.axis : q.axis.name ?? JSON.stringify(q.axis);
78
+ const entries = Object.entries(q.contextDomain);
79
+ if (entries.length === 0) return axisName;
80
+ return `${axisName} context: ${entries.map(([k, v]) => `${k}=${v}`).join(", ")}`;
81
+ }
82
+ //#endregion
83
+ exports.deriveDistinctTooltips = deriveDistinctTooltips;
84
+
85
+ //# sourceMappingURL=derive_distinct_tooltips.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"derive_distinct_tooltips.cjs","names":["Annotation"],"sources":["../../src/labels/derive_distinct_tooltips.ts"],"sourcesContent":["import {\n Annotation,\n PObjectId,\n readAnnotation,\n type AxisQualification,\n type PColumnSpec,\n} from \"@milaboratories/pl-model-common\";\nimport { isNil } from \"es-toolkit\";\nimport type { MatchQualifications, MatchVariant } from \"../columns\";\n\nexport type TooltipEntry = {\n /** Main column spec — used for column-name fallback when no label. */\n spec: PColumnSpec;\n /** Full qualifications carried by this variant. */\n qualifications?: MatchQualifications;\n /** Minimal qualifications that separate this variant from its siblings. */\n distinctiveQualifications?: MatchQualifications;\n /** Linker steps traversed to reach the hit column. */\n linkerPath?: MatchVariant[\"path\"];\n /** Position of this variant within the same physical column (1-based). */\n variantIndex?: number;\n /** Total variants for the same physical column. */\n variantCount?: number;\n};\n\n/** Format tooltip strings for each entry. Returns `undefined` when nothing useful. */\nexport function deriveDistinctTooltips(entries: TooltipEntry[]): (undefined | string)[] {\n return entries.map(formatTooltip);\n}\n\nfunction formatTooltip(entry: TooltipEntry): undefined | string {\n const sections: string[] = [];\n\n const header = formatHeader(entry);\n if (header !== undefined) sections.push(header);\n\n const origin = formatOriginPath(entry);\n if (origin !== undefined) sections.push(origin);\n\n const anchors = formatAnchors(entry.qualifications);\n if (anchors !== undefined) sections.push(anchors);\n\n const hit = formatHit(entry.qualifications);\n if (hit !== undefined) sections.push(hit);\n\n const distinctive = formatDistinctive(entry.distinctiveQualifications);\n if (distinctive !== undefined) sections.push(distinctive);\n\n if (sections.length <= 1) return undefined;\n return sections.join(\"\\n\\n\");\n}\n\nconst BULLET_1 = \" • \";\nconst SUB_BULLET = \" \";\n\nfunction formatHeader(entry: TooltipEntry): undefined | string {\n const lines: string[] = [];\n if (entry.variantCount !== undefined && entry.variantCount > 1) {\n lines.push(`Variant: ${entry.variantIndex ?? \"?\"} of ${entry.variantCount}`);\n }\n return lines.join(\"\\n\");\n}\n\nfunction formatOriginPath(entry: TooltipEntry): undefined | string {\n const path = entry.linkerPath ?? [];\n if (path.length === 0) return undefined;\n\n const lines = [\"Origin path\"];\n path.forEach((step, i) => {\n const label =\n readAnnotation(step.linker.spec, Annotation.LinkLabel) ??\n readAnnotation(step.linker.spec, Annotation.Label) ??\n step.linker.spec.name;\n lines.push(`${BULLET_1}linker ${i + 1}: ${label}`);\n const qs = formatAxisQualifications(step.qualifications);\n if (qs !== undefined) lines.push(`${SUB_BULLET}qualifies: ${qs}`);\n });\n const hitName = readAnnotation(entry.spec, Annotation.Label) ?? entry.spec.name;\n lines.push(`${BULLET_1}hit column: ${hitName}`);\n return lines.join(\"\\n\");\n}\n\nfunction formatAnchors(q: undefined | MatchQualifications): undefined | string {\n if (isNil(q)) return undefined;\n const ids = Object.keys(q.forQueries);\n if (ids.length === 0) return undefined;\n\n const lines = [];\n for (const id of ids) {\n const item = q.forQueries[id as PObjectId];\n if (item.length === 0) continue;\n const rendered = formatAxisQualifications(item);\n lines.push(`${BULLET_1}${id}${rendered !== undefined ? ` ${rendered}` : \"\"}`);\n }\n return lines.length > 0\n ? [\"Anchors (bound via this variant)\"].concat(lines).join(\"\\n\")\n : undefined;\n}\n\nfunction formatHit(q: undefined | MatchQualifications): undefined | string {\n if (isNil(q) || q.forHit.length === 0) return undefined;\n const rendered = formatAxisQualifications(q.forHit);\n if (rendered === undefined) return undefined;\n return [\"Hit column qualifications\", `${BULLET_1}${rendered}`].join(\"\\n\");\n}\n\nfunction formatDistinctive(q: undefined | MatchQualifications): undefined | string {\n if (isNil(q)) return undefined;\n const bullets: string[] = [];\n for (const id of Object.keys(q.forQueries)) {\n for (const item of q.forQueries[id as PObjectId])\n bullets.push(`${BULLET_1}${id}: ${formatQualification(item)}`);\n }\n for (const item of q.forHit) bullets.push(`${BULLET_1}hit: ${formatQualification(item)}`);\n if (bullets.length === 0) return undefined;\n return [\"Distinctive (what separates this variant)\", ...bullets].join(\"\\n\");\n}\n\nfunction formatAxisQualifications(qs: AxisQualification[]): undefined | string {\n if (qs.length === 0) return undefined;\n return qs.map(formatQualification).join(\"; \");\n}\n\nfunction formatQualification(q: AxisQualification): string {\n const axisName = typeof q.axis === \"string\" ? q.axis : (q.axis.name ?? JSON.stringify(q.axis));\n const entries = Object.entries(q.contextDomain);\n if (entries.length === 0) return axisName;\n const kv = entries.map(([k, v]) => `${k}=${v}`).join(\", \");\n return `${axisName} context: ${kv}`;\n}\n"],"mappings":";;;;;AA0BA,SAAgB,uBAAuB,SAAiD;AACtF,QAAO,QAAQ,IAAI,cAAc;;AAGnC,SAAS,cAAc,OAAyC;CAC9D,MAAM,WAAqB,EAAE;CAE7B,MAAM,SAAS,aAAa,MAAM;AAClC,KAAI,WAAW,KAAA,EAAW,UAAS,KAAK,OAAO;CAE/C,MAAM,SAAS,iBAAiB,MAAM;AACtC,KAAI,WAAW,KAAA,EAAW,UAAS,KAAK,OAAO;CAE/C,MAAM,UAAU,cAAc,MAAM,eAAe;AACnD,KAAI,YAAY,KAAA,EAAW,UAAS,KAAK,QAAQ;CAEjD,MAAM,MAAM,UAAU,MAAM,eAAe;AAC3C,KAAI,QAAQ,KAAA,EAAW,UAAS,KAAK,IAAI;CAEzC,MAAM,cAAc,kBAAkB,MAAM,0BAA0B;AACtE,KAAI,gBAAgB,KAAA,EAAW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AAU,OAAO,QAAQ,EAAE,cAAc;AAC/C,KAAI,QAAQ,WAAW,EAAG,QAAO;AAEjC,QAAO,GAAG,SAAS,YADR,QAAQ,KAAK,CAAC,GAAG,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,KAAK"}
@@ -0,0 +1,17 @@
1
+ import { MatchQualifications, MatchVariant } from "../columns/column_collection_builder.js";
2
+ import { PColumnSpec } from "@milaboratories/pl-model-common";
3
+
4
+ //#region src/labels/derive_distinct_tooltips.d.ts
5
+ type TooltipEntry = {
6
+ /** Main column spec — used for column-name fallback when no label. */spec: PColumnSpec; /** Full qualifications carried by this variant. */
7
+ qualifications?: MatchQualifications; /** Minimal qualifications that separate this variant from its siblings. */
8
+ distinctiveQualifications?: MatchQualifications; /** Linker steps traversed to reach the hit column. */
9
+ linkerPath?: MatchVariant["path"]; /** Position of this variant within the same physical column (1-based). */
10
+ variantIndex?: number; /** Total variants for the same physical column. */
11
+ variantCount?: number;
12
+ };
13
+ /** Format tooltip strings for each entry. Returns `undefined` when nothing useful. */
14
+ declare function deriveDistinctTooltips(entries: TooltipEntry[]): (undefined | string)[];
15
+ //#endregion
16
+ export { TooltipEntry, deriveDistinctTooltips };
17
+ //# sourceMappingURL=derive_distinct_tooltips.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"derive_distinct_tooltips.d.ts","names":[],"sources":["../../src/labels/derive_distinct_tooltips.ts"],"mappings":";;;;KAUY,YAAA;wEAEV,IAAA,EAAM,WAAA,EAFI;EAIV,cAAA,GAAiB,mBAAA;EAEjB,yBAAA,GAA4B,mBAAA,EAFX;EAIjB,UAAA,GAAa,YAAA,UAAA;EAEb,YAAA,WAFyB;EAIzB,YAAA;AAAA;;iBAIc,sBAAA,CAAuB,OAAA,EAAS,YAAA"}
@@ -0,0 +1,84 @@
1
+ import { Annotation, readAnnotation } from "@milaboratories/pl-model-common";
2
+ import { isNil } from "es-toolkit";
3
+ //#region src/labels/derive_distinct_tooltips.ts
4
+ /** Format tooltip strings for each entry. Returns `undefined` when nothing useful. */
5
+ function deriveDistinctTooltips(entries) {
6
+ return entries.map(formatTooltip);
7
+ }
8
+ function formatTooltip(entry) {
9
+ const sections = [];
10
+ const header = formatHeader(entry);
11
+ if (header !== void 0) sections.push(header);
12
+ const origin = formatOriginPath(entry);
13
+ if (origin !== void 0) sections.push(origin);
14
+ const anchors = formatAnchors(entry.qualifications);
15
+ if (anchors !== void 0) sections.push(anchors);
16
+ const hit = formatHit(entry.qualifications);
17
+ if (hit !== void 0) sections.push(hit);
18
+ const distinctive = formatDistinctive(entry.distinctiveQualifications);
19
+ if (distinctive !== void 0) sections.push(distinctive);
20
+ if (sections.length <= 1) return void 0;
21
+ return sections.join("\n\n");
22
+ }
23
+ const BULLET_1 = " • ";
24
+ const SUB_BULLET = " ";
25
+ function formatHeader(entry) {
26
+ const lines = [];
27
+ if (entry.variantCount !== void 0 && entry.variantCount > 1) lines.push(`Variant: ${entry.variantIndex ?? "?"} of ${entry.variantCount}`);
28
+ return lines.join("\n");
29
+ }
30
+ function formatOriginPath(entry) {
31
+ const path = entry.linkerPath ?? [];
32
+ if (path.length === 0) return void 0;
33
+ const lines = ["Origin path"];
34
+ path.forEach((step, i) => {
35
+ const label = readAnnotation(step.linker.spec, Annotation.LinkLabel) ?? readAnnotation(step.linker.spec, Annotation.Label) ?? step.linker.spec.name;
36
+ lines.push(`${BULLET_1}linker ${i + 1}: ${label}`);
37
+ const qs = formatAxisQualifications(step.qualifications);
38
+ if (qs !== void 0) lines.push(`${SUB_BULLET}qualifies: ${qs}`);
39
+ });
40
+ const hitName = readAnnotation(entry.spec, Annotation.Label) ?? entry.spec.name;
41
+ lines.push(`${BULLET_1}hit column: ${hitName}`);
42
+ return lines.join("\n");
43
+ }
44
+ function formatAnchors(q) {
45
+ if (isNil(q)) return void 0;
46
+ const ids = Object.keys(q.forQueries);
47
+ if (ids.length === 0) return void 0;
48
+ const lines = [];
49
+ for (const id of ids) {
50
+ const item = q.forQueries[id];
51
+ if (item.length === 0) continue;
52
+ const rendered = formatAxisQualifications(item);
53
+ lines.push(`${BULLET_1}${id}${rendered !== void 0 ? ` ${rendered}` : ""}`);
54
+ }
55
+ return lines.length > 0 ? ["Anchors (bound via this variant)"].concat(lines).join("\n") : void 0;
56
+ }
57
+ function formatHit(q) {
58
+ if (isNil(q) || q.forHit.length === 0) return void 0;
59
+ const rendered = formatAxisQualifications(q.forHit);
60
+ if (rendered === void 0) return void 0;
61
+ return ["Hit column qualifications", `${BULLET_1}${rendered}`].join("\n");
62
+ }
63
+ function formatDistinctive(q) {
64
+ if (isNil(q)) return void 0;
65
+ const bullets = [];
66
+ for (const id of Object.keys(q.forQueries)) for (const item of q.forQueries[id]) bullets.push(`${BULLET_1}${id}: ${formatQualification(item)}`);
67
+ for (const item of q.forHit) bullets.push(`${BULLET_1}hit: ${formatQualification(item)}`);
68
+ if (bullets.length === 0) return void 0;
69
+ return ["Distinctive (what separates this variant)", ...bullets].join("\n");
70
+ }
71
+ function formatAxisQualifications(qs) {
72
+ if (qs.length === 0) return void 0;
73
+ return qs.map(formatQualification).join("; ");
74
+ }
75
+ function formatQualification(q) {
76
+ const axisName = typeof q.axis === "string" ? q.axis : q.axis.name ?? JSON.stringify(q.axis);
77
+ const entries = Object.entries(q.contextDomain);
78
+ if (entries.length === 0) return axisName;
79
+ return `${axisName} context: ${entries.map(([k, v]) => `${k}=${v}`).join(", ")}`;
80
+ }
81
+ //#endregion
82
+ export { deriveDistinctTooltips };
83
+
84
+ //# sourceMappingURL=derive_distinct_tooltips.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"derive_distinct_tooltips.js","names":[],"sources":["../../src/labels/derive_distinct_tooltips.ts"],"sourcesContent":["import {\n Annotation,\n PObjectId,\n readAnnotation,\n type AxisQualification,\n type PColumnSpec,\n} from \"@milaboratories/pl-model-common\";\nimport { isNil } from \"es-toolkit\";\nimport type { MatchQualifications, MatchVariant } from \"../columns\";\n\nexport type TooltipEntry = {\n /** Main column spec — used for column-name fallback when no label. */\n spec: PColumnSpec;\n /** Full qualifications carried by this variant. */\n qualifications?: MatchQualifications;\n /** Minimal qualifications that separate this variant from its siblings. */\n distinctiveQualifications?: MatchQualifications;\n /** Linker steps traversed to reach the hit column. */\n linkerPath?: MatchVariant[\"path\"];\n /** Position of this variant within the same physical column (1-based). */\n variantIndex?: number;\n /** Total variants for the same physical column. */\n variantCount?: number;\n};\n\n/** Format tooltip strings for each entry. Returns `undefined` when nothing useful. */\nexport function deriveDistinctTooltips(entries: TooltipEntry[]): (undefined | string)[] {\n return entries.map(formatTooltip);\n}\n\nfunction formatTooltip(entry: TooltipEntry): undefined | string {\n const sections: string[] = [];\n\n const header = formatHeader(entry);\n if (header !== undefined) sections.push(header);\n\n const origin = formatOriginPath(entry);\n if (origin !== undefined) sections.push(origin);\n\n const anchors = formatAnchors(entry.qualifications);\n if (anchors !== undefined) sections.push(anchors);\n\n const hit = formatHit(entry.qualifications);\n if (hit !== undefined) sections.push(hit);\n\n const distinctive = formatDistinctive(entry.distinctiveQualifications);\n if (distinctive !== undefined) sections.push(distinctive);\n\n if (sections.length <= 1) return undefined;\n return sections.join(\"\\n\\n\");\n}\n\nconst BULLET_1 = \" • \";\nconst SUB_BULLET = \" \";\n\nfunction formatHeader(entry: TooltipEntry): undefined | string {\n const lines: string[] = [];\n if (entry.variantCount !== undefined && entry.variantCount > 1) {\n lines.push(`Variant: ${entry.variantIndex ?? \"?\"} of ${entry.variantCount}`);\n }\n return lines.join(\"\\n\");\n}\n\nfunction formatOriginPath(entry: TooltipEntry): undefined | string {\n const path = entry.linkerPath ?? [];\n if (path.length === 0) return undefined;\n\n const lines = [\"Origin path\"];\n path.forEach((step, i) => {\n const label =\n readAnnotation(step.linker.spec, Annotation.LinkLabel) ??\n readAnnotation(step.linker.spec, Annotation.Label) ??\n step.linker.spec.name;\n lines.push(`${BULLET_1}linker ${i + 1}: ${label}`);\n const qs = formatAxisQualifications(step.qualifications);\n if (qs !== undefined) lines.push(`${SUB_BULLET}qualifies: ${qs}`);\n });\n const hitName = readAnnotation(entry.spec, Annotation.Label) ?? entry.spec.name;\n lines.push(`${BULLET_1}hit column: ${hitName}`);\n return lines.join(\"\\n\");\n}\n\nfunction formatAnchors(q: undefined | MatchQualifications): undefined | string {\n if (isNil(q)) return undefined;\n const ids = Object.keys(q.forQueries);\n if (ids.length === 0) return undefined;\n\n const lines = [];\n for (const id of ids) {\n const item = q.forQueries[id as PObjectId];\n if (item.length === 0) continue;\n const rendered = formatAxisQualifications(item);\n lines.push(`${BULLET_1}${id}${rendered !== undefined ? ` ${rendered}` : \"\"}`);\n }\n return lines.length > 0\n ? [\"Anchors (bound via this variant)\"].concat(lines).join(\"\\n\")\n : undefined;\n}\n\nfunction formatHit(q: undefined | MatchQualifications): undefined | string {\n if (isNil(q) || q.forHit.length === 0) return undefined;\n const rendered = formatAxisQualifications(q.forHit);\n if (rendered === undefined) return undefined;\n return [\"Hit column qualifications\", `${BULLET_1}${rendered}`].join(\"\\n\");\n}\n\nfunction formatDistinctive(q: undefined | MatchQualifications): undefined | string {\n if (isNil(q)) return undefined;\n const bullets: string[] = [];\n for (const id of Object.keys(q.forQueries)) {\n for (const item of q.forQueries[id as PObjectId])\n bullets.push(`${BULLET_1}${id}: ${formatQualification(item)}`);\n }\n for (const item of q.forHit) bullets.push(`${BULLET_1}hit: ${formatQualification(item)}`);\n if (bullets.length === 0) return undefined;\n return [\"Distinctive (what separates this variant)\", ...bullets].join(\"\\n\");\n}\n\nfunction formatAxisQualifications(qs: AxisQualification[]): undefined | string {\n if (qs.length === 0) return undefined;\n return qs.map(formatQualification).join(\"; \");\n}\n\nfunction formatQualification(q: AxisQualification): string {\n const axisName = typeof q.axis === \"string\" ? q.axis : (q.axis.name ?? JSON.stringify(q.axis));\n const entries = Object.entries(q.contextDomain);\n if (entries.length === 0) return axisName;\n const kv = entries.map(([k, v]) => `${k}=${v}`).join(\", \");\n return `${axisName} context: ${kv}`;\n}\n"],"mappings":";;;;A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,KAAK,GAAG,SAAS,OAAO,oBAAoB,KAAK,GAAG;AACzF,KAAI,QAAQ,WAAW,EAAG,QAAO,KAAA;AACjC,QAAO,CAAC,6CAA6C,GAAG,QAAQ,CAAC,KAAK,KAAK;;AAG7E,SAAS,yBAAyB,IAA6C;AAC7E,KAAI,GAAG,WAAW,EAAG,QAAO,KAAA;AAC5B,QAAO,GAAG,IAAI,oBAAoB,CAAC,KAAK,KAAK;;AAG/C,SAAS,oBAAoB,GAA8B;CACzD,MAAM,WAAW,OAAO,EAAE,SAAS,WAAW,EAAE,OAAQ,EAAE,KAAK,QAAQ,KAAK,UAAU,EAAE,KAAK;CAC7F,MAAM,UAAU,OAAO,QAAQ,EAAE,cAAc;AAC/C,KAAI,QAAQ,WAAW,EAAG,QAAO;AAEjC,QAAO,GAAG,SAAS,YADR,QAAQ,KAAK,CAAC,GAAG,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,KAAK"}
@@ -1 +1,2 @@
1
1
  require("./derive_distinct_labels.cjs");
2
+ require("./derive_distinct_tooltips.cjs");
@@ -1 +1,2 @@
1
- import { DeriveLabelsOptions, Entry, Trace, TraceEntry, deriveDistinctLabels } from "./derive_distinct_labels.js";
1
+ import { DeriveLabelsOptions, Entry, Trace, TraceEntry, deriveDistinctLabels } from "./derive_distinct_labels.js";
2
+ import { TooltipEntry, deriveDistinctTooltips } from "./derive_distinct_tooltips.js";
@@ -1 +1,2 @@
1
1
  import "./derive_distinct_labels.js";
2
+ import "./derive_distinct_tooltips.js";
package/dist/package.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "1.65.9";
2
+ var version = "1.66.2";
3
3
  //#endregion
4
4
  Object.defineProperty(exports, "version", {
5
5
  enumerable: true,
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "1.65.9";
2
+ var version = "1.66.2";
3
3
  //#endregion
4
4
  export { version };
5
5
 
@@ -7,6 +7,8 @@ const require_label = require("./util/label.cjs");
7
7
  const require_pcolumn_data = require("./util/pcolumn_data.cjs");
8
8
  const require_column_collection = require("./util/column_collection.cjs");
9
9
  const require_pframe_upgraders = require("./util/pframe_upgraders.cjs");
10
+ const require_get_services = require("../services/get_services.cjs");
11
+ require("../services/index.cjs");
10
12
  let _milaboratories_pl_model_common = require("@milaboratories/pl-model-common");
11
13
  let canonicalize = require("canonicalize");
12
14
  canonicalize = require_runtime.__toESM(canonicalize);
@@ -307,18 +309,8 @@ var ResultPool = class {
307
309
  /** Main entry point to the API available within model lambdas (like outputs, sections, etc..) */
308
310
  var RenderCtxBase = class {
309
311
  ctx;
310
- requiredServiceNames;
311
- cachedServices;
312
- constructor(requiredServiceNames = []) {
312
+ constructor() {
313
313
  this.ctx = require_internal.getCfgRenderCtx();
314
- this.requiredServiceNames = requiredServiceNames;
315
- }
316
- get services() {
317
- if (this.cachedServices) return this.cachedServices;
318
- const ctx = this.ctx;
319
- const services = Object.freeze(Object.fromEntries(this.requiredServiceNames.map((id) => [id, Object.freeze(Object.fromEntries(ctx.getServiceMethods(id).map((method) => [method, (...args) => ctx.callServiceMethod(id, method, ...args)])))])));
320
- this.cachedServices = services;
321
- return services;
322
314
  }
323
315
  dataCache;
324
316
  get data() {
@@ -342,6 +334,9 @@ var RenderCtxBase = class {
342
334
  }
343
335
  return this.activeArgsCache.v;
344
336
  }
337
+ getService(name) {
338
+ return require_get_services.getService(name);
339
+ }
345
340
  getNamedAccessor(name) {
346
341
  return require_accessor.ifDef(this.ctx.getAccessorHandleByName(name), (accessor) => new require_accessor.TreeNodeAccessor(accessor, [name]));
347
342
  }
@@ -478,8 +473,8 @@ var RenderCtxLegacy = class extends RenderCtxBase {
478
473
  var PluginRenderCtx = class extends RenderCtxBase {
479
474
  handle;
480
475
  wrappedInputs;
481
- constructor(handle, wrappedInputs, requiredServiceNames = []) {
482
- super(requiredServiceNames);
476
+ constructor(handle, wrappedInputs) {
477
+ super();
483
478
  this.handle = handle;
484
479
  this.wrappedInputs = wrappedInputs;
485
480
  }