@quandis/qbo4.configuration 4.0.1-CI-20241007-232230 → 4.0.1-CI-20241008-165825
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/src/Configuration.d.ts +35 -35
- package/src/Configuration.js +104 -104
- package/src/IConfiguration.d.ts +34 -34
- package/src/IConfiguration.js +37 -37
- package/src/Program.d.ts +24 -24
- package/src/Program.js +8 -8
- package/src/Services.d.ts +9 -9
- package/src/Services.js +18 -18
- package/src/qbo-config-editor.d.ts +18 -18
- package/src/qbo-config-editor.js +84 -84
- package/src/qbo-css.d.ts +35 -35
- package/src/qbo-css.js +226 -226
- package/src/qbo-template.d.ts +22 -22
- package/src/qbo-template.js +417 -417
- package/src/styles.d.ts +1 -1
- package/src/styles.js +6 -6
- package/src/styles.js.map +1 -1
- package/src/styles.ts +5 -5
- package/wwwroot/css/qbo-config-editor.css +2 -2
- package/wwwroot/css/qbo-configuration.css +1730 -1730
- package/wwwroot/css/qbo-configuration.css.map +1 -1
- package/wwwroot/css/qbo-configuration.min.css +5 -5
- package/wwwroot/js/esm/qbo4.configuration.js +39074 -39565
- package/wwwroot/js/esm/qbo4.configuration.min.js +76 -76
- package/wwwroot/js/esm/qbo4.configuration.min.js.LICENSE.txt +41 -41
- package/wwwroot/js/esm/qbo4.configuration.min.js.map +1 -1
- package/wwwroot/js/qbo4.configuration.js +39150 -39641
- package/wwwroot/js/qbo4.configuration.min.js +76 -76
- package/wwwroot/js/qbo4.configuration.min.js.LICENSE.txt +41 -41
- package/wwwroot/js/qbo4.configuration.min.js.map +1 -1
package/src/qbo-css.js
CHANGED
|
@@ -1,195 +1,195 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { LitElement, html, } from 'lit';
|
|
11
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
12
|
-
import { css as csscode } from "@codemirror/lang-css";
|
|
13
|
-
import { basicSetup } from "codemirror";
|
|
14
|
-
import { EditorView, keymap } from "@codemirror/view";
|
|
15
|
-
import { indentWithTab } from "@codemirror/commands";
|
|
16
|
-
import { configurationCss } from './styles.js';
|
|
17
|
-
let QboCss = class QboCss extends LitElement {
|
|
18
|
-
constructor() {
|
|
19
|
-
super(...arguments);
|
|
20
|
-
this.dragging = false;
|
|
21
|
-
this.resizing = false;
|
|
22
|
-
this.offsetX = 0;
|
|
23
|
-
this.offsetY = 0;
|
|
24
|
-
this.startWidth = 0;
|
|
25
|
-
this.startHeight = 0;
|
|
26
|
-
this.editorError = null;
|
|
27
|
-
this.editing = false;
|
|
28
|
-
this.storageKey = 'qbo-css';
|
|
29
|
-
this.customcss = '';
|
|
30
|
-
this.editorCoding = false;
|
|
31
|
-
this.templateEndpoint = '/configuration/css';
|
|
32
|
-
this.editor = null;
|
|
33
|
-
// editorType: string | null = this.type;
|
|
34
|
-
this.styleElement = null;
|
|
35
|
-
}
|
|
36
|
-
static { this.styles = [
|
|
37
|
-
configurationCss
|
|
38
|
-
]; }
|
|
39
|
-
async connectedCallback() {
|
|
40
|
-
super.connectedCallback();
|
|
41
|
-
this.addEventListener('click', this.requestEdit.bind(this));
|
|
42
|
-
this.shadowRoot?.addEventListener('mousedown', this._onMouseDown.bind(this));
|
|
43
|
-
this.shadowRoot?.addEventListener('mousedown', this._onResizeMouseDown.bind(this), true);
|
|
44
|
-
window.addEventListener('mousemove', this._onMouseMove.bind(this));
|
|
45
|
-
window.addEventListener('mouseup', this._onMouseUp.bind(this));
|
|
46
|
-
this.customcss = localStorage.getItem(this.storageKey) ?? '';
|
|
47
|
-
}
|
|
48
|
-
async disconnectedCallback() {
|
|
49
|
-
this.removeEventListener('dblclick', this.requestEdit.bind(this));
|
|
50
|
-
this.shadowRoot?.removeEventListener('mousedown', this._onMouseDown.bind(this));
|
|
51
|
-
this.shadowRoot?.removeEventListener('mousedown', this._onResizeMouseDown.bind(this), true);
|
|
52
|
-
window.removeEventListener('mousemove', this._onMouseMove.bind(this));
|
|
53
|
-
window.removeEventListener('mouseup', this._onMouseUp.bind(this));
|
|
54
|
-
}
|
|
55
|
-
_onMouseDown(event) {
|
|
56
|
-
if (!event.target.closest('.qbo-code header'))
|
|
57
|
-
return;
|
|
58
|
-
this.dragging = true;
|
|
59
|
-
const editor = this.shadowRoot?.querySelector('.qbo-code');
|
|
60
|
-
if (editor) {
|
|
61
|
-
this.offsetX = event.clientX - editor.getBoundingClientRect().left;
|
|
62
|
-
this.offsetY = event.clientY - editor.getBoundingClientRect().top;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
_onResizeMouseDown(event) {
|
|
66
|
-
if (!event.target.closest('.qbo-code .resize-handle'))
|
|
67
|
-
return;
|
|
68
|
-
this.resizing = true;
|
|
69
|
-
const editor = this.shadowRoot?.querySelector('.qbo-code');
|
|
70
|
-
if (editor) {
|
|
71
|
-
this.startWidth = editor.offsetWidth;
|
|
72
|
-
this.startHeight = editor.offsetHeight;
|
|
73
|
-
this.offsetX = event.clientX;
|
|
74
|
-
this.offsetY = event.clientY;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
_onMouseMove(event) {
|
|
78
|
-
if (this.dragging) {
|
|
79
|
-
const editor = this.shadowRoot?.querySelector('.qbo-code');
|
|
80
|
-
const x = event.clientX - this.offsetX;
|
|
81
|
-
const y = event.clientY - this.offsetY;
|
|
82
|
-
if (editor) {
|
|
83
|
-
editor.style.left = `${x}px`;
|
|
84
|
-
editor.style.top = `${y}px`;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
else if (this.resizing) {
|
|
88
|
-
const editor = this.shadowRoot?.querySelector('.qbo-code');
|
|
89
|
-
if (editor) {
|
|
90
|
-
editor.style.width = `${this.startWidth + (event.clientX - this.offsetX)}px`;
|
|
91
|
-
editor.style.height = `${this.startHeight + (event.clientY - this.offsetY)}px`;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
_onMouseUp() {
|
|
96
|
-
this.dragging = false;
|
|
97
|
-
this.resizing = false;
|
|
98
|
-
}
|
|
99
|
-
requestEdit(event) {
|
|
100
|
-
if (event.composedPath().some((target) => {
|
|
101
|
-
return target instanceof Element && target.classList.contains('qbo-code');
|
|
102
|
-
}))
|
|
103
|
-
return;
|
|
104
|
-
if (!this.editing && event.target.closest('.qbo-design'))
|
|
105
|
-
this.toggleEdit(true);
|
|
106
|
-
}
|
|
107
|
-
toggleEdit(editing) {
|
|
108
|
-
this.editing = editing;
|
|
109
|
-
if (!this.editing) {
|
|
110
|
-
this.editor?.destroy();
|
|
111
|
-
this.editor = null;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
cancel() {
|
|
115
|
-
this.setCss(this.customcss);
|
|
116
|
-
this.toggleEdit(false);
|
|
117
|
-
}
|
|
118
|
-
firstUpdated(changedProperties) {
|
|
119
|
-
super.firstUpdated(changedProperties);
|
|
120
|
-
const style = document.createElement('style');
|
|
121
|
-
style.type = 'text/css';
|
|
122
|
-
style.appendChild(document.createTextNode(localStorage.getItem(this.storageKey) ?? ''));
|
|
123
|
-
document.head.appendChild(style);
|
|
124
|
-
this.styleElement = style;
|
|
125
|
-
}
|
|
126
|
-
updated(changedProperties) {
|
|
127
|
-
super.update(changedProperties);
|
|
128
|
-
if (this.editing) {
|
|
129
|
-
this.editor ??= new EditorView({
|
|
130
|
-
doc: this.styleElement?.textContent ?? '',
|
|
131
|
-
extensions: [
|
|
132
|
-
basicSetup,
|
|
133
|
-
csscode(),
|
|
134
|
-
keymap.of([indentWithTab]),
|
|
135
|
-
EditorView.updateListener.of((e) => {
|
|
136
|
-
this.setCss(e.state.doc.toString());
|
|
137
|
-
})
|
|
138
|
-
],
|
|
139
|
-
parent: this.shadowRoot?.querySelector('div.editor')
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
async code(event) {
|
|
144
|
-
try {
|
|
145
|
-
if (this.editor == null)
|
|
146
|
-
return;
|
|
147
|
-
this.editorCoding = true;
|
|
148
|
-
const prompt = event.target?.value;
|
|
149
|
-
const response = await fetch(`${this.templateEndpoint}/code`, {
|
|
150
|
-
method: 'POST',
|
|
151
|
-
headers: { 'Content-Type': 'application/json' },
|
|
152
|
-
body: JSON.stringify({
|
|
153
|
-
'CssTemplate': this.editor.state.doc.toString(),
|
|
154
|
-
// 'Component': this.getComponent(),
|
|
155
|
-
'Prompt': prompt
|
|
156
|
-
})
|
|
157
|
-
});
|
|
158
|
-
this.editorCoding = false;
|
|
159
|
-
if (response.ok) {
|
|
160
|
-
const html = await response.text();
|
|
161
|
-
this.editor.dispatch({
|
|
162
|
-
changes: { from: 0, to: this.editor.state.doc.length, insert: html }
|
|
163
|
-
});
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
else
|
|
167
|
-
throw new Error(`Failed to generate code: ${response.statusText}`);
|
|
168
|
-
}
|
|
169
|
-
catch (e) {
|
|
170
|
-
this.editorCoding = false;
|
|
171
|
-
throw e;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
save() {
|
|
175
|
-
this.toggleEdit(false);
|
|
176
|
-
}
|
|
177
|
-
// Creates a function from the user's input.
|
|
178
|
-
setCss(content) {
|
|
179
|
-
// const test = new Function('css', `return qbo4.configuration.html\`${content}\``) as TemplateFunction;
|
|
180
|
-
localStorage.setItem(this.storageKey, content);
|
|
181
|
-
if (this.styleElement == null)
|
|
182
|
-
return;
|
|
183
|
-
try {
|
|
184
|
-
this.styleElement.textContent = content;
|
|
185
|
-
this.editorError = undefined;
|
|
186
|
-
}
|
|
187
|
-
catch (e) {
|
|
188
|
-
this.editorError = e;
|
|
189
|
-
console.error(`Error rendering ${content}`, e);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
edit() {
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { LitElement, html, } from 'lit';
|
|
11
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
12
|
+
import { css as csscode } from "@codemirror/lang-css";
|
|
13
|
+
import { basicSetup } from "codemirror";
|
|
14
|
+
import { EditorView, keymap } from "@codemirror/view";
|
|
15
|
+
import { indentWithTab } from "@codemirror/commands";
|
|
16
|
+
import { configurationCss } from './styles.js';
|
|
17
|
+
let QboCss = class QboCss extends LitElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.dragging = false;
|
|
21
|
+
this.resizing = false;
|
|
22
|
+
this.offsetX = 0;
|
|
23
|
+
this.offsetY = 0;
|
|
24
|
+
this.startWidth = 0;
|
|
25
|
+
this.startHeight = 0;
|
|
26
|
+
this.editorError = null;
|
|
27
|
+
this.editing = false;
|
|
28
|
+
this.storageKey = 'qbo-css';
|
|
29
|
+
this.customcss = '';
|
|
30
|
+
this.editorCoding = false;
|
|
31
|
+
this.templateEndpoint = '/configuration/css';
|
|
32
|
+
this.editor = null;
|
|
33
|
+
// editorType: string | null = this.type;
|
|
34
|
+
this.styleElement = null;
|
|
35
|
+
}
|
|
36
|
+
static { this.styles = [
|
|
37
|
+
configurationCss
|
|
38
|
+
]; }
|
|
39
|
+
async connectedCallback() {
|
|
40
|
+
super.connectedCallback();
|
|
41
|
+
this.addEventListener('click', this.requestEdit.bind(this));
|
|
42
|
+
this.shadowRoot?.addEventListener('mousedown', this._onMouseDown.bind(this));
|
|
43
|
+
this.shadowRoot?.addEventListener('mousedown', this._onResizeMouseDown.bind(this), true);
|
|
44
|
+
window.addEventListener('mousemove', this._onMouseMove.bind(this));
|
|
45
|
+
window.addEventListener('mouseup', this._onMouseUp.bind(this));
|
|
46
|
+
this.customcss = localStorage.getItem(this.storageKey) ?? '';
|
|
47
|
+
}
|
|
48
|
+
async disconnectedCallback() {
|
|
49
|
+
this.removeEventListener('dblclick', this.requestEdit.bind(this));
|
|
50
|
+
this.shadowRoot?.removeEventListener('mousedown', this._onMouseDown.bind(this));
|
|
51
|
+
this.shadowRoot?.removeEventListener('mousedown', this._onResizeMouseDown.bind(this), true);
|
|
52
|
+
window.removeEventListener('mousemove', this._onMouseMove.bind(this));
|
|
53
|
+
window.removeEventListener('mouseup', this._onMouseUp.bind(this));
|
|
54
|
+
}
|
|
55
|
+
_onMouseDown(event) {
|
|
56
|
+
if (!event.target.closest('.qbo-code header'))
|
|
57
|
+
return;
|
|
58
|
+
this.dragging = true;
|
|
59
|
+
const editor = this.shadowRoot?.querySelector('.qbo-code');
|
|
60
|
+
if (editor) {
|
|
61
|
+
this.offsetX = event.clientX - editor.getBoundingClientRect().left;
|
|
62
|
+
this.offsetY = event.clientY - editor.getBoundingClientRect().top;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
_onResizeMouseDown(event) {
|
|
66
|
+
if (!event.target.closest('.qbo-code .resize-handle'))
|
|
67
|
+
return;
|
|
68
|
+
this.resizing = true;
|
|
69
|
+
const editor = this.shadowRoot?.querySelector('.qbo-code');
|
|
70
|
+
if (editor) {
|
|
71
|
+
this.startWidth = editor.offsetWidth;
|
|
72
|
+
this.startHeight = editor.offsetHeight;
|
|
73
|
+
this.offsetX = event.clientX;
|
|
74
|
+
this.offsetY = event.clientY;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
_onMouseMove(event) {
|
|
78
|
+
if (this.dragging) {
|
|
79
|
+
const editor = this.shadowRoot?.querySelector('.qbo-code');
|
|
80
|
+
const x = event.clientX - this.offsetX;
|
|
81
|
+
const y = event.clientY - this.offsetY;
|
|
82
|
+
if (editor) {
|
|
83
|
+
editor.style.left = `${x}px`;
|
|
84
|
+
editor.style.top = `${y}px`;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
else if (this.resizing) {
|
|
88
|
+
const editor = this.shadowRoot?.querySelector('.qbo-code');
|
|
89
|
+
if (editor) {
|
|
90
|
+
editor.style.width = `${this.startWidth + (event.clientX - this.offsetX)}px`;
|
|
91
|
+
editor.style.height = `${this.startHeight + (event.clientY - this.offsetY)}px`;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
_onMouseUp() {
|
|
96
|
+
this.dragging = false;
|
|
97
|
+
this.resizing = false;
|
|
98
|
+
}
|
|
99
|
+
requestEdit(event) {
|
|
100
|
+
if (event.composedPath().some((target) => {
|
|
101
|
+
return target instanceof Element && target.classList.contains('qbo-code');
|
|
102
|
+
}))
|
|
103
|
+
return;
|
|
104
|
+
if (!this.editing && event.target.closest('.qbo-design'))
|
|
105
|
+
this.toggleEdit(true);
|
|
106
|
+
}
|
|
107
|
+
toggleEdit(editing) {
|
|
108
|
+
this.editing = editing;
|
|
109
|
+
if (!this.editing) {
|
|
110
|
+
this.editor?.destroy();
|
|
111
|
+
this.editor = null;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
cancel() {
|
|
115
|
+
this.setCss(this.customcss);
|
|
116
|
+
this.toggleEdit(false);
|
|
117
|
+
}
|
|
118
|
+
firstUpdated(changedProperties) {
|
|
119
|
+
super.firstUpdated(changedProperties);
|
|
120
|
+
const style = document.createElement('style');
|
|
121
|
+
style.type = 'text/css';
|
|
122
|
+
style.appendChild(document.createTextNode(localStorage.getItem(this.storageKey) ?? ''));
|
|
123
|
+
document.head.appendChild(style);
|
|
124
|
+
this.styleElement = style;
|
|
125
|
+
}
|
|
126
|
+
updated(changedProperties) {
|
|
127
|
+
super.update(changedProperties);
|
|
128
|
+
if (this.editing) {
|
|
129
|
+
this.editor ??= new EditorView({
|
|
130
|
+
doc: this.styleElement?.textContent ?? '',
|
|
131
|
+
extensions: [
|
|
132
|
+
basicSetup,
|
|
133
|
+
csscode(),
|
|
134
|
+
keymap.of([indentWithTab]),
|
|
135
|
+
EditorView.updateListener.of((e) => {
|
|
136
|
+
this.setCss(e.state.doc.toString());
|
|
137
|
+
})
|
|
138
|
+
],
|
|
139
|
+
parent: this.shadowRoot?.querySelector('div.editor')
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
async code(event) {
|
|
144
|
+
try {
|
|
145
|
+
if (this.editor == null)
|
|
146
|
+
return;
|
|
147
|
+
this.editorCoding = true;
|
|
148
|
+
const prompt = event.target?.value;
|
|
149
|
+
const response = await fetch(`${this.templateEndpoint}/code`, {
|
|
150
|
+
method: 'POST',
|
|
151
|
+
headers: { 'Content-Type': 'application/json' },
|
|
152
|
+
body: JSON.stringify({
|
|
153
|
+
'CssTemplate': this.editor.state.doc.toString(),
|
|
154
|
+
// 'Component': this.getComponent(),
|
|
155
|
+
'Prompt': prompt
|
|
156
|
+
})
|
|
157
|
+
});
|
|
158
|
+
this.editorCoding = false;
|
|
159
|
+
if (response.ok) {
|
|
160
|
+
const html = await response.text();
|
|
161
|
+
this.editor.dispatch({
|
|
162
|
+
changes: { from: 0, to: this.editor.state.doc.length, insert: html }
|
|
163
|
+
});
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
else
|
|
167
|
+
throw new Error(`Failed to generate code: ${response.statusText}`);
|
|
168
|
+
}
|
|
169
|
+
catch (e) {
|
|
170
|
+
this.editorCoding = false;
|
|
171
|
+
throw e;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
save() {
|
|
175
|
+
this.toggleEdit(false);
|
|
176
|
+
}
|
|
177
|
+
// Creates a function from the user's input.
|
|
178
|
+
setCss(content) {
|
|
179
|
+
// const test = new Function('css', `return qbo4.configuration.html\`${content}\``) as TemplateFunction;
|
|
180
|
+
localStorage.setItem(this.storageKey, content);
|
|
181
|
+
if (this.styleElement == null)
|
|
182
|
+
return;
|
|
183
|
+
try {
|
|
184
|
+
this.styleElement.textContent = content;
|
|
185
|
+
this.editorError = undefined;
|
|
186
|
+
}
|
|
187
|
+
catch (e) {
|
|
188
|
+
this.editorError = e;
|
|
189
|
+
console.error(`Error rendering ${content}`, e);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
edit() {
|
|
193
193
|
return html `
|
|
194
194
|
<dialog class="qbo-code" open>
|
|
195
195
|
<header>
|
|
@@ -204,38 +204,38 @@ let QboCss = class QboCss extends LitElement {
|
|
|
204
204
|
<button type="submit" @click=${this.save}>Save</button>
|
|
205
205
|
<button type="reset" @click=${this.cancel}>Cancel</button>
|
|
206
206
|
</footer>
|
|
207
|
-
</dialog>`;
|
|
208
|
-
}
|
|
209
|
-
render() {
|
|
210
|
-
return html `${(this.editing) ? this.edit() : html ``}<slot>css edit</slot>`;
|
|
211
|
-
}
|
|
212
|
-
};
|
|
213
|
-
__decorate([
|
|
214
|
-
property({ attribute: false }),
|
|
215
|
-
__metadata("design:type", Object)
|
|
216
|
-
], QboCss.prototype, "editorError", void 0);
|
|
217
|
-
__decorate([
|
|
218
|
-
property(),
|
|
219
|
-
__metadata("design:type", Object)
|
|
220
|
-
], QboCss.prototype, "editing", void 0);
|
|
221
|
-
__decorate([
|
|
222
|
-
property(),
|
|
223
|
-
__metadata("design:type", String)
|
|
224
|
-
], QboCss.prototype, "storageKey", void 0);
|
|
225
|
-
__decorate([
|
|
226
|
-
property(),
|
|
227
|
-
__metadata("design:type", String)
|
|
228
|
-
], QboCss.prototype, "customcss", void 0);
|
|
229
|
-
__decorate([
|
|
230
|
-
property({ attribute: false }),
|
|
231
|
-
__metadata("design:type", Boolean)
|
|
232
|
-
], QboCss.prototype, "editorCoding", void 0);
|
|
233
|
-
__decorate([
|
|
234
|
-
property(),
|
|
235
|
-
__metadata("design:type", Object)
|
|
236
|
-
], QboCss.prototype, "templateEndpoint", void 0);
|
|
237
|
-
QboCss = __decorate([
|
|
238
|
-
customElement('qbo-css')
|
|
239
|
-
], QboCss);
|
|
240
|
-
export { QboCss };
|
|
207
|
+
</dialog>`;
|
|
208
|
+
}
|
|
209
|
+
render() {
|
|
210
|
+
return html `${(this.editing) ? this.edit() : html ``}<slot>css edit</slot>`;
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
__decorate([
|
|
214
|
+
property({ attribute: false }),
|
|
215
|
+
__metadata("design:type", Object)
|
|
216
|
+
], QboCss.prototype, "editorError", void 0);
|
|
217
|
+
__decorate([
|
|
218
|
+
property(),
|
|
219
|
+
__metadata("design:type", Object)
|
|
220
|
+
], QboCss.prototype, "editing", void 0);
|
|
221
|
+
__decorate([
|
|
222
|
+
property(),
|
|
223
|
+
__metadata("design:type", String)
|
|
224
|
+
], QboCss.prototype, "storageKey", void 0);
|
|
225
|
+
__decorate([
|
|
226
|
+
property(),
|
|
227
|
+
__metadata("design:type", String)
|
|
228
|
+
], QboCss.prototype, "customcss", void 0);
|
|
229
|
+
__decorate([
|
|
230
|
+
property({ attribute: false }),
|
|
231
|
+
__metadata("design:type", Boolean)
|
|
232
|
+
], QboCss.prototype, "editorCoding", void 0);
|
|
233
|
+
__decorate([
|
|
234
|
+
property(),
|
|
235
|
+
__metadata("design:type", Object)
|
|
236
|
+
], QboCss.prototype, "templateEndpoint", void 0);
|
|
237
|
+
QboCss = __decorate([
|
|
238
|
+
customElement('qbo-css')
|
|
239
|
+
], QboCss);
|
|
240
|
+
export { QboCss };
|
|
241
241
|
//# sourceMappingURL=qbo-css.js.map
|
package/src/qbo-template.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
-
export declare class ITemplate {
|
|
3
|
-
type: string;
|
|
4
|
-
map: Map<string, TemplateFunction> | undefined;
|
|
5
|
-
prefix: string;
|
|
6
|
-
templateEndpoint: string;
|
|
7
|
-
}
|
|
8
|
-
type Constructor<T = {}> = new (...args: any[]) => T;
|
|
9
|
-
export type TemplateFunction = (component: any) => TemplateResult;
|
|
10
|
-
export declare const templates: Map<string, Map<string, TemplateFunction>>;
|
|
11
|
-
export declare function template(prefix: string | null): (target: any, propertyKey: string) => void;
|
|
12
|
-
export declare const QboTemplateMixin: <T extends Constructor<LitElement>>(superClass: T) => Constructor<ITemplate> & T;
|
|
13
|
-
/**
|
|
14
|
-
* Renders a template defined in configuration.
|
|
15
|
-
*
|
|
16
|
-
* @remarks
|
|
17
|
-
* @param apiEndpoint - The API endpoint to fetch data from.
|
|
18
|
-
* @param method - The HTTP method to use when fetching data.
|
|
19
|
-
* @param error - Indicates whether an error occurred while fetching data.
|
|
20
|
-
*/
|
|
21
|
-
export declare const QboTemplate: Constructor<ITemplate> & typeof LitElement;
|
|
22
|
-
export {};
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
export declare class ITemplate {
|
|
3
|
+
type: string;
|
|
4
|
+
map: Map<string, TemplateFunction> | undefined;
|
|
5
|
+
prefix: string;
|
|
6
|
+
templateEndpoint: string;
|
|
7
|
+
}
|
|
8
|
+
type Constructor<T = {}> = new (...args: any[]) => T;
|
|
9
|
+
export type TemplateFunction = (component: any) => TemplateResult;
|
|
10
|
+
export declare const templates: Map<string, Map<string, TemplateFunction>>;
|
|
11
|
+
export declare function template(prefix: string | null): (target: any, propertyKey: string) => void;
|
|
12
|
+
export declare const QboTemplateMixin: <T extends Constructor<LitElement>>(superClass: T) => Constructor<ITemplate> & T;
|
|
13
|
+
/**
|
|
14
|
+
* Renders a template defined in configuration.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* @param apiEndpoint - The API endpoint to fetch data from.
|
|
18
|
+
* @param method - The HTTP method to use when fetching data.
|
|
19
|
+
* @param error - Indicates whether an error occurred while fetching data.
|
|
20
|
+
*/
|
|
21
|
+
export declare const QboTemplate: Constructor<ITemplate> & typeof LitElement;
|
|
22
|
+
export {};
|