lucid-extension-sdk 0.0.412 → 0.0.414
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/data/luciduseravatar.d.ts +10 -0
- package/core/data/luciduseravatar.js +20 -0
- package/core/data/serializedfield/serializedfields.d.ts +6 -0
- package/core/data/serializedfield/serializedfields.js +9 -2
- package/document/documentelement/documentelementtype.d.ts +2 -1
- package/document/documentelement/documentelementtype.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SerializedLucidDictionary } from './serializedfield/serializedfields';
|
|
2
|
+
/**
|
|
3
|
+
* Creates avatar data as a SerializedLucidDictionary.
|
|
4
|
+
* Useful for creating user avatars in extensions built on the Lucid Extension SDK that need to be parsed by Lucid's products.
|
|
5
|
+
*
|
|
6
|
+
* @param icon - The URL for the user's avatar
|
|
7
|
+
* @param userName - Used for tooltip on the avatar
|
|
8
|
+
* @returns A SerializedLucidDictionary with the keys: avatarUrl and userName
|
|
9
|
+
*/
|
|
10
|
+
export declare function createLucidUserAvatar(avatarUrl: string, userName: string): SerializedLucidDictionary;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createLucidUserAvatar = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Creates avatar data as a SerializedLucidDictionary.
|
|
6
|
+
* Useful for creating user avatars in extensions built on the Lucid Extension SDK that need to be parsed by Lucid's products.
|
|
7
|
+
*
|
|
8
|
+
* @param icon - The URL for the user's avatar
|
|
9
|
+
* @param userName - Used for tooltip on the avatar
|
|
10
|
+
* @returns A SerializedLucidDictionary with the keys: avatarUrl and userName
|
|
11
|
+
*/
|
|
12
|
+
function createLucidUserAvatar(avatarUrl, userName) {
|
|
13
|
+
return {
|
|
14
|
+
dict: {
|
|
15
|
+
avatarUrl: avatarUrl,
|
|
16
|
+
userName: userName,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
exports.createLucidUserAvatar = createLucidUserAvatar;
|
|
@@ -93,6 +93,12 @@ export declare const isSerializedLucidCurrency: (subject: unknown) => subject is
|
|
|
93
93
|
a: typeof isNumber;
|
|
94
94
|
t: typeof isString;
|
|
95
95
|
}>;
|
|
96
|
+
export declare const isSerializedLucidAvatarDataDictionary: (subject: unknown) => subject is import("../../guards").DestructureGuardedTypeObj<{
|
|
97
|
+
dict: (subject: unknown) => subject is import("../../guards").DestructureGuardedTypeObj<{
|
|
98
|
+
avatarUrl: (x: unknown) => x is string | undefined;
|
|
99
|
+
userName: typeof isString;
|
|
100
|
+
}>;
|
|
101
|
+
}>;
|
|
96
102
|
export declare const isSerializedMillisecondsDateObject: (subject: unknown) => subject is import("../../guards").DestructureGuardedTypeObj<{
|
|
97
103
|
ms: typeof isNumber;
|
|
98
104
|
isDateOnly: (x: unknown) => x is boolean | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isSerializedFields = exports.isSerializedJsonFieldType = exports.isSerializedFieldType = exports.isSerializedLucidIconDataDictionary = exports.isSerializedTimeObject = exports.isSerializedLucidDateObject = exports.isSerializedIsoDateObject = exports.isSerializedMillisecondsDateObject = exports.isSerializedLucidCurrency = exports.isSerializedLucidDictionary = exports.isJsonSerializedLucidDictionary = exports.isNestedSerializedLucidDictionary = exports.isSerializedColorObjectFieldType = void 0;
|
|
3
|
+
exports.isSerializedFields = exports.isSerializedJsonFieldType = exports.isSerializedFieldType = exports.isSerializedLucidIconDataDictionary = exports.isSerializedTimeObject = exports.isSerializedLucidDateObject = exports.isSerializedIsoDateObject = exports.isSerializedMillisecondsDateObject = exports.isSerializedLucidAvatarDataDictionary = exports.isSerializedLucidCurrency = exports.isSerializedLucidDictionary = exports.isJsonSerializedLucidDictionary = exports.isNestedSerializedLucidDictionary = exports.isSerializedColorObjectFieldType = void 0;
|
|
4
4
|
const checks_1 = require("../../checks");
|
|
5
5
|
const validators_1 = require("../../validators/validators");
|
|
6
6
|
function isSerializedColorObjectFieldType(value) {
|
|
@@ -20,6 +20,12 @@ exports.isSerializedLucidCurrency = (0, validators_1.objectValidator)({
|
|
|
20
20
|
'a': checks_1.isNumber,
|
|
21
21
|
't': checks_1.isString,
|
|
22
22
|
});
|
|
23
|
+
exports.isSerializedLucidAvatarDataDictionary = (0, validators_1.objectValidator)({
|
|
24
|
+
'dict': (0, validators_1.objectValidator)({
|
|
25
|
+
'avatarUrl': (0, validators_1.option)(checks_1.isString),
|
|
26
|
+
'userName': checks_1.isString,
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
23
29
|
exports.isSerializedMillisecondsDateObject = (0, validators_1.objectValidator)({
|
|
24
30
|
'ms': checks_1.isNumber,
|
|
25
31
|
'isDateOnly': (0, validators_1.option)(checks_1.isBoolean),
|
|
@@ -52,7 +58,8 @@ function isSerializedFieldType(value) {
|
|
|
52
58
|
(0, exports.isSerializedLucidDateObject)(value) ||
|
|
53
59
|
(0, exports.isSerializedTimeObject)(value) ||
|
|
54
60
|
isSerializedColorObjectFieldType(value) ||
|
|
55
|
-
(0, exports.isSerializedLucidIconDataDictionary)(value)
|
|
61
|
+
(0, exports.isSerializedLucidIconDataDictionary)(value) ||
|
|
62
|
+
(0, exports.isSerializedLucidAvatarDataDictionary)(value));
|
|
56
63
|
}
|
|
57
64
|
exports.isSerializedFieldType = isSerializedFieldType;
|
|
58
65
|
function isSerializedJsonFieldType(value) {
|
|
@@ -18,5 +18,6 @@ export declare enum DocumentElementType {
|
|
|
18
18
|
ShapeSpecificDefaultProperties = "ShapeSpecificDefaultProperties",
|
|
19
19
|
TrackedFormulaLocation = "TrackedFormulaLocation",
|
|
20
20
|
ElementAlias = "ElementAlias",
|
|
21
|
-
GeneratorCardSyncConfig = "GeneratorCardSyncConfig"
|
|
21
|
+
GeneratorCardSyncConfig = "GeneratorCardSyncConfig",
|
|
22
|
+
ScenarioSet = "ScenarioSet"
|
|
22
23
|
}
|
|
@@ -23,4 +23,5 @@ var DocumentElementType;
|
|
|
23
23
|
DocumentElementType["TrackedFormulaLocation"] = "TrackedFormulaLocation";
|
|
24
24
|
DocumentElementType["ElementAlias"] = "ElementAlias";
|
|
25
25
|
DocumentElementType["GeneratorCardSyncConfig"] = "GeneratorCardSyncConfig";
|
|
26
|
+
DocumentElementType["ScenarioSet"] = "ScenarioSet";
|
|
26
27
|
})(DocumentElementType || (exports.DocumentElementType = DocumentElementType = {}));
|