@genexus/genexus-ide-ui 0.0.71 → 0.0.73
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/dist/cjs/ch-checkbox_4.cjs.entry.js +75 -51
- package/dist/cjs/ch-shortcuts.cjs.entry.js +187 -0
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-ai-assistant.cjs.entry.js +101 -0
- package/dist/cjs/gx-ide-bpm-app-declaration.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-create-kb-from-server.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-kb-manager-export.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-new-object.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-references.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-share-kb.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-select-recent-comment.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-update-partial-selection.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-update-to-revision.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-template.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-ww-images.cjs.entry.js +1 -1
- package/dist/cjs/gxg-form-textarea.cjs.entry.js +28 -9
- package/dist/cjs/gxg-text.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/_starting-template/template.css +1 -0
- package/dist/collection/components/ai-assistant/ai-assistant.css +389 -0
- package/dist/collection/components/ai-assistant/ai-assistant.js +269 -0
- package/dist/collection/components/ai-assistant/gx-ide-assets/ai-assistant/langs/ai-assistant.lang.en.json +6 -0
- package/dist/collection/components/ai-assistant/gx-ide-assets/ai-assistant/langs/ai-assistant.lang.ja.json +3 -0
- package/dist/collection/components/ai-assistant/gx-ide-assets/ai-assistant/langs/ai-assistant.lang.zh.json +3 -0
- package/dist/collection/components/bpm-application-declaration/bpm-app-declaration.css +1 -0
- package/dist/collection/components/create-kb-from-server/create-kb-from-server.css +1 -0
- package/dist/collection/components/kb-manager-export/kb-manager-export.css +1 -0
- package/dist/collection/components/kb-manager-import/kb-manager-import.css +1 -0
- package/dist/collection/components/new-environment/new-environment.css +1 -0
- package/dist/collection/components/new-kb/new-kb.css +1 -0
- package/dist/collection/components/new-object/new-object.css +1 -0
- package/dist/collection/components/object-selector/object-selector.css +1 -0
- package/dist/collection/components/references/references.css +1 -0
- package/dist/collection/components/share-kb/share-kb.css +1 -0
- package/dist/collection/components/team-dev/commit/commit.css +1 -0
- package/dist/collection/components/team-dev/select-recent-comment/select-recent-comment.css +1 -0
- package/dist/collection/components/team-dev/update/update.css +1 -0
- package/dist/collection/components/team-dev/update-partial-selection/update-partial-selection.css +1 -0
- package/dist/collection/components/team-dev/update-to-revision/update-to-revision.css +1 -0
- package/dist/collection/components/ww-images/ww-images.css +1 -0
- package/dist/components/ch-shortcuts.js +217 -0
- package/dist/components/form-textarea.js +30 -9
- package/dist/components/gx-ide-ai-assistant.d.ts +11 -0
- package/dist/components/gx-ide-ai-assistant.js +151 -0
- package/dist/components/gx-ide-bpm-app-declaration.js +1 -1
- package/dist/components/gx-ide-create-kb-from-server.js +1 -1
- package/dist/components/gx-ide-kb-manager-export.js +1 -1
- package/dist/components/gx-ide-kb-manager-import.js +1 -1
- package/dist/components/gx-ide-new-environment.js +1 -1
- package/dist/components/gx-ide-new-kb.js +1 -1
- package/dist/components/gx-ide-new-object.js +1 -1
- package/dist/components/gx-ide-object-selector.js +1 -1
- package/dist/components/gx-ide-references.js +1 -1
- package/dist/components/gx-ide-share-kb.js +1 -1
- package/dist/components/gx-ide-team-dev-commit.js +1 -1
- package/dist/components/gx-ide-team-dev-select-recent-comment.js +1 -1
- package/dist/components/gx-ide-team-dev-update-partial-selection.js +1 -1
- package/dist/components/gx-ide-team-dev-update-to-revision.js +1 -1
- package/dist/components/gx-ide-team-dev-update.js +1 -1
- package/dist/components/gx-ide-template.js +1 -1
- package/dist/components/gx-ide-ww-images.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/text.js +1 -1
- package/dist/components/tree-view-item.js +1 -1
- package/dist/components/tree-view-render.js +73 -48
- package/dist/components/tree-view.js +2 -2
- package/dist/esm/ch-checkbox_4.entry.js +75 -51
- package/dist/esm/ch-shortcuts.entry.js +183 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-ai-assistant.entry.js +97 -0
- package/dist/esm/gx-ide-bpm-app-declaration.entry.js +1 -1
- package/dist/esm/gx-ide-create-kb-from-server.entry.js +1 -1
- package/dist/esm/gx-ide-kb-manager-export.entry.js +1 -1
- package/dist/esm/gx-ide-kb-manager-import.entry.js +1 -1
- package/dist/esm/gx-ide-new-environment.entry.js +1 -1
- package/dist/esm/gx-ide-new-kb.entry.js +1 -1
- package/dist/esm/gx-ide-new-object.entry.js +1 -1
- package/dist/esm/gx-ide-object-selector.entry.js +1 -1
- package/dist/esm/gx-ide-references.entry.js +1 -1
- package/dist/esm/gx-ide-share-kb.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-commit.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-select-recent-comment.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-update-partial-selection.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-update-to-revision.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-update.entry.js +1 -1
- package/dist/esm/gx-ide-template.entry.js +1 -1
- package/dist/esm/gx-ide-ww-images.entry.js +1 -1
- package/dist/esm/gxg-form-textarea.entry.js +28 -9
- package/dist/esm/gxg-text.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/ai-assistant/langs/ai-assistant.lang.en.json +6 -0
- package/dist/genexus-ide-ui/gx-ide-assets/ai-assistant/langs/ai-assistant.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/ai-assistant/langs/ai-assistant.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/{p-aacd75fc.entry.js → p-11fa1c83.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-8f4d3169.entry.js → p-13085dd7.entry.js} +1 -1
- package/dist/genexus-ide-ui/p-3cb1b400.entry.js +1 -0
- package/dist/genexus-ide-ui/{p-da1ae937.entry.js → p-3d410e77.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-3f8995ba.entry.js → p-3d4722f2.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-99a0cd49.entry.js → p-440fe7b3.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-4c0ecfe3.entry.js → p-446c0831.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-46c2406e.entry.js → p-7e52f6fb.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-7bcb1954.entry.js → p-8c5919ec.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-4313d9be.entry.js → p-9a15e22e.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-6929875a.entry.js → p-9ad85778.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-2b2acd3d.entry.js → p-abfa88ed.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-e23d6f44.entry.js → p-b34d258d.entry.js} +1 -1
- package/dist/genexus-ide-ui/p-b417c899.entry.js +1 -0
- package/dist/genexus-ide-ui/{p-c2ffd150.entry.js → p-ba31a49e.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-24b2988b.entry.js → p-baffd9b1.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-083e01a8.entry.js → p-c3895c79.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-8e68f1d3.entry.js → p-cb07fc99.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-46901569.entry.js → p-d2aca59f.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-7af7779b.entry.js → p-d664fa18.entry.js} +1 -1
- package/dist/genexus-ide-ui/{p-e090d88c.entry.js → p-e13a299b.entry.js} +1 -1
- package/dist/genexus-ide-ui/p-f1922c2f.entry.js +1 -0
- package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/shortcuts/ch-shortcuts.css +3 -0
- package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/tree-view/tree-view-item/tree-view-item.css +0 -1
- package/dist/node_modules/@genexus/gemini/dist/collection/components/form-textarea/form-textarea.css +44 -2
- package/dist/node_modules/@genexus/gemini/dist/collection/components/text/text.css +4 -1
- package/dist/types/components/ai-assistant/ai-assistant.d.ts +69 -0
- package/dist/types/components.d.ts +70 -0
- package/package.json +3 -3
- package/dist/genexus-ide-ui/p-ee85040d.entry.js +0 -1
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
/*Gemini*/
|
|
2
|
+
/*Gx Ide*/
|
|
3
|
+
/*@container queries*/
|
|
4
|
+
/* hiChar styles
|
|
5
|
+
Found on /common/helpers.tsx hiChar function is used to add a span/class to every character that matches a search value. It is used to help the user see why the filter results are filtered. The span/class on the characters are useless without proper styling.
|
|
6
|
+
*/
|
|
7
|
+
/* Helper Classes */
|
|
8
|
+
.gxi-hidden {
|
|
9
|
+
display: none !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.gxi-full-height {
|
|
13
|
+
height: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.gxi-overflow-auto {
|
|
17
|
+
overflow: auto;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.gxi-display-flex {
|
|
21
|
+
display: flex;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.align-start {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: start;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.align-center {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.align-end {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: end;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.overflow-auto {
|
|
40
|
+
overflow: auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Grids */
|
|
44
|
+
.grid {
|
|
45
|
+
display: grid;
|
|
46
|
+
grid-row-gap: var(--gx-ide-grid-row-gap);
|
|
47
|
+
grid-column-gap: var(--gx-ide-grid-column-gap);
|
|
48
|
+
grid-template-rows: auto;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
ch-grid-cell {
|
|
52
|
+
display: flex;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
ch-grid {
|
|
56
|
+
overflow: auto;
|
|
57
|
+
height: 100%;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
ch-grid-column {
|
|
61
|
+
/*to be removed when this works inside a component with shadow: true*/
|
|
62
|
+
z-index: 99;
|
|
63
|
+
border-bottom: 1px solid var(--gray-01);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
ch-grid-column:first-child {
|
|
67
|
+
padding-inline-start: var(--gxg-container--padding) !important;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
ch-grid-column:last-child {
|
|
71
|
+
padding-inline-end: var(--gxg-container--padding) !important;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
ch-grid-cell {
|
|
75
|
+
--spacing-comp-02: var(--gxg-container--padding);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/*Gxg Tabs*/
|
|
79
|
+
gxg-tabs {
|
|
80
|
+
box-shadow: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/*All components Host should have this class set. !important is set on every rule, since this styles could be overridden by the host user, since they are applied on the host component*/
|
|
84
|
+
:host(.gx-ide-component) {
|
|
85
|
+
box-shadow: var(--box-shadow-01) !important;
|
|
86
|
+
height: 100% !important;
|
|
87
|
+
display: flex !important;
|
|
88
|
+
flex-direction: column !important;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/*stylize the top bar*/
|
|
92
|
+
:host(:focus-within) gx-ide-top-bar::part(wrapper) {
|
|
93
|
+
background-color: var(--color-secondary-enabled);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Main wrapper (should be the first element inside the host. Everything should be inside .gx-ide-main-wrapper) */
|
|
97
|
+
.gx-ide-main-wrapper {
|
|
98
|
+
color: var(--gx-ide-component-text-color);
|
|
99
|
+
font-weight: var(--font-weight-regular);
|
|
100
|
+
font-size: var(--font-size-lg);
|
|
101
|
+
font-family: var(--font-family-primary);
|
|
102
|
+
line-height: 1.6em;
|
|
103
|
+
height: 100%;
|
|
104
|
+
background-color: var(--gx-ide-component-background-color);
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
flex-grow: 1;
|
|
108
|
+
box-sizing: border-box;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/*This is the main element. This is the one that take the remaining vertical space*/
|
|
112
|
+
.gx-ide-main {
|
|
113
|
+
flex-grow: 1;
|
|
114
|
+
overflow-y: auto;
|
|
115
|
+
/* Track */
|
|
116
|
+
/* Handle */
|
|
117
|
+
/* Handle on hover */
|
|
118
|
+
}
|
|
119
|
+
.gx-ide-main::-webkit-scrollbar {
|
|
120
|
+
width: 6px;
|
|
121
|
+
height: 6px;
|
|
122
|
+
}
|
|
123
|
+
.gx-ide-main::-webkit-scrollbar-track {
|
|
124
|
+
background-color: var(--gray-02);
|
|
125
|
+
border-radius: 10px;
|
|
126
|
+
}
|
|
127
|
+
.gx-ide-main::-webkit-scrollbar-thumb {
|
|
128
|
+
background: var(--gray-05);
|
|
129
|
+
border-radius: 10px;
|
|
130
|
+
}
|
|
131
|
+
.gx-ide-main::-webkit-scrollbar-thumb:hover {
|
|
132
|
+
background: var(--gray-04);
|
|
133
|
+
cursor: pointer;
|
|
134
|
+
}
|
|
135
|
+
.gx-ide-main .gxg-scroll {
|
|
136
|
+
display: block;
|
|
137
|
+
overflow-y: auto;
|
|
138
|
+
padding-inline-end: 2px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.gx-ide-overflow {
|
|
142
|
+
overflow-y: auto;
|
|
143
|
+
/* Track */
|
|
144
|
+
/* Handle */
|
|
145
|
+
/* Handle on hover */
|
|
146
|
+
}
|
|
147
|
+
.gx-ide-overflow::-webkit-scrollbar {
|
|
148
|
+
width: 6px;
|
|
149
|
+
height: 6px;
|
|
150
|
+
}
|
|
151
|
+
.gx-ide-overflow::-webkit-scrollbar-track {
|
|
152
|
+
background-color: var(--gray-02);
|
|
153
|
+
border-radius: 10px;
|
|
154
|
+
}
|
|
155
|
+
.gx-ide-overflow::-webkit-scrollbar-thumb {
|
|
156
|
+
background: var(--gray-05);
|
|
157
|
+
border-radius: 10px;
|
|
158
|
+
}
|
|
159
|
+
.gx-ide-overflow::-webkit-scrollbar-thumb:hover {
|
|
160
|
+
background: var(--gray-04);
|
|
161
|
+
cursor: pointer;
|
|
162
|
+
}
|
|
163
|
+
.gx-ide-overflow .gxg-scroll {
|
|
164
|
+
display: block;
|
|
165
|
+
overflow-y: auto;
|
|
166
|
+
padding-inline-end: 2px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/*gxg-tree-view*/
|
|
170
|
+
.tree-container {
|
|
171
|
+
display: flex;
|
|
172
|
+
height: 100%;
|
|
173
|
+
width: 100%;
|
|
174
|
+
box-sizing: border-box;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/*Gemini*/
|
|
178
|
+
/*Gx Ide*/
|
|
179
|
+
/*@container queries*/
|
|
180
|
+
/* hiChar styles
|
|
181
|
+
Found on /common/helpers.tsx hiChar function is used to add a span/class to every character that matches a search value. It is used to help the user see why the filter results are filtered. The span/class on the characters are useless without proper styling.
|
|
182
|
+
*/
|
|
183
|
+
:host {
|
|
184
|
+
display: block;
|
|
185
|
+
height: 100%;
|
|
186
|
+
--assistant-bg-color: var(--gray-11);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/*--- Assistant Status ---*/
|
|
190
|
+
:host(.assistant--success) .header::before {
|
|
191
|
+
background-color: var(--color-primary-hover);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
:host(.assistant--error) .header::before {
|
|
195
|
+
background-color: var(--color-error-light);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.gx-ide-main-wrapper {
|
|
199
|
+
padding: 106px 10px 52px 10px;
|
|
200
|
+
background-color: var(--gray-10);
|
|
201
|
+
height: 100%;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/*--- Header ---*/
|
|
205
|
+
.header {
|
|
206
|
+
border-block-start: 1px solid var(--gray-13);
|
|
207
|
+
padding-block-start: var(--spacing-comp-03);
|
|
208
|
+
display: flex;
|
|
209
|
+
gap: var(--spacing-comp-02);
|
|
210
|
+
align-items: center;
|
|
211
|
+
}
|
|
212
|
+
.header::before {
|
|
213
|
+
content: "";
|
|
214
|
+
width: var(--spacing-comp-02);
|
|
215
|
+
height: var(--spacing-comp-02);
|
|
216
|
+
display: block;
|
|
217
|
+
border-radius: calc(var(--spacing-comp-02) / 2);
|
|
218
|
+
background-color: var(--gray-02);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/*--- Messages ---*/
|
|
222
|
+
.messages {
|
|
223
|
+
display: flex;
|
|
224
|
+
flex-direction: column;
|
|
225
|
+
gap: var(--spacing-comp-02);
|
|
226
|
+
list-style-type: none;
|
|
227
|
+
padding: 0;
|
|
228
|
+
}
|
|
229
|
+
.messages .message {
|
|
230
|
+
display: grid;
|
|
231
|
+
grid-template-rows: 0fr;
|
|
232
|
+
transition: grid-template-rows 100ms;
|
|
233
|
+
transition: grid-template-rows 100ms, -ms-grid-rows 100ms;
|
|
234
|
+
/*caption*/
|
|
235
|
+
}
|
|
236
|
+
.messages .message--visible {
|
|
237
|
+
grid-template-rows: 1fr;
|
|
238
|
+
}
|
|
239
|
+
.messages .message__outer-wrapper {
|
|
240
|
+
overflow: hidden;
|
|
241
|
+
}
|
|
242
|
+
.messages .message__inner-wrapper {
|
|
243
|
+
padding: 8px;
|
|
244
|
+
border-radius: var(--border-radius-sm);
|
|
245
|
+
border: var(--border-width-sm) solid transparent;
|
|
246
|
+
background-color: var(--assistant-bg-color);
|
|
247
|
+
border-inline-start-width: var(--border-width-md);
|
|
248
|
+
}
|
|
249
|
+
.messages .message__caption {
|
|
250
|
+
font-size: var(--mc-font-size-xxs);
|
|
251
|
+
line-height: var(--font-style-regular);
|
|
252
|
+
}
|
|
253
|
+
.messages .message--user .message__inner-wrapper {
|
|
254
|
+
background-color: var(--gray-12);
|
|
255
|
+
}
|
|
256
|
+
.messages .message--assistant-action .message__inner-wrapper, .messages .message--assistant-error .message__inner-wrapper {
|
|
257
|
+
font-style: italic;
|
|
258
|
+
}
|
|
259
|
+
.messages .message--assistant-in-progress .message__inner-wrapper {
|
|
260
|
+
font-style: italic;
|
|
261
|
+
display: grid;
|
|
262
|
+
grid-template-columns: 1fr auto;
|
|
263
|
+
gap: var(--spacing-comp-02);
|
|
264
|
+
border-inline-start-color: var(--gray-02);
|
|
265
|
+
}
|
|
266
|
+
.messages .message--assistant-in-progress .message__inner-wrapper .message__caption {
|
|
267
|
+
overflow: hidden;
|
|
268
|
+
white-space: nowrap;
|
|
269
|
+
text-overflow: ellipsis;
|
|
270
|
+
flex: 1;
|
|
271
|
+
}
|
|
272
|
+
.messages .message--assistant-in-progress .message__inner-wrapper .animation-wrapper {
|
|
273
|
+
flex: none;
|
|
274
|
+
}
|
|
275
|
+
.messages .message--assistant-chat .message__inner-wrapper, .messages .message--assistant-action .message__inner-wrapper {
|
|
276
|
+
border-inline-start-color: var(--color-primary-hover);
|
|
277
|
+
}
|
|
278
|
+
.messages .message--assistant-error .message__inner-wrapper {
|
|
279
|
+
border-inline-start-color: var(--color-error-light);
|
|
280
|
+
}
|
|
281
|
+
/*--- Message Animation ---*/
|
|
282
|
+
@keyframes message-animation {
|
|
283
|
+
0% {
|
|
284
|
+
opacity: 0;
|
|
285
|
+
}
|
|
286
|
+
100% {
|
|
287
|
+
opacity: 1;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
/*--- Prompt ---*/
|
|
291
|
+
.prompt {
|
|
292
|
+
position: relative;
|
|
293
|
+
margin-top: auto;
|
|
294
|
+
}
|
|
295
|
+
.prompt__textarea::part(textarea-wrapper) {
|
|
296
|
+
border: none;
|
|
297
|
+
background-color: var(--assistant-bg-color);
|
|
298
|
+
}
|
|
299
|
+
.prompt__shortcuts {
|
|
300
|
+
position: absolute;
|
|
301
|
+
display: flex;
|
|
302
|
+
align-items: center;
|
|
303
|
+
gap: var(--spacing-comp-01);
|
|
304
|
+
padding-right: var(--spacing-comp-02);
|
|
305
|
+
right: 0;
|
|
306
|
+
top: 0;
|
|
307
|
+
height: 100%;
|
|
308
|
+
}
|
|
309
|
+
.prompt__shortcut {
|
|
310
|
+
padding: var(--spacing-comp-00) var(--spacing-comp-02);
|
|
311
|
+
background-color: var(--gray-00);
|
|
312
|
+
border-radius: var(--border-width-md);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/*--- Dot Pulse Sweet Animation ---*/
|
|
316
|
+
.animation-wrapper {
|
|
317
|
+
width: 60px;
|
|
318
|
+
display: flex;
|
|
319
|
+
align-items: center;
|
|
320
|
+
justify-content: center;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.dot-pulse {
|
|
324
|
+
position: relative;
|
|
325
|
+
left: -9999px;
|
|
326
|
+
width: 5px;
|
|
327
|
+
height: 5px;
|
|
328
|
+
border-radius: 2.5px;
|
|
329
|
+
background-color: var(--gray-03);
|
|
330
|
+
color: var(--gray-03);
|
|
331
|
+
box-shadow: 9999px 0 0 -5px;
|
|
332
|
+
animation: dot-pulse 1.5s infinite linear;
|
|
333
|
+
animation-delay: 0.25s;
|
|
334
|
+
}
|
|
335
|
+
.dot-pulse::before, .dot-pulse::after {
|
|
336
|
+
content: "";
|
|
337
|
+
display: inline-block;
|
|
338
|
+
position: absolute;
|
|
339
|
+
top: 0;
|
|
340
|
+
width: 5px;
|
|
341
|
+
height: 5px;
|
|
342
|
+
border-radius: 2.5px;
|
|
343
|
+
background-color: var(--gray-03);
|
|
344
|
+
color: var(--gray-03);
|
|
345
|
+
}
|
|
346
|
+
.dot-pulse::before {
|
|
347
|
+
box-shadow: 9984px 0 0 -5px;
|
|
348
|
+
animation: dot-pulse-before 1.5s infinite linear;
|
|
349
|
+
animation-delay: 0s;
|
|
350
|
+
}
|
|
351
|
+
.dot-pulse::after {
|
|
352
|
+
box-shadow: 10014px 0 0 -5px;
|
|
353
|
+
animation: dot-pulse-after 1.5s infinite linear;
|
|
354
|
+
animation-delay: 0.5s;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
@keyframes dot-pulse-before {
|
|
358
|
+
0% {
|
|
359
|
+
box-shadow: 9984px 0 0 -5px;
|
|
360
|
+
}
|
|
361
|
+
30% {
|
|
362
|
+
box-shadow: 9984px 0 0 2px;
|
|
363
|
+
}
|
|
364
|
+
60%, 100% {
|
|
365
|
+
box-shadow: 9984px 0 0 -5px;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
@keyframes dot-pulse {
|
|
369
|
+
0% {
|
|
370
|
+
box-shadow: 9999px 0 0 -5px;
|
|
371
|
+
}
|
|
372
|
+
30% {
|
|
373
|
+
box-shadow: 9999px 0 0 2px;
|
|
374
|
+
}
|
|
375
|
+
60%, 100% {
|
|
376
|
+
box-shadow: 9999px 0 0 -5px;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
@keyframes dot-pulse-after {
|
|
380
|
+
0% {
|
|
381
|
+
box-shadow: 10014px 0 0 -5px;
|
|
382
|
+
}
|
|
383
|
+
30% {
|
|
384
|
+
box-shadow: 10014px 0 0 2px;
|
|
385
|
+
}
|
|
386
|
+
60%, 100% {
|
|
387
|
+
box-shadow: 10014px 0 0 -5px;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/* STENCIL IMPORTS */
|
|
2
|
+
import { Host, h } from "@stencil/core";
|
|
3
|
+
/* OTHER LIBRARIES IMPORTS */
|
|
4
|
+
/* CUSTOM IMPORTS */
|
|
5
|
+
import { Locale } from "../../common/locale";
|
|
6
|
+
export class GxIdeTemplate {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.renderedFirstTime = false;
|
|
9
|
+
// 9.LOCAL METHODS //
|
|
10
|
+
this.renderMessage = (message) => {
|
|
11
|
+
if (message.text.length > 0) {
|
|
12
|
+
return (h("li", { class: {
|
|
13
|
+
"message": true,
|
|
14
|
+
[`message--${[message.type]}`]: true,
|
|
15
|
+
"message--assistant": message.type !== "user",
|
|
16
|
+
"message--visible": this.showMessage
|
|
17
|
+
} }, h("div", { class: "message__outer-wrapper" }, h("div", { class: "message__inner-wrapper" }, h("div", { class: {
|
|
18
|
+
"message__caption": true,
|
|
19
|
+
"message__caption--in-progress": message.type === "assistant-in-progress"
|
|
20
|
+
} }, message.text), message.type === "assistant-in-progress" ? (h("div", { class: "animation-wrapper" }, h("div", { class: "dot-pulse" }))) : null))));
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
this.textAreaInputHandler = () => {
|
|
24
|
+
this.userHasTyped = true;
|
|
25
|
+
};
|
|
26
|
+
this.promptEnterHandler = async (prompt) => {
|
|
27
|
+
const promptValue = prompt.detail;
|
|
28
|
+
if (this.userMessageCallback && !this.processingUserMessage) {
|
|
29
|
+
this.processingUserMessage = true;
|
|
30
|
+
this.userMessageCallback(promptValue).then(() => {
|
|
31
|
+
this.processingUserMessage = false;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
this.userHasTyped = false;
|
|
36
|
+
this.addingQuery = false;
|
|
37
|
+
this.showMessage = true;
|
|
38
|
+
this.processingUserMessage = false;
|
|
39
|
+
this.messages = undefined;
|
|
40
|
+
this.promptMaxHeight = "128px";
|
|
41
|
+
this.assistantStatus = "success";
|
|
42
|
+
this.focusShortcuts = undefined;
|
|
43
|
+
this.userMessageCallback = undefined;
|
|
44
|
+
}
|
|
45
|
+
// 5.EVENTS (EMIT) //
|
|
46
|
+
// 6.COMPONENT LIFECYCLE METHODS //
|
|
47
|
+
componentDidRender() {
|
|
48
|
+
if (!this.renderedFirstTime) {
|
|
49
|
+
this.componentDidRenderFirstTime.emit(this._componentLocale.componentName);
|
|
50
|
+
this.renderedFirstTime = true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
async componentWillLoad() {
|
|
54
|
+
this._componentLocale = await Locale.getComponentStrings(this.el);
|
|
55
|
+
}
|
|
56
|
+
// 7.LISTENERS //
|
|
57
|
+
// 8.PUBLIC METHODS API //
|
|
58
|
+
/**
|
|
59
|
+
* Clear the list of messages
|
|
60
|
+
*/
|
|
61
|
+
async clear() {
|
|
62
|
+
this.messages = [];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Add a message. This method will be used by the host to add messages from the assistant
|
|
66
|
+
*/
|
|
67
|
+
async addMessage(message) {
|
|
68
|
+
var _a;
|
|
69
|
+
if (((_a = message.text) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
70
|
+
const messages = [...this.messages];
|
|
71
|
+
const updateInProgressMessage = messages[messages.length - 1].type === "assistant-in-progress";
|
|
72
|
+
if (updateInProgressMessage) {
|
|
73
|
+
messages.pop();
|
|
74
|
+
}
|
|
75
|
+
messages.push(message);
|
|
76
|
+
this.messages = messages;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
// 10.RENDER() FUNCTION //
|
|
80
|
+
render() {
|
|
81
|
+
var _a;
|
|
82
|
+
return (h(Host, { class: { [`assistant--${this.assistantStatus}`]: true } }, h("div", { class: "gx-ide-main-wrapper" }, h("header", { class: "header" }, h("gxg-title", { type: "title-02" }, this._componentLocale.componentName)), ((_a = this.messages) === null || _a === void 0 ? void 0 : _a.length) ? (h("ol", { class: { messages: true } }, this.messages.map(message => {
|
|
83
|
+
return this.renderMessage(message);
|
|
84
|
+
}))) : null, h("div", { class: {
|
|
85
|
+
prompt: true
|
|
86
|
+
} }, h("gxg-form-textarea", { grow: true, class: "prompt__textarea", maxHeight: this.promptMaxHeight, placeholder: this._componentLocale.promptPlaceholder, onInput: this.textAreaInputHandler, onEnter: this.promptEnterHandler, disabled: this.processingUserMessage }), !this.userHasTyped ? (h("div", { class: {
|
|
87
|
+
prompt__shortcuts: true
|
|
88
|
+
} }, h("span", { class: "prompt__shortcut" }, "Ctrl"), h("span", { class: "prompt__shortcut" }, "A"))) : null))));
|
|
89
|
+
}
|
|
90
|
+
static get is() { return "gx-ide-ai-assistant"; }
|
|
91
|
+
static get encapsulation() { return "shadow"; }
|
|
92
|
+
static get originalStyleUrls() {
|
|
93
|
+
return {
|
|
94
|
+
"$": ["ai-assistant.scss"]
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
static get styleUrls() {
|
|
98
|
+
return {
|
|
99
|
+
"$": ["ai-assistant.css"]
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
static get assetsDirs() { return ["gx-ide-assets/ai-assistant"]; }
|
|
103
|
+
static get properties() {
|
|
104
|
+
return {
|
|
105
|
+
"messages": {
|
|
106
|
+
"type": "unknown",
|
|
107
|
+
"mutable": true,
|
|
108
|
+
"complexType": {
|
|
109
|
+
"original": "Message[]",
|
|
110
|
+
"resolved": "Message[]",
|
|
111
|
+
"references": {
|
|
112
|
+
"Message": {
|
|
113
|
+
"location": "local"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"required": false,
|
|
118
|
+
"optional": false,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [],
|
|
121
|
+
"text": "List of messages displayed by the component"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"promptMaxHeight": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"mutable": false,
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "\"128px\"",
|
|
129
|
+
"resolved": "\"128px\"",
|
|
130
|
+
"references": {}
|
|
131
|
+
},
|
|
132
|
+
"required": false,
|
|
133
|
+
"optional": false,
|
|
134
|
+
"docs": {
|
|
135
|
+
"tags": [],
|
|
136
|
+
"text": "The prompt textarea max-height"
|
|
137
|
+
},
|
|
138
|
+
"attribute": "prompt-max-height",
|
|
139
|
+
"reflect": false,
|
|
140
|
+
"defaultValue": "\"128px\""
|
|
141
|
+
},
|
|
142
|
+
"assistantStatus": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "AiStatus",
|
|
147
|
+
"resolved": "\"error\" | \"indeterminate\" | \"success\"",
|
|
148
|
+
"references": {
|
|
149
|
+
"AiStatus": {
|
|
150
|
+
"location": "local"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"required": false,
|
|
155
|
+
"optional": false,
|
|
156
|
+
"docs": {
|
|
157
|
+
"tags": [],
|
|
158
|
+
"text": "A temporary property to illustrate the assistant status"
|
|
159
|
+
},
|
|
160
|
+
"attribute": "assistant-status",
|
|
161
|
+
"reflect": false,
|
|
162
|
+
"defaultValue": "\"success\""
|
|
163
|
+
},
|
|
164
|
+
"focusShortcuts": {
|
|
165
|
+
"type": "unknown",
|
|
166
|
+
"mutable": false,
|
|
167
|
+
"complexType": {
|
|
168
|
+
"original": "string[]",
|
|
169
|
+
"resolved": "string[]",
|
|
170
|
+
"references": {}
|
|
171
|
+
},
|
|
172
|
+
"required": false,
|
|
173
|
+
"optional": false,
|
|
174
|
+
"docs": {
|
|
175
|
+
"tags": [],
|
|
176
|
+
"text": "List of keys that make up the shortcut to focus on the component's text input"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"userMessageCallback": {
|
|
180
|
+
"type": "unknown",
|
|
181
|
+
"mutable": false,
|
|
182
|
+
"complexType": {
|
|
183
|
+
"original": "UserMessageCallback",
|
|
184
|
+
"resolved": "(text: string) => Promise<void>",
|
|
185
|
+
"references": {
|
|
186
|
+
"UserMessageCallback": {
|
|
187
|
+
"location": "local"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"required": false,
|
|
192
|
+
"optional": false,
|
|
193
|
+
"docs": {
|
|
194
|
+
"tags": [],
|
|
195
|
+
"text": "List of keys that make up the shortcut to focus on the component's text input"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
static get states() {
|
|
201
|
+
return {
|
|
202
|
+
"userHasTyped": {},
|
|
203
|
+
"addingQuery": {},
|
|
204
|
+
"showMessage": {},
|
|
205
|
+
"processingUserMessage": {}
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
static get events() {
|
|
209
|
+
return [{
|
|
210
|
+
"method": "componentDidRenderFirstTime",
|
|
211
|
+
"name": "componentDidRenderFirstTime",
|
|
212
|
+
"bubbles": true,
|
|
213
|
+
"cancelable": true,
|
|
214
|
+
"composed": true,
|
|
215
|
+
"docs": {
|
|
216
|
+
"tags": [],
|
|
217
|
+
"text": "This event is emitted once just after the component is fully loaded and the first render() occurs"
|
|
218
|
+
},
|
|
219
|
+
"complexType": {
|
|
220
|
+
"original": "boolean",
|
|
221
|
+
"resolved": "boolean",
|
|
222
|
+
"references": {}
|
|
223
|
+
}
|
|
224
|
+
}];
|
|
225
|
+
}
|
|
226
|
+
static get methods() {
|
|
227
|
+
return {
|
|
228
|
+
"clear": {
|
|
229
|
+
"complexType": {
|
|
230
|
+
"signature": "() => Promise<void>",
|
|
231
|
+
"parameters": [],
|
|
232
|
+
"references": {
|
|
233
|
+
"Promise": {
|
|
234
|
+
"location": "global"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"return": "Promise<void>"
|
|
238
|
+
},
|
|
239
|
+
"docs": {
|
|
240
|
+
"text": "Clear the list of messages",
|
|
241
|
+
"tags": []
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"addMessage": {
|
|
245
|
+
"complexType": {
|
|
246
|
+
"signature": "(message: Message) => Promise<void>",
|
|
247
|
+
"parameters": [{
|
|
248
|
+
"tags": [],
|
|
249
|
+
"text": ""
|
|
250
|
+
}],
|
|
251
|
+
"references": {
|
|
252
|
+
"Promise": {
|
|
253
|
+
"location": "global"
|
|
254
|
+
},
|
|
255
|
+
"Message": {
|
|
256
|
+
"location": "local"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"return": "Promise<void>"
|
|
260
|
+
},
|
|
261
|
+
"docs": {
|
|
262
|
+
"text": "Add a message. This method will be used by the host to add messages from the assistant",
|
|
263
|
+
"tags": []
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
static get elementRef() { return "el"; }
|
|
269
|
+
}
|