lucid-extension-sdk 0.0.256 → 0.0.258
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 +6 -2
- package/core/cardintegration/cardfielddisplaysettings.js +5 -1
- package/core/data/serializedfield/serializedfielddefinition.d.ts +2 -1
- package/core/data/serializedfield/serializedfielddefinition.js +1 -0
- package/data/schemadefinition.d.ts +6 -2
- package/data/schemadefinition.js +4 -1
- package/document/blockclasses/cardblockproxy.d.ts +0 -1
- package/document/blockclasses/cardblockproxy.js +0 -1
- package/package.json +1 -1
|
@@ -169,12 +169,16 @@ export declare function serializeLucidCardFieldDisplaySettings(settings: LucidCa
|
|
|
169
169
|
/** @ignore */
|
|
170
170
|
export declare function deserializeLucidCardFieldDisplaySettings(settings: SerializedLucidCardFieldDisplaySettings): LucidCardFieldDisplaySettings;
|
|
171
171
|
/**
|
|
172
|
-
* These are the
|
|
172
|
+
* These are the six possible values for the status of a basic card block.
|
|
173
|
+
* Must be kept in sync with cake/app/webroot/ts/libraries/lucidcards/lucidcarddefaultstatus.ts
|
|
173
174
|
*/
|
|
174
175
|
export declare enum StatusValues {
|
|
176
|
+
New = "New",
|
|
175
177
|
Todo = "To Do",
|
|
176
178
|
InProgress = "In Progress",
|
|
177
|
-
Done = "Done"
|
|
179
|
+
Done = "Done",
|
|
180
|
+
NotDoing = "Not Doing",
|
|
181
|
+
Blocked = "Blocked"
|
|
178
182
|
}
|
|
179
183
|
export declare enum LucidCardFields {
|
|
180
184
|
Title = "Title",
|
|
@@ -102,13 +102,17 @@ function deserializeLucidCardFieldDisplaySettings(settings) {
|
|
|
102
102
|
}
|
|
103
103
|
exports.deserializeLucidCardFieldDisplaySettings = deserializeLucidCardFieldDisplaySettings;
|
|
104
104
|
/**
|
|
105
|
-
* These are the
|
|
105
|
+
* These are the six possible values for the status of a basic card block.
|
|
106
|
+
* Must be kept in sync with cake/app/webroot/ts/libraries/lucidcards/lucidcarddefaultstatus.ts
|
|
106
107
|
*/
|
|
107
108
|
var StatusValues;
|
|
108
109
|
(function (StatusValues) {
|
|
110
|
+
StatusValues["New"] = "New";
|
|
109
111
|
StatusValues["Todo"] = "To Do";
|
|
110
112
|
StatusValues["InProgress"] = "In Progress";
|
|
111
113
|
StatusValues["Done"] = "Done";
|
|
114
|
+
StatusValues["NotDoing"] = "Not Doing";
|
|
115
|
+
StatusValues["Blocked"] = "Blocked";
|
|
112
116
|
})(StatusValues || (exports.StatusValues = StatusValues = {}));
|
|
113
117
|
var LucidCardFields;
|
|
114
118
|
(function (LucidCardFields) {
|
|
@@ -10,7 +10,8 @@ export declare enum FieldConstraintType {
|
|
|
10
10
|
MAX_VALUE = "maxValue",
|
|
11
11
|
SINGLE_LINE_ONLY = "singleLineOnly",
|
|
12
12
|
NO_WHITESPACE = "noWhitespace",
|
|
13
|
-
UNIQUE_EDIT = "uniqueEditType"
|
|
13
|
+
UNIQUE_EDIT = "uniqueEditType",
|
|
14
|
+
MAX_LENGTH = "maxLength"
|
|
14
15
|
}
|
|
15
16
|
export declare const isFieldConstraintType: (x: unknown) => x is FieldConstraintType;
|
|
16
17
|
export type SerializedFieldConstraint = {
|
|
@@ -16,6 +16,7 @@ var FieldConstraintType;
|
|
|
16
16
|
FieldConstraintType["SINGLE_LINE_ONLY"] = "singleLineOnly";
|
|
17
17
|
FieldConstraintType["NO_WHITESPACE"] = "noWhitespace";
|
|
18
18
|
FieldConstraintType["UNIQUE_EDIT"] = "uniqueEditType";
|
|
19
|
+
FieldConstraintType["MAX_LENGTH"] = "maxLength";
|
|
19
20
|
})(FieldConstraintType || (exports.FieldConstraintType = FieldConstraintType = {}));
|
|
20
21
|
exports.isFieldConstraintType = (0, validators_1.enumValidator)(FieldConstraintType);
|
|
21
22
|
exports.isSerializedFieldConstraint = (0, validators_1.objectValidator)({
|
|
@@ -32,8 +32,12 @@ export interface UniqueEditFieldConstraintDefinition {
|
|
|
32
32
|
type: FieldConstraintType.UNIQUE_EDIT;
|
|
33
33
|
value?: undefined;
|
|
34
34
|
}
|
|
35
|
-
export
|
|
36
|
-
|
|
35
|
+
export interface MaxLengthConstraintDefinition {
|
|
36
|
+
type: FieldConstraintType.MAX_LENGTH;
|
|
37
|
+
value: number;
|
|
38
|
+
}
|
|
39
|
+
export type FieldConstraintDefinition = RequiredFieldConstraintDefinition | LockedFieldConstraintDefinition | MinValueFieldConstraintDefinition | MaxValueFieldConstraintDefinition | SingleLineFieldConstraintDefinition | NoWhitespaceFieldConstraintDefinition | UniqueEditFieldConstraintDefinition | MaxLengthConstraintDefinition;
|
|
40
|
+
export declare function minMaxFieldConstraintValidator(val: unknown): val is FieldConstraintType.MIN_VALUE | FieldConstraintType.MAX_VALUE | FieldConstraintType.MAX_LENGTH;
|
|
37
41
|
export declare const isFieldConstraintDefinition: (x: unknown) => x is {
|
|
38
42
|
type?: FieldConstraintType | undefined;
|
|
39
43
|
} & {
|
package/data/schemadefinition.js
CHANGED
|
@@ -6,7 +6,9 @@ const fieldtypedefinition_1 = require("../core/data/fieldtypedefinition/fieldtyp
|
|
|
6
6
|
const serializedfielddefinition_1 = require("../core/data/serializedfield/serializedfielddefinition");
|
|
7
7
|
const validators_1 = require("../core/validators/validators");
|
|
8
8
|
function minMaxFieldConstraintValidator(val) {
|
|
9
|
-
return val === serializedfielddefinition_1.FieldConstraintType.MIN_VALUE ||
|
|
9
|
+
return (val === serializedfielddefinition_1.FieldConstraintType.MIN_VALUE ||
|
|
10
|
+
val === serializedfielddefinition_1.FieldConstraintType.MAX_VALUE ||
|
|
11
|
+
val === serializedfielddefinition_1.FieldConstraintType.MAX_LENGTH);
|
|
10
12
|
}
|
|
11
13
|
exports.minMaxFieldConstraintValidator = minMaxFieldConstraintValidator;
|
|
12
14
|
exports.isFieldConstraintDefinition = (0, validators_1.both)((0, validators_1.objectValidator)({
|
|
@@ -54,6 +56,7 @@ function parseFieldDefinition(field) {
|
|
|
54
56
|
switch (constraint['Type']) {
|
|
55
57
|
case serializedfielddefinition_1.FieldConstraintType.MIN_VALUE:
|
|
56
58
|
case serializedfielddefinition_1.FieldConstraintType.MAX_VALUE:
|
|
59
|
+
case serializedfielddefinition_1.FieldConstraintType.MAX_LENGTH:
|
|
57
60
|
if (!(0, checks_1.isNumber)(constraint['Details'])) {
|
|
58
61
|
throw new Error('Invalid constraint format');
|
|
59
62
|
}
|
|
@@ -25,7 +25,6 @@ export declare class CardBlockProxy extends BlockProxy {
|
|
|
25
25
|
setDescription(description: string): void;
|
|
26
26
|
/**
|
|
27
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
28
|
*/
|
|
30
29
|
setStatus(status: StatusValues): void;
|
|
31
30
|
/**
|
|
@@ -50,7 +50,6 @@ class CardBlockProxy extends blockproxy_1.BlockProxy {
|
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
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
53
|
*/
|
|
55
54
|
setStatus(status) {
|
|
56
55
|
const settings = this.getSettings();
|