@hotstaq/admin-panel 0.3.17 → 0.4.0
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/.gitlab-ci.yml +4 -1
- package/assets/css/freelight-panel.css +174 -0
- package/build/WebExport.d.ts.map +1 -1
- package/build/WebExport.js +7 -1
- package/build/WebExport.js.map +1 -1
- package/build/components/admin-add-panel.d.ts +62 -0
- package/build/components/admin-add-panel.d.ts.map +1 -0
- package/build/components/admin-add-panel.js +191 -0
- package/build/components/admin-add-panel.js.map +1 -0
- package/build/components/admin-card-table.d.ts +55 -0
- package/build/components/admin-card-table.d.ts.map +1 -0
- package/build/components/admin-card-table.js +149 -0
- package/build/components/admin-card-table.js.map +1 -0
- package/build/components/admin-detail-page.d.ts +68 -0
- package/build/components/admin-detail-page.d.ts.map +1 -0
- package/build/components/admin-detail-page.js +247 -0
- package/build/components/admin-detail-page.js.map +1 -0
- package/build/components/admin-disclaimer.d.ts +21 -0
- package/build/components/admin-disclaimer.d.ts.map +1 -0
- package/build/components/admin-disclaimer.js +37 -0
- package/build/components/admin-disclaimer.js.map +1 -0
- package/build/components/admin-eyebrow-heading.d.ts +23 -0
- package/build/components/admin-eyebrow-heading.d.ts.map +1 -0
- package/build/components/admin-eyebrow-heading.js +40 -0
- package/build/components/admin-eyebrow-heading.js.map +1 -0
- package/build/components/admin-form-field.d.ts +69 -0
- package/build/components/admin-form-field.d.ts.map +1 -0
- package/build/components/admin-form-field.js +117 -0
- package/build/components/admin-form-field.js.map +1 -0
- package/build/components/admin-table.d.ts +1 -1
- package/build/components/admin-table.d.ts.map +1 -1
- package/build/components/admin-table.js +13 -12
- package/build/components/admin-table.js.map +1 -1
- package/build/index.d.ts +7 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +16 -1
- package/build/index.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build-web/AdminPanelComponents.js +2 -2
- package/package.json +3 -3
- package/src/WebExport.ts +7 -1
- package/src/components/admin-add-panel.ts +232 -0
- package/src/components/admin-card-table.ts +183 -0
- package/src/components/admin-detail-page.ts +270 -0
- package/src/components/admin-disclaimer.ts +43 -0
- package/src/components/admin-eyebrow-heading.ts +50 -0
- package/src/components/admin-form-field.ts +166 -0
- package/src/components/admin-table.ts +15 -15
- package/src/index.ts +18 -2
package/.gitlab-ci.yml
CHANGED
|
@@ -27,6 +27,9 @@ publish:
|
|
|
27
27
|
- build
|
|
28
28
|
script:
|
|
29
29
|
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
|
30
|
-
-
|
|
30
|
+
# --ignore-scripts skips prepublishOnly (which would re-run build-web and
|
|
31
|
+
# need a fresh `npm ci` for tsc). The build stage already produced the
|
|
32
|
+
# full publishable set in build/, build-web/, and public/js/.
|
|
33
|
+
- npm publish --access public --ignore-scripts
|
|
31
34
|
rules:
|
|
32
35
|
- if: '$CI_COMMIT_BRANCH == "main"'
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/* ==============================================================
|
|
2
|
+
Freelight-style admin-panel theme (admin-panel 0.4.0+).
|
|
3
|
+
Visual styling for the new card/detail-page/add-panel components.
|
|
4
|
+
============================================================== */
|
|
5
|
+
|
|
6
|
+
/* ---- shared tokens ---- */
|
|
7
|
+
:root {
|
|
8
|
+
--flap-text: #1f2937;
|
|
9
|
+
--flap-text-muted: #6b7280;
|
|
10
|
+
--flap-border: #e5e7eb;
|
|
11
|
+
--flap-surface: #ffffff;
|
|
12
|
+
--flap-surface-2: #f8fafc;
|
|
13
|
+
--flap-surface-3: #f1f5f9;
|
|
14
|
+
--flap-hover: #eef2ff;
|
|
15
|
+
--flap-accent: #4f46e5;
|
|
16
|
+
--flap-accent-soft: rgba(79, 70, 229, 0.08);
|
|
17
|
+
--flap-danger: #dc2626;
|
|
18
|
+
--flap-success: #16a34a;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
[data-theme="dark"] {
|
|
22
|
+
--flap-text: #e2e8f0;
|
|
23
|
+
--flap-text-muted: #94a3b8;
|
|
24
|
+
--flap-border: #1e293b;
|
|
25
|
+
--flap-surface: #0f172a;
|
|
26
|
+
--flap-surface-2: #111827;
|
|
27
|
+
--flap-surface-3: #1f2937;
|
|
28
|
+
--flap-hover: #1e1b4b;
|
|
29
|
+
--flap-accent: #6366f1;
|
|
30
|
+
--flap-accent-soft: rgba(99, 102, 241, 0.18);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* ---- admin-card-table ---- */
|
|
34
|
+
.fl-card-table {
|
|
35
|
+
border-color: var(--flap-border);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.fl-card-table .card-header {
|
|
39
|
+
background: var(--flap-surface-2);
|
|
40
|
+
border-bottom: 1px solid var(--flap-border);
|
|
41
|
+
font-weight: 600;
|
|
42
|
+
color: var(--flap-text);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.fl-card-list .fl-card-row {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: 1rem;
|
|
49
|
+
padding: 0.9rem 1.1rem;
|
|
50
|
+
border-color: var(--flap-border);
|
|
51
|
+
color: var(--flap-text);
|
|
52
|
+
text-decoration: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.fl-card-list .fl-card-row-link:hover,
|
|
56
|
+
.fl-card-list .fl-card-row-link:focus {
|
|
57
|
+
background: var(--flap-hover);
|
|
58
|
+
color: var(--flap-text);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.fl-card-list .fl-card-row-main {
|
|
62
|
+
flex: 1 1 auto;
|
|
63
|
+
min-width: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.fl-card-list .fl-card-row-label {
|
|
67
|
+
font-weight: 600;
|
|
68
|
+
color: var(--flap-text);
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.fl-card-list .fl-card-row-sub {
|
|
75
|
+
color: var(--flap-text-muted);
|
|
76
|
+
font-size: 0.85rem;
|
|
77
|
+
margin-top: 0.15rem;
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
text-overflow: ellipsis;
|
|
80
|
+
white-space: nowrap;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.fl-card-list .fl-card-row-actions {
|
|
84
|
+
flex: 0 0 auto;
|
|
85
|
+
display: flex;
|
|
86
|
+
gap: 0.4rem;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Mobile: stack the action area below the label so labels keep
|
|
90
|
+
their width and buttons don't fight for room. */
|
|
91
|
+
@media (max-width: 575.98px) {
|
|
92
|
+
.fl-card-list .fl-card-row {
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
align-items: stretch;
|
|
95
|
+
}
|
|
96
|
+
.fl-card-list .fl-card-row-actions {
|
|
97
|
+
margin-top: 0.5rem;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* ---- admin-add-panel ---- */
|
|
102
|
+
.fl-add-panel-body {
|
|
103
|
+
border-top: 1px solid var(--flap-border);
|
|
104
|
+
background: var(--flap-surface-2);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.fl-add-panel-title {
|
|
108
|
+
color: var(--flap-text);
|
|
109
|
+
letter-spacing: 0.01em;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.fl-add-panel-form .form-label {
|
|
113
|
+
color: var(--flap-text);
|
|
114
|
+
margin-bottom: 0.25rem;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* ---- admin-detail-page ---- */
|
|
118
|
+
.fl-detail-page .card {
|
|
119
|
+
border-color: var(--flap-border);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.fl-detail-page .card-body {
|
|
123
|
+
background: var(--flap-surface);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.fl-detail-page .form-label {
|
|
127
|
+
color: var(--flap-text);
|
|
128
|
+
margin-bottom: 0.25rem;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.fl-detail-feedback {
|
|
132
|
+
margin-bottom: 1rem;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.fl-detail-feedback.d-none {
|
|
136
|
+
margin-bottom: 0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Sticky save bar — sits at the bottom of the viewport while the user
|
|
140
|
+
edits, so Save is always reachable on long forms. */
|
|
141
|
+
.fl-detail-save-bar {
|
|
142
|
+
position: fixed;
|
|
143
|
+
bottom: 0;
|
|
144
|
+
left: 0;
|
|
145
|
+
right: 0;
|
|
146
|
+
padding: 0.9rem 0;
|
|
147
|
+
background: var(--flap-surface);
|
|
148
|
+
border-top: 1px solid var(--flap-border);
|
|
149
|
+
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
|
|
150
|
+
z-index: 50;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
[data-theme="dark"] .fl-detail-save-bar {
|
|
154
|
+
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.35);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* ---- admin-disclaimer ---- */
|
|
158
|
+
.fl-disclaimer {
|
|
159
|
+
border-color: var(--flap-border);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.fl-disclaimer .card-body {
|
|
163
|
+
background: var(--flap-accent-soft);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* ---- admin-eyebrow-heading ---- */
|
|
167
|
+
.fl-eyebrow-heading {
|
|
168
|
+
margin-top: 0.25rem;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.fl-eyebrow-heading h1 {
|
|
172
|
+
color: var(--flap-text);
|
|
173
|
+
letter-spacing: -0.01em;
|
|
174
|
+
}
|
package/build/WebExport.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebExport.d.ts","sourceRoot":"","sources":["../src/WebExport.ts"],"names":[],"mappings":"AAAA,iBAAe,WAAW,IAAK,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"WebExport.d.ts","sourceRoot":"","sources":["../src/WebExport.ts"],"names":[],"mappings":"AAAA,iBAAe,WAAW,IAAK,OAAO,CAAC,GAAG,CAAC,CAiC1C;AAED,OAAO,EACN,WAAW,EACX,CAAC"}
|
package/build/WebExport.js
CHANGED
|
@@ -35,7 +35,13 @@ function buildAssets() {
|
|
|
35
35
|
"AdminTable",
|
|
36
36
|
"AdminTableField",
|
|
37
37
|
"AdminTableRow",
|
|
38
|
-
"AdminText"
|
|
38
|
+
"AdminText",
|
|
39
|
+
"AdminFormField",
|
|
40
|
+
"AdminAddPanel",
|
|
41
|
+
"AdminCardTable",
|
|
42
|
+
"AdminDetailPage",
|
|
43
|
+
"AdminDisclaimer",
|
|
44
|
+
"AdminEyebrowHeading"
|
|
39
45
|
]
|
|
40
46
|
});
|
|
41
47
|
});
|
package/build/WebExport.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebExport.js","sourceRoot":"","sources":["../src/WebExport.ts"],"names":[],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"WebExport.js","sourceRoot":"","sources":["../src/WebExport.ts"],"names":[],"mappings":";;;;;;;;;;;AAoCC,kCAAW;AApCZ,SAAe,WAAW;;QAEzB,OAAO,CAAC;YACN,MAAM,EAAE,CAAC,gBAAgB;gBACxB,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,eAAe,CAAC,EAAE;gBAC5C,eAAe;gBACf,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,EAAE;gBACvE,gBAAgB;gBAChB,oBAAoB;gBACpB,+BAA+B;gBAC/B,6BAA6B;gBAC7B,kCAAkC;gBAClC,2BAA2B,CAAC;YAC7B,IAAI,EAAE,CAAC,mBAAmB,CAAC;YAC3B,GAAG,EAAE,CAAC,kBAAkB,CAAC;YACzB,EAAE,EAAE,CAAC,iBAAiB,EAAE,qCAAqC,CAAC;YAC9D,gBAAgB,EAAE,yBAAyB;YAC3C,UAAU,EAAE;gBACX,gBAAgB;gBAChB,WAAW;gBACX,aAAa;gBACb,eAAe;gBACf,YAAY;gBACZ,iBAAiB;gBACjB,eAAe;gBACf,WAAW;gBACX,gBAAgB;gBAChB,eAAe;gBACf,gBAAgB;gBAChB,iBAAiB;gBACjB,iBAAiB;gBACjB,qBAAqB;aAAC;SACvB,CAAC,CAAC;IACL,CAAC;CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { HotStaq, HotAPI, HotComponent, HotComponentOutput } from "hotstaq";
|
|
2
|
+
/**
|
|
3
|
+
* Inline collapsible "Add" panel. Replaces the modal opened by
|
|
4
|
+
* <admin-edit hot-type="add">. Built on Bootstrap's collapse so it
|
|
5
|
+
* slides down below a trigger button without overlaying the page.
|
|
6
|
+
*
|
|
7
|
+
* Pairs with <admin-card-table>: the table's "+ Add" button toggles
|
|
8
|
+
* this panel via Bootstrap's data-bs-toggle="collapse" data-bs-target.
|
|
9
|
+
* Slot for form fields lives at `hot-place-here name="panelBody"`.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* <admin-add-panel name="bankAccountsAdd" hot-title="Add bank account"
|
|
13
|
+
* hot-onsave="<(values) => {
|
|
14
|
+
* const r = await Hot.jsonRequest(`${config.baseUrl}/v1/bank_accounts/create`,
|
|
15
|
+
* { bankAccount: values }, '${jwtToken}');
|
|
16
|
+
* if (r && r.error) { alertError(r.error); return false; }
|
|
17
|
+
* }Ra>"
|
|
18
|
+
* hot-attached_list="bankAccountsList">
|
|
19
|
+
* <admin-form-field hot-field="name" hot-label="Name" hot-required="1"
|
|
20
|
+
* hot-col="col-md-6"></admin-form-field>
|
|
21
|
+
* ...
|
|
22
|
+
* </admin-add-panel>
|
|
23
|
+
*/
|
|
24
|
+
export declare class AdminAddPanel extends HotComponent {
|
|
25
|
+
/** Title shown at the top of the panel. */
|
|
26
|
+
title: string;
|
|
27
|
+
/** Submit button label. */
|
|
28
|
+
button_title: string;
|
|
29
|
+
/** Cancel button label. Empty disables the cancel button. */
|
|
30
|
+
cancel_text: string;
|
|
31
|
+
/** Optional id of the related <admin-card-table>; the toggle button gets injected into its header. */
|
|
32
|
+
attached_list: string;
|
|
33
|
+
/** Where to render the toggle button (a hot-place-here name on the page). Leave blank when attached_list is set. */
|
|
34
|
+
add_place_here: string;
|
|
35
|
+
/** Text shown on the toggle button. */
|
|
36
|
+
add_text: string;
|
|
37
|
+
/** When set to "1" / "true", panel starts expanded. */
|
|
38
|
+
start_open: string;
|
|
39
|
+
/** What to run when the user clicks Save. Receives a values object built from hot-field inputs. Return false to keep the panel open. */
|
|
40
|
+
onsave: (values: any) => Promise<boolean | void>;
|
|
41
|
+
protected panelId: string;
|
|
42
|
+
protected formId: string;
|
|
43
|
+
constructor(copy: HotComponent | HotStaq, api: HotAPI);
|
|
44
|
+
/**
|
|
45
|
+
* Wires the submit + cancel handlers after the DOM is in place.
|
|
46
|
+
* Browsers handle the collapse open/close via Bootstrap data-attrs
|
|
47
|
+
* on the toggle button — we don't need to manage that ourselves.
|
|
48
|
+
*/
|
|
49
|
+
onPostPlace(parentHtmlElement: HTMLElement, htmlElement: HTMLElement): HTMLElement;
|
|
50
|
+
/** Read every hot-field-marked input inside the panel into a plain object. */
|
|
51
|
+
protected collectFieldValues(panel: HTMLElement): any;
|
|
52
|
+
protected resetFields(panel: HTMLElement): void;
|
|
53
|
+
protected collapsePanel(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Best-effort refresh of the paired <admin-card-table>. The table
|
|
56
|
+
* exposes a `refreshList` method on the rendered element when its
|
|
57
|
+
* data is loaded; calling it re-fetches without a page reload.
|
|
58
|
+
*/
|
|
59
|
+
protected refreshAttachedList(): void;
|
|
60
|
+
output(): string | HotComponentOutput[];
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=admin-add-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-add-panel.d.ts","sourceRoot":"","sources":["../../src/components/admin-add-panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAO,MAAM,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEjF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,aAAc,SAAQ,YAAY;IAE9C,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;IACpB,sGAAsG;IACtG,aAAa,EAAE,MAAM,CAAC;IACtB,oHAAoH;IACpH,cAAc,EAAE,MAAM,CAAC;IACvB,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IACnB,wIAAwI;IACxI,MAAM,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAEjD,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,IAAI,EAAE,YAAY,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM;IAetD;;;;OAIG;IACH,WAAW,CAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,WAAW;IAsDnF,8EAA8E;IAC9E,SAAS,CAAC,kBAAkB,CAAE,KAAK,EAAE,WAAW,GAAG,GAAG;IAoBtD,SAAS,CAAC,WAAW,CAAE,KAAK,EAAE,WAAW,GAAG,IAAI;IAYhD,SAAS,CAAC,aAAa,IAAK,IAAI;IAYhC;;;;OAIG;IACH,SAAS,CAAC,mBAAmB,IAAK,IAAI;IAQtC,MAAM,IAAK,MAAM,GAAG,kBAAkB,EAAE;CAqDxC"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AdminAddPanel = void 0;
|
|
13
|
+
const hotstaq_1 = require("hotstaq");
|
|
14
|
+
/**
|
|
15
|
+
* Inline collapsible "Add" panel. Replaces the modal opened by
|
|
16
|
+
* <admin-edit hot-type="add">. Built on Bootstrap's collapse so it
|
|
17
|
+
* slides down below a trigger button without overlaying the page.
|
|
18
|
+
*
|
|
19
|
+
* Pairs with <admin-card-table>: the table's "+ Add" button toggles
|
|
20
|
+
* this panel via Bootstrap's data-bs-toggle="collapse" data-bs-target.
|
|
21
|
+
* Slot for form fields lives at `hot-place-here name="panelBody"`.
|
|
22
|
+
*
|
|
23
|
+
* Usage:
|
|
24
|
+
* <admin-add-panel name="bankAccountsAdd" hot-title="Add bank account"
|
|
25
|
+
* hot-onsave="<(values) => {
|
|
26
|
+
* const r = await Hot.jsonRequest(`${config.baseUrl}/v1/bank_accounts/create`,
|
|
27
|
+
* { bankAccount: values }, '${jwtToken}');
|
|
28
|
+
* if (r && r.error) { alertError(r.error); return false; }
|
|
29
|
+
* }Ra>"
|
|
30
|
+
* hot-attached_list="bankAccountsList">
|
|
31
|
+
* <admin-form-field hot-field="name" hot-label="Name" hot-required="1"
|
|
32
|
+
* hot-col="col-md-6"></admin-form-field>
|
|
33
|
+
* ...
|
|
34
|
+
* </admin-add-panel>
|
|
35
|
+
*/
|
|
36
|
+
class AdminAddPanel extends hotstaq_1.HotComponent {
|
|
37
|
+
constructor(copy, api) {
|
|
38
|
+
super(copy, api);
|
|
39
|
+
this.tag = "admin-add-panel";
|
|
40
|
+
this.title = "";
|
|
41
|
+
this.button_title = "Save";
|
|
42
|
+
this.cancel_text = "Cancel";
|
|
43
|
+
this.attached_list = "";
|
|
44
|
+
this.add_place_here = "";
|
|
45
|
+
this.add_text = "+ Add";
|
|
46
|
+
this.start_open = "0";
|
|
47
|
+
this.onsave = null;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Wires the submit + cancel handlers after the DOM is in place.
|
|
51
|
+
* Browsers handle the collapse open/close via Bootstrap data-attrs
|
|
52
|
+
* on the toggle button — we don't need to manage that ourselves.
|
|
53
|
+
*/
|
|
54
|
+
onPostPlace(parentHtmlElement, htmlElement) {
|
|
55
|
+
const self = this;
|
|
56
|
+
const panel = document.getElementById(this.panelId);
|
|
57
|
+
if (panel == null)
|
|
58
|
+
return (null);
|
|
59
|
+
const submitBtn = panel.querySelector(`.fl-add-panel-submit`);
|
|
60
|
+
const cancelBtn = panel.querySelector(`.fl-add-panel-cancel`);
|
|
61
|
+
if (submitBtn != null) {
|
|
62
|
+
submitBtn.addEventListener("click", (e) => __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
e.preventDefault();
|
|
64
|
+
const values = self.collectFieldValues(panel);
|
|
65
|
+
submitBtn.disabled = true;
|
|
66
|
+
try {
|
|
67
|
+
let keepOpen = false;
|
|
68
|
+
if (typeof self.onsave === "function")
|
|
69
|
+
keepOpen = yield self.onsave(values);
|
|
70
|
+
if (keepOpen === false || keepOpen == null) {
|
|
71
|
+
self.resetFields(panel);
|
|
72
|
+
self.collapsePanel();
|
|
73
|
+
self.refreshAttachedList();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
catch (ex) {
|
|
77
|
+
console.error("admin-add-panel onsave threw:", ex);
|
|
78
|
+
}
|
|
79
|
+
finally {
|
|
80
|
+
submitBtn.disabled = false;
|
|
81
|
+
}
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
if (cancelBtn != null) {
|
|
85
|
+
cancelBtn.addEventListener("click", (e) => {
|
|
86
|
+
e.preventDefault();
|
|
87
|
+
self.resetFields(panel);
|
|
88
|
+
self.collapsePanel();
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return (null);
|
|
92
|
+
}
|
|
93
|
+
/** Read every hot-field-marked input inside the panel into a plain object. */
|
|
94
|
+
collectFieldValues(panel) {
|
|
95
|
+
const out = {};
|
|
96
|
+
const nodes = panel.querySelectorAll("[hot-field]");
|
|
97
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
98
|
+
const el = nodes[i];
|
|
99
|
+
const field = el.getAttribute("hot-field");
|
|
100
|
+
if (field == null || field === "")
|
|
101
|
+
continue;
|
|
102
|
+
if (el instanceof HTMLInputElement && el.type === "checkbox")
|
|
103
|
+
out[field] = el.checked;
|
|
104
|
+
else if (el instanceof HTMLInputElement && el.type === "number")
|
|
105
|
+
out[field] = el.value === "" ? null : Number(el.value);
|
|
106
|
+
else
|
|
107
|
+
out[field] = el.value;
|
|
108
|
+
}
|
|
109
|
+
return (out);
|
|
110
|
+
}
|
|
111
|
+
resetFields(panel) {
|
|
112
|
+
const nodes = panel.querySelectorAll("[hot-field]");
|
|
113
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
114
|
+
const el = nodes[i];
|
|
115
|
+
if (el instanceof HTMLInputElement && el.type === "checkbox")
|
|
116
|
+
el.checked = false;
|
|
117
|
+
else if (el instanceof HTMLSelectElement)
|
|
118
|
+
el.selectedIndex = 0;
|
|
119
|
+
else
|
|
120
|
+
el.value = "";
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
collapsePanel() {
|
|
124
|
+
const panel = document.getElementById(this.panelId);
|
|
125
|
+
if (panel == null)
|
|
126
|
+
return;
|
|
127
|
+
// Bootstrap collapse hide — works without importing Bootstrap JS
|
|
128
|
+
// directly by toggling the .show class and aria-expanded on any
|
|
129
|
+
// trigger pointed at us.
|
|
130
|
+
panel.classList.remove("show");
|
|
131
|
+
const triggers = document.querySelectorAll(`[data-bs-target="#${this.panelId}"]`);
|
|
132
|
+
triggers.forEach(t => t.setAttribute("aria-expanded", "false"));
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Best-effort refresh of the paired <admin-card-table>. The table
|
|
136
|
+
* exposes a `refreshList` method on the rendered element when its
|
|
137
|
+
* data is loaded; calling it re-fetches without a page reload.
|
|
138
|
+
*/
|
|
139
|
+
refreshAttachedList() {
|
|
140
|
+
if (this.attached_list === "")
|
|
141
|
+
return;
|
|
142
|
+
const list = document.getElementById(this.attached_list);
|
|
143
|
+
if (list != null && typeof list.refreshList === "function")
|
|
144
|
+
list.refreshList();
|
|
145
|
+
}
|
|
146
|
+
output() {
|
|
147
|
+
if (this.name === "")
|
|
148
|
+
throw new Error("admin-add-panel: name is required");
|
|
149
|
+
this.panelId = `${this.name}Panel`;
|
|
150
|
+
this.formId = `${this.name}Form`;
|
|
151
|
+
const showClass = (this.start_open === "1" || this.start_open === "true") ? " show" : "";
|
|
152
|
+
const titleHtml = this.title ? `<h2 class="h6 fl-add-panel-title mb-3">${this.title}</h2>` : "";
|
|
153
|
+
const cancelHtml = this.cancel_text
|
|
154
|
+
? `<button type="button" class="btn btn-sm btn-link text-muted fl-add-panel-cancel">${this.cancel_text}</button>`
|
|
155
|
+
: "";
|
|
156
|
+
const panelHtml = `
|
|
157
|
+
<div id="${this.panelId}" class="collapse fl-add-panel${showClass}">
|
|
158
|
+
<div class="card-body border-top bg-body-tertiary fl-add-panel-body">
|
|
159
|
+
${titleHtml}
|
|
160
|
+
<form id="${this.formId}" class="fl-add-panel-form">
|
|
161
|
+
<div class="row g-2 align-items-end">
|
|
162
|
+
<hot-place-here name="panelBody"></hot-place-here>
|
|
163
|
+
</div>
|
|
164
|
+
<div class="d-flex justify-content-end gap-2 mt-3">
|
|
165
|
+
${cancelHtml}
|
|
166
|
+
<button type="submit" class="btn btn-sm btn-success fl-add-panel-submit">${this.button_title}</button>
|
|
167
|
+
</div>
|
|
168
|
+
</form>
|
|
169
|
+
</div>
|
|
170
|
+
</div>`;
|
|
171
|
+
const outputs = [{ html: panelHtml, documentSelector: "body" }];
|
|
172
|
+
// If a partner card-table is named, inject the toggle button into
|
|
173
|
+
// its header slot. Otherwise honour an explicit add_place_here.
|
|
174
|
+
const toggleBtn = `<button type="button" class="btn btn-sm btn-primary fl-add-panel-toggle" data-bs-toggle="collapse" data-bs-target="#${this.panelId}" aria-expanded="${showClass ? "true" : "false"}" aria-controls="${this.panelId}">${this.add_text}</button>`;
|
|
175
|
+
if (this.attached_list !== "") {
|
|
176
|
+
outputs.push({
|
|
177
|
+
html: toggleBtn,
|
|
178
|
+
documentSelector: `[data-card-table-add-slot="${this.attached_list}"]`
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
else if (this.add_place_here !== "") {
|
|
182
|
+
outputs.push({
|
|
183
|
+
html: toggleBtn,
|
|
184
|
+
documentSelector: `hot-place-here[name="${this.add_place_here}"]`
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
return (outputs);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
exports.AdminAddPanel = AdminAddPanel;
|
|
191
|
+
//# sourceMappingURL=admin-add-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-add-panel.js","sourceRoot":"","sources":["../../src/components/admin-add-panel.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAiF;AAEjF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,aAAc,SAAQ,sBAAY;IAsB9C,YAAa,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;iBACC,IAAI,CAAC,MAAM;;;;;SAKnB,UAAU;kFAC+D,IAAI,CAAC,YAAY;;;;UAIzF,CAAC;QAET,MAAM,OAAO,GAAyB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC,CAAC;QAEtF,kEAAkE;QAClE,gEAAgE;QAChE,MAAM,SAAS,GAAG,uHAAuH,IAAI,CAAC,OAAO,oBAAoB,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,oBAAoB,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,QAAQ,WAAW,CAAC;QAEnQ,IAAI,IAAI,CAAC,aAAa,KAAK,EAAE,EAC7B,CAAC;YACA,OAAO,CAAC,IAAI,CAAE;gBACb,IAAI,EAAE,SAAS;gBACf,gBAAgB,EAAE,8BAA8B,IAAI,CAAC,aAAa,IAAI;aACtE,CAAC,CAAC;QACJ,CAAC;aACI,IAAI,IAAI,CAAC,cAAc,KAAK,EAAE,EACnC,CAAC;YACA,OAAO,CAAC,IAAI,CAAE;gBACb,IAAI,EAAE,SAAS;gBACf,gBAAgB,EAAE,wBAAwB,IAAI,CAAC,cAAc,IAAI;aACjE,CAAC,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,OAAO,CAAC,CAAC;IAClB,CAAC;CACD;AA/MD,sCA+MC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { HotStaq, HotAPI, HotComponent, HotComponentOutput } from "hotstaq";
|
|
2
|
+
/**
|
|
3
|
+
* Freelight-style card list. Renders campaign / project / member rows
|
|
4
|
+
* as cards on every viewport, with optional inline action buttons and
|
|
5
|
+
* a sub-line below the primary label.
|
|
6
|
+
*
|
|
7
|
+
* Replaces the click-row-opens-modal flow of <admin-table> + <admin-edit>:
|
|
8
|
+
* when `hot-detail-route` is set, the whole row becomes a link to the
|
|
9
|
+
* configured detail URL (e.g. "/budget/:id"). When `hot-detail-route` is
|
|
10
|
+
* empty, the row renders without navigation — the caller is expected to
|
|
11
|
+
* provide their own inline action buttons via `hot-row-actions`.
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* <admin-card-table id="bankAccountsList" hot-list-url="/v1/bank_accounts/list"
|
|
15
|
+
* hot-detail-route="/bankAccount/:id"
|
|
16
|
+
* hot-primary-field="name" hot-subline-field="bankSyncAPIType"
|
|
17
|
+
* hot-empty-text="No bank accounts yet.">
|
|
18
|
+
* </admin-card-table>
|
|
19
|
+
*
|
|
20
|
+
* The component exposes a `.refreshList()` method on the rendered DOM
|
|
21
|
+
* element so callers (the paired admin-add-panel, an edit-save callback,
|
|
22
|
+
* etc.) can re-fetch without a page reload.
|
|
23
|
+
*/
|
|
24
|
+
export declare class AdminCardTable extends HotComponent {
|
|
25
|
+
/** Optional title shown in the card header. */
|
|
26
|
+
title: string;
|
|
27
|
+
/** Endpoint that returns { length, data: [...] } — usually the entity's list route. */
|
|
28
|
+
list_url: string;
|
|
29
|
+
/** JWT token to send as Authorization bearer. Empty for public endpoints. */
|
|
30
|
+
jwt: string;
|
|
31
|
+
/** Body params to POST with the list call (JSON). */
|
|
32
|
+
list_params: string;
|
|
33
|
+
/** Field name on each row used as the primary card label (default "name"). */
|
|
34
|
+
primary_field: string;
|
|
35
|
+
/** Optional second-line field rendered in muted text under the primary label. */
|
|
36
|
+
subline_field: string;
|
|
37
|
+
/** Pattern for the row's click target. ":id" interpolates row.id. Empty disables row navigation. */
|
|
38
|
+
detail_route: string;
|
|
39
|
+
/** Text shown when the list is empty. */
|
|
40
|
+
empty_text: string;
|
|
41
|
+
/** Text shown while the list is loading. */
|
|
42
|
+
loading_text: string;
|
|
43
|
+
/** Inner HTML template for the right-side action area, with ":id" placeholder. */
|
|
44
|
+
row_actions: string;
|
|
45
|
+
/** Slot name where the partner admin-add-panel injects its toggle button. */
|
|
46
|
+
add_slot: string;
|
|
47
|
+
constructor(copy: HotComponent | HotStaq, api: HotAPI);
|
|
48
|
+
onPostPlace(parentHtmlElement: HTMLElement, htmlElement: HTMLElement): HTMLElement;
|
|
49
|
+
protected fetchAndRender(): Promise<void>;
|
|
50
|
+
protected escapeHtml(s: any): string;
|
|
51
|
+
protected interpolate(template: string, row: any): string;
|
|
52
|
+
protected renderRow(row: any): string;
|
|
53
|
+
output(): string | HotComponentOutput[];
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=admin-card-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-card-table.d.ts","sourceRoot":"","sources":["../../src/components/admin-card-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAO,MAAM,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEjF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,cAAe,SAAQ,YAAY;IAE/C,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,uFAAuF;IACvF,QAAQ,EAAE,MAAM,CAAC;IACjB,6EAA6E;IAC7E,GAAG,EAAE,MAAM,CAAC;IACZ,qDAAqD;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,aAAa,EAAE,MAAM,CAAC;IACtB,iFAAiF;IACjF,aAAa,EAAE,MAAM,CAAC;IACtB,oGAAoG;IACpG,YAAY,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,kFAAkF;IAClF,WAAW,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,CAAC;gBAEJ,IAAI,EAAE,YAAY,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM;IAkBtD,WAAW,CAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,GAAG,WAAW;cAkBnE,cAAc,IAAK,OAAO,CAAC,IAAI,CAAC;IAyChD,SAAS,CAAC,UAAU,C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