lucid-extension-sdk 0.0.427 → 0.0.429
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
|
@@ -1015,6 +1015,8 @@ export type AddSpreadsheetIntegrationQuery = {
|
|
|
1015
1015
|
/** Dark Icon URl */
|
|
1016
1016
|
'di'?: string;
|
|
1017
1017
|
} | undefined;
|
|
1018
|
+
/** importDescription */
|
|
1019
|
+
'id'?: string | undefined;
|
|
1018
1020
|
/** addCardsIntegration */
|
|
1019
1021
|
'c'?: boolean;
|
|
1020
1022
|
/** getUpstreamSourceUrl */
|
|
@@ -73,6 +73,10 @@ export declare abstract class LucidSpreadsheetIntegration {
|
|
|
73
73
|
*/
|
|
74
74
|
darkIconUrl?: string;
|
|
75
75
|
};
|
|
76
|
+
/**
|
|
77
|
+
* Subtext to show for this import option in the import modal
|
|
78
|
+
*/
|
|
79
|
+
importDescription?: string;
|
|
76
80
|
abstract dataConnectorName: string;
|
|
77
81
|
addCardsIntegration: boolean;
|
|
78
82
|
abstract configChooser: ListChooser | CustomDetailsChooser;
|
|
@@ -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': (
|
|
73
|
-
'uri': (
|
|
74
|
-
'dadr': (
|
|
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
|
};
|
|
@@ -82,6 +94,9 @@ class LucidSpreadsheetIntegrationRegistry {
|
|
|
82
94
|
'di': spreadsheetIntegration.iconConfiguration.darkIconUrl,
|
|
83
95
|
};
|
|
84
96
|
}
|
|
97
|
+
if (spreadsheetIntegration.importDescription) {
|
|
98
|
+
serialized['id'] = spreadsheetIntegration.importDescription;
|
|
99
|
+
}
|
|
85
100
|
if (spreadsheetIntegration.addCard) {
|
|
86
101
|
const addCard = spreadsheetIntegration.addCard;
|
|
87
102
|
serialized['ac'] = {
|