@epam/ai-dial-shared 0.27.0-rc.4 → 0.27.0-rc.41
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/index.esm.js +30 -49
- package/package.json +3 -2
- package/src/types/features.d.ts +32 -31
- package/src/types/message-form-schema.d.ts +5 -2
package/index.esm.js
CHANGED
|
@@ -1,72 +1,50 @@
|
|
|
1
1
|
var Feature;
|
|
2
2
|
(function (Feature) {
|
|
3
|
+
// Layout
|
|
4
|
+
Feature["Header"] = "header";
|
|
5
|
+
Feature["Footer"] = "footer";
|
|
3
6
|
Feature["ConversationsSection"] = "conversations-section";
|
|
4
7
|
Feature["PromptsSection"] = "prompts-section";
|
|
8
|
+
Feature["ShowConversationsSectionByDefault"] = "showConversationsSectionByDefault";
|
|
9
|
+
Feature["ShowPromptsSectionByDefault"] = "showPromptsSectionByDefault";
|
|
10
|
+
Feature["AttachmentsManager"] = "attachments-manager";
|
|
11
|
+
// Conversation Header
|
|
12
|
+
Feature["HideNewConversation"] = "hide-new-conversation";
|
|
5
13
|
Feature["TopSettings"] = "top-settings";
|
|
6
14
|
Feature["TopClearConversation"] = "top-clear-conversation";
|
|
7
15
|
Feature["TopChatInfo"] = "top-chat-info";
|
|
8
16
|
Feature["TopChatModelSettings"] = "top-chat-model-settings";
|
|
9
17
|
Feature["HideTopContextMenu"] = "hide-top-context-menu";
|
|
18
|
+
Feature["DisallowChangeAgent"] = "disallow-change-agent";
|
|
19
|
+
// Conversation functions
|
|
20
|
+
Feature["Likes"] = "likes";
|
|
21
|
+
Feature["InputFiles"] = "input-files";
|
|
22
|
+
Feature["InputLinks"] = "input-links";
|
|
23
|
+
Feature["MessageTemplates"] = "message-templates";
|
|
24
|
+
// Conversation First Screen
|
|
10
25
|
Feature["EmptyChatSettings"] = "empty-chat-settings";
|
|
11
26
|
Feature["HideEmptyChatChangeAgent"] = "hide-empty-chat-change-agent";
|
|
12
|
-
|
|
13
|
-
Feature["Footer"] = "footer";
|
|
14
|
-
Feature["RequestApiKey"] = "request-api-key";
|
|
15
|
-
Feature["ReportAnIssue"] = "report-an-issue";
|
|
16
|
-
Feature["Likes"] = "likes";
|
|
27
|
+
// Sharing
|
|
17
28
|
Feature["ConversationsSharing"] = "conversations-sharing";
|
|
18
29
|
Feature["PromptsSharing"] = "prompts-sharing";
|
|
19
30
|
Feature["ApplicationsSharing"] = "applications-sharing";
|
|
20
|
-
|
|
21
|
-
Feature["InputLinks"] = "input-links";
|
|
22
|
-
Feature["AttachmentsManager"] = "attachments-manager";
|
|
31
|
+
// Publishing
|
|
23
32
|
Feature["ConversationsPublishing"] = "conversations-publishing";
|
|
24
33
|
Feature["PromptsPublishing"] = "prompts-publishing";
|
|
34
|
+
// Special dialogs
|
|
35
|
+
Feature["RequestApiKey"] = "request-api-key";
|
|
36
|
+
Feature["ReportAnIssue"] = "report-an-issue";
|
|
37
|
+
// User settings
|
|
38
|
+
Feature["HideUserSettings"] = "hide-user-settings";
|
|
25
39
|
Feature["CustomLogo"] = "custom-logo";
|
|
26
|
-
|
|
40
|
+
// Applications
|
|
27
41
|
Feature["CustomApplications"] = "custom-applications";
|
|
28
|
-
Feature["MessageTemplates"] = "message-templates";
|
|
29
|
-
Feature["Marketplace"] = "marketplace";
|
|
30
42
|
Feature["QuickApps"] = "quick-apps";
|
|
31
43
|
Feature["CodeApps"] = "code-apps";
|
|
32
|
-
|
|
44
|
+
// Marketplace
|
|
45
|
+
Feature["Marketplace"] = "marketplace";
|
|
33
46
|
Feature["MarketplaceTableView"] = "marketplace-table-view";
|
|
34
|
-
Feature["HideUserSettings"] = "hide-user-settings";
|
|
35
47
|
})(Feature || (Feature = {}));
|
|
36
|
-
const availableFeatures = {
|
|
37
|
-
[Feature.ConversationsSection]: true,
|
|
38
|
-
[Feature.PromptsSection]: true,
|
|
39
|
-
[Feature.TopSettings]: true,
|
|
40
|
-
[Feature.TopClearConversation]: true,
|
|
41
|
-
[Feature.TopChatInfo]: true,
|
|
42
|
-
[Feature.TopChatModelSettings]: true,
|
|
43
|
-
[Feature.HideTopContextMenu]: false,
|
|
44
|
-
[Feature.EmptyChatSettings]: true,
|
|
45
|
-
[Feature.HideEmptyChatChangeAgent]: false,
|
|
46
|
-
[Feature.Header]: true,
|
|
47
|
-
[Feature.Footer]: true,
|
|
48
|
-
[Feature.RequestApiKey]: true,
|
|
49
|
-
[Feature.ReportAnIssue]: true,
|
|
50
|
-
[Feature.Likes]: true,
|
|
51
|
-
[Feature.ConversationsSharing]: true,
|
|
52
|
-
[Feature.PromptsSharing]: true,
|
|
53
|
-
[Feature.ApplicationsSharing]: true,
|
|
54
|
-
[Feature.InputFiles]: true,
|
|
55
|
-
[Feature.InputLinks]: true,
|
|
56
|
-
[Feature.AttachmentsManager]: true,
|
|
57
|
-
[Feature.ConversationsPublishing]: true,
|
|
58
|
-
[Feature.PromptsPublishing]: true,
|
|
59
|
-
[Feature.CustomLogo]: true,
|
|
60
|
-
[Feature.HideNewConversation]: true,
|
|
61
|
-
[Feature.CustomApplications]: true,
|
|
62
|
-
[Feature.MessageTemplates]: true,
|
|
63
|
-
[Feature.Marketplace]: true,
|
|
64
|
-
[Feature.QuickApps]: true,
|
|
65
|
-
[Feature.CodeApps]: true,
|
|
66
|
-
[Feature.DisallowChangeAgent]: true,
|
|
67
|
-
[Feature.MarketplaceTableView]: true,
|
|
68
|
-
[Feature.HideUserSettings]: true,
|
|
69
|
-
};
|
|
70
48
|
|
|
71
49
|
var Role;
|
|
72
50
|
(function (Role) {
|
|
@@ -114,10 +92,13 @@ var FormSchemaPropertyType;
|
|
|
114
92
|
(function (FormSchemaPropertyType) {
|
|
115
93
|
FormSchemaPropertyType["array"] = "array";
|
|
116
94
|
FormSchemaPropertyType["number"] = "number";
|
|
95
|
+
FormSchemaPropertyType["type"] = "integer";
|
|
96
|
+
FormSchemaPropertyType["string"] = "string";
|
|
97
|
+
FormSchemaPropertyType["boolean"] = "boolean";
|
|
117
98
|
})(FormSchemaPropertyType || (FormSchemaPropertyType = {}));
|
|
118
99
|
|
|
119
100
|
const validateFeature = (feature) => {
|
|
120
|
-
return feature
|
|
101
|
+
return Object.values(Feature).includes(feature);
|
|
121
102
|
};
|
|
122
103
|
|
|
123
104
|
class Task {
|
|
@@ -270,4 +251,4 @@ var VisualizerConnectorRequests;
|
|
|
270
251
|
VisualizerConnectorRequests["setVisualizerOptions"] = "SET_VISUALIZER_OPTIONS";
|
|
271
252
|
})(VisualizerConnectorRequests || (VisualizerConnectorRequests = {}));
|
|
272
253
|
|
|
273
|
-
export { DeferredRequest, DialSchemaProperties, Feature, FormSchemaPropertyType, FormSchemaPropertyWidget, LikeState, OverlayEvents, OverlayRequests, PublishActions, Role, SharePermission, Task, UploadStatus, VisualizerConnectorEvents, VisualizerConnectorRequests,
|
|
254
|
+
export { DeferredRequest, DialSchemaProperties, Feature, FormSchemaPropertyType, FormSchemaPropertyWidget, LikeState, OverlayEvents, OverlayRequests, PublishActions, Role, SharePermission, Task, UploadStatus, VisualizerConnectorEvents, VisualizerConnectorRequests, overlayAppName, overlayLibName, setStyles, validateFeature, visualizerConnectorLibName };
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@epam/ai-dial-shared",
|
|
3
3
|
"description": "Shared elements that support developing DIAL",
|
|
4
4
|
"homepage": "https://epam-rail.com",
|
|
5
|
-
"version": "0.27.0-rc.
|
|
5
|
+
"version": "0.27.0-rc.41",
|
|
6
6
|
"dependencies": {},
|
|
7
7
|
"type": "module",
|
|
8
8
|
"bugs": {
|
|
@@ -15,5 +15,6 @@
|
|
|
15
15
|
"directory": "libs/shared"
|
|
16
16
|
},
|
|
17
17
|
"module": "./index.esm.js",
|
|
18
|
-
"main": "./index.esm.js"
|
|
18
|
+
"main": "./index.esm.js",
|
|
19
|
+
"types": "./index.esm.d.ts"
|
|
19
20
|
}
|
package/src/types/features.d.ts
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
export declare enum Feature {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
2
|
+
Header = "header",// Display app header
|
|
3
|
+
Footer = "footer",// Display app footer
|
|
4
|
+
ConversationsSection = "conversations-section",// Display conversations sidebar
|
|
5
|
+
PromptsSection = "prompts-section",// Display prompts sidebar
|
|
6
|
+
ShowConversationsSectionByDefault = "showConversationsSectionByDefault",// show conversations sidebar by default on desktop
|
|
7
|
+
ShowPromptsSectionByDefault = "showPromptsSectionByDefault",// show prompts sidebar by default on desktop
|
|
8
|
+
AttachmentsManager = "attachments-manager",// Display attachments manager in conversation
|
|
9
|
+
HideNewConversation = "hide-new-conversation",// hide "New conversation" button
|
|
10
|
+
TopSettings = "top-settings",// Display conversation top header
|
|
11
|
+
TopClearConversation = "top-clear-conversation",// Display clear conversations button in chat top settings
|
|
12
|
+
TopChatInfo = "top-chat-info",// Display conversation info in top chat settings
|
|
13
|
+
TopChatModelSettings = "top-chat-model-settings",// Display change model settings button
|
|
14
|
+
HideTopContextMenu = "hide-top-context-menu",// Hide top context menu button
|
|
15
|
+
DisallowChangeAgent = "disallow-change-agent",// Disallow "Change agent" button
|
|
16
|
+
Likes = "likes",// Display likes
|
|
17
|
+
InputFiles = "input-files",// Allow attach files to conversation
|
|
18
|
+
InputLinks = "input-links",// Allow attach links to conversation
|
|
19
|
+
MessageTemplates = "message-templates",// message templates
|
|
20
|
+
EmptyChatSettings = "empty-chat-settings",// Display settings for empty chat
|
|
21
|
+
HideEmptyChatChangeAgent = "hide-empty-chat-change-agent",// Hide empty chat "Change agent" button
|
|
22
|
+
ConversationsSharing = "conversations-sharing",// Display conversation sharing
|
|
23
|
+
PromptsSharing = "prompts-sharing",// Display prompts sharing
|
|
24
|
+
ApplicationsSharing = "applications-sharing",// Display applications sharing
|
|
22
25
|
ConversationsPublishing = "conversations-publishing",
|
|
23
26
|
PromptsPublishing = "prompts-publishing",
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
QuickApps = "quick-apps"
|
|
30
|
-
CodeApps = "code-apps"
|
|
31
|
-
|
|
32
|
-
MarketplaceTableView = "marketplace-table-view"
|
|
33
|
-
HideUserSettings = "hide-user-settings"
|
|
27
|
+
RequestApiKey = "request-api-key",// Display request API Key modal
|
|
28
|
+
ReportAnIssue = "report-an-issue",// Display report issue modal
|
|
29
|
+
HideUserSettings = "hide-user-settings",// Hide user settings
|
|
30
|
+
CustomLogo = "custom-logo",// Enable setting for custom logo feature
|
|
31
|
+
CustomApplications = "custom-applications",// custom applications
|
|
32
|
+
QuickApps = "quick-apps",// Enable Quick apps
|
|
33
|
+
CodeApps = "code-apps",// Enable Code apps
|
|
34
|
+
Marketplace = "marketplace",// Enable Marketplace
|
|
35
|
+
MarketplaceTableView = "marketplace-table-view"
|
|
34
36
|
}
|
|
35
|
-
export declare const availableFeatures: Record<Feature, boolean>;
|
|
@@ -15,11 +15,14 @@ export interface FormSchemaButtonOption {
|
|
|
15
15
|
submit?: boolean;
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
export type MessageFormValueType = string[] | number | undefined;
|
|
18
|
+
export type MessageFormValueType = string[] | number | string | boolean | undefined;
|
|
19
19
|
export type MessageFormValue = Record<string, MessageFormValueType>;
|
|
20
20
|
export declare enum FormSchemaPropertyType {
|
|
21
21
|
array = "array",
|
|
22
|
-
number = "number"
|
|
22
|
+
number = "number",
|
|
23
|
+
type = "integer",
|
|
24
|
+
string = "string",
|
|
25
|
+
boolean = "boolean"
|
|
23
26
|
}
|
|
24
27
|
export interface FormSchemaProperty {
|
|
25
28
|
[DialSchemaProperties.DialWidget]?: FormSchemaPropertyWidget;
|