lucid-extension-sdk 0.0.450 → 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.
package/commandtypes.d.ts CHANGED
@@ -830,6 +830,8 @@ export type AutoSyncSettings = {
830
830
  'p'?: {
831
831
  /** Header */
832
832
  'h': string;
833
+ /** Label */
834
+ 'l'?: string | undefined;
833
835
  /** query placeholder */
834
836
  'qph': string;
835
837
  /**remove non matching label */
@@ -63,6 +63,10 @@ export interface AutoSyncConfigPhrasesType {
63
63
  * The header to display for the integration in the autosync modal.
64
64
  */
65
65
  header: string;
66
+ /**
67
+ * The label to display next to the toggle in the import modal (e.g. WIQL/JQL).
68
+ */
69
+ label?: string | undefined;
66
70
  /**
67
71
  * The query placeholder string to display for the integration. For example, the Jira integration displays "Search with a JQL query..."
68
72
  */
@@ -87,9 +91,11 @@ export interface AutoSyncConfigPhrasesType {
87
91
  export declare const SupportedAutoSyncGeneratorType: {
88
92
  readonly Timeline: "timeline";
89
93
  readonly DynamicMatrix: "dynamic matrix";
94
+ readonly Frame: "frame";
90
95
  };
91
96
  export type SupportedAutoSyncGeneratorType = (typeof SupportedAutoSyncGeneratorType)[keyof typeof SupportedAutoSyncGeneratorType];
92
97
  export declare const isSupportedAutoSyncGeneratorType: (x: unknown) => x is {} extends {
93
98
  readonly Timeline: "timeline";
94
99
  readonly DynamicMatrix: "dynamic matrix";
95
- } ? never : "timeline" | "dynamic matrix";
100
+ readonly Frame: "frame";
101
+ } ? never : "timeline" | "dynamic matrix" | "frame";
@@ -11,5 +11,6 @@ exports.AutoSyncPaginationSize = 50;
11
11
  exports.SupportedAutoSyncGeneratorType = {
12
12
  Timeline: 'timeline',
13
13
  DynamicMatrix: 'dynamic matrix',
14
+ Frame: 'frame',
14
15
  };
15
16
  exports.isSupportedAutoSyncGeneratorType = (0, validators_1.stringEnumValidator)(exports.SupportedAutoSyncGeneratorType);
@@ -130,6 +130,7 @@ declare const CardIntegrationConfigFormatter: import("../format/format").Format<
130
130
  } | null | undefined;
131
131
  } | null | undefined;
132
132
  }> | null | undefined>];
133
+ readonly supportsParentCards: readonly ["spc", import("../format/format").Format<boolean | null | undefined, boolean | null | undefined>];
133
134
  }>, {
134
135
  readonly fieldNames: readonly string[];
135
136
  readonly fieldStyles?: Map<string, {
@@ -171,6 +172,7 @@ declare const CardIntegrationConfigFormatter: import("../format/format").Format<
171
172
  } | null | undefined;
172
173
  } | null | undefined;
173
174
  }> | null | undefined;
175
+ readonly supportsParentCards?: boolean | null | undefined;
174
176
  }>];
