@jini-ai/admin 0.6.17 → 0.6.22
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.22
|
|
4
|
+
|
|
5
|
+
- Form submission detail shows a failed email notification and the field errors of an imported submission that did not pass the form checks. `FormSubmission` gains optional `notificationDelivery` and `validation`.
|
|
6
|
+
|
|
3
7
|
## 0.6.17
|
|
4
8
|
|
|
5
9
|
### Patch Changes
|
|
@@ -151,7 +155,7 @@
|
|
|
151
155
|
- Shell copy is host-neutral and public APIs use object argument contracts; theme/process handoffs are archived.
|
|
152
156
|
- Distribution includes runtime output, release documentation and required assets only. Process records and per-job neutrality checks are no longer part of the package surface.
|
|
153
157
|
|
|
154
|
-
##
|
|
158
|
+
## 0.6.19
|
|
155
159
|
|
|
156
160
|
- Add portable Forms admin screens, HTTP/memory adapters and core-port conformance under ./forms\*.
|
|
157
161
|
- Add composable comments admin queue/settings module with HTTP and memory adapters and API conformance.
|
|
@@ -107,6 +107,18 @@ export interface AdminFormDefinition {
|
|
|
107
107
|
readonly html?: string | undefined;
|
|
108
108
|
}
|
|
109
109
|
export interface AdminFormSubmission {
|
|
110
|
+
/** Optional host notification summary, with no recipient/provider details. */
|
|
111
|
+
readonly notificationDelivery?: {
|
|
112
|
+
readonly failed: number;
|
|
113
|
+
readonly pending: number;
|
|
114
|
+
};
|
|
115
|
+
readonly validation?: {
|
|
116
|
+
readonly status: "invalid";
|
|
117
|
+
readonly fieldErrors: readonly {
|
|
118
|
+
readonly field: string;
|
|
119
|
+
readonly reason: string;
|
|
120
|
+
}[];
|
|
121
|
+
};
|
|
110
122
|
readonly id: string;
|
|
111
123
|
readonly formDefinitionId: string;
|
|
112
124
|
/** Keyed by the definition's field ids at submission time. */
|
|
@@ -22,7 +22,7 @@ export function FormSubmissionDetail({ formId, submissionId, onBack, onDeleted,
|
|
|
22
22
|
// button sat right on top of the table and Delete sat right underneath it. Same
|
|
23
23
|
// flex-column-plus-gap idiom `.field-group` already uses elsewhere for vertical rhythm,
|
|
24
24
|
// rather than one-off margins on each button.
|
|
25
|
-
_jsxs("div", { className: "form-submission-detail", children: [_jsxs("button", { type: "button", className: "btn-secondary", onClick: onBack, "aria-label": t("Back to submissions"), ...agentHandle({ handle: "form-submission-back" }, { role: "link", label: "Back to this form's list of submissions" }), children: ["\u2190 ", t("Back")] }), error ? _jsx("div", { className: "notice error", children: error }) : null, _jsx("div", { className: "table-scroll", children: _jsx("table", { className: "list-table", children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("th", { children: t("Submitted at") }), _jsx("td", { children: _jsx(FormSubmissionDate, { date: formatDate({ iso: submission.submittedAt }) }) })] }), _jsxs("tr", { children: [_jsx("th", { children: t("Source IP") }), _jsx("td", { children: submission.sourceIp })] }), formSubmissionRows({ data: submission.data, answerColumns }, { unknownFieldLabel: t("Unknown field") }).map(({ key, label, value, file }) => {
|
|
25
|
+
_jsxs("div", { className: "form-submission-detail", children: [_jsxs("button", { type: "button", className: "btn-secondary", onClick: onBack, "aria-label": t("Back to submissions"), ...agentHandle({ handle: "form-submission-back" }, { role: "link", label: "Back to this form's list of submissions" }), children: ["\u2190 ", t("Back")] }), error ? _jsx("div", { className: "notice error", children: error }) : null, submission.notificationDelivery && submission.notificationDelivery.failed > 0 ? _jsxs("div", { className: "notice error", role: "alert", children: [t("Email notification failed. The submission is saved here. Check the email provider settings before sending a new notification."), _jsxs("p", { children: [t("Details: FORM_NOTIFICATION_FAILED"), " (", submission.notificationDelivery.failed, ")"] })] }) : null, submission.validation?.status === "invalid" ? _jsxs("div", { className: "notice error", role: "alert", children: [_jsx("p", { children: t("Imported for review: this submission did not pass the form checks.") }), _jsx("ul", { children: submission.validation.fieldErrors.map(({ field, reason }, index) => _jsxs("li", { children: [field, ": ", reason] }, `${field}-${index}`)) })] }) : null, _jsx("div", { className: "table-scroll", children: _jsx("table", { className: "list-table", children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("th", { children: t("Submitted at") }), _jsx("td", { children: _jsx(FormSubmissionDate, { date: formatDate({ iso: submission.submittedAt }) }) })] }), _jsxs("tr", { children: [_jsx("th", { children: t("Source IP") }), _jsx("td", { children: submission.sourceIp })] }), formSubmissionRows({ data: submission.data, answerColumns }, { unknownFieldLabel: t("Unknown field") }).map(({ key, label, value, file }) => {
|
|
26
26
|
const href = file ? fileUrl(file) : null;
|
|
27
27
|
return (_jsxs("tr", { children: [_jsx("th", { className: "jini-submission-field-label", children: label }), _jsx("td", { children: href && file ? _jsx("a", { href: href, download: file.filename, ...agentHandle({ handle: `form-submission-file-${key}` }, { role: "link", label: `Download the uploaded file ${file.filename}` }), children: value }) : value })] }, key));
|
|
28
28
|
})] }) }) }), _jsx("button", { type: "button", className: "btn-danger", disabled: deleting, onClick: requestDelete, ...agentHandle({ handle: "form-submission-delete" }, {
|
|
@@ -156,6 +156,17 @@ export declare function useSubmissionsView({ controller }: {
|
|
|
156
156
|
view: () => void;
|
|
157
157
|
status?: "active" | "trash";
|
|
158
158
|
id: string;
|
|
159
|
+
notificationDelivery?: {
|
|
160
|
+
readonly failed: number;
|
|
161
|
+
readonly pending: number;
|
|
162
|
+
};
|
|
163
|
+
validation?: {
|
|
164
|
+
readonly status: "invalid";
|
|
165
|
+
readonly fieldErrors: readonly {
|
|
166
|
+
readonly field: string;
|
|
167
|
+
readonly reason: string;
|
|
168
|
+
}[];
|
|
169
|
+
};
|
|
159
170
|
formDefinitionId: string;
|
|
160
171
|
sourceIp: string;
|
|
161
172
|
submittedAt: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/admin",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.22",
|
|
4
4
|
"description": "Composable admin surface for Jini-hosted products: framework-free contracts, panel registry, and route model in `/core`; React shell and panels in `/react`. Import only the layers you need.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -475,12 +475,12 @@
|
|
|
475
475
|
"react": "^19.2.0",
|
|
476
476
|
"react-dom": "^19.2.0",
|
|
477
477
|
"@testing-library/user-event": "^14.6.1",
|
|
478
|
-
"@jini-ai/agentic": "^0.6.
|
|
479
|
-
"@jini-ai/ui
|
|
480
|
-
"@jini-ai/agent-plugins": "^0.6.
|
|
481
|
-
"@jini-ai/cms": "^0.6.
|
|
482
|
-
"@jini-ai/
|
|
483
|
-
"@jini-ai/
|
|
478
|
+
"@jini-ai/agentic": "^0.6.19",
|
|
479
|
+
"@jini-ai/ui": "^0.6.22",
|
|
480
|
+
"@jini-ai/agent-plugins": "^0.6.22",
|
|
481
|
+
"@jini-ai/cms": "^0.6.22",
|
|
482
|
+
"@jini-ai/ui-kit": "^0.6.19",
|
|
483
|
+
"@jini-ai/core": "^0.6.22"
|
|
484
484
|
},
|
|
485
485
|
"typesVersions": {
|
|
486
486
|
"*": {
|