lucid-extension-sdk 0.0.399 → 0.0.401
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
|
@@ -1194,8 +1194,6 @@ export type CreateUserImageResult = Promise<RawCreateUserImageResult>;
|
|
|
1194
1194
|
export type SerializedCustomFieldDisplaySettings = {
|
|
1195
1195
|
/** Default to multiline text */
|
|
1196
1196
|
'd'?: boolean | undefined;
|
|
1197
|
-
/** allowMultiSelectEnums */
|
|
1198
|
-
'amse'?: boolean | undefined;
|
|
1199
1197
|
/** useRoundIcons */
|
|
1200
1198
|
'uri'?: boolean | undefined;
|
|
1201
1199
|
/** displayMappedDatesAsDateRange */
|
|
@@ -156,7 +156,7 @@ class LucidCardIntegrationRegistry {
|
|
|
156
156
|
* Register a card integration.
|
|
157
157
|
*/
|
|
158
158
|
static addCardIntegration(client, cardIntegration) {
|
|
159
|
-
var _a, _b, _c, _d
|
|
159
|
+
var _a, _b, _c, _d;
|
|
160
160
|
const getFieldsActionName = LucidCardIntegrationRegistry.nextHookName();
|
|
161
161
|
client.registerAction(getFieldsActionName, async (param) => {
|
|
162
162
|
const dataSource = new datasourceproxy_1.DataSourceProxy(param['d'], client);
|
|
@@ -292,9 +292,8 @@ class LucidCardIntegrationRegistry {
|
|
|
292
292
|
if (cardIntegration.fieldConfiguration.customFieldDisplaySettings) {
|
|
293
293
|
serialized['fc']['cfds'] = {
|
|
294
294
|
'd': cardIntegration.fieldConfiguration.customFieldDisplaySettings.defaultToMultilineText,
|
|
295
|
-
'
|
|
296
|
-
'
|
|
297
|
-
'dadr': (_f = (_e = cardIntegration.fieldConfiguration) === null || _e === void 0 ? void 0 : _e.customFieldDisplaySettings) === null || _f === void 0 ? void 0 : _f.displayMappedDatesAsDateRange,
|
|
295
|
+
'uri': (_b = (_a = cardIntegration.fieldConfiguration) === null || _a === void 0 ? void 0 : _a.customFieldDisplaySettings) === null || _b === void 0 ? void 0 : _b.useRoundIcons,
|
|
296
|
+
'dadr': (_d = (_c = cardIntegration.fieldConfiguration) === null || _c === void 0 ? void 0 : _c.customFieldDisplaySettings) === null || _d === void 0 ? void 0 : _d.displayMappedDatesAsDateRange,
|
|
298
297
|
};
|
|
299
298
|
}
|
|
300
299
|
this.registerDependencyMapping(client, cardIntegration, serialized);
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { Pruner } from '../guards';
|
|
2
|
+
/**
|
|
3
|
+
* Create a pruner which allows the target to be either null or satisfy the
|
|
4
|
+
* sub-pruner.
|
|
5
|
+
*
|
|
6
|
+
* @return A pruner for the subpruner or a null value
|
|
7
|
+
*/
|
|
8
|
+
export declare function nullablePruner(subPruner: Pruner): (data: unknown, invalidFields?: Map<number, unknown[]>, level?: number) => unknown;
|
|
2
9
|
/**
|
|
3
10
|
* Creates a pruner function that will remove object fields that are invalid.
|
|
4
11
|
* If a sub-pruner is provided for a field, then the object field values will be pruned.
|
package/core/pruners/pruners.js
CHANGED
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pruneObjectField = exports.arrayPruner = exports.objectOfPruner = exports.objectPruner = void 0;
|
|
3
|
+
exports.pruneObjectField = exports.arrayPruner = exports.objectOfPruner = exports.objectPruner = exports.nullablePruner = void 0;
|
|
4
4
|
const checks_1 = require("../checks");
|
|
5
|
+
/**
|
|
6
|
+
* Create a pruner which allows the target to be either null or satisfy the
|
|
7
|
+
* sub-pruner.
|
|
8
|
+
*
|
|
9
|
+
* @return A pruner for the subpruner or a null value
|
|
10
|
+
*/
|
|
11
|
+
function nullablePruner(subPruner) {
|
|
12
|
+
return (data, invalidFields, level = 0) => {
|
|
13
|
+
if (data === null) {
|
|
14
|
+
return data;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return subPruner(data, invalidFields, level);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
exports.nullablePruner = nullablePruner;
|
|
5
22
|
/**
|
|
6
23
|
* Creates a pruner function that will remove object fields that are invalid.
|
|
7
24
|
* If a sub-pruner is provided for a field, then the object field values will be pruned.
|
|
@@ -160,10 +160,6 @@ export interface CustomFieldDisplaySettings {
|
|
|
160
160
|
* `FieldConstraintType.SINGLE_LINE_ONLY` constraint to the necessary fields.
|
|
161
161
|
* */
|
|
162
162
|
defaultToMultilineText?: boolean;
|
|
163
|
-
/** Whether multi-select dropdown fields are allowed.
|
|
164
|
-
* If false, all enum fields are coerced to single-select regardless of their type.
|
|
165
|
-
*/
|
|
166
|
-
allowMultiSelectEnums?: boolean;
|
|
167
163
|
/** Whether to default to using round icons in dropdowns in both the edit details panel and basic edit panel */
|
|
168
164
|
useRoundIcons?: boolean;
|
|
169
165
|
/**
|