@fjell/core 4.4.44 → 4.4.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -284,7 +284,7 @@ var itemKeyToLocKeyArray = (ik) => {
284
284
  let lka = [];
285
285
  if (isComKey(ik)) {
286
286
  const ck = ik;
287
- lka = [{ kt: ck.kt, lk: ck.pk }, ...ck.loc];
287
+ lka = [...ck.loc];
288
288
  } else {
289
289
  const pk = ik;
290
290
  lka = [{ kt: pk.kt, lk: pk.pk }];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fjell/core",
3
3
  "description": "Core Item and Key Framework for Fjell",
4
- "version": "4.4.44",
4
+ "version": "4.4.47",
5
5
  "keywords": [
6
6
  "core",
7
7
  "fjell"
package/src/key/KUtils.ts CHANGED
@@ -382,7 +382,10 @@ export const itemKeyToLocKeyArray =
382
382
  let lka: Array<LocKey<L1 | L2 | L3 | L4 | L5>> = [];
383
383
  if (isComKey(ik)) {
384
384
  const ck = ik as ComKey<S, L1, L2, L3, L4, L5>;
385
- lka = [{ kt: ck.kt, lk: ck.pk } as unknown as LocKey<L1 | L2 | L3 | L4 | L5>, ...ck.loc];
385
+ // For composite keys, return only the parent location keys (ck.loc)
386
+ // Location arrays are ordered child-to-parent per KTA hierarchy: ['child', 'parent', 'grandparent']
387
+ // This is used for aggregation queries where we want to find sibling items at the same location
388
+ lka = [...ck.loc];
386
389
  } else {
387
390
  const pk = ik as PriKey<S>;
388
391
  lka = [{ kt: pk.kt, lk: pk.pk } as unknown as LocKey<L1 | L2 | L3 | L4 | L5>];