@quandis/qbo4.configuration 4.0.1-CI-20240610-201642 → 4.0.1-CI-20240612-212159
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/package.json +1 -1
- package/readme.md +183 -5
- package/scss/qbo-configuration.scss +15 -9
- package/src/qbo-template.js +76 -9
- package/src/qbo-template.js.map +1 -1
- package/src/qbo-template.ts +79 -9
- package/src/styles.js +1 -1
- package/src/styles.js.map +1 -1
- package/src/styles.ts +1 -1
- package/wwwroot/css/qbo-configuration.css +76 -59
- package/wwwroot/css/qbo-configuration.css.map +1 -1
- package/wwwroot/css/qbo-configuration.min.css +1 -1
- package/wwwroot/js/qbo4.configuration.js +90 -19
- package/wwwroot/js/qbo4.configuration.min.js +12 -11
- package/wwwroot/js/qbo4.configuration.min.js.map +1 -1
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
# Overview
|
|
2
2
|
|
|
3
|
-
The `@quandis/qbo4.Configuration.Web` package offers
|
|
4
|
-
|
|
3
|
+
The `@quandis/qbo4.Configuration.Web` package offers:
|
|
4
|
+
|
|
5
|
+
- Management of options classes via dependency injection
|
|
6
|
+
- A `QboTemplate` web component base class that supports configuration driven rendering options
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# Options Classes
|
|
10
|
+
|
|
11
|
+
Similar to Microsoft's `IConfiguration`, the `qbo4.Configuration` package's classes manage configuration settings
|
|
12
|
+
for a web application via dependency injection.
|
|
5
13
|
|
|
6
14
|
Including the `qbo4.Configuration.js` script will provide:
|
|
7
15
|
|
|
@@ -11,7 +19,7 @@ Including the `qbo4.Configuration.js` script will provide:
|
|
|
11
19
|
|
|
12
20
|
It provides for dependency injections via the `tsyringe` package.
|
|
13
21
|
|
|
14
|
-
|
|
22
|
+
## Typescript Usage
|
|
15
23
|
|
|
16
24
|
```typescript
|
|
17
25
|
import 'reflect-metadata';
|
|
@@ -35,7 +43,7 @@ const b = config.getSection('B').bind(OptionsB);
|
|
|
35
43
|
expect(b.count).equal(27);
|
|
36
44
|
```
|
|
37
45
|
|
|
38
|
-
|
|
46
|
+
## Browser Usage
|
|
39
47
|
|
|
40
48
|
```html
|
|
41
49
|
<html>
|
|
@@ -56,7 +64,7 @@ expect(b.count).equal(27);
|
|
|
56
64
|
</html>
|
|
57
65
|
```
|
|
58
66
|
|
|
59
|
-
|
|
67
|
+
## Example: ApplicationInsights Logger
|
|
60
68
|
|
|
61
69
|
Assume we want to inject an `ApplicationInsights` logger, where the `InstrumentationKey` is stored in the configuration settings.
|
|
62
70
|
|
|
@@ -83,3 +91,173 @@ export class ApplicationInsights {
|
|
|
83
91
|
// Prepare the class for dependency injection
|
|
84
92
|
export const ApplicationInsightsToken: InjectionToken<ApplicationInsights> = 'ApplicationInsights';
|
|
85
93
|
```
|
|
94
|
+
|
|
95
|
+
# QboTemplate Web Component
|
|
96
|
+
|
|
97
|
+
The `QboTemplate` web component enables power users to configure the rendering of a web component a runtime.
|
|
98
|
+
Assume we have a `Contact` web component that renders a contact's name, address, and other information,
|
|
99
|
+
and we choose to support different layouts based on a `type` attribute:
|
|
100
|
+
|
|
101
|
+
```html
|
|
102
|
+
<qbo-contact type="fullname"></qbo-contact>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
should render:
|
|
106
|
+
|
|
107
|
+
```html
|
|
108
|
+
<input name="first" placeholder="First name"/>
|
|
109
|
+
<input name="middle" placeholder="Middle name"/>
|
|
110
|
+
<input name="last" placeholder="Last name"/>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Such a web component might look like this:
|
|
114
|
+
|
|
115
|
+
```typescript
|
|
116
|
+
import { html } from 'lit';
|
|
117
|
+
import { customElement } from 'lit/decorators.js';
|
|
118
|
+
|
|
119
|
+
@customElement('qbo-contact')
|
|
120
|
+
export class ContactComponent extends LitElement {
|
|
121
|
+
jsonData: object = {
|
|
122
|
+
'Contact': {
|
|
123
|
+
'First': 'James',
|
|
124
|
+
'Middle': 'Tiberious',
|
|
125
|
+
'Last': 'Kirk'
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
render() {
|
|
130
|
+
return html`
|
|
131
|
+
<input name="first" placeholder="First name" value="${this.jsonData['Contact']['First']}"/>
|
|
132
|
+
<input name="middle" placeholder="Middle name" value="${this.jsonData['Contact']['Middle']}"/>
|
|
133
|
+
<input name="last" placeholder="Last name" value="${this.jsonData['Contact']['Last']}"/>
|
|
134
|
+
`;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Futher assume that you want to allow a power user to configure the layout of the `qbo-contact` web component at runtime.
|
|
140
|
+
To accomplish this, shift the `ContactComponent` to derive from a `QboTemplate` class:
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
import { html } from 'lit';
|
|
144
|
+
import { customElement } from 'lit/decorators.js';
|
|
145
|
+
import { templates, TemplateFunction, QboTemplate } from '@quandis/qbo4.configuration';
|
|
146
|
+
|
|
147
|
+
export class ContactComponent extends QboTemplate {
|
|
148
|
+
constructor() {
|
|
149
|
+
super();
|
|
150
|
+
this.type ??= 'default';
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
jsonData: object = {
|
|
154
|
+
'Contact': {
|
|
155
|
+
'First': 'James',
|
|
156
|
+
'Middle': 'Tiberious',
|
|
157
|
+
'Last': 'Kirk'
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Notice: no render method here - see below.
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const contactTemplates = new Map<string, TemplateFunction>();
|
|
165
|
+
|
|
166
|
+
contactTemplates.set('default', (component: any) => {
|
|
167
|
+
return html`<input name="first" placeholder="First name" value="${component.jsonData['Contact']['First']}"/>
|
|
168
|
+
<input name="middle" placeholder="Middle name" value="${component.jsonData['Contact']['Middle']}"/>
|
|
169
|
+
<input name="last" placeholder="Last name" value="${component.jsonData['Contact']['Last']}"/>`;
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
contactTemplates.set('reverse', (component: any) => {
|
|
173
|
+
return html`<input name="last" placeholder="Last name" value="${component.jsonData['Contact']['First']}"/>,
|
|
174
|
+
<input name="first" placeholder="Last name" value="${component.jsonData['Contact']['Last']}"/>
|
|
175
|
+
<input name="middle" placeholder="Middle name" value="${component.jsonData['Contact']['Middle']}"/>`
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
// template is a global variable set by the qbo4.configuration package
|
|
179
|
+
templates.set('ContactComponent', contactTemplates);
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Now you can render the `qbo-contact` web component with a `type` attribute:
|
|
183
|
+
|
|
184
|
+
```html
|
|
185
|
+
<!-- This will render last name, first name, middle name -->
|
|
186
|
+
<qbo-contact type="reverse"></qbo-contact>
|
|
187
|
+
|
|
188
|
+
<!-- This will render first name, middle name, last name -->
|
|
189
|
+
<qbo-contact type="default"></qbo-contact>
|
|
190
|
+
|
|
191
|
+
<!-- So will this, because we set type = 'default' in the constructor -->
|
|
192
|
+
<qbo-contact></qbo-contact>
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
> Note that the template functions accept a `component` parameter, which is the instance of the `ContactComponent` class.
|
|
196
|
+
Ensure you reference your component's properties via `component` rather than `this`.
|
|
197
|
+
|
|
198
|
+
Mapping `type` to different rendering functions is all well and good, but not particularly interesting.
|
|
199
|
+
|
|
200
|
+
The interesting part is allowing a power user to create new rendering functions (or edit existing ones) at runtime.
|
|
201
|
+
|
|
202
|
+
The `QboTemplate` class will listen for a `ctrl-dblclick` event if it is contained in an element with a `qbo-design` class
|
|
203
|
+
(indicating that we are in 'design' mode).
|
|
204
|
+
|
|
205
|
+
When the `ctrl-dblclick` event is triggered, a dialog will open, presenting the user with something like:
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
**Edit Template**
|
|
209
|
+
|
|
210
|
+
| default ↓ | <- *a datalist of available templates*
|
|
211
|
+
|
|
212
|
+
```html
|
|
213
|
+
1 <input name="first" placeholder="First name" value="${component.jsonData.Contact.First]}"/>
|
|
214
|
+
2 <input name="middle" placeholder="Middle name" value="${component.jsonData.Contact.Middle]}"/>
|
|
215
|
+
3 <input name="last" placeholder="Last name" value="${component.jsonData.Contact.Last}"/>
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
^ *an editor for editing the rendering function*
|
|
219
|
+
|
|
220
|
+
[ Save ] [ Cancel ]
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
Feature include:
|
|
225
|
+
|
|
226
|
+
- As the power user modifies the template, the underlying UI will update in real-time.
|
|
227
|
+
- Any syntax errors will be trapped and displayed in the editor
|
|
228
|
+
- The editor can be dragged and resized as needed
|
|
229
|
+
- The `type` at the top can be selected from a `datalist`, and new types can be entered.
|
|
230
|
+
- Clicking `Save` will save the template in configuration (server-side), and be available for use.
|
|
231
|
+
- Clicking `Cancel` will discard any changes, reverting to the original rendering.
|
|
232
|
+
|
|
233
|
+
## How it Works
|
|
234
|
+
|
|
235
|
+
Deployment of `@qbo4.Configuration` web components is paired with deployment of the `qbo4.Configuration.Web` Razor Class Library,
|
|
236
|
+
which includes server-side functionality to store are retrieve template code.
|
|
237
|
+
The `QboTemplate` class will interact with the server-side `/template` endpoint to store and retrieve templates.
|
|
238
|
+
|
|
239
|
+
The `QboTemplate` class will render the web component based on the `type` attribute, using the `templates` map.
|
|
240
|
+
If the `type` is not found in the `templates` map, the component will `fetch` templates stored in configuration
|
|
241
|
+
from the `/template/search/{ComponentClassName}` endpoint.
|
|
242
|
+
|
|
243
|
+
> If a component's `Typescript` class defines a `type` that also exists in configuration, the configuration will take precedence.
|
|
244
|
+
|
|
245
|
+
## Spiderman Clause
|
|
246
|
+
|
|
247
|
+
With great power comes great responsibility. Only trusted user should be allowed to edit templates.
|
|
248
|
+
The ultimate control of this remains server-side with the authorization policies of the `/template` endpoints.
|
|
249
|
+
For the front-end, the `QboTemplate` class will only allow editing of templates if the containing element has a `qbo-design` class.
|
|
250
|
+
We recommend that the `qbo-design` class be added to the `body` for trusted power users only.
|
|
251
|
+
This will prevent accidental editing attempts of templates by regular users.
|
|
252
|
+
|
|
253
|
+
As with all qbo-based configuration, enable and test in a lower environment before deploying to production.
|
|
254
|
+
|
|
255
|
+
# RoadMap
|
|
256
|
+
|
|
257
|
+
- add intellisense to CodeMirror for component-specific properties (including Json data)
|
|
258
|
+
- shift the Editor to a separate web component
|
|
259
|
+
- enable custom Editors, to simplify changes to complex controls
|
|
260
|
+
- create a GUI designer that detects available web components via DI
|
|
261
|
+
- propagate changes to a components `type` property to parent components
|
|
262
|
+
- if a user creates a new `type` of an address control called `streetview`, and the address control is part of a property control, save the property control such that it uses `<qbo-address type="streetview">`
|
|
263
|
+
- add AI modifications to the default editor
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@import "../node_modules/bootstrap/scss/bootstrap";
|
|
2
2
|
|
|
3
|
-
.
|
|
3
|
+
.qbo-code {
|
|
4
4
|
position: fixed;
|
|
5
5
|
top: 100px;
|
|
6
6
|
left: 100px;
|
|
@@ -15,39 +15,45 @@
|
|
|
15
15
|
overflow: auto;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.qbo-code header {
|
|
19
19
|
/*background: #f0f0f0;
|
|
20
20
|
padding: 10px;*/
|
|
21
21
|
cursor: move;
|
|
22
22
|
@extend .modal-header;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.
|
|
25
|
+
.qbo-code section {
|
|
26
26
|
/*padding: 10px;*/
|
|
27
27
|
@extend .modal-body;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.
|
|
30
|
+
.qbo-code footer {
|
|
31
31
|
@extend .modal-footer;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
.qbo-code input {
|
|
35
35
|
@extend .form-control;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.
|
|
38
|
+
.qbo-code button {
|
|
39
39
|
@extend .btn;
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
.qbo-code button[type="submit"]
|
|
42
42
|
{
|
|
43
43
|
@extend .btn-primary;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.
|
|
46
|
+
.qbo-code button[type="reset"] {
|
|
47
47
|
@extend .btn-light;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
.working {
|
|
51
|
+
@extend .alert-success;
|
|
52
|
+
opacity: 1;
|
|
53
|
+
cursor: not-allowed;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/*.qbo-code .resize-handle {
|
|
51
57
|
@extend .modal-footer;
|
|
52
58
|
}*/
|
|
53
59
|
.error {
|
package/src/qbo-template.js
CHANGED
|
@@ -51,6 +51,7 @@ export const QboTemplateMixin = (superClass) => {
|
|
|
51
51
|
this.map = undefined;
|
|
52
52
|
this.editor = null;
|
|
53
53
|
this.editorType = this.type;
|
|
54
|
+
this.editorCoding = false;
|
|
54
55
|
}
|
|
55
56
|
async connectedCallback() {
|
|
56
57
|
super.connectedCallback();
|
|
@@ -81,20 +82,20 @@ export const QboTemplateMixin = (superClass) => {
|
|
|
81
82
|
window.removeEventListener('mouseup', this._onMouseUp.bind(this));
|
|
82
83
|
}
|
|
83
84
|
_onMouseDown(event) {
|
|
84
|
-
if (!event.target.closest('.
|
|
85
|
+
if (!event.target.closest('.qbo-code header'))
|
|
85
86
|
return;
|
|
86
87
|
this.dragging = true;
|
|
87
|
-
const editor = this.shadowRoot?.querySelector('.
|
|
88
|
+
const editor = this.shadowRoot?.querySelector('.qbo-code');
|
|
88
89
|
if (editor) {
|
|
89
90
|
this.offsetX = event.clientX - editor.getBoundingClientRect().left;
|
|
90
91
|
this.offsetY = event.clientY - editor.getBoundingClientRect().top;
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
94
|
_onResizeMouseDown(event) {
|
|
94
|
-
if (!event.target.closest('.
|
|
95
|
+
if (!event.target.closest('.qbo-code .resize-handle'))
|
|
95
96
|
return;
|
|
96
97
|
this.resizing = true;
|
|
97
|
-
const editor = this.shadowRoot?.querySelector('.
|
|
98
|
+
const editor = this.shadowRoot?.querySelector('.qbo-code');
|
|
98
99
|
if (editor) {
|
|
99
100
|
this.startWidth = editor.offsetWidth;
|
|
100
101
|
this.startHeight = editor.offsetHeight;
|
|
@@ -104,7 +105,7 @@ export const QboTemplateMixin = (superClass) => {
|
|
|
104
105
|
}
|
|
105
106
|
_onMouseMove(event) {
|
|
106
107
|
if (this.dragging) {
|
|
107
|
-
const editor = this.shadowRoot?.querySelector('.
|
|
108
|
+
const editor = this.shadowRoot?.querySelector('.qbo-code');
|
|
108
109
|
const x = event.clientX - this.offsetX;
|
|
109
110
|
const y = event.clientY - this.offsetY;
|
|
110
111
|
if (editor) {
|
|
@@ -113,7 +114,7 @@ export const QboTemplateMixin = (superClass) => {
|
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
116
|
else if (this.resizing) {
|
|
116
|
-
const editor = this.shadowRoot?.querySelector('.
|
|
117
|
+
const editor = this.shadowRoot?.querySelector('.qbo-code');
|
|
117
118
|
if (editor) {
|
|
118
119
|
editor.style.width = `${this.startWidth + (event.clientX - this.offsetX)}px`;
|
|
119
120
|
editor.style.height = `${this.startHeight + (event.clientY - this.offsetY)}px`;
|
|
@@ -158,6 +159,36 @@ export const QboTemplateMixin = (superClass) => {
|
|
|
158
159
|
});
|
|
159
160
|
return keys.map(key => ({ label: key, type: 'variable' }));
|
|
160
161
|
}
|
|
162
|
+
_isSerializable(value) {
|
|
163
|
+
if (typeof value === 'function' || typeof value === 'undefined') {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
try {
|
|
167
|
+
JSON.stringify(value);
|
|
168
|
+
}
|
|
169
|
+
catch (error) {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
getComponent() {
|
|
175
|
+
let json = {};
|
|
176
|
+
const ownProperties = new Set(Object.keys(this));
|
|
177
|
+
// Filter properties to exclude those defined by the base class
|
|
178
|
+
ownProperties.forEach(prop => {
|
|
179
|
+
if (prop.startsWith('_'))
|
|
180
|
+
return;
|
|
181
|
+
if (prop === 'constructor'
|
|
182
|
+
|| prop === 'shadowRoot'
|
|
183
|
+
|| prop === 'renderOptions'
|
|
184
|
+
|| prop === 'renderRoot'
|
|
185
|
+
|| prop === 'editor'
|
|
186
|
+
|| typeof this[prop] === 'function')
|
|
187
|
+
return;
|
|
188
|
+
json[prop] = this[prop];
|
|
189
|
+
});
|
|
190
|
+
return json;
|
|
191
|
+
}
|
|
161
192
|
async loadScript(prefix) {
|
|
162
193
|
if (!scriptCache[prefix]) {
|
|
163
194
|
scriptCache[prefix] = this.fetchScript(prefix);
|
|
@@ -256,10 +287,10 @@ export const QboTemplateMixin = (superClass) => {
|
|
|
256
287
|
}
|
|
257
288
|
}
|
|
258
289
|
edit() {
|
|
259
|
-
this.testTemplate ??= this.
|
|
290
|
+
this.testTemplate ??= this.map?.get(this.type) ?? this.defaultTemplate;
|
|
260
291
|
const id = Math.random().toString(36).substring(2, 15);
|
|
261
292
|
return html `
|
|
262
|
-
<dialog class="
|
|
293
|
+
<dialog class="qbo-code" open>
|
|
263
294
|
<header>
|
|
264
295
|
<h5>Edit Template</h5>
|
|
265
296
|
</header>
|
|
@@ -271,7 +302,8 @@ export const QboTemplateMixin = (superClass) => {
|
|
|
271
302
|
<div class="editor"></div>
|
|
272
303
|
${this.editorError ? html `<hr/><span class="error">${this.editorError.message}<span>` : html ``}
|
|
273
304
|
</section>
|
|
274
|
-
<footer
|
|
305
|
+
<footer>
|
|
306
|
+
<input @change=${this.code} ?disabled="${this.editorCoding}" class="${this.editorCoding ? 'working' : ''}" placeholder="Ask AI to code..." />
|
|
275
307
|
<button type="submit" @click=${this.save}>Save</button>
|
|
276
308
|
<button type="reset" @click=${this.cancel}>Cancel</button>
|
|
277
309
|
</footer>
|
|
@@ -302,6 +334,37 @@ export const QboTemplateMixin = (superClass) => {
|
|
|
302
334
|
throw e;
|
|
303
335
|
}
|
|
304
336
|
}
|
|
337
|
+
async code(event) {
|
|
338
|
+
try {
|
|
339
|
+
if (this.editor == null)
|
|
340
|
+
return;
|
|
341
|
+
this.editorCoding = true;
|
|
342
|
+
const prompt = event.target?.value;
|
|
343
|
+
const response = await fetch(`${this.templateEndpoint}/code`, {
|
|
344
|
+
method: 'POST',
|
|
345
|
+
headers: { 'Content-Type': 'application/json' },
|
|
346
|
+
body: JSON.stringify({
|
|
347
|
+
'HtmlTemplate': this.editor.state.doc.toString(),
|
|
348
|
+
'Component': this.getComponent(),
|
|
349
|
+
'Prompt': prompt
|
|
350
|
+
})
|
|
351
|
+
});
|
|
352
|
+
this.editorCoding = false;
|
|
353
|
+
if (response.ok) {
|
|
354
|
+
const html = await response.text();
|
|
355
|
+
this.editor.dispatch({
|
|
356
|
+
changes: { from: 0, to: this.editor.state.doc.length, insert: html }
|
|
357
|
+
});
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
else
|
|
361
|
+
throw new Error(`Failed to generate code: ${response.statusText}`);
|
|
362
|
+
}
|
|
363
|
+
catch (e) {
|
|
364
|
+
this.editorCoding = false;
|
|
365
|
+
throw e;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
305
368
|
render() {
|
|
306
369
|
let template = this.defaultTemplate;
|
|
307
370
|
if (this.type && this.map?.has(this.type))
|
|
@@ -344,6 +407,10 @@ export const QboTemplateMixin = (superClass) => {
|
|
|
344
407
|
property({ attribute: false }),
|
|
345
408
|
__metadata("design:type", Object)
|
|
346
409
|
], QboTemplateClass.prototype, "map", void 0);
|
|
410
|
+
__decorate([
|
|
411
|
+
property({ attribute: false }),
|
|
412
|
+
__metadata("design:type", Boolean)
|
|
413
|
+
], QboTemplateClass.prototype, "editorCoding", void 0);
|
|
347
414
|
;
|
|
348
415
|
return QboTemplateClass;
|
|
349
416
|
};
|
package/src/qb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CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACrB,gHAAgH;QACpH,CAAC;;IAvXD;QADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;yDACP;IAGxB;QADC,QAAQ,EAAE;;kDACgB;IAG3B;QADC,QAAQ,EAAE;;qDACK;IAGhB;QADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;6DACuF;IAGtH;QADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;0DACY;IAG3C;QADC,QAAQ,EAAE;;8DACoB;IAG/B;QADC,QAAQ,EAAE;;oDACkB;IAG7B;QADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;iDAC4B;IAM3D;QADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;0DACD;IA8VjC,CAAC;IAEF,OAAO,gBAAyD,CAAC;AACrE,CAAC,CAAA;AAED;;;;;;;IAOI;AACJ,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC"}
|
package/src/qbo-template.ts
CHANGED
|
@@ -5,6 +5,8 @@ import { basicSetup } from "codemirror"
|
|
|
5
5
|
import { EditorView, keymap } from "@codemirror/view"
|
|
6
6
|
import { html as htmlcode } from "@codemirror/lang-html"
|
|
7
7
|
import { indentWithTab } from "@codemirror/commands"
|
|
8
|
+
import { ChangeSpec } from "@codemirror/state";
|
|
9
|
+
|
|
8
10
|
import { autocompletion, completeFromList } from '@codemirror/autocomplete';
|
|
9
11
|
import { configurationCss } from './styles.js';
|
|
10
12
|
|
|
@@ -76,6 +78,9 @@ export const QboTemplateMixin = <T extends Constructor<LitElement>>(superClass:
|
|
|
76
78
|
editor: EditorView | null = null;
|
|
77
79
|
editorType: string | null = this.type;
|
|
78
80
|
|
|
81
|
+
@property({ attribute: false })
|
|
82
|
+
editorCoding: boolean = false;
|
|
83
|
+
|
|
79
84
|
|
|
80
85
|
constructor(...args: any[]) {
|
|
81
86
|
super(...args);
|
|
@@ -112,9 +117,9 @@ export const QboTemplateMixin = <T extends Constructor<LitElement>>(superClass:
|
|
|
112
117
|
}
|
|
113
118
|
|
|
114
119
|
_onMouseDown(event) {
|
|
115
|
-
if (!event.target.closest('.
|
|
120
|
+
if (!event.target.closest('.qbo-code header')) return;
|
|
116
121
|
this.dragging = true;
|
|
117
|
-
const editor = this.shadowRoot?.querySelector('.
|
|
122
|
+
const editor = this.shadowRoot?.querySelector('.qbo-code');
|
|
118
123
|
if (editor) {
|
|
119
124
|
this.offsetX = event.clientX - editor.getBoundingClientRect().left;
|
|
120
125
|
this.offsetY = event.clientY - editor.getBoundingClientRect().top;
|
|
@@ -122,9 +127,9 @@ export const QboTemplateMixin = <T extends Constructor<LitElement>>(superClass:
|
|
|
122
127
|
}
|
|
123
128
|
|
|
124
129
|
_onResizeMouseDown(event) {
|
|
125
|
-
if (!event.target.closest('.
|
|
130
|
+
if (!event.target.closest('.qbo-code .resize-handle')) return;
|
|
126
131
|
this.resizing = true;
|
|
127
|
-
const editor = this.shadowRoot?.querySelector('.
|
|
132
|
+
const editor = this.shadowRoot?.querySelector('.qbo-code') as HTMLElement;
|
|
128
133
|
if (editor) {
|
|
129
134
|
this.startWidth = editor.offsetWidth;
|
|
130
135
|
this.startHeight = editor.offsetHeight;
|
|
@@ -135,7 +140,7 @@ export const QboTemplateMixin = <T extends Constructor<LitElement>>(superClass:
|
|
|
135
140
|
|
|
136
141
|
_onMouseMove(event) {
|
|
137
142
|
if (this.dragging) {
|
|
138
|
-
const editor = this.shadowRoot?.querySelector('.
|
|
143
|
+
const editor = this.shadowRoot?.querySelector('.qbo-code') as HTMLElement;
|
|
139
144
|
const x = event.clientX - this.offsetX;
|
|
140
145
|
const y = event.clientY - this.offsetY;
|
|
141
146
|
if (editor) {
|
|
@@ -143,7 +148,7 @@ export const QboTemplateMixin = <T extends Constructor<LitElement>>(superClass:
|
|
|
143
148
|
editor.style.top = `${y}px`;
|
|
144
149
|
}
|
|
145
150
|
} else if (this.resizing) {
|
|
146
|
-
const editor = this.shadowRoot?.querySelector('.
|
|
151
|
+
const editor = this.shadowRoot?.querySelector('.qbo-code') as HTMLElement;
|
|
147
152
|
if (editor) {
|
|
148
153
|
editor.style.width = `${this.startWidth + (event.clientX - this.offsetX)}px`;
|
|
149
154
|
editor.style.height = `${this.startHeight + (event.clientY - this.offsetY)}px`;
|
|
@@ -192,6 +197,39 @@ export const QboTemplateMixin = <T extends Constructor<LitElement>>(superClass:
|
|
|
192
197
|
return keys.map(key => ({ label: key, type: 'variable' }));
|
|
193
198
|
}
|
|
194
199
|
|
|
200
|
+
|
|
201
|
+
_isSerializable(value) {
|
|
202
|
+
if (typeof value === 'function' || typeof value === 'undefined') {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
try {
|
|
207
|
+
JSON.stringify(value);
|
|
208
|
+
} catch (error) {
|
|
209
|
+
return false;
|
|
210
|
+
}
|
|
211
|
+
return true;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
getComponent(): object {
|
|
215
|
+
let json = {};
|
|
216
|
+
|
|
217
|
+
const ownProperties = new Set(Object.keys(this));
|
|
218
|
+
|
|
219
|
+
// Filter properties to exclude those defined by the base class
|
|
220
|
+
ownProperties.forEach(prop => {
|
|
221
|
+
if (prop.startsWith('_')) return;
|
|
222
|
+
if (prop === 'constructor'
|
|
223
|
+
|| prop === 'shadowRoot'
|
|
224
|
+
|| prop === 'renderOptions'
|
|
225
|
+
|| prop === 'renderRoot'
|
|
226
|
+
|| prop === 'editor'
|
|
227
|
+
|| typeof this[prop] === 'function') return;
|
|
228
|
+
json[prop] = this[prop];
|
|
229
|
+
});
|
|
230
|
+
return json;
|
|
231
|
+
}
|
|
232
|
+
|
|
195
233
|
async loadScript(prefix: string): Promise<void> {
|
|
196
234
|
if (!scriptCache[prefix]) {
|
|
197
235
|
scriptCache[prefix] = this.fetchScript(prefix);
|
|
@@ -302,10 +340,10 @@ export const QboTemplateMixin = <T extends Constructor<LitElement>>(superClass:
|
|
|
302
340
|
}
|
|
303
341
|
|
|
304
342
|
edit() {
|
|
305
|
-
this.testTemplate ??= this.
|
|
343
|
+
this.testTemplate ??= this.map?.get(this.type!) as TemplateFunction ?? this.defaultTemplate;
|
|
306
344
|
const id = Math.random().toString(36).substring(2, 15);
|
|
307
345
|
return html`
|
|
308
|
-
<dialog class="
|
|
346
|
+
<dialog class="qbo-code" open>
|
|
309
347
|
<header>
|
|
310
348
|
<h5>Edit Template</h5>
|
|
311
349
|
</header>
|
|
@@ -317,7 +355,8 @@ export const QboTemplateMixin = <T extends Constructor<LitElement>>(superClass:
|
|
|
317
355
|
<div class="editor"></div>
|
|
318
356
|
${this.editorError ? html`<hr/><span class="error">${this.editorError.message}<span>` : html``}
|
|
319
357
|
</section>
|
|
320
|
-
<footer
|
|
358
|
+
<footer>
|
|
359
|
+
<input @change=${this.code} ?disabled="${this.editorCoding}" class="${this.editorCoding ? 'working' : ''}" placeholder="Ask AI to code..." />
|
|
321
360
|
<button type="submit" @click=${this.save}>Save</button>
|
|
322
361
|
<button type="reset" @click=${this.cancel}>Cancel</button>
|
|
323
362
|
</footer>
|
|
@@ -349,6 +388,37 @@ export const QboTemplateMixin = <T extends Constructor<LitElement>>(superClass:
|
|
|
349
388
|
}
|
|
350
389
|
}
|
|
351
390
|
|
|
391
|
+
async code(event: Event) {
|
|
392
|
+
try {
|
|
393
|
+
if (this.editor == null) return;
|
|
394
|
+
this.editorCoding = true;
|
|
395
|
+
const prompt = (event.target as HTMLInputElement)?.value;
|
|
396
|
+
const response = await fetch(`${this.templateEndpoint}/code`, {
|
|
397
|
+
method: 'POST',
|
|
398
|
+
headers: { 'Content-Type': 'application/json' },
|
|
399
|
+
body: JSON.stringify({
|
|
400
|
+
'HtmlTemplate': this.editor.state.doc.toString(),
|
|
401
|
+
'Component': this.getComponent(),
|
|
402
|
+
'Prompt': prompt
|
|
403
|
+
})
|
|
404
|
+
});
|
|
405
|
+
this.editorCoding = false;
|
|
406
|
+
|
|
407
|
+
if (response.ok) {
|
|
408
|
+
const html = await response.text();
|
|
409
|
+
this.editor.dispatch({
|
|
410
|
+
changes: { from: 0, to: this.editor.state.doc.length, insert: html }
|
|
411
|
+
});
|
|
412
|
+
return;
|
|
413
|
+
} else
|
|
414
|
+
throw new Error(`Failed to generate code: ${response.statusText}`);
|
|
415
|
+
} catch (e) {
|
|
416
|
+
this.editorCoding = false;
|
|
417
|
+
throw e;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
}
|
|
421
|
+
|
|
352
422
|
render() {
|
|
353
423
|
let template = this.defaultTemplate;
|
|
354
424
|
if (this.type && this.map?.has(this.type))
|