lucid-extension-sdk 0.0.451 → 0.0.452

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.
@@ -42,6 +42,7 @@ export declare const isSerializedDataSourceProperties: (subject: unknown) => sub
42
42
  ShowOnlyIfHasInward: (x: unknown) => x is boolean | null | undefined;
43
43
  SkipOutwardRelationships: (x: unknown) => x is boolean | null | undefined;
44
44
  ShowOnlyIfHasOutward: (x: unknown) => x is boolean | null | undefined;
45
+ SuppressLinkedItems: (x: unknown) => x is string | null | undefined;
45
46
  }>> | undefined;
46
47
  }>[] | null | undefined;
47
48
  }>;
@@ -83,6 +83,7 @@ export declare const isSerializedImportedDataSource: (subject: unknown) => subje
83
83
  ShowOnlyIfHasInward: (x: unknown) => x is boolean | null | undefined;
84
84
  SkipOutwardRelationships: (x: unknown) => x is boolean | null | undefined;
85
85
  ShowOnlyIfHasOutward: (x: unknown) => x is boolean | null | undefined;
86
+ SuppressLinkedItems: (x: unknown) => x is string | null | undefined;
86
87
  }>> | undefined;
87
88
  }>[] | null | undefined;
88
89
  }>;
@@ -142,6 +143,7 @@ export declare const isSerializedPreviewData: (subject: unknown) => subject is i
142
143
  ShowOnlyIfHasInward: (x: unknown) => x is boolean | null | undefined;
143
144
  SkipOutwardRelationships: (x: unknown) => x is boolean | null | undefined;
144
145
  ShowOnlyIfHasOutward: (x: unknown) => x is boolean | null | undefined;
146
+ SuppressLinkedItems: (x: unknown) => x is string | null | undefined;
145
147
  }>> | undefined;
146
148
  }>[] | null | undefined;
147
149
  }>;
@@ -1,8 +1,10 @@
1
1
  import { isString } from '../../checks';
2
2
  export type SerializedHierarchicalRelationshipFilterConfig = {
3
3
  'ShowOnlyIfHasInward'?: boolean | null | undefined;
4
+ /** @deprecated Use `SuppressLinkedItems` instead */
4
5
  'SkipOutwardRelationships'?: boolean | null | undefined;
5
6
  'ShowOnlyIfHasOutward'?: boolean | null | undefined;
7
+ 'SuppressLinkedItems'?: string | null | undefined;
6
8
  };
7
9
  export type SerializedSourceForeignKey = {
8
10
  'Id': string;
@@ -30,6 +32,7 @@ export declare const isSerializedHierarchicalRelationshipFilterConfig: (subject:
30
32
  ShowOnlyIfHasInward: (x: unknown) => x is boolean | null | undefined;
31
33
  SkipOutwardRelationships: (x: unknown) => x is boolean | null | undefined;
32
34
  ShowOnlyIfHasOutward: (x: unknown) => x is boolean | null | undefined;
35
+ SuppressLinkedItems: (x: unknown) => x is string | null | undefined;
33
36
  }>>;
34
37
  export declare const isSerializedSourceForeignKey: (subject: unknown) => subject is import("../../guards").DestructureGuardedTypeObj<{
35
38
  Id: typeof isString;
@@ -41,5 +44,6 @@ export declare const isSerializedSourceForeignKey: (subject: unknown) => subject
41
44
  ShowOnlyIfHasInward: (x: unknown) => x is boolean | null | undefined;
42
45
  SkipOutwardRelationships: (x: unknown) => x is boolean | null | undefined;
43
46
  ShowOnlyIfHasOutward: (x: unknown) => x is boolean | null | undefined;
47
+ SuppressLinkedItems: (x: unknown) => x is string | null | undefined;
44
48
  }>> | undefined;
45
49
  }>;
@@ -7,6 +7,7 @@ exports.isSerializedHierarchicalRelationshipFilterConfig = (0, validators_1.part
7
7
  'ShowOnlyIfHasInward': (0, validators_1.nullableOption)(checks_1.isBoolean),
8
8
  'SkipOutwardRelationships': (0, validators_1.nullableOption)(checks_1.isBoolean),
9
9
  'ShowOnlyIfHasOutward': (0, validators_1.nullableOption)(checks_1.isBoolean),
10
+ 'SuppressLinkedItems': (0, validators_1.nullableOption)(checks_1.isString),
10
11
  });
