lucid-extension-sdk 0.0.427 → 0.0.428

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.
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LucidSpreadsheetIntegrationRegistry = void 0;
4
+ const datasourceproxy_1 = require("../../data/datasourceproxy");
4
5
  const checks_1 = require("../checks");
5
6
  const cardintegrationdefinitions_1 = require("../sharedcardintegration/cardintegrationdefinitions");
6
7
  const lucidspreadsheetintegration_1 = require("./lucidspreadsheetintegration");
@@ -13,7 +14,7 @@ class LucidSpreadsheetIntegrationRegistry {
13
14
  * Register a spreadsheet integration.
14
15
  */
15
16
  static addSpreadsheetIntegration(client, spreadsheetIntegration) {
16
- var _a, _b, _c, _d, _e, _f;
17
+ var _a, _b, _c, _d, _e, _f, _g;
17
18
  let configChooserActions;
18
19
  const configChooser = spreadsheetIntegration.configChooser;
19
20
  if (configChooser instanceof lucidspreadsheetintegration_1.CustomDetailsChooser) {
@@ -60,6 +61,16 @@ class LucidSpreadsheetIntegrationRegistry {
60
61
  catch (error) { }
61
62
  return lucidspreadsheetintegration_1.LucidSpreadsheetIntegrationFailureType.GenericFailure;
62
63
  });
64
+ let getFieldsActionName = undefined;
65
+ const getAllFields = (_a = spreadsheetIntegration.fieldConfiguration) === null || _a === void 0 ? void 0 : _a.getAllFields;
66
+ if (getAllFields) {
67
+ getFieldsActionName = LucidSpreadsheetIntegrationRegistry.nextHookName();
68
+ client.registerAction(getFieldsActionName, async (param) => {
69
+ const dataSource = new datasourceproxy_1.DataSourceProxy(param['d'], client);
70
+ const fields = await getAllFields(dataSource);
71
+ return fields;
72
+ });
73
+ }
63
74
  const serialized = {
64
75
  'ld': spreadsheetIntegration.labelDescription,
65
76
  'li': spreadsheetIntegration.labelIconUrl,
@@ -68,10 +79,11 @@ class LucidSpreadsheetIntegrationRegistry {
68
79
  'gs': configChooserActions,
69
80
  'gm': getMultipleSheetsForSpreadsheetDetailsActionName,
70
81
  'fc': {
82
+ 'gf': getFieldsActionName,
71
83
  'cfds': {
72
- 'd': (_b = (_a = spreadsheetIntegration.fieldConfiguration) === null || _a === void 0 ? void 0 : _a.customFieldDisplaySettings) === null || _b === void 0 ? void 0 : _b.defaultToMultilineText,
73
- 'uri': (_d = (_c = spreadsheetIntegration.fieldConfiguration) === null || _c === void 0 ? void 0 : _c.customFieldDisplaySettings) === null || _d === void 0 ? void 0 : _d.useRoundIcons,
74
- 'dadr': (_f = (_e = spreadsheetIntegration.fieldConfiguration) === null || _e === void 0 ? void 0 : _e.customFieldDisplaySettings) === null || _f === void 0 ? void 0 : _f.displayMappedDatesAsDateRange,
84
+ 'd': (_c = (_b = spreadsheetIntegration.fieldConfiguration) === null || _b === void 0 ? void 0 : _b.customFieldDisplaySettings) === null || _c === void 0 ? void 0 : _c.defaultToMultilineText,
85
+ 'uri': (_e = (_d = spreadsheetIntegration.fieldConfiguration) === null || _d === void 0 ? void 0 : _d.customFieldDisplaySettings) === null || _e === void 0 ? void 0 : _e.useRoundIcons,
86
+ 'dadr': (_g = (_f = spreadsheetIntegration.fieldConfiguration) === null || _f === void 0 ? void 0 : _f.customFieldDisplaySettings) === null || _g === void 0 ? void 0 : _g.displayMappedDatesAsDateRange,
75
87
  },
76
88
  },
77
89
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.427",
3
+ "version": "0.0.428",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",