@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 +0,0 @@
|
|
|
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,aAAa;IACP,oCAAW,GAAjB,UAAmB,iBAA8B,EAAE,WAAwB;;;gBAE1E,kDAAkD;gBAClD,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE;oBAClB,aAAG,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC;;;;KAC9B;IAEK,+BAAM,GAAZ;;;gBAEC,sBAAO,CAAC,gOAGW,IAAI,CAAC,KAAK,8RAQrB,CAAC,EAAC;;;KACV;IACF,qBAAC;AAAD,CAAC,AA9CD,CAAoC,sBAAY,GA8C/C;AA9CY,wCAAc"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { HotStaq, HotAPI, HotComponent } from "hotstaq";
|
|
2
|
-
export declare class AdminEdit extends HotComponent {
|
|
3
|
-
/**
|
|
4
|
-
* The title of this edit modal.
|
|
5
|
-
*/
|
|
6
|
-
title: string;
|
|
7
|
-
/**
|
|
8
|
-
* The button title.
|
|
9
|
-
*/
|
|
10
|
-
button_title: string;
|
|
11
|
-
/**
|
|
12
|
-
* The attached list.
|
|
13
|
-
*/
|
|
14
|
-
attached_list: string;
|
|
15
|
-
/**
|
|
16
|
-
* The attached schema.
|
|
17
|
-
*/
|
|
18
|
-
schema: string;
|
|
19
|
-
/**
|
|
20
|
-
* The field elements in the edit modal.
|
|
21
|
-
*/
|
|
22
|
-
fieldElements: {
|
|
23
|
-
[name: string]: any;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* The modal id.
|
|
27
|
-
*/
|
|
28
|
-
modalId: string;
|
|
29
|
-
constructor(copy: HotComponent | HotStaq, api: HotAPI);
|
|
30
|
-
/**
|
|
31
|
-
* Save this form.
|
|
32
|
-
*/
|
|
33
|
-
onSave(): Promise<void>;
|
|
34
|
-
output(): Promise<{
|
|
35
|
-
html: string;
|
|
36
|
-
parentSelector: string;
|
|
37
|
-
}[]>;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=admin-edit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;AAE7D,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;IA0BN,MAAM;;;;CAoCZ"}
|
|
@@ -1,124 +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.AdminEdit = void 0;
|
|
55
|
-
var hotstaq_1 = require("hotstaq");
|
|
56
|
-
var AdminEdit = /** @class */ (function (_super) {
|
|
57
|
-
__extends(AdminEdit, _super);
|
|
58
|
-
function AdminEdit(copy, api) {
|
|
59
|
-
var _this = _super.call(this, copy, api) || this;
|
|
60
|
-
_this.tag = "admin-edit";
|
|
61
|
-
_this.title = "";
|
|
62
|
-
_this.button_title = "";
|
|
63
|
-
_this.attached_list = "";
|
|
64
|
-
_this.schema = "";
|
|
65
|
-
_this.fieldElements = {};
|
|
66
|
-
_this.modalId = "";
|
|
67
|
-
return _this;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Save this form.
|
|
71
|
-
*/
|
|
72
|
-
AdminEdit.prototype.onSave = function () {
|
|
73
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
-
var values, key, fieldElement, value, attachedList;
|
|
75
|
-
return __generator(this, function (_a) {
|
|
76
|
-
switch (_a.label) {
|
|
77
|
-
case 0:
|
|
78
|
-
values = {};
|
|
79
|
-
for (key in this.fieldElements) {
|
|
80
|
-
fieldElement = this.fieldElements[key];
|
|
81
|
-
value = fieldElement.value;
|
|
82
|
-
values[key] = value;
|
|
83
|
-
}
|
|
84
|
-
return [4 /*yield*/, hotstaq_1.Hot.jsonRequest("".concat(hotstaq_1.Hot.Data.baseUrl, "/v1/data/add"), {
|
|
85
|
-
schema: this.schema,
|
|
86
|
-
fields: values
|
|
87
|
-
})];
|
|
88
|
-
case 1:
|
|
89
|
-
_a.sent();
|
|
90
|
-
attachedList = document.getElementById(this.attached_list);
|
|
91
|
-
// @ts-ignore
|
|
92
|
-
return [4 /*yield*/, attachedList.hotComponent.refreshList()];
|
|
93
|
-
case 2:
|
|
94
|
-
// @ts-ignore
|
|
95
|
-
_a.sent();
|
|
96
|
-
// @ts-ignore
|
|
97
|
-
$("#".concat(this.modalId)).modal("hide");
|
|
98
|
-
return [2 /*return*/];
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
AdminEdit.prototype.output = function () {
|
|
104
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
105
|
-
return __generator(this, function (_a) {
|
|
106
|
-
if (this.name === "")
|
|
107
|
-
throw new Error("You must specify a name for each admin-edit element!");
|
|
108
|
-
this.modalId = "".concat(this.name, "Modal");
|
|
109
|
-
return [2 /*return*/, ([{
|
|
110
|
-
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 -->"),
|
|
111
|
-
parentSelector: "body"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
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>"),
|
|
115
|
-
//`<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>`,
|
|
116
|
-
parentSelector: "hot-place-here[name=\"buttons\"]"
|
|
117
|
-
}])];
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
return AdminEdit;
|
|
122
|
-
}(hotstaq_1.HotComponent));
|
|
123
|
-
exports.AdminEdit = AdminEdit;
|
|
124
|
-
//# sourceMappingURL=admin-edit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin-edit.js","sourceRoot":"","sources":["../../../src/components/admin-edit.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA6D;AAE7D;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;QAEjB,KAAI,CAAC,aAAa,GAAG,EAAE,CAAC;QAExB,KAAI,CAAC,OAAO,GAAG,EAAE,CAAC;;IACnB,CAAC;IAED;;OAEG;IACG,0BAAM,GAAZ;;;;;;wBAEK,MAAM,GAAQ,EAAE,CAAC;wBAErB,KAAS,GAAG,IAAI,IAAI,CAAC,aAAa,EAClC;4BACK,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;4BACvC,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC;4BAE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AA3GY,8BAAS"}
|
|
@@ -1 +0,0 @@
|
|
|
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;AAE7D,qBAAa,eAAgB,SAAQ,YAAY;IAEhD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;gBAED,IAAI,EAAE,YAAY,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM;IAQtD;;OAEG;IAEG,WAAW,CAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAS5F,MAAM;;;;CAOZ"}
|
|
@@ -1,92 +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.AdminTableField = void 0;
|
|
55
|
-
var hotstaq_1 = require("hotstaq");
|
|
56
|
-
var AdminTableField = /** @class */ (function (_super) {
|
|
57
|
-
__extends(AdminTableField, _super);
|
|
58
|
-
function AdminTableField(copy, api) {
|
|
59
|
-
var _this = _super.call(this, copy, api) || this;
|
|
60
|
-
_this.tag = "admin-table-field";
|
|
61
|
-
_this.field = 0;
|
|
62
|
-
return _this;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Add this table field to the table
|
|
66
|
-
*/
|
|
67
|
-
// @ts-ignore
|
|
68
|
-
AdminTableField.prototype.onPostPlace = function (parentHtmlElement, htmlElement) {
|
|
69
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
-
var hotComponent;
|
|
71
|
-
return __generator(this, function (_a) {
|
|
72
|
-
hotComponent = parentHtmlElement.parentNode.parentNode.parentNode.hotComponent;
|
|
73
|
-
if (hotComponent != null)
|
|
74
|
-
hotComponent.addHeaderDataOnly(this, htmlElement);
|
|
75
|
-
return [2 /*return*/];
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
AdminTableField.prototype.output = function () {
|
|
80
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
81
|
-
return __generator(this, function (_a) {
|
|
82
|
-
return [2 /*return*/, ([{
|
|
83
|
-
html: "<th>".concat(this.inner, "</th>"),
|
|
84
|
-
placeHereParent: "header"
|
|
85
|
-
}])];
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
return AdminTableField;
|
|
90
|
-
}(hotstaq_1.HotComponent));
|
|
91
|
-
exports.AdminTableField = AdminTableField;
|
|
92
|
-
//# sourceMappingURL=admin-table-field.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin-table-field.js","sourceRoot":"","sources":["../../../src/components/admin-table-field.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA6D;AAE7D;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,aAAa;IACP,qCAAW,GAAjB,UAAmB,iBAA8B,EAAE,WAAwB;;;;gBAGtE,YAAY,GAAG,iBAAiB,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,YAAY,CAAC;gBAEnF,IAAI,YAAY,IAAI,IAAI;oBACvB,YAAY,CAAC,iBAAiB,CAAE,IAAI,EAAE,WAAW,CAAC,CAAC;;;;KACpD;IAEK,gCAAM,GAAZ;;;gBAEC,sBAAO,CAAC,CAAC;4BACR,IAAI,EAAE,cAAO,IAAI,CAAC,KAAK,UAAO;4BAC9B,eAAe,EAAE,QAAQ;yBACzB,CAAC,CAAC,EAAC;;;KACJ;IACF,sBAAC;AAAD,CAAC,AAnCD,CAAqC,sBAAY,GAmChD;AAnCY,0CAAe"}
|
|
@@ -1 +0,0 @@
|
|
|
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;AAE7D,qBAAa,aAAc,SAAQ,YAAY;IAE9C;;;;OAIG;IACH,MAAM,EAAE,GAAG,EAAE,CAAC;gBAED,IAAI,EAAE,YAAY,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM;IAQtD;;OAEG;IAEG,WAAW,CAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAM5F,MAAM;;;;CAqBZ"}
|
|
@@ -1,99 +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.AdminTableRow = void 0;
|
|
55
|
-
var hotstaq_1 = require("hotstaq");
|
|
56
|
-
var AdminTableRow = /** @class */ (function (_super) {
|
|
57
|
-
__extends(AdminTableRow, _super);
|
|
58
|
-
function AdminTableRow(copy, api) {
|
|
59
|
-
var _this = _super.call(this, copy, api) || this;
|
|
60
|
-
_this.tag = "admin-table-row";
|
|
61
|
-
_this.fields = [];
|
|
62
|
-
return _this;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Add this table row to the table
|
|
66
|
-
*/
|
|
67
|
-
// @ts-ignore
|
|
68
|
-
AdminTableRow.prototype.onPostPlace = function (parentHtmlElement, htmlElement) {
|
|
69
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
-
return __generator(this, function (_a) {
|
|
71
|
-
// @ts-ignore
|
|
72
|
-
parentHtmlElement.parentNode.parentNode.parentNode.hotComponent.rowElements.push({ fields: this.fields, element: htmlElement });
|
|
73
|
-
return [2 /*return*/];
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
AdminTableRow.prototype.output = function () {
|
|
78
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
79
|
-
var rowHtml, iIdx, fieldObj, key, value;
|
|
80
|
-
return __generator(this, function (_a) {
|
|
81
|
-
rowHtml = "";
|
|
82
|
-
for (iIdx = 0; iIdx < this.fields.length; iIdx++) {
|
|
83
|
-
fieldObj = this.fields[iIdx];
|
|
84
|
-
for (key in fieldObj) {
|
|
85
|
-
value = fieldObj[key];
|
|
86
|
-
rowHtml += "<td>".concat(value, "</td>");
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return [2 /*return*/, ([{
|
|
90
|
-
html: "<tr>".concat(rowHtml, "</tr>"),
|
|
91
|
-
placeHereParent: "results"
|
|
92
|
-
}])];
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
return AdminTableRow;
|
|
97
|
-
}(hotstaq_1.HotComponent));
|
|
98
|
-
exports.AdminTableRow = AdminTableRow;
|
|
99
|
-
//# sourceMappingURL=admin-table-row.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin-table-row.js","sourceRoot":"","sources":["../../../src/components/admin-table-row.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA6D;AAE7D;IAAmC,iCAAY;IAS9C,uBAAa,IAA4B,EAAE,GAAW;QAAtD,YAEC,kBAAO,IAAI,EAAE,GAAG,CAAC,SAIjB;QAFA,KAAI,CAAC,GAAG,GAAG,iBAAiB,CAAC;QAC7B,KAAI,CAAC,MAAM,GAAG,EAAE,CAAC;;IAClB,CAAC;IAED;;OAEG;IACH,aAAa;IACP,mCAAW,GAAjB,UAAmB,iBAA8B,EAAE,WAAwB;;;gBAE1E,aAAa;gBACb,iBAAiB,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,YAAY,CAAC,WAAW,CAAC,IAAI,CAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAC,CAAC,CAAC;;;;KAChI;IAEK,8BAAM,GAAZ;;;;gBAEK,OAAO,GAAG,EAAE,CAAC;gBAEjB,KAAS,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,EACpD;oBACK,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;oBAEjC,KAAS,GAAG,IAAI,QAAQ,EACxB;wBACK,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;wBAE1B,OAAO,IAAI,cAAO,KAAK,UAAO,CAAC;qBAC/B;iBACD;gBAED,sBAAO,CAAC,CAAC;4BACR,IAAI,EAAE,cAAO,OAAO,UAAO;4BAC3B,eAAe,EAAE,SAAS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;;KACD;IAED;;OAEG;IACH,aAAa;IACP,gCAAW,GAAjB,UAAmB,iBAA8B,EAAE,WAAwB;;;;gBAE1E,UAAU,CAAE;;;oCAEV,qBAAM,IAAI,CAAC,WAAW,EAAG,EAAA;;gCAAzB,SAAyB,CAAC;;;;qBAC1B,EAAE,EAAE,CAAC,CAAC;;;;KACR;IAEK,2BAAM,GAAZ;;;gBAEC,sBAAO,CAAC,4BACK,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,4BAC7B,IAAI,CAAC,KAAK,iRASV,CAAC,EAAC;;;KACT;IACF,iBAAC;AAAD,CAAC,AAvJD,CAAgC,sBAAY,GAuJ3C;AAvJY,gCAAU"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { HotStaq, HotAPI, HotComponent } from "hotstaq";
|
|
2
|
-
export declare class AdminText extends HotComponent {
|
|
3
|
-
/**
|
|
4
|
-
* The associated database field.
|
|
5
|
-
*/
|
|
6
|
-
field: string;
|
|
7
|
-
constructor(copy: HotComponent | HotStaq, api: HotAPI);
|
|
8
|
-
/**
|
|
9
|
-
* Corrects the placement of the text elements for modals.
|
|
10
|
-
*/
|
|
11
|
-
onPostPlace(parentHtmlElement: HTMLElement, htmlElement: HTMLElement): Promise<HTMLElement>;
|
|
12
|
-
output(): Promise<string>;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=admin-text.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin-text.d.ts","sourceRoot":"","sources":["../../../src/components/admin-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAO,MAAM,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE7D,qBAAa,SAAU,SAAQ,YAAY;IAE1C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;gBAED,IAAI,EAAE,YAAY,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM;IAQtD;;OAEG;IAEG,WAAW,CAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAe5F,MAAM;CAWZ"}
|
|
@@ -1,98 +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.AdminText = void 0;
|
|
55
|
-
var hotstaq_1 = require("hotstaq");
|
|
56
|
-
var AdminText = /** @class */ (function (_super) {
|
|
57
|
-
__extends(AdminText, _super);
|
|
58
|
-
function AdminText(copy, api) {
|
|
59
|
-
var _this = _super.call(this, copy, api) || this;
|
|
60
|
-
_this.tag = "admin-text";
|
|
61
|
-
_this.field = "";
|
|
62
|
-
return _this;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Corrects the placement of the text elements for modals.
|
|
66
|
-
*/
|
|
67
|
-
// @ts-ignore
|
|
68
|
-
AdminText.prototype.onPostPlace = function (parentHtmlElement, htmlElement) {
|
|
69
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
-
var placeHereArray, placeHere;
|
|
71
|
-
return __generator(this, function (_a) {
|
|
72
|
-
placeHereArray = parentHtmlElement.querySelectorAll("hot-place-here[type=\"modal\"]");
|
|
73
|
-
if (placeHereArray.length > 0) {
|
|
74
|
-
placeHere = placeHereArray[0];
|
|
75
|
-
parentHtmlElement.removeChild(htmlElement);
|
|
76
|
-
placeHere.appendChild(htmlElement);
|
|
77
|
-
// @ts-ignore
|
|
78
|
-
parentHtmlElement.hotComponent.fieldElements[this.field] = htmlElement.querySelector("input");
|
|
79
|
-
}
|
|
80
|
-
return [2 /*return*/];
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
AdminText.prototype.output = function () {
|
|
85
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
86
|
-
var value;
|
|
87
|
-
return __generator(this, function (_a) {
|
|
88
|
-
value = "";
|
|
89
|
-
if (this.value != null)
|
|
90
|
-
value = this.value;
|
|
91
|
-
return [2 /*return*/, ("<div>\n\t\t\t<label class=\"form-label\">".concat(this.inner, "</label><input class=\"form-control\" type = \"text\" value = \"").concat(value, "\" />\n\t\t</div>"))];
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
return AdminText;
|
|
96
|
-
}(hotstaq_1.HotComponent));
|
|
97
|
-
exports.AdminText = AdminText;
|
|
98
|
-
//# sourceMappingURL=admin-text.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin-text.js","sourceRoot":"","sources":["../../../src/components/admin-text.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA6D;AAE7D;IAA+B,6BAAY;IAO1C,mBAAa,IAA4B,EAAE,GAAW;QAAtD,YAEC,kBAAO,IAAI,EAAE,GAAG,CAAC,SAIjB;QAFA,KAAI,CAAC,GAAG,GAAG,YAAY,CAAC;QACxB,KAAI,CAAC,KAAK,GAAG,EAAE,CAAC;;IACjB,CAAC;IAED;;OAEG;IACH,aAAa;IACP,+BAAW,GAAjB,UAAmB,iBAA8B,EAAE,WAAwB;;;;gBAEtE,cAAc,GAAG,iBAAiB,CAAC,gBAAgB,CAAE,gCAA8B,CAAC,CAAC;gBAEzF,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAC7B;oBACK,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClC,iBAAiB,CAAC,WAAW,CAAE,WAAW,CAAC,CAAC;oBAC5C,SAAS,CAAC,WAAW,CAAE,WAAW,CAAC,CAAC;oBAEpC,aAAa;oBACb,iBAAiB,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC,aAAa,CAAE,OAAO,CAAC,CAAC;iBAC/F;;;;KACD;IAEK,0BAAM,GAAZ;;;;gBAEK,KAAK,GAAW,EAAE,CAAC;gBAEvB,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI;oBACrB,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;gBAEpB,sBAAO,CAAC,mDACqB,IAAI,CAAC,KAAK,6EAA8D,KAAK,sBACnG,CAAC,EAAC;;;KACT;IACF,gBAAC;AAAD,CAAC,AA7CD,CAA+B,sBAAY,GA6C1C;AA7CY,8BAAS"}
|
package/scripts/watch.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { HotIO } from "hotstaq";
|
|
2
|
-
import * as ppath from "path";
|
|
3
|
-
import * as chokidar from "chokidar";
|
|
4
|
-
|
|
5
|
-
(async () =>
|
|
6
|
-
{
|
|
7
|
-
function watchAndCopy (src: string, dest: string): void
|
|
8
|
-
{
|
|
9
|
-
chokidar.watch (src, { ignoreInitial: true })
|
|
10
|
-
.on ("all", async (event, filePath) =>
|
|
11
|
-
{
|
|
12
|
-
if (event === 'change')
|
|
13
|
-
{
|
|
14
|
-
const fileName: string = ppath.basename (filePath);
|
|
15
|
-
const fileExt: string = ppath.extname (filePath).toLowerCase ();
|
|
16
|
-
const destPath: string = dest + '/' + fileName;
|
|
17
|
-
|
|
18
|
-
if (fileExt === ".js")
|
|
19
|
-
{
|
|
20
|
-
await HotIO.copyFile (filePath, destPath);
|
|
21
|
-
|
|
22
|
-
console.log (`${fileName} was copied to ${destPath}`);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
})
|
|
26
|
-
.on ("error", (error) =>
|
|
27
|
-
{
|
|
28
|
-
console.error (`Error: ${error}`);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (await HotIO.exists (`${process.cwd ()}/assets/components/`) === false)
|
|
33
|
-
await HotIO.mkdir (`${process.cwd ()}/assets/components/`);
|
|
34
|
-
|
|
35
|
-
const src: string = `${process.cwd ()}/build/src/components/`;
|
|
36
|
-
const dest: string = `${process.cwd ()}/assets/components/`;
|
|
37
|
-
|
|
38
|
-
//watchAndCopy (src, dest);
|
|
39
|
-
|
|
40
|
-
await HotIO.copyFiles (src, dest, {
|
|
41
|
-
// @ts-ignore
|
|
42
|
-
"filter": (src: string, dest: string) =>
|
|
43
|
-
{
|
|
44
|
-
const fileExt: string = ppath.extname (src).toLowerCase ();
|
|
45
|
-
|
|
46
|
-
if (fileExt === "")
|
|
47
|
-
return (true);
|
|
48
|
-
|
|
49
|
-
if (fileExt === ".js")
|
|
50
|
-
{
|
|
51
|
-
console.log (`Copying ${src}`);
|
|
52
|
-
return (true);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return (false);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
console.log (`${src} was copied to ${dest}`);
|
|
59
|
-
})();
|