lucid-extension-sdk 0.0.94 → 0.0.96

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.94",
3
+ "version": "0.0.96",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "sdk/index.js",
6
6
  "types": "sdk/index.d.ts",
@@ -33,7 +33,7 @@ export declare abstract class TaskManagementCardIntegration {
33
33
  /**
34
34
  * Callback to provide a list of all supported field names for the card integration.
35
35
  */
36
- getAllFields: (collection: CollectionProxy) => Promise<string[]>;
36
+ getAllFields: (collection: CollectionProxy, dataSource: DataSourceProxy) => Promise<string[]>;
37
37
  /**
38
38
  * Callback that handled changes in the fields the user wants to be displayed in the card integration.
39
39
  * If this callback is not provided then the user will not be shown the modal to configure fields.
@@ -48,7 +48,7 @@ export declare abstract class TaskManagementCardIntegration {
48
48
  /**
49
49
  * Provide the default configuration for a new import
50
50
  */
51
- abstract getDefaultConfig: (collection: CollectionProxy) => Promise<CardIntegrationConfig>;
51
+ abstract getDefaultConfig: (collection: CollectionProxy, dataSource: DataSourceProxy) => Promise<CardIntegrationConfig>;
52
52
  /**
53
53
  * If specified, allow the user to import cards using the standard card-import modal.
54
54
  *
@@ -2,10 +2,12 @@ import { SerializedFieldType } from '../data/serializedfield/serializedfields';
2
2
  /** @ignore */
3
3
  export interface GetFieldsParam {
4
4
  'c': string;
5
+ 'd': string;
5
6
  }
6
7
  /** @ignore */
7
8
  export interface GetDefaultConfigParam {
8
9
  'c': string;
10
+ 'd': string;
9
11
  }
10
12
  /** @ignore */
11
13
  export interface OnSelectedFieldsChangeParam {
@@ -33,7 +33,8 @@ class TaskManagementCardRegistry {
33
33
  const getFieldsActionName = TaskManagementCardRegistry.nextHookName();
34
34
  client.registerAction(getFieldsActionName, async (param) => {
35
35
  const collection = new collectionproxy_1.CollectionProxy(param['c'], client);
36
- const fields = await cardIntegration.fieldConfiguration.getAllFields(collection);
36
+ const dataSource = new datasourceproxy_1.DataSourceProxy(param['d'], client);
37
+ const fields = await cardIntegration.fieldConfiguration.getAllFields(collection, dataSource);
37
38
  return fields;
38
39
  });
39
40
  let onSelectedFieldsChangeActionName = undefined;
@@ -48,7 +49,8 @@ class TaskManagementCardRegistry {
48
49
  const getDefaultConfigActionName = TaskManagementCardRegistry.nextHookName();
49
50
  client.registerAction(getDefaultConfigActionName, async (param) => {
50
51
  const collection = new collectionproxy_1.CollectionProxy(param['c'], client);
51
- return (0, cardintegrationconfig_1.serializeCardIntegrationConfig)(await cardIntegration.getDefaultConfig(collection));
52
+ const dataSource = new datasourceproxy_1.DataSourceProxy(param['d'], client);
53
+ return (0, cardintegrationconfig_1.serializeCardIntegrationConfig)(await cardIntegration.getDefaultConfig(collection, dataSource));
52
54
  });
53
55
  let showIntroActionName = undefined;
54
56
  if (cardIntegration.showIntro) {
@@ -9,7 +9,6 @@ export declare enum DocumentElementType {
9
9
  FontStylePreset = "FontStylePreset",
10
10
  IntraDocumentMutex = "Mutex",
11
11
  Rule = "Rule",
12
- RuleGroup = "RuleGroup",
13
12
  DocumentFormula = "Formula",
14
13
  TaskCardFieldsConfig = "TaskCardFieldsConfig"
15
14
  }
@@ -13,7 +13,6 @@ var DocumentElementType;
13
13
  DocumentElementType["FontStylePreset"] = "FontStylePreset";
14
14
  DocumentElementType["IntraDocumentMutex"] = "Mutex";
15
15
  DocumentElementType["Rule"] = "Rule";
16
- DocumentElementType["RuleGroup"] = "RuleGroup";
17
16
  DocumentElementType["DocumentFormula"] = "Formula";
18
17
  DocumentElementType["TaskCardFieldsConfig"] = "TaskCardFieldsConfig";
19
18
  })(DocumentElementType = exports.DocumentElementType || (exports.DocumentElementType = {}));