lucid-extension-sdk 0.0.158 → 0.0.160
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/core/cardintegration/cardfielddisplaysettings.d.ts +17 -0
- package/core/cardintegration/cardfielddisplaysettings.js +20 -1
- package/dataconnector/datasourceclient.js +1 -8
- package/dataconnector/signaturevalidator.d.ts +0 -2
- package/dataconnector/signaturevalidator.js +0 -4
- package/document/blockclasses/cardblockproxy.d.ts +43 -0
- package/document/blockclasses/cardblockproxy.js +86 -0
- package/package.json +1 -1
|
@@ -148,3 +148,20 @@ export declare type SerializedLucidCardFieldDisplaySettings = {
|
|
|
148
148
|
export declare function serializeLucidCardFieldDisplaySettings(settings: LucidCardFieldDisplaySettings): SerializedLucidCardFieldDisplaySettings;
|
|
149
149
|
/** @ignore */
|
|
150
150
|
export declare function deserializeLucidCardFieldDisplaySettings(settings: SerializedLucidCardFieldDisplaySettings): LucidCardFieldDisplaySettings;
|
|
151
|
+
/**
|
|
152
|
+
* These are the three possible values for the status of a basic card block.
|
|
153
|
+
*/
|
|
154
|
+
export declare enum StatusValues {
|
|
155
|
+
Todo = "To Do",
|
|
156
|
+
InProgress = "In Progress",
|
|
157
|
+
Done = "Done"
|
|
158
|
+
}
|
|
159
|
+
export declare enum LucidCardFields {
|
|
160
|
+
Title = "Title",
|
|
161
|
+
Description = "Description",
|
|
162
|
+
Assignee = "Assignee",
|
|
163
|
+
Estimate = "Estimate",
|
|
164
|
+
Status = "Status",
|
|
165
|
+
StartTime = "StartTime",
|
|
166
|
+
EndTime = "EndTime"
|
|
167
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeLucidCardFieldDisplaySettings = exports.serializeLucidCardFieldDisplaySettings = exports.isOnClickHandlerKey = exports.OnClickHandlerKeys = exports.isFieldDisplayType = exports.FieldDisplayType = void 0;
|
|
3
|
+
exports.LucidCardFields = exports.StatusValues = exports.deserializeLucidCardFieldDisplaySettings = exports.serializeLucidCardFieldDisplaySettings = exports.isOnClickHandlerKey = exports.OnClickHandlerKeys = exports.isFieldDisplayType = exports.FieldDisplayType = void 0;
|
|
4
4
|
const validators_1 = require("../validators/validators");
|
|
5
5
|
/**
|
|
6
6
|
* When configuring a field on a LucidCardBlock to be displayed as a data graphic, one of these values specifies
|
|
@@ -95,3 +95,22 @@ function deserializeLucidCardFieldDisplaySettings(settings) {
|
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
exports.deserializeLucidCardFieldDisplaySettings = deserializeLucidCardFieldDisplaySettings;
|
|
98
|
+
/**
|
|
99
|
+
* These are the three possible values for the status of a basic card block.
|
|
100
|
+
*/
|
|
101
|
+
var StatusValues;
|
|
102
|
+
(function (StatusValues) {
|
|
103
|
+
StatusValues["Todo"] = "To Do";
|
|
104
|
+
StatusValues["InProgress"] = "In Progress";
|
|
105
|
+
StatusValues["Done"] = "Done";
|
|
106
|
+
})(StatusValues = exports.StatusValues || (exports.StatusValues = {}));
|
|
107
|
+
var LucidCardFields;
|
|
108
|
+
(function (LucidCardFields) {
|
|
109
|
+
LucidCardFields["Title"] = "Title";
|
|
110
|
+
LucidCardFields["Description"] = "Description";
|
|
111
|
+
LucidCardFields["Assignee"] = "Assignee";
|
|
112
|
+
LucidCardFields["Estimate"] = "Estimate";
|
|
113
|
+
LucidCardFields["Status"] = "Status";
|
|
114
|
+
LucidCardFields["StartTime"] = "StartTime";
|
|
115
|
+
LucidCardFields["EndTime"] = "EndTime";
|
|
116
|
+
})(LucidCardFields = exports.LucidCardFields || (exports.LucidCardFields = {}));
|
|
@@ -21,14 +21,7 @@ class DataSourceClient {
|
|
|
21
21
|
const dataSyncUrl = urls.dataSync;
|
|
22
22
|
this.metadataUrl = (0, checks_1.isString)(dataSyncUrl) ? `${dataSyncUrl}dataSource/metadata` : undefined;
|
|
23
23
|
}
|
|
24
|
-
formatBody({
|
|
25
|
-
const upstreamConfig = updateFilterType
|
|
26
|
-
? {
|
|
27
|
-
'upstreamConfig': {
|
|
28
|
-
'UpdateType': updateFilterType,
|
|
29
|
-
},
|
|
30
|
-
}
|
|
31
|
-
: {};
|
|
24
|
+
formatBody({ dataSourceName, collections }) {
|
|
32
25
|
const updateData = {};
|
|
33
26
|
for (const collectionId in collections) {
|
|
34
27
|
updateData[collectionId] = (0, datasourceupdatetypes_1.serializeCollectionPatch)(collections[collectionId]);
|
|
@@ -33,10 +33,6 @@ class SignatureValidator {
|
|
|
33
33
|
exports.SignatureValidator = SignatureValidator;
|
|
34
34
|
/** Mock signature validator, always returns true. */
|
|
35
35
|
class MockSignatureValidator {
|
|
36
|
-
constructor() {
|
|
37
|
-
this.publicKey = false;
|
|
38
|
-
}
|
|
39
|
-
/** Returns true */
|
|
40
36
|
validate() {
|
|
41
37
|
return true;
|
|
42
38
|
}
|
|
@@ -1,4 +1,47 @@
|
|
|
1
|
+
import { StatusValues } from '../../core/cardintegration/cardfielddisplaysettings';
|
|
2
|
+
import { SerializedIsoDateObject } from '../../core/data/serializedfield/serializedfields';
|
|
1
3
|
import { BlockProxy } from '../blockproxy';
|
|
4
|
+
/**
|
|
5
|
+
* A generic lucid card block.
|
|
6
|
+
* This shape has all of the base functionality as a BlockProxy, as well as additional card specific properties.
|
|
7
|
+
*/
|
|
2
8
|
export declare class CardBlockProxy extends BlockProxy {
|
|
3
9
|
static classNameRegex: RegExp;
|
|
10
|
+
private getSettings;
|
|
11
|
+
getTitle(): string;
|
|
12
|
+
getDescription(): string;
|
|
13
|
+
getStatus(): StatusValues;
|
|
14
|
+
getAssignee(): string;
|
|
15
|
+
getStartTime(): SerializedIsoDateObject;
|
|
16
|
+
getEndTime(): SerializedIsoDateObject;
|
|
17
|
+
getEstimate(): number;
|
|
18
|
+
/**
|
|
19
|
+
* @param title The title that you want to set for this card.
|
|
20
|
+
*/
|
|
21
|
+
setTitle(title: string): void;
|
|
22
|
+
/**
|
|
23
|
+
* @param description The description that you want to set for this card.
|
|
24
|
+
*/
|
|
25
|
+
setDescription(description: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* @param status The status that you want to set for this card.
|
|
28
|
+
* This can be one of three values: "To Do", "In Progress", or "Done".
|
|
29
|
+
*/
|
|
30
|
+
setStatus(status: StatusValues): void;
|
|
31
|
+
/**
|
|
32
|
+
* @param assignee The assignee that you want to set for this card.
|
|
33
|
+
*/
|
|
34
|
+
setAssignee(assignee: string): void;
|
|
35
|
+
/**
|
|
36
|
+
* @param startTime The start time that you want to set for this card.
|
|
37
|
+
*/
|
|
38
|
+
setStartTime(startTime: SerializedIsoDateObject): void;
|
|
39
|
+
/**
|
|
40
|
+
* @param endTime The end time that you want to set for this card.
|
|
41
|
+
*/
|
|
42
|
+
setEndTime(endTime: SerializedIsoDateObject): void;
|
|
43
|
+
/**
|
|
44
|
+
* @param estimate The estimate that you want to set for this card.
|
|
45
|
+
*/
|
|
46
|
+
setEstimate(estimate: number): void;
|
|
4
47
|
}
|
|
@@ -1,8 +1,94 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CardBlockProxy = void 0;
|
|
4
|
+
const cardfielddisplaysettings_1 = require("../../core/cardintegration/cardfielddisplaysettings");
|
|
4
5
|
const blockproxy_1 = require("../blockproxy");
|
|
6
|
+
/**
|
|
7
|
+
* A generic lucid card block.
|
|
8
|
+
* This shape has all of the base functionality as a BlockProxy, as well as additional card specific properties.
|
|
9
|
+
*/
|
|
5
10
|
class CardBlockProxy extends blockproxy_1.BlockProxy {
|
|
11
|
+
getSettings() {
|
|
12
|
+
return this.referenceKeys.get(this.referenceKeys.keys()[0]).definition;
|
|
13
|
+
}
|
|
14
|
+
getTitle() {
|
|
15
|
+
return this.getSettings().data[cardfielddisplaysettings_1.LucidCardFields.Title];
|
|
16
|
+
}
|
|
17
|
+
getDescription() {
|
|
18
|
+
return this.getSettings().data[cardfielddisplaysettings_1.LucidCardFields.Description];
|
|
19
|
+
}
|
|
20
|
+
getStatus() {
|
|
21
|
+
return this.getSettings().data[cardfielddisplaysettings_1.LucidCardFields.Status];
|
|
22
|
+
}
|
|
23
|
+
getAssignee() {
|
|
24
|
+
return this.getSettings().data[cardfielddisplaysettings_1.LucidCardFields.Assignee];
|
|
25
|
+
}
|
|
26
|
+
getStartTime() {
|
|
27
|
+
return this.getSettings().data[cardfielddisplaysettings_1.LucidCardFields.StartTime];
|
|
28
|
+
}
|
|
29
|
+
getEndTime() {
|
|
30
|
+
return this.getSettings().data[cardfielddisplaysettings_1.LucidCardFields.EndTime];
|
|
31
|
+
}
|
|
32
|
+
getEstimate() {
|
|
33
|
+
return this.getSettings().data[cardfielddisplaysettings_1.LucidCardFields.Estimate];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @param title The title that you want to set for this card.
|
|
37
|
+
*/
|
|
38
|
+
setTitle(title) {
|
|
39
|
+
const settings = this.getSettings();
|
|
40
|
+
settings.data[cardfielddisplaysettings_1.LucidCardFields.Title] = title;
|
|
41
|
+
this.setReferenceKey(this.referenceKeys.keys()[0], settings);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @param description The description that you want to set for this card.
|
|
45
|
+
*/
|
|
46
|
+
setDescription(description) {
|
|
47
|
+
const settings = this.getSettings();
|
|
48
|
+
settings.data[cardfielddisplaysettings_1.LucidCardFields.Description] = description;
|
|
49
|
+
this.setReferenceKey(this.referenceKeys.keys()[0], settings);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* @param status The status that you want to set for this card.
|
|
53
|
+
* This can be one of three values: "To Do", "In Progress", or "Done".
|
|
54
|
+
*/
|
|
55
|
+
setStatus(status) {
|
|
56
|
+
const settings = this.getSettings();
|
|
57
|
+
settings.data[cardfielddisplaysettings_1.LucidCardFields.Status] = status;
|
|
58
|
+
this.setReferenceKey(this.referenceKeys.keys()[0], settings);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @param assignee The assignee that you want to set for this card.
|
|
62
|
+
*/
|
|
63
|
+
setAssignee(assignee) {
|
|
64
|
+
const settings = this.getSettings();
|
|
65
|
+
settings.data[cardfielddisplaysettings_1.LucidCardFields.Assignee] = assignee;
|
|
66
|
+
this.setReferenceKey(this.referenceKeys.keys()[0], settings);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @param startTime The start time that you want to set for this card.
|
|
70
|
+
*/
|
|
71
|
+
setStartTime(startTime) {
|
|
72
|
+
const settings = this.getSettings();
|
|
73
|
+
settings.data[cardfielddisplaysettings_1.LucidCardFields.StartTime] = startTime;
|
|
74
|
+
this.setReferenceKey(this.referenceKeys.keys()[0], settings);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* @param endTime The end time that you want to set for this card.
|
|
78
|
+
*/
|
|
79
|
+
setEndTime(endTime) {
|
|
80
|
+
const settings = this.getSettings();
|
|
81
|
+
settings.data[cardfielddisplaysettings_1.LucidCardFields.EndTime] = endTime;
|
|
82
|
+
this.setReferenceKey(this.referenceKeys.keys()[0], settings);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* @param estimate The estimate that you want to set for this card.
|
|
86
|
+
*/
|
|
87
|
+
setEstimate(estimate) {
|
|
88
|
+
const settings = this.getSettings();
|
|
89
|
+
settings.data[cardfielddisplaysettings_1.LucidCardFields.Estimate] = estimate;
|
|
90
|
+
this.setReferenceKey(this.referenceKeys.keys()[0], settings);
|
|
91
|
+
}
|
|
6
92
|
}
|
|
7
93
|
exports.CardBlockProxy = CardBlockProxy;
|
|
8
94
|
CardBlockProxy.classNameRegex = /^LucidCardBlock$/;
|