@quandis/qbo4.configuration 4.0.1-CI-20241017-003408 → 4.0.1-CI-20241017-161458
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 +2 -2
- package/src/qbo-config-editor.d.ts +1 -0
- package/src/qbo-config-editor.js +30 -14
- package/src/qbo-config-editor.js.map +1 -1
- package/src/qbo-config-editor.ts +33 -14
- package/wwwroot/js/esm/qbo4.configuration.js +31 -15
- package/wwwroot/js/esm/qbo4.configuration.min.js +10 -10
- package/wwwroot/js/esm/qbo4.configuration.min.js.map +1 -1
- package/wwwroot/js/qbo4.configuration.js +31 -15
- package/wwwroot/js/qbo4.configuration.min.js +10 -10
- package/wwwroot/js/qbo4.configuration.min.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quandis/qbo4.configuration",
|
|
3
|
-
"version": "4.0.1-CI-20241017-
|
|
3
|
+
"version": "4.0.1-CI-20241017-161458",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./src/Program.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"mini-css-extract-plugin": "^2.9.1",
|
|
36
36
|
"postcss-cli": "^11.0.0",
|
|
37
37
|
"postcss-loader": "^8.1.1",
|
|
38
|
-
"sass": "^1.80.
|
|
38
|
+
"sass": "^1.80.1",
|
|
39
39
|
"sass-loader": "^16.0.2",
|
|
40
40
|
"style-loader": "^4.0.0",
|
|
41
41
|
"typescript": "^5.6.3",
|
|
@@ -12,6 +12,7 @@ export declare class QboConfigEditor extends LitElement {
|
|
|
12
12
|
addKeyValuePair(event: any): void;
|
|
13
13
|
deleteKeyValuePair(key: any, event: any): Promise<void>;
|
|
14
14
|
saveChanges(event: any): Promise<void>;
|
|
15
|
+
alertError(error: any): void;
|
|
15
16
|
alertUpdated(): void;
|
|
16
17
|
alertClear(alert: Element): void;
|
|
17
18
|
cancelChanges(event: any): Promise<void>;
|
package/src/qbo-config-editor.js
CHANGED
|
@@ -51,7 +51,7 @@ export class QboConfigEditor extends LitElement {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
catch (err) {
|
|
54
|
-
|
|
54
|
+
this.alertError(err);
|
|
55
55
|
}
|
|
56
56
|
await this.search();
|
|
57
57
|
this.alertUpdated();
|
|
@@ -65,13 +65,28 @@ export class QboConfigEditor extends LitElement {
|
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
catch (err) {
|
|
68
|
-
|
|
68
|
+
this.alertError(err);
|
|
69
69
|
}
|
|
70
70
|
await this.search();
|
|
71
71
|
this.alertUpdated();
|
|
72
72
|
}
|
|
73
|
+
alertError(error) {
|
|
74
|
+
dispatchEvent(new CustomEvent('qbo-error', { detail: error }));
|
|
75
|
+
var alert = this.renderRoot.querySelector(`div.error`);
|
|
76
|
+
if (alert) {
|
|
77
|
+
alert.classList.remove("hidden");
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
alert = document.createElement("div");
|
|
81
|
+
alert.className = "error";
|
|
82
|
+
alert.innerHTML = error;
|
|
83
|
+
var form = this.renderRoot.querySelector(`form`);
|
|
84
|
+
form?.insertBefore(alert, form?.querySelector(`div.${this.buttonClass}`));
|
|
85
|
+
}
|
|
86
|
+
setTimeout(this.alertClear, 5000, alert);
|
|
87
|
+
}
|
|
73
88
|
alertUpdated() {
|
|
74
|
-
var alert = this.renderRoot.querySelector(`div.
|
|
89
|
+
var alert = this.renderRoot.querySelector(`div.success`);
|
|
75
90
|
if (alert) {
|
|
76
91
|
alert.classList.remove("hidden");
|
|
77
92
|
}
|
|
@@ -111,7 +126,7 @@ export class QboConfigEditor extends LitElement {
|
|
|
111
126
|
this.configData = await response.json();
|
|
112
127
|
}
|
|
113
128
|
catch (err) {
|
|
114
|
-
|
|
129
|
+
this.alertError(err);
|
|
115
130
|
}
|
|
116
131
|
}
|
|
117
132
|
}
|
|
@@ -121,20 +136,22 @@ export class QboConfigEditor extends LitElement {
|
|
|
121
136
|
}
|
|
122
137
|
render() {
|
|
123
138
|
const source = new JsonConfigurationSource(this.configData);
|
|
124
|
-
|
|
125
|
-
<form @submit="${this.handleSubmit}" class="${this.formClass}" data-bs-theme="${this.theme}">
|
|
126
|
-
<div class="${this.searchClass}">
|
|
127
|
-
<input type="text" @keydown="${this.filter}">
|
|
128
|
-
<button type="button" @click="${this.filter}">Search</button>
|
|
129
|
-
</div>
|
|
139
|
+
const header = Array.from(source.getValues()).length == 0 ? html `` : html `
|
|
130
140
|
<div class="${this.rowClass}">
|
|
131
141
|
<div>
|
|
132
|
-
<
|
|
142
|
+
<strong>Name</strong>
|
|
133
143
|
</div>
|
|
134
144
|
<div>
|
|
135
|
-
<
|
|
145
|
+
<strong>Value</strong>
|
|
136
146
|
</div>
|
|
147
|
+
</div>`;
|
|
148
|
+
return html `
|
|
149
|
+
<form @submit="${this.handleSubmit}" class="${this.formClass}" data-bs-theme="${this.theme}">
|
|
150
|
+
<div class="${this.searchClass}">
|
|
151
|
+
<input type="text" @keydown="${this.filter}">
|
|
152
|
+
<button type="button" @click="${this.filter}">Search</button>
|
|
137
153
|
</div>
|
|
154
|
+
${header}
|
|
138
155
|
${Array.from(source.getValues()).map(({ key, value }) => html `
|
|
139
156
|
<div class="${this.rowClass}">
|
|
140
157
|
<div>
|
|
@@ -154,8 +171,7 @@ export class QboConfigEditor extends LitElement {
|
|
|
154
171
|
<button type="button" class="cancel" @click="${this.cancelChanges}">Cancel</button>
|
|
155
172
|
</div>
|
|
156
173
|
</div>
|
|
157
|
-
</form
|
|
158
|
-
</slot>`;
|
|
174
|
+
</form>`;
|
|
159
175
|
}
|
|
160
176
|
}
|
|
161
177
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qbo-config-editor.js","sourceRoot":"","sources":["qbo-config-editor.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,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C,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC;;;;6CAItE,KAAK,aAAa,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;+DACpD,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC,CAAC;;;WAG1F,CAAC;kBACM,IAAI,CAAC,WAAW;oDACkB,IAAI,CAAC,eAAe;;yDAEf,IAAI,CAAC,WAAW;2DACd,IAAI,CAAC,aAAa;;;QAGrE,CAAC;IACL,CAAC;;AAvLD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;;oDACwC;AAGhE;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDACH;AAGxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8BACf,MAAM;mDAAM;AAGxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDACK;AAGhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDACN;AAGrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDACJ;AAGvB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CACX;AAwKpB,cAAc,CAAC,MAAM,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC"}
|
package/src/qbo-config-editor.ts
CHANGED
|
@@ -56,7 +56,7 @@ export class QboConfigEditor extends LitElement {
|
|
|
56
56
|
method: 'GET'
|
|
57
57
|
});
|
|
58
58
|
} catch (err) {
|
|
59
|
-
|
|
59
|
+
this.alertError(err);
|
|
60
60
|
}
|
|
61
61
|
await this.search();
|
|
62
62
|
this.alertUpdated();
|
|
@@ -70,14 +70,31 @@ export class QboConfigEditor extends LitElement {
|
|
|
70
70
|
body: JSON.stringify(this.configData)
|
|
71
71
|
});
|
|
72
72
|
} catch (err) {
|
|
73
|
-
|
|
73
|
+
this.alertError(err);
|
|
74
74
|
}
|
|
75
75
|
await this.search();
|
|
76
76
|
this.alertUpdated();
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
alertError(error) {
|
|
80
|
+
dispatchEvent(new CustomEvent('qbo-error', { detail: error }));
|
|
81
|
+
|
|
82
|
+
var alert = this.renderRoot.querySelector(`div.error`);
|
|
83
|
+
if (alert) {
|
|
84
|
+
alert.classList.remove("hidden");
|
|
85
|
+
} else {
|
|
86
|
+
alert = document.createElement("div");
|
|
87
|
+
alert.className = "error";
|
|
88
|
+
alert.innerHTML = error;
|
|
89
|
+
|
|
90
|
+
var form = this.renderRoot.querySelector(`form`);
|
|
91
|
+
form?.insertBefore(alert, form?.querySelector(`div.${this.buttonClass}`));
|
|
92
|
+
}
|
|
93
|
+
setTimeout(this.alertClear, 5000, alert);
|
|
94
|
+
}
|
|
95
|
+
|
|
79
96
|
alertUpdated() {
|
|
80
|
-
var alert = this.renderRoot.querySelector(`div.
|
|
97
|
+
var alert = this.renderRoot.querySelector(`div.success`);
|
|
81
98
|
if (alert) {
|
|
82
99
|
alert.classList.remove("hidden");
|
|
83
100
|
} else {
|
|
@@ -122,7 +139,7 @@ export class QboConfigEditor extends LitElement {
|
|
|
122
139
|
});
|
|
123
140
|
this.configData = await response.json();
|
|
124
141
|
} catch (err) {
|
|
125
|
-
|
|
142
|
+
this.alertError(err);
|
|
126
143
|
}
|
|
127
144
|
|
|
128
145
|
}
|
|
@@ -135,20 +152,23 @@ export class QboConfigEditor extends LitElement {
|
|
|
135
152
|
|
|
136
153
|
render() {
|
|
137
154
|
const source = new JsonConfigurationSource(this.configData);
|
|
138
|
-
|
|
139
|
-
<form @submit="${this.handleSubmit}" class="${this.formClass}" data-bs-theme="${this.theme}">
|
|
140
|
-
<div class="${this.searchClass}">
|
|
141
|
-
<input type="text" @keydown="${this.filter}">
|
|
142
|
-
<button type="button" @click="${this.filter}">Search</button>
|
|
143
|
-
</div>
|
|
155
|
+
const header = Array.from(source.getValues()).length == 0 ? html`` : html`
|
|
144
156
|
<div class="${this.rowClass}">
|
|
145
157
|
<div>
|
|
146
|
-
<
|
|
158
|
+
<strong>Name</strong>
|
|
147
159
|
</div>
|
|
148
160
|
<div>
|
|
149
|
-
<
|
|
161
|
+
<strong>Value</strong>
|
|
150
162
|
</div>
|
|
163
|
+
</div>`;
|
|
164
|
+
|
|
165
|
+
return html`
|
|
166
|
+
<form @submit="${this.handleSubmit}" class="${this.formClass}" data-bs-theme="${this.theme}">
|
|
167
|
+
<div class="${this.searchClass}">
|
|
168
|
+
<input type="text" @keydown="${this.filter}">
|
|
169
|
+
<button type="button" @click="${this.filter}">Search</button>
|
|
151
170
|
</div>
|
|
171
|
+
${header}
|
|
152
172
|
${Array.from(source.getValues()).map(({ key, value }) => html`
|
|
153
173
|
<div class="${this.rowClass}">
|
|
154
174
|
<div>
|
|
@@ -168,8 +188,7 @@ export class QboConfigEditor extends LitElement {
|
|
|
168
188
|
<button type="button" class="cancel" @click="${this.cancelChanges}">Cancel</button>
|
|
169
189
|
</div>
|
|
170
190
|
</div>
|
|
171
|
-
</form
|
|
172
|
-
</slot>`;
|
|
191
|
+
</form>`;
|
|
173
192
|
}
|
|
174
193
|
}
|
|
175
194
|
|