lucid-extension-sdk 0.0.230 → 0.0.232
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.
|
@@ -62,6 +62,16 @@ export type ImageBadgeSettings = {
|
|
|
62
62
|
height: number;
|
|
63
63
|
width: number;
|
|
64
64
|
};
|
|
65
|
+
export type TextBadgeSettings = {
|
|
66
|
+
bold?: boolean;
|
|
67
|
+
italic?: boolean;
|
|
68
|
+
underline?: boolean;
|
|
69
|
+
rounding?: number;
|
|
70
|
+
minwidth?: number;
|
|
71
|
+
minheight?: number;
|
|
72
|
+
maxfontsize?: number;
|
|
73
|
+
maxtextwidth?: number;
|
|
74
|
+
};
|
|
65
75
|
export interface StencilConfig {
|
|
66
76
|
/**
|
|
67
77
|
* How should we generate the stencil/data graphic from the specified field value?
|
|
@@ -124,6 +134,11 @@ export interface StencilConfig {
|
|
|
124
134
|
* If onClickHandlerKey is OpenBrowserWindow, this formula calculates the URL to open.
|
|
125
135
|
*/
|
|
126
136
|
linkFormula?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Allows the same card to have multiple textbadges but have different properties.
|
|
139
|
+
* You can change bold, italic, underline, rounding, minwidth, minheight, maxtextwidth, maxfontsize
|
|
140
|
+
*/
|
|
141
|
+
textBadgeSettings?: TextBadgeSettings;
|
|
127
142
|
}
|
|
128
143
|
/**
|
|
129
144
|
* Configuration settings for how to display a particular field on the card itself.
|
|
@@ -146,6 +161,7 @@ export type SerializedLucidCardFieldDisplaySettings = {
|
|
|
146
161
|
'v'?: VerticalBadgePos;
|
|
147
162
|
'onClickHandlerKey'?: OnClickHandlerKeys;
|
|
148
163
|
'imageBadgeSettings'?: ImageBadgeSettings;
|
|
164
|
+
'textBadgeSettings'?: TextBadgeSettings;
|
|
149
165
|
};
|
|
150
166
|
};
|
|
151
167
|
/** @ignore */
|
|
@@ -77,6 +77,7 @@ function serializeLucidCardFieldDisplaySettings(settings) {
|
|
|
77
77
|
'v': settings.stencilConfig.verticalPosition,
|
|
78
78
|
'onClickHandlerKey': settings.stencilConfig.onClickHandlerKey,
|
|
79
79
|
'imageBadgeSettings': settings.stencilConfig.imageBadgeSettings,
|
|
80
|
+
'textBadgeSettings': settings.stencilConfig.textBadgeSettings,
|
|
80
81
|
},
|
|
81
82
|
};
|
|
82
83
|
}
|
|
@@ -95,6 +96,7 @@ function deserializeLucidCardFieldDisplaySettings(settings) {
|
|
|
95
96
|
verticalPosition: settings['StencilConfig']['v'],
|
|
96
97
|
onClickHandlerKey: settings['StencilConfig']['onClickHandlerKey'],
|
|
97
98
|
imageBadgeSettings: settings['StencilConfig']['imageBadgeSettings'],
|
|
99
|
+
textBadgeSettings: settings['StencilConfig']['textBadgeSettings'],
|
|
98
100
|
},
|
|
99
101
|
};
|
|
100
102
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DataConnector = exports.DataConnectorResponseError = exports.DataConnectorRequestError = exports.DataConnectorRunError = void 0;
|
|
4
4
|
const checks_1 = require("../core/checks");
|
|
5
|
+
const validators_1 = require("../core/validators/validators");
|
|
5
6
|
const action_1 = require("./actions/action");
|
|
6
7
|
const dataconnectoractionkeys_1 = require("./actions/dataconnectoractionkeys");
|
|
7
8
|
const managewebhookresponsebody_1 = require("./actions/managewebhookresponsebody");
|
|
@@ -135,6 +136,7 @@ class DataConnector {
|
|
|
135
136
|
}
|
|
136
137
|
exports.DataConnector = DataConnector;
|
|
137
138
|
// instanceof DataConnectorRunError will not work in some environments
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
const isDataConnectorRunError = (0, validators_1.objectValidator)({
|
|
140
|
+
status: checks_1.isNumber,
|
|
141
|
+
body: checks_1.isUnknown,
|
|
142
|
+
});
|