lucid-extension-sdk 0.0.365 → 0.0.367

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.
@@ -2,12 +2,23 @@ import { CollectionProxy } from '../../data/collectionproxy';
2
2
  import { DataSourceProxy } from '../../data/datasourceproxy';
3
3
  import { TextStyle } from '../../document/text/textstyle';
4
4
  import { EditorClient } from '../../editorclient';
5
+ import { isString } from '../checks';
5
6
  import { SerializedFieldType } from '../data/serializedfield/serializedfields';
6
7
  import { DependenciesForItems, ExtensionCardFieldDefinition, ImportResult } from '../sharedcardintegration/cardintegrationdefinitions';
7
8
  import { CardIntegrationConfig } from './cardintegrationconfig';
8
9
  import { DependencyMappingPhrasesType } from './dependencymappingphrases';
9
10
  import { LucidCardIntegrationCustomImportModal } from './lucidcardintegrationcustomimportmodal';
10
11
  import { LucidCardIntegrationStandardImportModal } from './lucidcardintegrationstandardimportmodal';
12
+ export interface FieldDescriptor {
13
+ name: string;
14
+ label?: string | undefined;
15
+ locked?: boolean | undefined;
16
+ }
17
+ export declare const isFieldDescriptor: (subject: unknown) => subject is import("../guards").DestructureGuardedTypeObj<{
18
+ name: typeof isString;
19
+ label: (x: unknown) => x is string | undefined;
20
+ locked: (x: unknown) => x is boolean | undefined;
21
+ }>;
11
22
  export declare abstract class LucidCardIntegration {
12
23
  protected readonly client: EditorClient;
13
24
  constructor(client: EditorClient);
@@ -43,7 +54,7 @@ export declare abstract class LucidCardIntegration {
43
54
  /**
44
55
  * Callback to provide a list of all supported field names for the card integration.
45
56
  */
46
- getAllFields: (dataSource: DataSourceProxy) => Promise<string[]>;
57
+ getAllFields: (dataSource: DataSourceProxy) => Promise<string[] | FieldDescriptor[]>;
47
58
  /**
48
59
  * Callback that handled changes in the fields the user wants to be displayed in the card integration.
49
60
  * If this callback is not provided then the user will not be shown the modal to configure fields.
@@ -1,6 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LucidCardIntegration = void 0;
3
+ exports.LucidCardIntegration = exports.isFieldDescriptor = void 0;
4
+ const checks_1 = require("../checks");
5
+ const validators_1 = require("../validators/validators");
6
+ exports.isFieldDescriptor = (0, validators_1.objectValidator)({
7
+ name: checks_1.isString,
8
+ label: (0, validators_1.option)(checks_1.isString),
9
+ locked: (0, validators_1.option)(checks_1.isBoolean),
10
+ });
4
11
  class LucidCardIntegration {
5
12
  constructor(client) {
6
13
  this.client = client;
@@ -0,0 +1,7 @@
1
+ export declare enum DependencyLineName {
2
+ Parent = "parent",
3
+ Blocks = "blocks",
4
+ Duplicates = "duplicates",
5
+ RelatesTo = "relates to",
6
+ Clones = "clones"
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DependencyLineName = void 0;
4
+ var DependencyLineName;
5
+ (function (DependencyLineName) {
6
+ DependencyLineName["Parent"] = "parent";
7
+ DependencyLineName["Blocks"] = "blocks";
8
+ DependencyLineName["Duplicates"] = "duplicates";
9
+ DependencyLineName["RelatesTo"] = "relates to";
10
+ DependencyLineName["Clones"] = "clones";
11
+ })(DependencyLineName || (exports.DependencyLineName = DependencyLineName = {}));
package/index.d.ts CHANGED
@@ -41,6 +41,7 @@ export * from './core/optionalkey';
41
41
  export * from './core/properties/datagraphic/badgeposition';
42
42
  export * from './core/properties/datagraphic/datagraphicindexes';
43
43
  export * from './core/properties/datagraphic/staticdatagraphicsettings';
44
+ export * from './core/properties/dependencylinename';
44
45
  export * from './core/properties/fillcolor';
45
46
  export * from './core/properties/shadow';
46
47
  export * from './core/properties/strokestyle';
package/index.js CHANGED
@@ -57,6 +57,7 @@ __exportStar(require("./core/optionalkey"), exports);
57
57
  __exportStar(require("./core/properties/datagraphic/badgeposition"), exports);
58
58
  __exportStar(require("./core/properties/datagraphic/datagraphicindexes"), exports);
59
59
  __exportStar(require("./core/properties/datagraphic/staticdatagraphicsettings"), exports);
60
+ __exportStar(require("./core/properties/dependencylinename"), exports);
60
61
  __exportStar(require("./core/properties/fillcolor"), exports);
61
62
  __exportStar(require("./core/properties/shadow"), exports);
62
63
  __exportStar(require("./core/properties/strokestyle"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.365",
3
+ "version": "0.0.367",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",