175
177
  readonly cardDetailsPanelConfig: readonly ["cdpc", import("../format/format").Format<import("../format/objectformat").ObjectFormatSerializedType<{
176
178
  /**
@@ -255,6 +257,7 @@ declare const CardIntegrationConfigFormatter: import("../format/format").Format<
255
257
  } | null | undefined;
256
258
  } | null | undefined;
257
259
  }> | null | undefined;
260
+ readonly supportsParentCards?: boolean | null | undefined;
258
261
  };
259
262
  readonly cardDetailsPanelConfig: {
260
263
  readonly fields: readonly {
@@ -34,6 +34,7 @@ const CardIntegrationConfigFormatter = (0, objectformat_1.ObjectFormat)({
34
34
  'fd',
35
35
  (0, format_1.OptionFormat)((0, mapformat_1.MapEntriesFormat)(primitiveformat_1.StringFormat, cardfielddisplaysettings_1.CardFieldDisplaySettingsFormatter)),
36
36
  ],
37
+ supportsParentCards: ['spc', (0, format_1.OptionFormat)(primitiveformat_1.BooleanFormat)],
37
38
  }),
38
39
  ],
39
40
  cardDetailsPanelConfig: [
@@ -343,6 +343,7 @@ class LucidCardIntegrationRegistry {
343
343
  if (autoSync.phrases) {
344
344
  serialized['as']['p'] = {
345
345
  'h': autoSync.phrases.header,
346
+ 'l': autoSync.phrases.label,
346
347
  'qph': autoSync.phrases.queryPlaceholder,
347
348
  'rnml': LucidCardIntegrationRegistry.nextHookName(),
348
349
  'nml': autoSync.phrases.noMatchedLabel,
package/core/checks.d.ts CHANGED
@@ -134,7 +134,8 @@ export declare function isMap(val: unknown): val is Map<unknown, unknown>;
134
134
  export type Tuple<T, N extends number> = N extends N ? (number extends N ? T[] : TupleOfHelper<T, N, []>) : never;
135
135
  type TupleOfHelper<T, N extends number, R extends unknown[]> = R['length'] extends N ? R : TupleOfHelper<T, N, [T, ...R]>;
136
136
  export declare function isExactLength<T, N extends number>(arr: readonly T[], exactLength: N): arr is Tuple<T, N>;
137
- export declare function isAtLeastLength<T, N extends number>(arr: readonly T[], minimumLength: N): arr is [...Tuple<T, N>, ...T[]];
137
+ export type ArrayAtLeastLength<T, N extends number> = [...Tuple<T, N>, ...T[]];
138
+ export declare function isAtLeastLength<T, N extends number>(arr: readonly T[], minimumLength: N): arr is ArrayAtLeastLength<T, N>;
138
139
  /**
139
140
  * Returns true if the specified value is a tuple where the first element, T, passes the tGuard function
140
141
  * and the second element, U, passes the uGuard function
@@ -17,6 +17,11 @@ export declare const SemanticCollection: {
17
17
  * This collection contains changes for {@link BranchedCollection}
18
18
  */
19
19
  readonly Patch: "Patch";
20
+ /**
21
+ * This collection is populated by a query (e.g., JQL, WIQL) executed during background sync.
22
+ * Query collections contain foreign key references to an items collection rather than duplicated data.
23
+ */
24
+ readonly Query: "Query";
20
25
  };
21
26
  export type SemanticCollection = (typeof SemanticCollection)[keyof typeof SemanticCollection];
22
27
  export declare const isSemanticCollection: (x: unknown) => x is {} extends {
@@ -33,4 +38,9 @@ export declare const isSemanticCollection: (x: unknown) => x is {} extends {
33
38
  * This collection contains changes for {@link BranchedCollection}
34
39
  */
35
40
  readonly Patch: "Patch";
36
- } ? never : "Patch" | "Items" | "Metadata";
41
+ /**
42
+ * This collection is populated by a query (e.g., JQL, WIQL) executed during background sync.
43
+ * Query collections contain foreign key references to an items collection rather than duplicated data.
44
+ */
45
+ readonly Query: "Query";
46
+ } ? never : "Patch" | "Items" | "Metadata" | "Query";
@@ -21,5 +21,10 @@ exports.SemanticCollection = {
21
21
  * This collection contains changes for {@link BranchedCollection}
22
22
  */
23
23
  Patch: 'Patch',
24
+ /**
25
+ * This collection is populated by a query (e.g., JQL, WIQL) executed during background sync.
26
+ * Query collections contain foreign key references to an items collection rather than duplicated data.
27
+ */
28
+ Query: 'Query',
24
29
  };
25
30
  exports.isSemanticCollection = (0, validators_1.enumValidator)(exports.SemanticCollection);
@@ -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) {
@@ -263,6 +263,7 @@ export declare const isPartialSize: (subject: unknown) => subject is Partial<Des
263
263
  }>>;
264
264
  export declare function isPositiveNumber(x: unknown): x is number;
265
265
  export declare function isDate(x: unknown): x is Date;
266
+ export declare function isUrl(x: unknown): x is URL;
266
267
  export declare function maxLengthValidator(max: number): (x: unknown) => x is string;
267
268
  export declare function minLengthValidator(min: number): (x: unknown) => x is string;
268
269
  export declare function isEmptyObject(x: unknown): x is {};
@@ -33,6 +33,7 @@ exports.isTrue = isTrue;
33
33
  exports.isFalse = isFalse;
34
34
  exports.isPositiveNumber = isPositiveNumber;
35
35
  exports.isDate = isDate;
36
+ exports.isUrl = isUrl;
36
37
  exports.maxLengthValidator = maxLengthValidator;
37
38
  exports.minLengthValidator = minLengthValidator;
38
39
  exports.isEmptyObject = isEmptyObject;
@@ -515,6 +516,9 @@ function isPositiveNumber(x) {
515
516
  function isDate(x) {
516
517
  return x instanceof Date;
517
518
  }
519
+ function isUrl(x) {
520
+ return x instanceof URL;
521
+ }
518
522
  function maxLengthValidator(max) {
519
523
  return (x) => (0, checks_1.isString)(x) && x.length <= max;
520
524
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.450",
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",