11
12
  exports.isSerializedSourceForeignKey = (0, validators_1.objectValidator)({
12
13
  'Id': checks_1.isString,
@@ -1,4 +1,34 @@
1
1
  import type { SerializedHierarchicalRelationshipFilterConfig, SerializedSourceForeignKey } from './serializedsourceforeignkey';
2
+ export declare const SuppressLinkedItems: {
3
+ /**
4
+ * Suppress only the outward direction of this relationship in the linked items panel.
5
+ * "Outward" means items that this item points to via the source field
6
+ * (e.g. a parent item that stores a list of child IDs — the children are outward).
7
+ * The inward direction (items that point back to this item) remains visible.
8
+ *
9
+ * Use this when items on one end of the relationship should show the relationship
10
+ * in the linked items panel, but items on the other end should not.
11
+ */
12
+ readonly Outward: "outward";
13
+ /**
14
+ * Suppress only the inward direction of this relationship in the linked items panel.
15
+ * "Inward" means items that point to this item via their own source field
16
+ * (i.e. items for which this item appears in their outward lookup).
17
+ * The outward direction (items this item points to) remains visible.
18
+ */
19
+ readonly Inward: "inward";
20
+ /**
21
+ * Suppress both directions of this relationship in the linked items panel.
22
+ * Neither the items this item points to (outward) nor the items that point
23
+ * to this item (inward) will appear in the linked items panel.
24
+ *
25
+ * Use this when the relationship is already represented elsewhere in your UI
26
+ * (e.g. a dedicated parent/child hierarchy view) and should not also appear
27
+ * as a linked item.
28
+ */
29
+ readonly Both: "both";
30
+ };
31
+ export type SuppressLinkedItems = (typeof SuppressLinkedItems)[keyof typeof SuppressLinkedItems];
2
32
  /**
3
33
  * Optional configuration for filtering hierarchical relationships.
4
34
  */
@@ -10,8 +40,8 @@ export type HierarchicalRelationshipFilterConfig = {
10
40
  */
11
41
  showOnlyIfHasInward?: boolean;
12
42
  /**
43
+ * @deprecated Use `suppressLinkedItems` instead.
13
44
  * If true, skip outward relationships in linked items display.
14
- * Example: ADO "Child" FK should not show children on parent cards.
15
45
  */
16
46
  skipOutwardRelationships?: boolean;
17
47
  /**
@@ -20,6 +50,21 @@ export type HierarchicalRelationshipFilterConfig = {
20
50
  * but is filtered out on parent cards (parent has no outward "parent" field).
21
51
  */
22
52
  showOnlyIfHasOutward?: boolean;
53
+ /**
54
+ * Controls which directions of this foreign key relationship are hidden from
55
+ * the linked items panel.
56
+ *
57
+ * A foreign key has two directions:
58
+ * - **Outward**: items that the current item points to(it's "children") via its source field.
59
+ * - **Inward**: items that point to the current item(it's "parent") via their own source field.
60
+ *
61
+ * Use `'outward'` to hide outward links while keeping inward links visible.
62
+ * Use `'inward'` to hide inward links while keeping outward links visible.
63
+ * Use `'both'` to hide all links for this relationship from the linked items panel.
64
+ *
65
+ * When omitted, both directions are shown normally.
66
+ */
67
+ suppressLinkedItems?: SuppressLinkedItems;
23
68
  };
24
69
  export type SourceForeignKey = {
25
70
  id: string;
@@ -1,14 +1,50 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SuppressLinkedItems = void 0;
3
4
  exports.serializeHierarchicalFilterConfig = serializeHierarchicalFilterConfig;
4
5
  exports.deserializeHierarchicalFilterConfig = deserializeHierarchicalFilterConfig;
5
6
  exports.serializeSourceForeignKey = serializeSourceForeignKey;
6
7
  exports.deserializeSourceForeignKey = deserializeSourceForeignKey;
8
+ const validators_1 = require("../../validators/validators");
9
+ exports.SuppressLinkedItems = {
10
+ /**
11
+ * Suppress only the outward direction of this relationship in the linked items panel.
12
+ * "Outward" means items that this item points to via the source field
13
+ * (e.g. a parent item that stores a list of child IDs — the children are outward).
14
+ * The inward direction (items that point back to this item) remains visible.
15
+ *
16
+ * Use this when items on one end of the relationship should show the relationship
17
+ * in the linked items panel, but items on the other end should not.
18
+ */
19
+ Outward: 'outward',
20
+ /**
21
+ * Suppress only the inward direction of this relationship in the linked items panel.
22
+ * "Inward" means items that point to this item via their own source field
23
+ * (i.e. items for which this item appears in their outward lookup).
24
+ * The outward direction (items this item points to) remains visible.
25
+ */
26
+ Inward: 'inward',
27
+ /**
28
+ * Suppress both directions of this relationship in the linked items panel.
29
+ * Neither the items this item points to (outward) nor the items that point
30
+ * to this item (inward) will appear in the linked items panel.
31
+ *
32
+ * Use this when the relationship is already represented elsewhere in your UI
33
+ * (e.g. a dedicated parent/child hierarchy view) and should not also appear
34
+ * as a linked item.
35
+ */
36
+ Both: 'both',
37
+ };
38
+ const isSuppressLinkedItems = (0, validators_1.stringEnumValidator)(exports.SuppressLinkedItems);
39
+ function parseSuppressLinkedItems(value) {
40
+ return value != null && isSuppressLinkedItems(value) ? value : undefined;
41
+ }
7
42
  function serializeHierarchicalFilterConfig(config) {
8
43
  return {
9
44
  'ShowOnlyIfHasInward': config.showOnlyIfHasInward,
10
45
  'SkipOutwardRelationships': config.skipOutwardRelationships,
11
46
  'ShowOnlyIfHasOutward': config.showOnlyIfHasOutward,
47
+ 'SuppressLinkedItems': config.suppressLinkedItems,
12
48
  };
13
49
  }
14
50
  function deserializeHierarchicalFilterConfig(config) {
@@ -17,6 +53,7 @@ function deserializeHierarchicalFilterConfig(config) {
17
53
  showOnlyIfHasInward: (_a = config['ShowOnlyIfHasInward']) !== null && _a !== void 0 ? _a : undefined,
18
54
  skipOutwardRelationships: (_b = config['SkipOutwardRelationships']) !== null && _b !== void 0 ? _b : undefined,
19
55
  showOnlyIfHasOutward: (_c = config['ShowOnlyIfHasOutward']) !== null && _c !== void 0 ? _c : undefined,
56
+ suppressLinkedItems: parseSuppressLinkedItems(config['SuppressLinkedItems']),
20
57
  };
21
58
  }
22
59
  function serializeSourceForeignKey(foreignKey) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.451",
3
+ "version": "0.0.452",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",