@hotstaq/admin-panel 0.2.5 → 0.2.6
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 +0 -1
- package/build/src/AppAPI.d.ts.map +1 -1
- package/build/src/AppAPI.js +48 -1
- package/build/src/AppAPI.js.map +1 -1
- package/build/src/cli.js +2 -2
- package/build/src/cli.js.map +1 -1
- package/build/src/components/admin-button.d.ts +1 -1
- package/build/src/components/admin-button.d.ts.map +1 -1
- package/build/src/components/admin-button.js +1 -5
- package/build/src/components/admin-button.js.map +1 -1
- package/build/src/components/admin-dashboard.d.ts +2 -2
- package/build/src/components/admin-dashboard.d.ts.map +1 -1
- package/build/src/components/admin-dashboard.js +5 -50
- package/build/src/components/admin-dashboard.js.map +1 -1
- package/build/src/components/admin-edit.d.ts +2 -5
- package/build/src/components/admin-edit.d.ts.map +1 -1
- package/build/src/components/admin-edit.js +12 -16
- package/build/src/components/admin-edit.js.map +1 -1
- package/build/src/components/admin-table-field.d.ts +3 -6
- package/build/src/components/admin-table-field.d.ts.map +1 -1
- package/build/src/components/admin-table-field.js +9 -54
- package/build/src/components/admin-table-field.js.map +1 -1
- package/build/src/components/admin-table-row.d.ts +3 -6
- package/build/src/components/admin-table-row.d.ts.map +1 -1
- package/build/src/components/admin-table-row.js +15 -61
- package/build/src/components/admin-table-row.js.map +1 -1
- package/build/src/components/admin-table.d.ts +3 -3
- package/build/src/components/admin-table.d.ts.map +1 -1
- package/build/src/components/admin-table.js +11 -20
- package/build/src/components/admin-table.js.map +1 -1
- package/build/src/components/admin-text.d.ts +3 -3
- package/build/src/components/admin-text.d.ts.map +1 -1
- package/build/src/components/admin-text.js +13 -60
- package/build/src/components/admin-text.js.map +1 -1
- package/build-web/AdminPanelComponents.js +2 -2
- package/package.json +4 -4
- package/src/AppAPI.ts +55 -2
- package/src/cli.ts +2 -2
- package/src/components/admin-button.ts +2 -2
- package/src/components/admin-dashboard.ts +4 -3
- package/src/components/admin-edit.ts +4 -4
- package/src/components/admin-table-field.ts +6 -5
- package/src/components/admin-table-row.ts +6 -5
- package/src/components/admin-table.ts +6 -5
- package/src/components/admin-text.ts +5 -4
package/.vscode/launch.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppAPI.d.ts","sourceRoot":"","sources":["../../src/AppAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"AppAPI.d.ts","sourceRoot":"","sources":["../../src/AppAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAE4C,MAAM,SAAS,CAAC;AAGjG;;GAEG;AACH,qBAAa,MAAO,SAAQ,MAAM;gBAEpB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,GAAG,SAAS,EAAE,EAAE,GAAE,GAAU;CA2E/E"}
|
package/build/src/AppAPI.js
CHANGED
|
@@ -76,7 +76,54 @@ var AppAPI = /** @class */ (function (_super) {
|
|
|
76
76
|
return [2 /*return*/, (true)];
|
|
77
77
|
});
|
|
78
78
|
}); };
|
|
79
|
-
_this.addRoute(new dataroute_1.DataRoute(_this))
|
|
79
|
+
_this.addRoute(new dataroute_1.DataRoute(_this, function (db) { return __awaiter(_this, void 0, void 0, function () {
|
|
80
|
+
var results, testUsers, iIdx, testUser, verified, result, id;
|
|
81
|
+
return __generator(this, function (_a) {
|
|
82
|
+
switch (_a.label) {
|
|
83
|
+
case 0:
|
|
84
|
+
if (!(this.connection.processor.mode === hotstaq_1.DeveloperMode.Development)) return [3 /*break*/, 6];
|
|
85
|
+
return [4 /*yield*/, db.query("create table if not exists users (\n\t\t\t\t\t\t\tid INT(10) NOT NULL AUTO_INCREMENT,\n\t\t\t\t\t\t\tname VARCHAR(256) DEFAULT '',\n\t\t\t\t\t\t\temail VARCHAR(256) DEFAULT '',\n\t\t\t\t\t\t\tpassword VARCHAR(256) DEFAULT '',\n\t\t\t\t\t\t\tverified INT(1) DEFAULT '0',\n\t\t\t\t\t\t\tregistered DATETIME DEFAULT NOW(),\n\t\t\t\t\t\t\tenabled INT(1) DEFAULT '1',\n\t\t\t\t\t\t\tPRIMARY KEY (id)\n\t\t\t\t\t\t)")];
|
|
86
|
+
case 1:
|
|
87
|
+
_a.sent();
|
|
88
|
+
return [4 /*yield*/, db.queryOne("select COUNT(*) from users;")];
|
|
89
|
+
case 2:
|
|
90
|
+
results = _a.sent();
|
|
91
|
+
if (!(results.results["COUNT(*)"] < 1)) return [3 /*break*/, 6];
|
|
92
|
+
testUsers = [{
|
|
93
|
+
name: "John",
|
|
94
|
+
email: "test1@freelight.org",
|
|
95
|
+
password: "a867h398jdg",
|
|
96
|
+
verified: true
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "Jane",
|
|
100
|
+
email: "test2@freelight.org",
|
|
101
|
+
password: "ai97w3a98w3498",
|
|
102
|
+
verified: true
|
|
103
|
+
}
|
|
104
|
+
];
|
|
105
|
+
iIdx = 0;
|
|
106
|
+
_a.label = 3;
|
|
107
|
+
case 3:
|
|
108
|
+
if (!(iIdx < testUsers.length)) return [3 /*break*/, 6];
|
|
109
|
+
testUser = testUsers[iIdx];
|
|
110
|
+
verified = 0;
|
|
111
|
+
if (testUser.verified === true)
|
|
112
|
+
verified = 1;
|
|
113
|
+
return [4 /*yield*/, db.query("INSERT INTO users (name, email, password, verified) VALUES (?, ?, ?, ?);", [testUser.name, testUser.email, testUser.password, verified])];
|
|
114
|
+
case 4:
|
|
115
|
+
result = _a.sent();
|
|
116
|
+
if (result.error != null)
|
|
117
|
+
throw new Error(result.error);
|
|
118
|
+
id = result.results["insertId"];
|
|
119
|
+
_a.label = 5;
|
|
120
|
+
case 5:
|
|
121
|
+
iIdx++;
|
|
122
|
+
return [3 /*break*/, 3];
|
|
123
|
+
case 6: return [2 /*return*/];
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}); }));
|
|
80
127
|
return _this;
|
|
81
128
|
}
|
|
82
129
|
return AppAPI;
|
package/build/src/AppAPI.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppAPI.js","sourceRoot":"","sources":["../../src/AppAPI.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"AppAPI.js","sourceRoot":"","sources":["../../src/AppAPI.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAEiG;AACjG,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,SAwE9B;QAtEA,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,EAAE,UAAO,EAAc;;;;;6BAEnD,CAAA,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,KAAK,uBAAa,CAAC,WAAW,CAAA,EAA5D,wBAA4D;wBAE/D,qBAAM,EAAE,CAAC,KAAK,CACb,ofASE,CAAC,EAAA;;wBAVJ,SAUI,CAAC;wBAEc,qB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(this && this.__generator) || function (thisArg, body) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
var hotstaq_1 = require("hotstaq");
|
|
40
40
|
var cli = new hotstaq_1.HotCLI();
|
|
41
|
-
cli.setup(
|
|
41
|
+
cli.setup().then(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
42
|
return __generator(this, function (_a) {
|
|
43
43
|
switch (_a.label) {
|
|
44
|
-
case 0: return [4 /*yield*/, cli.start()];
|
|
44
|
+
case 0: return [4 /*yield*/, cli.start(process.argv)];
|
|
45
45
|
case 1:
|
|
46
46
|
_a.sent();
|
|
47
47
|
return [2 /*return*/];
|
package/build/src/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,EAAG,CAAC,IAAI,CAAE;;;oBAEX,qBAAM,GAAG,CAAC,KAAK,CAAE,OAAO,CAAC,IAAI,CAAC,EAAA;;gBAA9B,SAA8B,CAAC;;;;KAClC,CAAC,CAAC"}
|
|
@@ -2,6 +2,6 @@ import { HotStaq, HotAPI, HotComponent } from "hotstaq";
|
|
|
2
2
|
export declare class AdminButton extends HotComponent {
|
|
3
3
|
constructor(copy: HotComponent | HotStaq, api: HotAPI);
|
|
4
4
|
buttonClicked(): Promise<void>;
|
|
5
|
-
output():
|
|
5
|
+
output(): string;
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=admin-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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,IAAK,OAAO,CAAC,IAAI,CAAC;IAIrC,MAAM,IAAK,MAAM;CAIjB"}
|
|
@@ -68,11 +68,7 @@ var AdminButton = /** @class */ (function (_super) {
|
|
|
68
68
|
});
|
|
69
69
|
};
|
|
70
70
|
AdminButton.prototype.output = function () {
|
|
71
|
-
return
|
|
72
|
-
return __generator(this, function (_a) {
|
|
73
|
-
return [2 /*return*/, ("<button id = \"".concat(this.htmlElements[0].id, "\" onclick = \"this.buttonClicked ();\"></button>"))];
|
|
74
|
-
});
|
|
75
|
-
});
|
|
71
|
+
return ("<button id = \"".concat(this.htmlElements[0].id, "\" onclick = \"this.buttonClicked ();\"></button>"));
|
|
76
72
|
};
|
|
77
73
|
return AdminButton;
|
|
78
74
|
}(hotstaq_1.HotComponent));
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;IAED,4BAAM,GAAN;QAEC,OAAO,CAAC,yBAAiB,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,sDAAgD,CAAC,CAAC;IACnG,CAAC;IACF,kBAAC;AAAD,CAAC,AAjBD,CAAiC,sBAAY,GAiB5C;AAjBY,kCAAW"}
|
|
@@ -12,7 +12,7 @@ export declare class AdminDashboard extends HotComponent {
|
|
|
12
12
|
/**
|
|
13
13
|
* Add this table field to the table
|
|
14
14
|
*/
|
|
15
|
-
onPostPlace(parentHtmlElement: HTMLElement, htmlElement: HTMLElement):
|
|
16
|
-
output():
|
|
15
|
+
onPostPlace(parentHtmlElement: HTMLElement, htmlElement: HTMLElement): HTMLElement;
|
|
16
|
+
output(): string;
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=admin-dashboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;IACH,WAAW,CAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,WAAW;IASnF,MAAM,IAAK,MAAM;CAejB"}
|
|
@@ -14,42 +14,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
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
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
18
|
exports.AdminDashboard = void 0;
|
|
55
19
|
var hotstaq_1 = require("hotstaq");
|
|
@@ -65,23 +29,14 @@ var AdminDashboard = /** @class */ (function (_super) {
|
|
|
65
29
|
/**
|
|
66
30
|
* Add this table field to the table
|
|
67
31
|
*/
|
|
68
|
-
// @ts-ignore
|
|
69
32
|
AdminDashboard.prototype.onPostPlace = function (parentHtmlElement, htmlElement) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
hotstaq_1.Hot.Data.baseUrl = this.base;
|
|
75
|
-
return [2 /*return*/];
|
|
76
|
-
});
|
|
77
|
-
});
|
|
33
|
+
// Set the base API url to use for this dashboard.
|
|
34
|
+
if (this.base != "")
|
|
35
|
+
hotstaq_1.Hot.Data.baseUrl = this.base;
|
|
36
|
+
return (null);
|
|
78
37
|
};
|
|
79
38
|
AdminDashboard.prototype.output = function () {
|
|
80
|
-
return
|
|
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
|
-
});
|
|
39
|
+
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>"));
|
|
85
40
|
};
|
|
86
41
|
return AdminDashboard;
|
|
87
42
|
}(hotstaq_1.HotComponent));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-dashboard.js","sourceRoot":"","sources":["../../../src/components/admin-dashboard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin-dashboard.js","sourceRoot":"","sources":["../../../src/components/admin-dashboard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,mCAA6D;AAE7D;IAAoC,kCAAY;IAW/C,wBAAa,IAA4B,EAAE,GAAW;QAAtD,YAEC,kBAAO,IAAI,EAAE,GAAG,CAAC,SAKjB;QAHA,KAAI,CAAC,GAAG,GAAG,iBAAiB,CAAC;QAC7B,KAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,KAAI,CAAC,IAAI,GAAG,EAAE,CAAC;;IAChB,CAAC;IAED;;OAEG;IACH,oCAAW,GAAX,UAAa,iBAA8B,EAAE,WAAwB;QAEpE,kDAAkD;QAClD,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE;YAClB,aAAG,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC;QAE9B,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,+BAAM,GAAN;QAEC,OAAO,CAAC,gOAGW,IAAI,CAAC,KAAK,8RAQrB,CAAC,CAAC;IACX,CAAC;IACF,qBAAC;AAAD,CAAC,AA/CD,CAAoC,sBAAY,GA+C/C;AA/CY,wCAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HotStaq, HotAPI, HotComponent } from "hotstaq";
|
|
1
|
+
import { HotStaq, HotAPI, HotComponent, HotComponentOutput } from "hotstaq";
|
|
2
2
|
export declare class AdminEdit extends HotComponent {
|
|
3
3
|
/**
|
|
4
4
|
* The title of this edit modal.
|
|
@@ -31,9 +31,6 @@ export declare class AdminEdit extends HotComponent {
|
|
|
31
31
|
* Save this form.
|
|
32
32
|
*/
|
|
33
33
|
onSave(): Promise<void>;
|
|
34
|
-
output():
|
|
35
|
-
html: string;
|
|
36
|
-
parentSelector: string;
|
|
37
|
-
}[]>;
|
|
34
|
+
output(): string | HotComponentOutput[];
|
|
38
35
|
}
|
|
39
36
|
//# sourceMappingURL=admin-edit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-edit.d.ts","sourceRoot":"","sources":["../../../src/components/admin-edit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAO,MAAM,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"admin-edit.d.ts","sourceRoot":"","sources":["../../../src/components/admin-edit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAO,MAAM,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEjF,qBAAa,SAAU,SAAQ,YAAY;IAE1C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,aAAa,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC;KAAE,CAAC;IACxC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;gBAEH,IAAI,EAAE,YAAY,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM;IAetD;;OAEG;IACG,MAAM;IA0BZ,MAAM,IAAK,MAAM,GAAG,kBAAkB,EAAE;CAoCxC"}
|
|
@@ -101,22 +101,18 @@ var AdminEdit = /** @class */ (function (_super) {
|
|
|
101
101
|
});
|
|
102
102
|
};
|
|
103
103
|
AdminEdit.prototype.output = function () {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
this.modalId
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
parentSelector: "hot-place-here[name=\"buttons\"]"
|
|
117
|
-
}])];
|
|
118
|
-
});
|
|
119
|
-
});
|
|
104
|
+
if (this.name === "")
|
|
105
|
+
throw new Error("You must specify a name for each admin-edit element!");
|
|
106
|
+
this.modalId = "".concat(this.name, "Modal");
|
|
107
|
+
return ([{
|
|
108
|
+
html: "\n\t\t\t<!-- ".concat(this.title, " Modal Start -->\n\t\t\t<div class=\"modal fade\" id=\"").concat(this.modalId, "\" tabindex=\"-1\" aria-labelledby=\"").concat(this.name, "ModalLabel\" aria-hidden=\"true\">\n\t\t\t\t<div class=\"modal-dialog\">\n\t\t\t\t\t<div class=\"modal-content\">\n\t\t\t\t\t<div class=\"modal-header\">\n\t\t\t\t\t\t<h5 class=\"modal-title\" id=\"").concat(this.name, "ModalLabel\">").concat(this.title, "</h5>\n\t\t\t\t\t\t<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"modal-body\">\n\t\t\t\t\t\t<hot-place-here name = \"modalBody\" type = \"modal\"></hot-place-here>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"modal-footer\">\n\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancel</button>\n\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-primary\" onclick = \"document.getElementById('").concat(this.modalId, "').onSave ();\">").concat(this.button_title, "</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!-- ").concat(this.title, " Modal End -->"),
|
|
109
|
+
documentSelector: "body"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
html: "<button id = \"".concat(this.modalId, "-add-btn\" type=\"button\" class=\"btn btn-sm btn-outline-secondary\" data-bs-toggle=\"modal\" data-bs-target=\"#").concat(this.modalId, "\">Add</button>"),
|
|
113
|
+
//`<button id = "${this.modalId}-add-btn" type="button" class="btn btn-sm btn-outline-secondary" data-bs-toggle="modal" onclick = "$('#${this.modalId}').modal ('show');">Add</button>`,
|
|
114
|
+
documentSelector: "hot-place-here[name=\"buttons\"]"
|
|
115
|
+
}]);
|
|
120
116
|
};
|
|
121
117
|
return AdminEdit;
|
|
122
118
|
}(hotstaq_1.HotComponent));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-edit.js","sourceRoot":"","sources":["../../../src/components/admin-edit.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"admin-edit.js","sourceRoot":"","sources":["../../../src/components/admin-edit.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAiF;AAEjF;IAA+B,6BAAY;IA2B1C,mBAAa,IAA4B,EAAE,GAAW;QAAtD,YAEC,kBAAO,IAAI,EAAE,GAAG,CAAC,SAWjB;QATA,KAAI,CAAC,GAAG,GAAG,YAAY,CAAC;QACxB,KAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,KAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,KAAI,CAAC,aAAa,GAAG,EAAE,CAAC;QACxB,KAAI,CAAC,MAAM,GAAG,EAAE,CAAC;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AO,6BAAkB,IAAI,CAAC,YAAY,qGAK/H,IAAI,CAAC,KAAK,mBAAgB;gBACjC,gBAAgB,EAAE,MAAM;aACxB;YACD;gBACC,IAAI,EAAE,yBAAiB,IAAI,CAAC,OAAO,8HAA4G,IAAI,CAAC,OAAO,oBAAgB;gBAC3K,wLAAwL;gBACxL,gBAAgB,EAAE,kCAAgC;aAClD,CAAC,CAAC,CAAC;IACL,CAAC;IACF,gBAAC;AAAD,CAAC,AA3GD,CAA+B,sBAAY,GA2G1C;AA3GY,8BAAS"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HotStaq, HotAPI, HotComponent } from "hotstaq";
|
|
1
|
+
import { HotStaq, HotAPI, HotComponent, HotComponentOutput } from "hotstaq";
|
|
2
2
|
export declare class AdminTableField extends HotComponent {
|
|
3
3
|
/**
|
|
4
4
|
* The table field.
|
|
@@ -8,10 +8,7 @@ export declare class AdminTableField extends HotComponent {
|
|
|
8
8
|
/**
|
|
9
9
|
* Add this table field to the table
|
|
10
10
|
*/
|
|
11
|
-
onPostPlace(parentHtmlElement: HTMLElement, htmlElement: HTMLElement):
|
|
12
|
-
output():
|
|
13
|
-
html: string;
|
|
14
|
-
placeHereParent: string;
|
|
15
|
-
}[]>;
|
|
11
|
+
onPostPlace(parentHtmlElement: HTMLElement, htmlElement: HTMLElement): HTMLElement;
|
|
12
|
+
output(): string | HotComponentOutput[];
|
|
16
13
|
}
|
|
17
14
|
//# sourceMappingURL=admin-table-field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-table-field.d.ts","sourceRoot":"","sources":["../../../src/components/admin-table-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAO,MAAM,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"admin-table-field.d.ts","sourceRoot":"","sources":["../../../src/components/admin-table-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAO,MAAM,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEjF,qBAAa,eAAgB,SAAQ,YAAY;IAEhD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;gBAED,IAAI,EAAE,YAAY,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM;IAQtD;;OAEG;IACH,WAAW,CAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,WAAW;IAWnF,MAAM,IAAK,MAAM,GAAG,kBAAkB,EAAE;CAOxC"}
|
|
@@ -14,42 +14,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
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
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
18
|
exports.AdminTableField = void 0;
|
|
55
19
|
var hotstaq_1 = require("hotstaq");
|
|
@@ -64,27 +28,18 @@ var AdminTableField = /** @class */ (function (_super) {
|
|
|
64
28
|
/**
|
|
65
29
|
* Add this table field to the table
|
|
66
30
|
*/
|
|
67
|
-
// @ts-ignore
|
|
68
31
|
AdminTableField.prototype.onPostPlace = function (parentHtmlElement, htmlElement) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
hotComponent.addHeaderDataOnly(this, htmlElement);
|
|
75
|
-
return [2 /*return*/];
|
|
76
|
-
});
|
|
77
|
-
});
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
var hotComponent = parentHtmlElement.parentNode.parentNode.parentNode.hotComponent;
|
|
34
|
+
if (hotComponent != null)
|
|
35
|
+
hotComponent.addHeaderDataOnly(this, htmlElement);
|
|
36
|
+
return (null);
|
|
78
37
|
};
|
|
79
38
|
AdminTableField.prototype.output = function () {
|
|
80
|
-
return
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
placeHereParent: "header"
|
|
85
|
-
}])];
|
|
86
|
-
});
|
|
87
|
-
});
|
|
39
|
+
return ([{
|
|
40
|
+
html: "<th>".concat(this.inner, "</th>"),
|
|
41
|
+
documentSelector: "[hot-place-here='header']"
|
|
42
|
+
}]);
|
|
88
43
|
};
|
|
89
44
|
return AdminTableField;
|
|
90
45
|
}(hotstaq_1.HotComponent));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-table-field.js","sourceRoot":"","sources":["../../../src/components/admin-table-field.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin-table-field.js","sourceRoot":"","sources":["../../../src/components/admin-table-field.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,mCAAiF;AAEjF;IAAqC,mCAAY;IAOhD,yBAAa,IAA4B,EAAE,GAAW;QAAtD,YAEC,kBAAO,IAAI,EAAE,GAAG,CAAC,SAIjB;QAFA,KAAI,CAAC,GAAG,GAAG,mBAAmB,CAAC;QAC/B,KAAI,CAAC,KAAK,GAAG,CAAC,CAAC;;IAChB,CAAC;IAED;;OAEG;IACH,qCAAW,GAAX,UAAa,iBAA8B,EAAE,WAAwB;QAEpE,aAAa;QACb,IAAI,YAAY,GAAG,iBAAiB,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,YAAY,CAAC;QAEnF,IAAI,YAAY,IAAI,IAAI;YACvB,YAAY,CAAC,iBAAiB,CAAE,IAAI,EAAE,WAAW,CAAC,CAAC;QAEpD,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,gCAAM,GAAN;QAEC,OAAO,CAAC,CAAC;gBACR,IAAI,EAAE,cAAO,IAAI,CAAC,KAAK,UAAO;gBAC9B,gBAAgB,EAAE,2BAA2B;aAC7C,CAAC,CAAC,CAAC;IACL,CAAC;IACF,sBAAC;AAAD,CAAC,AApCD,CAAqC,sBAAY,GAoChD;AApCY,0CAAe"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HotStaq, HotAPI, HotComponent } from "hotstaq";
|
|
1
|
+
import { HotStaq, HotAPI, HotComponent, HotComponentOutput } from "hotstaq";
|
|
2
2
|
export declare class AdminTableRow extends HotComponent {
|
|
3
3
|
/**
|
|
4
4
|
* The fields are stored in a key/value object.
|
|
@@ -10,10 +10,7 @@ export declare class AdminTableRow extends HotComponent {
|
|
|
10
10
|
/**
|
|
11
11
|
* Add this table row to the table
|
|
12
12
|
*/
|
|
13
|
-
onPostPlace(parentHtmlElement: HTMLElement, htmlElement: HTMLElement):
|
|
14
|
-
output():
|
|
15
|
-
html: string;
|
|
16
|
-
placeHereParent: string;
|
|
17
|
-
}[]>;
|
|
13
|
+
onPostPlace(parentHtmlElement: HTMLElement, htmlElement: HTMLElement): HTMLElement;
|
|
14
|
+
output(): string | HotComponentOutput[];
|
|
18
15
|
}
|
|
19
16
|
//# sourceMappingURL=admin-table-row.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-table-row.d.ts","sourceRoot":"","sources":["../../../src/components/admin-table-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAO,MAAM,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"admin-table-row.d.ts","sourceRoot":"","sources":["../../../src/components/admin-table-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAO,MAAM,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEjF,qBAAa,aAAc,SAAQ,YAAY;IAE9C;;;;OAIG;IACH,MAAM,EAAE,GAAG,EAAE,CAAC;gBAED,IAAI,EAAE,YAAY,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM;IAQtD;;OAEG;IACH,WAAW,CAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,WAAW;IAQnF,MAAM,IAAK,MAAM,GAAG,kBAAkB,EAAE;CAqBxC"}
|
|
@@ -14,42 +14,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
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
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
18
|
exports.AdminTableRow = void 0;
|
|
55
19
|
var hotstaq_1 = require("hotstaq");
|
|
@@ -64,34 +28,24 @@ var AdminTableRow = /** @class */ (function (_super) {
|
|
|
64
28
|
/**
|
|
65
29
|
* Add this table row to the table
|
|
66
30
|
*/
|
|
67
|
-
// @ts-ignore
|
|
68
31
|
AdminTableRow.prototype.onPostPlace = function (parentHtmlElement, htmlElement) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
parentHtmlElement.parentNode.parentNode.parentNode.hotComponent.rowElements.push({ fields: this.fields, element: htmlElement });
|
|
73
|
-
return [2 /*return*/];
|
|
74
|
-
});
|
|
75
|
-
});
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
parentHtmlElement.parentNode.parentNode.parentNode.hotComponent.rowElements.push({ fields: this.fields, element: htmlElement });
|
|
34
|
+
return (null);
|
|
76
35
|
};
|
|
77
36
|
AdminTableRow.prototype.output = function () {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
html: "<tr>".concat(rowHtml, "</tr>"),
|
|
91
|
-
placeHereParent: "results"
|
|
92
|
-
}])];
|
|
93
|
-
});
|
|
94
|
-
});
|
|
37
|
+
var rowHtml = "";
|
|
38
|
+
for (var iIdx = 0; iIdx < this.fields.length; iIdx++) {
|
|
39
|
+
var fieldObj = this.fields[iIdx];
|
|
40
|
+
for (var key in fieldObj) {
|
|
41
|
+
var value = fieldObj[key];
|
|
42
|
+
rowHtml += "<td>".concat(value, "</td>");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return ([{
|
|
46
|
+
html: "<tr>".concat(rowHtml, "</tr>"),
|
|
47
|
+
documentSelector: "[hot-place-here='results']"
|
|
48
|
+
}]);
|
|
95
49
|
};
|
|
96
50
|
return AdminTableRow;
|
|
97
51
|
}(hotstaq_1.HotComponent));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-table-row.js","sourceRoot":"","sources":["../../../src/components/admin-table-row.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin-table-row.js","sourceRoot":"","sources":["../../../src/components/admin-table-row.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,mCAAiF;AAE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"./admin-table-field";
|
|
3
3
|
export declare class AdminTable extends HotComponent {
|
|
4
4
|
/**
|
|
@@ -69,7 +69,7 @@ export declare class AdminTable extends HotComponent {
|
|
|
69
69
|
/**
|
|
70
70
|
* Get the list of data from the server.
|
|
71
71
|
*/
|
|
72
|
-
onPostPlace(parentHtmlElement: HTMLElement, htmlElement: HTMLElement):
|
|
73
|
-
output():
|
|
72
|
+
onPostPlace(parentHtmlElement: HTMLElement, htmlElement: HTMLElement): HTMLElement;
|
|
73
|
+
output(): string | HotComponentOutput[];
|
|
74
74
|
}
|
|
75
75
|
//# sourceMappingURL=admin-table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-table.d.ts","sourceRoot":"","sources":["../../../src/components/admin-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAO,MAAM,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"admin-table.d.ts","sourceRoot":"","sources":["../../../src/components/admin-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAO,MAAM,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,qBAAa,UAAW,SAAQ,YAAY;IAE3C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,cAAc,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC;KAAE,CAAM;IAC9C;;;;OAIG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;;;;;;;;;;;OAaG;IACH,WAAW,EAAE;QAAE,MAAM,EAAE,GAAG,EAAE,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;KAAE,EAAE,CAAM;gBAExC,IAAI,EAAE,YAAY,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM;IAYtD;;OAEG;IACH,SAAS,CAAE,iBAAiB,EAAE,WAAW;IASzC;;OAEG;IACH,iBAAiB,CAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW;IAMxE;;;;OAIG;IACH,MAAM,CAAE,MAAM,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,EAAE;IAmBzC;;OAEG;IACG,SAAS;IAOf;;OAEG;IACG,WAAW;IAgBjB;;OAEG;IACH,WAAW,CAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,WAAW;IAUnF,MAAM,IAAK,MAAM,GAAG,kBAAkB,EAAE;CAexC"}
|