@hotstaq/admin-panel 0.2.5 → 0.2.7
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/.vscode/launch.json +5 -5
- package/HotSite.json +2 -2
- package/build/{src/AppAPI.d.ts → AppAPI.d.ts} +0 -0
- package/build/AppAPI.d.ts.map +1 -0
- package/build/{src/AppAPI.js → AppAPI.js} +48 -1
- package/build/AppAPI.js.map +1 -0
- package/build/WebExport.d.ts +3 -0
- package/build/WebExport.d.ts.map +1 -0
- package/build/{src/WebExport.js → WebExport.js} +8 -22
- package/build/WebExport.js.map +1 -0
- package/build/{src/cli.d.ts → cli.d.ts} +0 -0
- package/build/cli.d.ts.map +1 -0
- package/build/{src/cli.js → cli.js} +2 -2
- package/build/cli.js.map +1 -0
- package/build/{src/components → components}/admin-button.d.ts +1 -1
- package/build/components/admin-button.d.ts.map +1 -0
- package/build/{src/components → components}/admin-button.js +1 -5
- package/build/components/admin-button.js.map +1 -0
- package/build/components/admin-checkbox.d.ts +1 -0
- package/build/components/admin-checkbox.d.ts.map +1 -0
- package/build/components/admin-checkbox.js +43 -0
- package/build/components/admin-checkbox.js.map +1 -0
- package/build/{src/components → components}/admin-dashboard.d.ts +2 -2
- package/build/components/admin-dashboard.d.ts.map +1 -0
- package/build/components/admin-dashboard.js +44 -0
- package/build/components/admin-dashboard.js.map +1 -0
- package/build/components/admin-edit.d.ts +87 -0
- package/build/components/admin-edit.d.ts.map +1 -0
- package/build/components/admin-edit.js +297 -0
- package/build/components/admin-edit.js.map +1 -0
- package/build/{src/components → components}/admin-table-field.d.ts +3 -6
- package/build/components/admin-table-field.d.ts.map +1 -0
- package/build/components/admin-table-field.js +47 -0
- package/build/components/admin-table-field.js.map +1 -0
- package/build/{src/components → components}/admin-table-row.d.ts +3 -6
- package/build/components/admin-table-row.d.ts.map +1 -0
- package/build/components/admin-table-row.js +55 -0
- package/build/components/admin-table-row.js.map +1 -0
- package/build/{src/components → components}/admin-table.d.ts +36 -4
- package/build/components/admin-table.d.ts.map +1 -0
- package/build/{src/components → components}/admin-table.js +116 -23
- package/build/components/admin-table.js.map +1 -0
- package/build/components/admin-text.d.ts +26 -0
- package/build/components/admin-text.d.ts.map +1 -0
- package/build/components/admin-text.js +57 -0
- package/build/components/admin-text.js.map +1 -0
- package/build/{src/WebExport.d.ts → index.d.ts} +2 -3
- package/build/index.d.ts.map +1 -0
- package/build/index.js +18 -0
- package/build/index.js.map +1 -0
- package/build-web/AdminPanelComponents.js +2 -2
- package/build-web/AdminPanelWeb_AppAPI.js +87 -0
- package/package.json +8 -7
- package/src/AppAPI.ts +55 -2
- package/src/WebExport.ts +9 -24
- package/src/cli.ts +2 -2
- package/src/components/admin-button.ts +2 -2
- package/src/components/admin-checkbox.ts +52 -0
- package/src/components/admin-dashboard.ts +4 -3
- package/src/components/admin-edit.ts +233 -16
- package/src/components/admin-table-field.ts +8 -7
- package/src/components/admin-table-row.ts +9 -5
- package/src/components/admin-table.ts +169 -10
- package/src/components/admin-text.ts +24 -4
- package/src/index.ts +17 -0
- package/tsconfig.json +1 -0
- package/webpack.config.cjs +2 -1
- package/build/scripts/watch.d.ts +0 -2
- package/build/scripts/watch.d.ts.map +0 -1
- package/build/scripts/watch.js +0 -127
- package/build/scripts/watch.js.map +0 -1
- package/build/src/AppAPI.d.ts.map +0 -1
- package/build/src/AppAPI.js.map +0 -1
- package/build/src/WebExport.d.ts.map +0 -1
- package/build/src/WebExport.js.map +0 -1
- package/build/src/cli.d.ts.map +0 -1
- package/build/src/cli.js.map +0 -1
- package/build/src/components/admin-button.d.ts.map +0 -1
- package/build/src/components/admin-button.js.map +0 -1
- package/build/src/components/admin-dashboard.d.ts.map +0 -1
- package/build/src/components/admin-dashboard.js +0 -89
- package/build/src/components/admin-dashboard.js.map +0 -1
- package/build/src/components/admin-edit.d.ts +0 -39
- package/build/src/components/admin-edit.d.ts.map +0 -1
- package/build/src/components/admin-edit.js +0 -124
- package/build/src/components/admin-edit.js.map +0 -1
- package/build/src/components/admin-table-field.d.ts.map +0 -1
- package/build/src/components/admin-table-field.js +0 -92
- package/build/src/components/admin-table-field.js.map +0 -1
- package/build/src/components/admin-table-row.d.ts.map +0 -1
- package/build/src/components/admin-table-row.js +0 -99
- package/build/src/components/admin-table-row.js.map +0 -1
- package/build/src/components/admin-table.d.ts.map +0 -1
- package/build/src/components/admin-table.js.map +0 -1
- package/build/src/components/admin-text.d.ts +0 -14
- package/build/src/components/admin-text.d.ts.map +0 -1
- package/build/src/components/admin-text.js +0 -98
- package/build/src/components/admin-text.js.map +0 -1
- package/scripts/watch.ts +0 -59
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HotStaq, Hot, HotAPI, HotComponent } from "hotstaq";
|
|
1
|
+
import { HotStaq, Hot, HotAPI, HotComponent, HotComponentOutput } from "hotstaq";
|
|
2
2
|
|
|
3
3
|
export class AdminTableRow extends HotComponent
|
|
4
4
|
{
|
|
@@ -20,17 +20,21 @@ export class AdminTableRow extends HotComponent
|
|
|
20
20
|
/**
|
|
21
21
|
* Add this table row to the table
|
|
22
22
|
*/
|
|
23
|
-
|
|
24
|
-
async onPostPlace (parentHtmlElement: HTMLElement, htmlElement: HTMLElement): Promise<HTMLElement>
|
|
23
|
+
onPostPlace (parentHtmlElement: HTMLElement, htmlElement: HTMLElement): HTMLElement
|
|
25
24
|
{
|
|
26
25
|
// @ts-ignore
|
|
27
26
|
parentHtmlElement.parentNode.parentNode.parentNode.hotComponent.rowElements.push ({ fields: this.fields, element: htmlElement});
|
|
27
|
+
|
|
28
|
+
return (null);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
output (): string | HotComponentOutput[]
|
|
31
32
|
{
|
|
32
33
|
let rowHtml = "";
|
|
33
34
|
|
|
35
|
+
if (this.fields.length > 0)
|
|
36
|
+
rowHtml += `<td><input type = "checkbox" /></td>`;
|
|
37
|
+
|
|
34
38
|
for (let iIdx = 0; iIdx < this.fields.length; iIdx++)
|
|
35
39
|
{
|
|
36
40
|
let fieldObj = this.fields[iIdx];
|
|
@@ -45,7 +49,7 @@ export class AdminTableRow extends HotComponent
|
|
|
45
49
|
|
|
46
50
|
return ([{
|
|
47
51
|
html: `<tr>${rowHtml}</tr>`,
|
|
48
|
-
|
|
52
|
+
documentSelector: "[hot-place-here='results']"
|
|
49
53
|
}]);
|
|
50
54
|
}
|
|
51
55
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HotStaq, Hot, HotAPI, HotComponent } from "hotstaq";
|
|
1
|
+
import { HotStaq, Hot, HotAPI, HotComponent, HotComponentOutput } from "hotstaq";
|
|
2
2
|
import { AdminTableField } from "./admin-table-field";
|
|
3
3
|
|
|
4
4
|
export class AdminTable extends HotComponent
|
|
@@ -37,7 +37,17 @@ export class AdminTable extends HotComponent
|
|
|
37
37
|
* "html": "<tr><td>John Smith</td><td>john.smith@test.com</td></tr>"
|
|
38
38
|
* }
|
|
39
39
|
*/
|
|
40
|
-
rowElements: { fields: any[];
|
|
40
|
+
rowElements: { fields: any[]; element: HTMLElement; }[] = [];
|
|
41
|
+
/**
|
|
42
|
+
* The selected row indicies. Each index maps to the rowElements array.
|
|
43
|
+
*
|
|
44
|
+
* @fixme Add support for this in the future.
|
|
45
|
+
*/
|
|
46
|
+
//protected selectedRows: number[];
|
|
47
|
+
/**
|
|
48
|
+
* The most recently selected row index. The index maps to the rowElements array.
|
|
49
|
+
*/
|
|
50
|
+
protected selected: number;
|
|
41
51
|
|
|
42
52
|
constructor (copy: HotComponent | HotStaq, api: HotAPI)
|
|
43
53
|
{
|
|
@@ -49,6 +59,8 @@ export class AdminTable extends HotComponent
|
|
|
49
59
|
this.headerElements = {};
|
|
50
60
|
this.headerIndicies = [];
|
|
51
61
|
this.rowElements = [];
|
|
62
|
+
//this.selectedRows = [];
|
|
63
|
+
this.selected = -1;
|
|
52
64
|
}
|
|
53
65
|
|
|
54
66
|
/**
|
|
@@ -58,6 +70,9 @@ export class AdminTable extends HotComponent
|
|
|
58
70
|
{
|
|
59
71
|
let header = this.htmlElements[0].getElementsByTagName ("thead")[0];
|
|
60
72
|
|
|
73
|
+
if (this.headerIndicies.length < 1)
|
|
74
|
+
this.headerIndicies.push (null);
|
|
75
|
+
|
|
61
76
|
// @ts-ignore
|
|
62
77
|
this.headerIndicies.push (tableFieldElement.hotComponent.field);
|
|
63
78
|
header.appendChild (tableFieldElement);
|
|
@@ -68,10 +83,142 @@ export class AdminTable extends HotComponent
|
|
|
68
83
|
*/
|
|
69
84
|
addHeaderDataOnly (tableField: AdminTableField, htmlElement: HTMLElement)
|
|
70
85
|
{
|
|
86
|
+
if (this.headerIndicies.length < 1)
|
|
87
|
+
this.headerIndicies.push (null);
|
|
88
|
+
|
|
71
89
|
this.headerIndicies.push (tableField.field);
|
|
72
90
|
this.headerElements[tableField.field] = htmlElement;
|
|
73
91
|
}
|
|
74
92
|
|
|
93
|
+
/**
|
|
94
|
+
* Executes this event when a row is selected. If this returns false, the row will not be selected.
|
|
95
|
+
*/
|
|
96
|
+
onSelectedRow: (rowIndex: number) => Promise<boolean> = null;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Executes when a row is selected.
|
|
100
|
+
*/
|
|
101
|
+
async selectRow (htmlElement: HTMLElement, rowIndex: number): Promise<void>
|
|
102
|
+
{
|
|
103
|
+
if (this.onSelectedRow != null)
|
|
104
|
+
{
|
|
105
|
+
let result = await this.onSelectedRow (rowIndex);
|
|
106
|
+
|
|
107
|
+
if (result === false)
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// In the future, we will support multiple rows being selected. For now
|
|
112
|
+
// this will ensure that only one row is selected at a time.
|
|
113
|
+
{
|
|
114
|
+
let tbody = this.htmlElements[1].getElementsByTagName ("tbody")[0];
|
|
115
|
+
let rows = tbody.getElementsByTagName ("tr");
|
|
116
|
+
|
|
117
|
+
for (let iIdx = 0; iIdx < rows.length; iIdx++)
|
|
118
|
+
{
|
|
119
|
+
let row: HTMLTableRowElement = rows[iIdx];
|
|
120
|
+
|
|
121
|
+
if (row.classList.contains ("table-primary") === true)
|
|
122
|
+
row.classList.remove ("table-primary");
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
htmlElement.classList.add ("table-primary");
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
this.selected = rowIndex;
|
|
129
|
+
|
|
130
|
+
/*this.selectedRows = [];
|
|
131
|
+
let tbody = this.htmlElements[1].getElementsByTagName ("tbody")[0];
|
|
132
|
+
|
|
133
|
+
// Find all the checkboxes in tbody.
|
|
134
|
+
let checkboxes = tbody.getElementsByTagName ("input");
|
|
135
|
+
|
|
136
|
+
for (let iIdx = 0; iIdx < checkboxes.length; iIdx++)
|
|
137
|
+
{
|
|
138
|
+
let checkbox: HTMLInputElement = checkboxes[iIdx];
|
|
139
|
+
|
|
140
|
+
if (checkbox.checked != null)
|
|
141
|
+
{
|
|
142
|
+
if (checkbox.checked === true)
|
|
143
|
+
{
|
|
144
|
+
// Get the data-index attribute.
|
|
145
|
+
let dataIndexStr: string = checkbox.parentElement.parentElement.getAttribute ("data-index");
|
|
146
|
+
let dataIndex: number = parseInt (dataIndexStr);
|
|
147
|
+
|
|
148
|
+
this.selectedRows.push (dataIndex);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}*/
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Get the selected data.
|
|
156
|
+
*/
|
|
157
|
+
getSelected (): any[]
|
|
158
|
+
{
|
|
159
|
+
let index: number = this.selected;
|
|
160
|
+
|
|
161
|
+
if (index < 0)
|
|
162
|
+
return (null);
|
|
163
|
+
|
|
164
|
+
return (this.rowElements[index].fields);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Get the selected data.
|
|
169
|
+
*/
|
|
170
|
+
/*getSelectedRows (): any[]
|
|
171
|
+
{
|
|
172
|
+
let rows: any[] = [];
|
|
173
|
+
|
|
174
|
+
for (let iIdx = 0; iIdx < this.selectedRows.length; iIdx++)
|
|
175
|
+
{
|
|
176
|
+
let index: number = this.selectedRows[iIdx];
|
|
177
|
+
rows.push (this.rowElements[index].fields);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return (rows);
|
|
181
|
+
}*/
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Get the data for each row that has been checked.
|
|
185
|
+
*/
|
|
186
|
+
getCheckedRows (): any[]
|
|
187
|
+
{
|
|
188
|
+
let rows: any[] = [];
|
|
189
|
+
let tbody = this.htmlElements[1].getElementsByTagName ("tbody")[0];
|
|
190
|
+
|
|
191
|
+
// Find all the checkboxes in tbody.
|
|
192
|
+
let checkboxes = tbody.getElementsByTagName ("input");
|
|
193
|
+
|
|
194
|
+
for (let iIdx = 0; iIdx < checkboxes.length; iIdx++)
|
|
195
|
+
{
|
|
196
|
+
let checkbox: HTMLInputElement = checkboxes[iIdx];
|
|
197
|
+
|
|
198
|
+
if (checkbox.checked != null)
|
|
199
|
+
{
|
|
200
|
+
if (checkbox.checked === true)
|
|
201
|
+
{
|
|
202
|
+
// Get the data-index attribute.
|
|
203
|
+
let dataIndexStr: string = checkbox.parentElement.parentElement.getAttribute ("data-index");
|
|
204
|
+
let dataIndex: number = parseInt (dataIndexStr);
|
|
205
|
+
|
|
206
|
+
rows.push (this.rowElements[dataIndex].fields);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return (rows);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Get a row's data.
|
|
216
|
+
*/
|
|
217
|
+
getRow (index: number): any[]
|
|
218
|
+
{
|
|
219
|
+
return (this.rowElements[index].fields);
|
|
220
|
+
}
|
|
221
|
+
|
|
75
222
|
/**
|
|
76
223
|
* Add a row to the table.
|
|
77
224
|
*
|
|
@@ -80,7 +227,10 @@ export class AdminTable extends HotComponent
|
|
|
80
227
|
addRow (fields: { [name: string]: any }[])
|
|
81
228
|
{
|
|
82
229
|
let tbody = this.htmlElements[1].getElementsByTagName ("tbody")[0];
|
|
83
|
-
let
|
|
230
|
+
let index: number = this.rowElements.length;
|
|
231
|
+
let rowStr = `<tr onclick = "this.parentNode.parentNode.parentNode.parentNode.hotComponent.selectRow (this, ${index});">`;
|
|
232
|
+
|
|
233
|
+
rowStr += `<td><input type = "checkbox" /></td>`;
|
|
84
234
|
|
|
85
235
|
for (let iIdx = 0; iIdx < this.headerIndicies.length; iIdx++)
|
|
86
236
|
{
|
|
@@ -88,12 +238,17 @@ export class AdminTable extends HotComponent
|
|
|
88
238
|
let value = fields[key];
|
|
89
239
|
|
|
90
240
|
if (this.headerElements[key] != null)
|
|
91
|
-
rowStr += `<td>${value}</td>`;
|
|
241
|
+
rowStr += `<td data-index = "${index}">${value}</td>`;
|
|
92
242
|
}
|
|
93
243
|
|
|
94
244
|
rowStr += "</tr>";
|
|
95
245
|
|
|
96
|
-
HotStaq.addHtml (tbody, rowStr);
|
|
246
|
+
let newObj = HotStaq.addHtml (tbody, rowStr);
|
|
247
|
+
|
|
248
|
+
this.rowElements.push ({
|
|
249
|
+
fields: fields,
|
|
250
|
+
element: (<HTMLElement>newObj)
|
|
251
|
+
});
|
|
97
252
|
}
|
|
98
253
|
|
|
99
254
|
/**
|
|
@@ -128,23 +283,27 @@ export class AdminTable extends HotComponent
|
|
|
128
283
|
/**
|
|
129
284
|
* Get the list of data from the server.
|
|
130
285
|
*/
|
|
131
|
-
|
|
132
|
-
async onPostPlace (parentHtmlElement: HTMLElement, htmlElement: HTMLElement): Promise<HTMLElement>
|
|
286
|
+
onPostPlace (parentHtmlElement: HTMLElement, htmlElement: HTMLElement): HTMLElement
|
|
133
287
|
{
|
|
134
288
|
setTimeout (async () =>
|
|
135
289
|
{
|
|
136
290
|
await this.refreshList ();
|
|
137
291
|
}, 50);
|
|
292
|
+
|
|
293
|
+
return (null);
|
|
138
294
|
}
|
|
139
295
|
|
|
140
|
-
|
|
296
|
+
output (): string | HotComponentOutput[]
|
|
141
297
|
{
|
|
142
298
|
return (`
|
|
143
299
|
<div id = "${this.htmlElements[0].id}">
|
|
144
300
|
<h2>${this.title}</h2>
|
|
145
301
|
<div class="table-responsive">
|
|
146
|
-
<table class="table table-striped table-sm">
|
|
147
|
-
<thead
|
|
302
|
+
<table id = "${this.htmlElements[0].id}Table" class="table table-striped table-sm">
|
|
303
|
+
<thead>
|
|
304
|
+
<tr hot-place-here = "header">
|
|
305
|
+
<th></th>
|
|
306
|
+
</tr>
|
|
148
307
|
</thead>
|
|
149
308
|
<tbody hot-place-here = "results">
|
|
150
309
|
</tbody>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HotStaq, Hot, HotAPI, HotComponent } from "hotstaq";
|
|
1
|
+
import { HotStaq, Hot, HotAPI, HotComponent, HotComponentOutput } from "hotstaq";
|
|
2
2
|
|
|
3
3
|
export class AdminText extends HotComponent
|
|
4
4
|
{
|
|
@@ -6,6 +6,18 @@ export class AdminText extends HotComponent
|
|
|
6
6
|
* The associated database field.
|
|
7
7
|
*/
|
|
8
8
|
field: string;
|
|
9
|
+
/**
|
|
10
|
+
* The type of field. Can be:
|
|
11
|
+
* * text
|
|
12
|
+
* * date
|
|
13
|
+
*
|
|
14
|
+
* Default: text
|
|
15
|
+
*/
|
|
16
|
+
field_type: string;
|
|
17
|
+
/**
|
|
18
|
+
* If set to 1, this will not output the field.
|
|
19
|
+
*/
|
|
20
|
+
no_output: string;
|
|
9
21
|
|
|
10
22
|
constructor (copy: HotComponent | HotStaq, api: HotAPI)
|
|
11
23
|
{
|
|
@@ -13,16 +25,19 @@ export class AdminText extends HotComponent
|
|
|
13
25
|
|
|
14
26
|
this.tag = "admin-text";
|
|
15
27
|
this.field = "";
|
|
28
|
+
this.field_type = "text";
|
|
29
|
+
this.no_output = "0";
|
|
16
30
|
}
|
|
17
31
|
|
|
18
32
|
/**
|
|
19
33
|
* Corrects the placement of the text elements for modals.
|
|
20
34
|
*/
|
|
21
|
-
|
|
22
|
-
async onPostPlace (parentHtmlElement: HTMLElement, htmlElement: HTMLElement): Promise<HTMLElement>
|
|
35
|
+
onPostPlace (parentHtmlElement: HTMLElement, htmlElement: HTMLElement): HTMLElement
|
|
23
36
|
{
|
|
24
37
|
let placeHereArray = parentHtmlElement.querySelectorAll (`hot-place-here[type="modal"]`);
|
|
25
38
|
|
|
39
|
+
// Search for the input box in the modal we attached to, then store the
|
|
40
|
+
// found input box into the fieldElements array.
|
|
26
41
|
if (placeHereArray.length > 0)
|
|
27
42
|
{
|
|
28
43
|
let placeHere = placeHereArray[0];
|
|
@@ -32,15 +47,20 @@ export class AdminText extends HotComponent
|
|
|
32
47
|
// @ts-ignore
|
|
33
48
|
parentHtmlElement.hotComponent.fieldElements[this.field] = htmlElement.querySelector ("input");
|
|
34
49
|
}
|
|
50
|
+
|
|
51
|
+
return (null);
|
|
35
52
|
}
|
|
36
53
|
|
|
37
|
-
|
|
54
|
+
output (): string | HotComponentOutput[]
|
|
38
55
|
{
|
|
39
56
|
let value: string = "";
|
|
40
57
|
|
|
41
58
|
if (this.value != null)
|
|
42
59
|
value = this.value;
|
|
43
60
|
|
|
61
|
+
if (this.no_output === "1")
|
|
62
|
+
return (`<div><input class="form-control" type = "hidden" value = "${value}" /></div>`);
|
|
63
|
+
|
|
44
64
|
return (`<div>
|
|
45
65
|
<label class="form-label">${this.inner}</label><input class="form-control" type = "text" value = "${value}" />
|
|
46
66
|
</div>`);
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AdminButton } from "./components/admin-button";
|
|
2
|
+
import { AdminDashboard } from "./components/admin-dashboard";
|
|
3
|
+
import { AdminEdit } from "./components/admin-edit";
|
|
4
|
+
import { AdminTable } from "./components/admin-table";
|
|
5
|
+
import { AdminTableField } from "./components/admin-table-field";
|
|
6
|
+
import { AdminTableRow } from "./components/admin-table-row";
|
|
7
|
+
import { AdminText } from "./components/admin-text";
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
AdminButton,
|
|
11
|
+
AdminDashboard,
|
|
12
|
+
AdminEdit,
|
|
13
|
+
AdminTable,
|
|
14
|
+
AdminTableField,
|
|
15
|
+
AdminTableRow,
|
|
16
|
+
AdminText
|
|
17
|
+
};
|
package/tsconfig.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
/* Basic Options */
|
|
4
4
|
// "incremental": true, /* Enable incremental compilation */
|
|
5
5
|
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
|
6
|
+
"skipLibCheck": false, /* Skip type checking of declaration files. */
|
|
6
7
|
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
|
7
8
|
"lib": [
|
|
8
9
|
"ES6",
|
package/webpack.config.cjs
CHANGED
|
@@ -8,7 +8,7 @@ const packageJSON = JSON.parse (packageStr);
|
|
|
8
8
|
let packageVersion = packageJSON.version.toString ();
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
entry: "./src/
|
|
11
|
+
entry: "./src/index.ts",
|
|
12
12
|
devtool: "inline-source-map",
|
|
13
13
|
target: "web",
|
|
14
14
|
module: {
|
|
@@ -59,6 +59,7 @@ module.exports = {
|
|
|
59
59
|
"dotenv": "{}",
|
|
60
60
|
"fs-extra": "{}",
|
|
61
61
|
"HotIO": "{}",
|
|
62
|
+
"bootstrap": "bootstrap",
|
|
62
63
|
"hotstaq": "HotStaqWeb",
|
|
63
64
|
"graceful-fs": "{}",
|
|
64
65
|
"node:path": "{}",
|
package/build/scripts/watch.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../scripts/watch.ts"],"names":[],"mappings":""}
|
package/build/scripts/watch.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
-
function step(op) {
|
|
39
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
41
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
-
switch (op[0]) {
|
|
44
|
-
case 0: case 1: t = op; break;
|
|
45
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
-
default:
|
|
49
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
-
if (t[2]) _.ops.pop();
|
|
54
|
-
_.trys.pop(); continue;
|
|
55
|
-
}
|
|
56
|
-
op = body.call(thisArg, _);
|
|
57
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
-
var hotstaq_1 = require("hotstaq");
|
|
63
|
-
var ppath = __importStar(require("path"));
|
|
64
|
-
var chokidar = __importStar(require("chokidar"));
|
|
65
|
-
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
|
-
function watchAndCopy(src, dest) {
|
|
67
|
-
var _this = this;
|
|
68
|
-
chokidar.watch(src, { ignoreInitial: true })
|
|
69
|
-
.on("all", function (event, filePath) { return __awaiter(_this, void 0, void 0, function () {
|
|
70
|
-
var fileName, fileExt, destPath;
|
|
71
|
-
return __generator(this, function (_a) {
|
|
72
|
-
switch (_a.label) {
|
|
73
|
-
case 0:
|
|
74
|
-
if (!(event === 'change')) return [3 /*break*/, 2];
|
|
75
|
-
fileName = ppath.basename(filePath);
|
|
76
|
-
fileExt = ppath.extname(filePath).toLowerCase();
|
|
77
|
-
destPath = dest + '/' + fileName;
|
|
78
|
-
if (!(fileExt === ".js")) return [3 /*break*/, 2];
|
|
79
|
-
return [4 /*yield*/, hotstaq_1.HotIO.copyFile(filePath, destPath)];
|
|
80
|
-
case 1:
|
|
81
|
-
_a.sent();
|
|
82
|
-
console.log("".concat(fileName, " was copied to ").concat(destPath));
|
|
83
|
-
_a.label = 2;
|
|
84
|
-
case 2: return [2 /*return*/];
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}); })
|
|
88
|
-
.on("error", function (error) {
|
|
89
|
-
console.error("Error: ".concat(error));
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
var src, dest;
|
|
93
|
-
return __generator(this, function (_a) {
|
|
94
|
-
switch (_a.label) {
|
|
95
|
-
case 0: return [4 /*yield*/, hotstaq_1.HotIO.exists("".concat(process.cwd(), "/assets/components/"))];
|
|
96
|
-
case 1:
|
|
97
|
-
if (!((_a.sent()) === false)) return [3 /*break*/, 3];
|
|
98
|
-
return [4 /*yield*/, hotstaq_1.HotIO.mkdir("".concat(process.cwd(), "/assets/components/"))];
|
|
99
|
-
case 2:
|
|
100
|
-
_a.sent();
|
|
101
|
-
_a.label = 3;
|
|
102
|
-
case 3:
|
|
103
|
-
src = "".concat(process.cwd(), "/build/src/components/");
|
|
104
|
-
dest = "".concat(process.cwd(), "/assets/components/");
|
|
105
|
-
//watchAndCopy (src, dest);
|
|
106
|
-
return [4 /*yield*/, hotstaq_1.HotIO.copyFiles(src, dest, {
|
|
107
|
-
// @ts-ignore
|
|
108
|
-
"filter": function (src, dest) {
|
|
109
|
-
var fileExt = ppath.extname(src).toLowerCase();
|
|
110
|
-
if (fileExt === "")
|
|
111
|
-
return (true);
|
|
112
|
-
if (fileExt === ".js") {
|
|
113
|
-
console.log("Copying ".concat(src));
|
|
114
|
-
return (true);
|
|
115
|
-
}
|
|
116
|
-
return (false);
|
|
117
|
-
}
|
|
118
|
-
})];
|
|
119
|
-
case 4:
|
|
120
|
-
//watchAndCopy (src, dest);
|
|
121
|
-
_a.sent();
|
|
122
|
-
console.log("".concat(src, " was copied to ").concat(dest));
|
|
123
|
-
return [2 /*return*/];
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
}); })();
|
|
127
|
-
//# sourceMappingURL=watch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"watch.js","sourceRoot":"","sources":["../../scripts/watch.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAgC;AAChC,0CAA8B;AAC9B,iDAAqC;AAErC,CAAC;IAEA,SAAS,YAAY,CAAE,GAAW,EAAE,IAAY;QAAhD,iBAuBC;QArBA,QAAQ,CAAC,KAAK,CAAE,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;aAC3C,EAAE,CAAE,KAAK,EAAE,UAAO,KAAK,EAAE,QAAQ;;;;;6BAE5B,CAAA,KAAK,KAAK,QAAQ,CAAA,EAAlB,wBAAkB;wBAEf,QAAQ,GAAW,KAAK,CAAC,QAAQ,CAAE,QAAQ,CAAC,CAAC;wBAC7C,OAAO,GAAW,KAAK,CAAC,OAAO,CAAE,QAAQ,CAAC,CAAC,WAAW,EAAG,CAAC;wBAC1D,QAAQ,GAAW,IAAI,GAAG,GAAG,GAAG,QAAQ,CAAC;6BAE3C,CAAA,OAAO,KAAK,KAAK,CAAA,EAAjB,wBAAiB;wBAEpB,qBAAM,eAAK,CAAC,QAAQ,CAAE,QAAQ,EAAE,QAAQ,CAAC,EAAA;;wBAAzC,SAAyC,CAAC;wBAE1C,OAAO,CAAC,GAAG,CAAE,UAAG,QAAQ,4BAAkB,QAAQ,CAAE,CAAC,CAAC;;;;;aAGxD,CAAC;aACF,EAAE,CAAE,OAAO,EAAE,UAAC,KAAK;YAElB,OAAO,CAAC,KAAK,CAAE,iBAAU,KAAK,CAAE,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACN,CAAC;;;;oBAEG,qBAAM,eAAK,CAAC,MAAM,CAAE,UAAG,OAAO,CAAC,GAAG,EAAG,wBAAqB,CAAC,EAAA;;qBAA3D,CAAA,CAAA,SAA2D,MAAK,KAAK,CAAA,EAArE,wBAAqE;gBACxE,qBAAM,eAAK,CAAC,KAAK,CAAE,UAAG,OAAO,CAAC,GAAG,EAAG,wBAAqB,CAAC,EAAA;;gBAA1D,SAA0D,CAAC;;;gBAEtD,GAAG,GAAW,UAAG,OAAO,CAAC,GAAG,EAAG,2BAAwB,CAAC;gBACxD,IAAI,GAAW,UAAG,OAAO,CAAC,GAAG,EAAG,wBAAqB,CAAC;gBAE5D,2BAA2B;gBAE3B,qBAAM,eAAK,CAAC,SAAS,CAAE,GAAG,EAAE,IAAI,EAAE;wBACjC,aAAa;wBACb,QAAQ,EAAE,UAAC,GAAW,EAAE,IAAY;4BAEnC,IAAM,OAAO,GAAW,KAAK,CAAC,OAAO,CAAE,GAAG,CAAC,CAAC,WAAW,EAAG,CAAC;4BAE3D,IAAI,OAAO,KAAK,EAAE;gCACjB,OAAO,CAAC,IAAI,CAAC,CAAC;4BAEf,IAAI,OAAO,KAAK,KAAK,EACrB;gCACC,OAAO,CAAC,GAAG,CAAE,kBAAW,GAAG,CAAE,CAAC,CAAC;gCAC/B,OAAO,CAAC,IAAI,CAAC,CAAC;6BACd;4BAED,OAAO,CAAC,KAAK,CAAC,CAAC;wBAChB,CAAC;qBACD,CAAC,EAAA;;gBAnBF,2BAA2B;gBAE3B,SAiBE,CAAC;gBACH,OAAO,CAAC,GAAG,CAAE,UAAG,GAAG,4BAAkB,IAAI,CAAE,CAAC,CAAC;;;;KAC7C,CAAC,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AppAPI.d.ts","sourceRoot":"","sources":["../../src/AppAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAEiB,MAAM,SAAS,CAAC;AAGtE;;GAEG;AACH,qBAAa,MAAO,SAAQ,MAAM;gBAEpB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,GAAG,SAAS,EAAE,EAAE,GAAE,GAAU;CAsB/E"}
|
package/build/src/AppAPI.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AppAPI.js","sourceRoot":"","sources":["../../src/AppAPI.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAEsE;AACtE,gDAA+C;AAE/C;;GAEG;AACH;IAA4B,0BAAM;IAEjC,gBAAa,OAAe,EAAE,UAAiC,EAAE,EAAc;QAAd,mBAAA,EAAA,SAAc;QAA/E,YAEC,kBAAM,OAAO,EAAE,UAAU,EAAE,EAAE,CAAC,SAmB9B;QAjBA,KAAI,CAAC,aAAa,GAAG;;gBAEnB,IAAI,UAAU,CAAC,IAAI,KAAK,uBAAa,CAAC,QAAQ,EAC9C;oBACC,IAAI,CAAC,WAAW,CAAE,IAAI,qBAAW,CAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;iBACpE;gBAED,sBAAO,CAAC,IAAI,CAAC,EAAC;;aACd,CAAC;QACH,KAAI,CAAC,cAAc,GAAG;;gBAEpB,6BAA6B;gBAE7B,sBAAO,CAAC,IAAI,CAAC,EAAC;;aACd,CAAC;QAEH,KAAI,CAAC,QAAQ,CAAE,IAAI,qBAAS,CAAE,KAAI,CAAC,CAAC,CAAC;;IACtC,CAAC;IACF,aAAC;AAAD,CAAC,AAxBD,CAA4B,gBAAM,GAwBjC;AAxBY,wBAAM"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WebExport.d.ts","sourceRoot":"","sources":["../../src/WebExport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,iBAAe,WAAW,IAAK,OAAO,CAAC,GAAG,CAAC,CAqB1C;AAED,OAAO,EACL,WAAW,EACX,WAAW,EACX,cAAc,EACd,SAAS,EACT,UAAU,EACV,eAAe,EACf,aAAa,EACb,SAAS,EACT,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WebExport.js","sourceRoot":"","sources":["../../src/WebExport.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAAwD;AAiCtD,4FAjCO,0BAAW,OAiCP;AAhCb,gEAA8D;AAiC5D,+FAjCO,gCAAc,OAiCP;AAhChB,sDAAoD;AAiClD,0FAjCO,sBAAS,OAiCP;AAhCX,wDAAsD;AAiCpD,2FAjCO,wBAAU,OAiCP;AAhCZ,oEAAiE;AAiC/D,gGAjCO,mCAAe,OAiCP;AAhCjB,gEAA6D;AAiC3D,8FAjCO,+BAAa,OAiCP;AAhCf,sDAAoD;AAiClD,0FAjCO,sBAAS,OAiCP;AA/BX,SAAe,WAAW;;;YAEzB,sBAAO,CAAC;oBACN,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,EAAE;wBAC/E,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,eAAe,CAAC,EAAE;wBAC5C,UAAU;wBACV,eAAe;wBACf,gBAAgB,CAAC;oBAClB,IAAI,EAAE,CAAC,mBAAmB,CAAC;oBAC3B,GAAG,EAAE,CAAC,kBAAkB,CAAC;oBACzB,EAAE,EAAE,CAAC,iBAAiB,EAAE,qCAAqC,CAAC;oBAC9D,gBAAgB,EAAE,yBAAyB;oBAC3C,UAAU,EAAE;wBACX,0BAAW;wBACX,gCAAc;wBACd,sBAAS;wBACT,wBAAU;wBACV,mCAAe;wBACf,+BAAa;wBACb,sBAAS;qBAAC;iBACX,CAAC,EAAC;;;CACJ;AAGC,kCAAW"}
|
package/build/src/cli.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":""}
|
package/build/src/cli.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAiC;AAEjC,IAAI,GAAG,GAAW,IAAI,gBAAM,EAAG,CAAC;AAChC,GAAG,CAAC,KAAK,CAAE,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAE;;;oBAEvB,qBAAM,GAAG,CAAC,KAAK,EAAG,EAAA;;gBAAlB,SAAkB,CAAC;;;;KACtB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin-button.d.ts","sourceRoot":"","sources":["../../../src/components/admin-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAO,MAAM,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE7D,qBAAa,WAAY,SAAQ,YAAY;gBAE/B,IAAI,EAAE,YAAY,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM;IAOhD,aAAa;IAIb,MAAM;CAIZ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin-button.js","sourceRoot":"","sources":["../../../src/components/admin-button.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA6D;AAE7D;IAAiC,+BAAY;IAE5C,qBAAa,IAA4B,EAAE,GAAW;QAAtD,YAEC,kBAAO,IAAI,EAAE,GAAG,CAAC,SAGjB;QADA,KAAI,CAAC,GAAG,GAAG,cAAc,CAAC;;IAC3B,CAAC;IAEK,mCAAa,GAAnB;;;;;;KAEC;IAEK,4BAAM,GAAZ;;;gBAEC,sBAAO,CAAC,yBAAiB,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,sDAAgD,CAAC,EAAC;;;KAClG;IACF,kBAAC;AAAD,CAAC,AAjBD,CAAiC,sBAAY,GAiB5C;AAjBY,kCAAW"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin-dashboard.d.ts","sourceRoot":"","sources":["../../../src/components/admin-dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAO,MAAM,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE7D,qBAAa,cAAe,SAAQ,YAAY;IAE/C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;gBAEA,IAAI,EAAE,YAAY,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM;IAStD;;OAEG;IAEG,WAAW,CAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAO5F,MAAM,IAAK,OAAO,CAAC,MAAM,CAAC;CAehC"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
-
function step(op) {
|
|
31
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
-
switch (op[0]) {
|
|
36
|
-
case 0: case 1: t = op; break;
|
|
37
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
-
default:
|
|
41
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
-
if (t[2]) _.ops.pop();
|
|
46
|
-
_.trys.pop(); continue;
|
|
47
|
-
}
|
|
48
|
-
op = body.call(thisArg, _);
|
|
49
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
-
exports.AdminDashboard = void 0;
|
|
55
|
-
var hotstaq_1 = require("hotstaq");
|
|
56
|
-
var AdminDashboard = /** @class */ (function (_super) {
|
|
57
|
-
__extends(AdminDashboard, _super);
|
|
58
|
-
function AdminDashboard(copy, api) {
|
|
59
|
-
var _this = _super.call(this, copy, api) || this;
|
|
60
|
-
_this.tag = "admin-dashboard";
|
|
61
|
-
_this.title = "";
|
|
62
|
-
_this.base = "";
|
|
63
|
-
return _this;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Add this table field to the table
|
|
67
|
-
*/
|
|
68
|
-
// @ts-ignore
|
|
69
|
-
AdminDashboard.prototype.onPostPlace = function (parentHtmlElement, htmlElement) {
|
|
70
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
71
|
-
return __generator(this, function (_a) {
|
|
72
|
-
// Set the base API url to use for this dashboard.
|
|
73
|
-
if (this.base != "")
|
|
74
|
-
hotstaq_1.Hot.Data.baseUrl = this.base;
|
|
75
|
-
return [2 /*return*/];
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
AdminDashboard.prototype.output = function () {
|
|
80
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
81
|
-
return __generator(this, function (_a) {
|
|
82
|
-
return [2 /*return*/, ("\n\t\t<main class=\"col-md-9 ms-sm-auto col-lg-10 px-md-4\">\n\t\t\t<div class=\"d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom\">\n\t\t\t\t<h1 class=\"h2\">".concat(this.title, "</h1>\n\t\t\t\t<div class=\"btn-toolbar mb-2 mb-md-0\">\n\t\t\t\t\t<div class=\"btn-group me-2\">\n\t\t\t\t\t\t<hot-place-here name = \"buttons\"></hot-place-here>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<hot-place-here name = \"body\"></hot-place-here>\n\t\t</main>"))];
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
return AdminDashboard;
|
|
87
|
-
}(hotstaq_1.HotComponent));
|
|
88
|
-
exports.AdminDashboard = AdminDashboard;
|
|
89
|
-
//# sourceMappingURL=admin-dashboard.js.map
|