@webx-ui/module-inbox 0.6.8 → 0.7.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/dist/FormField.d.ts +18 -0
- package/dist/FormNotifications.d.ts +8 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1788 -1509
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +50 -1
- package/package.json +3 -3
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.wx-inbox-field-form[data-v-a3de6c60]{display:flex;flex-direction:column;gap:var(--wx-space-12)}.wx-inbox-field-form__row[data-v-a3de6c60]{display:flex;flex-wrap:wrap;gap:var(--wx-space-12)}.wx-inbox-field-form__row[data-v-a3de6c60]>*{flex:1 1 200px;min-width:0}.wx-inbox-field-form__row[data-v-a3de6c60]:empty{display:none}.wx-inbox-field-form__checks[data-v-a3de6c60]{display:flex;flex-wrap:wrap;gap:var(--wx-space-16)}.wx-inbox-choices[data-v-a3de6c60]{display:flex;flex-direction:column;gap:var(--wx-space-8);align-items:flex-start}.wx-inbox-choices__row[data-v-a3de6c60]{display:flex;align-items:center;gap:var(--wx-space-8);width:100%}.wx-inbox-choices__row[data-v-a3de6c60]>:first-child{flex:0 1 180px;min-width:0}.wx-inbox-choices__row[data-v-a3de6c60]>:nth-child(2){flex:1 1 auto;min-width:0}.wx-inbox-field[data-v-db38e823]{display:flex;flex-direction:column;gap:var(--wx-space-2);flex:1 1 auto;min-width:0}.wx-inbox-field__name[data-v-db38e823]{display:flex;align-items:center;gap:var(--wx-space-6);min-width:0}.wx-inbox-embed[data-v-7f9788ed]{display:flex;flex-direction:column;gap:var(--wx-space-16)}.wx-inbox-embed__snippet[data-v-7f9788ed]{display:flex;align-items:center;gap:var(--wx-space-8);margin-top:var(--wx-space-12);padding:var(--wx-space-10) var(--wx-space-12);border:1px solid var(--wx-border-default);border-radius:var(--wx-radius-md);background:var(--wx-bg-subtle)}.wx-inbox-embed__snippet code[data-v-7f9788ed]{flex:1 1 auto;min-width:0;overflow-x:auto;white-space:pre;font-family:var(--wx-font-family-mono);font-size:var(--wx-font-size-sm)}.wx-inbox-general[data-v-1932aefe]{display:flex;flex-direction:column;gap:var(--wx-space-16)}.wx-inbox-recipients[data-v-
|
|
1
|
+
.wx-inbox-field-form[data-v-a3de6c60]{display:flex;flex-direction:column;gap:var(--wx-space-12)}.wx-inbox-field-form__row[data-v-a3de6c60]{display:flex;flex-wrap:wrap;gap:var(--wx-space-12)}.wx-inbox-field-form__row[data-v-a3de6c60]>*{flex:1 1 200px;min-width:0}.wx-inbox-field-form__row[data-v-a3de6c60]:empty{display:none}.wx-inbox-field-form__checks[data-v-a3de6c60]{display:flex;flex-wrap:wrap;gap:var(--wx-space-16)}.wx-inbox-choices[data-v-a3de6c60]{display:flex;flex-direction:column;gap:var(--wx-space-8);align-items:flex-start}.wx-inbox-choices__row[data-v-a3de6c60]{display:flex;align-items:center;gap:var(--wx-space-8);width:100%}.wx-inbox-choices__row[data-v-a3de6c60]>:first-child{flex:0 1 180px;min-width:0}.wx-inbox-choices__row[data-v-a3de6c60]>:nth-child(2){flex:1 1 auto;min-width:0}.wx-inbox-field[data-v-db38e823]{display:flex;flex-direction:column;gap:var(--wx-space-2);flex:1 1 auto;min-width:0}.wx-inbox-field__name[data-v-db38e823]{display:flex;align-items:center;gap:var(--wx-space-6);min-width:0}.wx-inbox-embed[data-v-7f9788ed]{display:flex;flex-direction:column;gap:var(--wx-space-16)}.wx-inbox-embed__snippet[data-v-7f9788ed]{display:flex;align-items:center;gap:var(--wx-space-8);margin-top:var(--wx-space-12);padding:var(--wx-space-10) var(--wx-space-12);border:1px solid var(--wx-border-default);border-radius:var(--wx-radius-md);background:var(--wx-bg-subtle)}.wx-inbox-embed__snippet code[data-v-7f9788ed]{flex:1 1 auto;min-width:0;overflow-x:auto;white-space:pre;font-family:var(--wx-font-family-mono);font-size:var(--wx-font-size-sm)}.wx-inbox-general[data-v-1932aefe]{display:flex;flex-direction:column;gap:var(--wx-space-16)}.wx-inbox-notifications[data-v-ee478a8e]{display:flex;flex-direction:column;gap:var(--wx-gap, var(--wx-space-16))}.wx-inbox-recipients[data-v-ee478a8e]{display:flex;flex-direction:column;gap:var(--wx-space-8);margin-block:var(--wx-space-12);max-width:var(--wx-field-max-width, 640px)}.wx-inbox-channels[data-v-ee478a8e]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--wx-space-8);margin-block-start:var(--wx-space-12);max-width:var(--wx-field-max-width, 640px)}.wx-inbox-channels[data-v-ee478a8e]>:first-child{align-self:stretch}.wx-inbox-recipients__item[data-v-ee478a8e]{display:flex;flex-direction:column;gap:var(--wx-space-4)}.wx-inbox-recipients__row[data-v-ee478a8e]{display:flex;align-items:center;gap:var(--wx-space-8)}.wx-inbox-recipients__row[data-v-ee478a8e]>:first-child{flex:1 1 auto;min-width:0}.wx-inbox-editor[data-v-4e3d1a4c]{display:flex;flex-direction:column;gap:var(--wx-gap, var(--wx-space-16))}.wx-inbox-editor__head[data-v-4e3d1a4c] .wx-screen-head__subtitle{font-family:var(--wx-font-family-mono)}.wx-inbox-editor__tabs[data-v-4e3d1a4c]{flex:1 1 auto}.wx-inbox-form-field[data-v-91f60441]{display:flex;flex-direction:column;gap:var(--wx-space-8);min-width:0}.wx-inbox-form-field__chosen[data-v-91f60441]{display:flex;align-items:center;gap:var(--wx-space-8);min-width:0;padding:var(--wx-space-6) var(--wx-space-8) var(--wx-space-6) var(--wx-space-12);border:1px solid var(--wx-border-default);border-radius:var(--wx-radius-control);background:var(--wx-bg-surface)}.wx-inbox-form-field__text[data-v-91f60441]{display:flex;flex-direction:column;flex:1 1 auto;min-width:0}.wx-inbox-form-field__title[data-v-91f60441],.wx-inbox-form-field__slug[data-v-91f60441]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wx-inbox-form-field__slug[data-v-91f60441],.wx-inbox-form-field__empty[data-v-91f60441]{font-size:var(--wx-font-size-sm);color:var(--wx-text-muted)}.wx-inbox-form-field__empty[data-v-91f60441]{margin:0}.wx-inbox-form-field[data-v-91f60441] .wx-badge{flex:none}.wx-inbox-create[data-v-55fb40d8],.wx-inbox-by-hand[data-v-72006299]{display:flex;flex-direction:column;gap:var(--wx-space-12)}.wx-submissions[data-v-b23e9ac8]{display:flex;flex-direction:column;gap:var(--wx-gap, var(--wx-space-16));padding:var(--wx-gap, var(--wx-space-16));min-width:0}.wx-submissions__head[data-v-b23e9ac8] .wx-screen-head__subtitle{font-family:var(--wx-font-family-mono)}.wx-submissions__views[data-v-b23e9ac8] .wx-tabs__panels{padding-top:var(--wx-space-8)}.wx-submissions__mass[data-v-b23e9ac8]{display:flex;align-items:center;gap:var(--wx-space-8);flex-wrap:wrap}.wx-submissions[data-v-b23e9ac8] .wx-submissions__when{white-space:nowrap}.wx-submissions__state[data-v-b23e9ac8]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--wx-space-6);min-width:0}.wx-submissions[data-v-b23e9ac8] .is-unread{font-weight:var(--wx-font-weight-medium)}.wx-submissions[data-v-b23e9ac8] .is-unread td:first-child{box-shadow:inset 2px 0 0 0 var(--wx-color-primary)}.wx-inbox>.wx-card__body{display:flex;flex-direction:column;overflow:clip;border-radius:inherit}.wx-inbox__loading{padding:var(--wx-space-16)}.wx-inbox__forms{padding:var(--wx-space-8) var(--wx-space-12)}.wx-inbox__forms.is-panel{padding:0}.wx-inbox__forms.is-plain .wx-sortable-list__row{padding-inline:var(--wx-space-8)}.wx-inbox__forms.is-plain .wx-sortable-list__head{margin-block-end:var(--wx-space-6);padding-inline:var(--wx-space-8)}.wx-inbox-form{display:flex;flex-direction:column;gap:var(--wx-space-2);align-items:flex-start;flex:1 1 auto;min-width:0;padding:0;border:0;background:none;font:inherit;color:inherit;text-align:start;cursor:pointer}.wx-inbox-form__name{display:flex;align-items:center;gap:var(--wx-space-6);min-width:0;max-width:100%}.wx-inbox-form.is-off .wx-inbox-form__name>.wx-text{text-decoration:line-through}.wx-inbox__forms .wx-sortable-list__row:has(.wx-inbox-form.is-current){background:var(--wx-bg-subtle);border-radius:var(--wx-radius-sm)}.wx-inbox-form.is-current{color:var(--wx-color-primary)}.wx-inbox-form__silent{flex:none;color:var(--wx-color-warning)}.wx-inbox-form__count{flex:0 0 auto}.wx-inbox-status-form[data-v-b520b53b]{display:flex;flex-direction:column;gap:var(--wx-space-12)}.wx-inbox-status-form__checks[data-v-b520b53b]{display:flex;flex-wrap:wrap;gap:var(--wx-space-16)}.wx-inbox-statuses[data-v-ba548af9]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--wx-space-12)}.wx-inbox-statuses>.wx-list-screen[data-v-ba548af9]{align-self:stretch}.wx-inbox-status[data-v-ba548af9]{display:flex;align-items:center;gap:var(--wx-space-8);flex:1 1 auto;min-width:0;flex-wrap:wrap}.wx-submission[data-v-89eacc36]{display:flex;flex-direction:column;gap:var(--wx-gap, var(--wx-space-16));min-width:0;container-type:inline-size}.wx-submission__panes[data-v-89eacc36],.wx-submission__main[data-v-89eacc36],.wx-submission__aside[data-v-89eacc36]{display:flex;flex-direction:column;gap:var(--wx-gap, var(--wx-space-16));min-width:0}@container (min-width: 900px){.wx-submission__panes[data-v-89eacc36]{flex-direction:row;align-items:flex-start}.wx-submission__main[data-v-89eacc36]{flex:1 1 auto}.wx-submission__aside[data-v-89eacc36]{flex:0 0 320px;max-width:320px}}.wx-submission__value[data-v-89eacc36]{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.wx-submission__detail[data-v-89eacc36]{overflow-wrap:anywhere}.wx-submission__recipients[data-v-89eacc36]{display:flex;flex-direction:column;gap:var(--wx-space-4);margin:0;padding:0;list-style:none}.wx-submission__recipients li[data-v-89eacc36]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--wx-space-8);overflow-wrap:anywhere}.wx-submission__recipients li.wx-submission__channel[data-v-89eacc36]{flex-wrap:nowrap;justify-content:space-between;align-items:flex-start}.wx-submission__channel-text[data-v-89eacc36]{display:flex;flex-direction:column;min-width:0}.wx-submission__event[data-v-89eacc36]{margin:0}.wx-submission__by[data-v-89eacc36]{display:flex;align-items:baseline;gap:var(--wx-space-6);flex-wrap:wrap;margin:0}.wx-submission__files[data-v-89eacc36]{display:flex;flex-wrap:wrap;gap:var(--wx-space-8)}.wx-submission__fields[data-v-89eacc36]{display:flex;flex-direction:column;gap:var(--wx-space-12)}.wx-submission__field[data-v-89eacc36]{display:flex;flex-direction:column;gap:var(--wx-space-4)}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LocalizedValue } from '@webx-ui/core';
|
|
2
|
+
import { RelationCandidate } from '@webx-ui/module-admin';
|
|
2
3
|
/** The kinds of question a form can ask (§4). Mirrors `WebxUi\Inbox\Fields\FieldType`. */
|
|
3
4
|
export declare const FIELD_TYPES: readonly ["text", "email", "tel", "textarea", "select", "radio", "checkbox", "consent", "date", "file", "hidden"];
|
|
4
5
|
export type FieldType = (typeof FIELD_TYPES)[number];
|
|
@@ -84,6 +85,8 @@ export interface FormOptions {
|
|
|
84
85
|
redirect?: string;
|
|
85
86
|
recipients?: Recipient[];
|
|
86
87
|
email_field?: string;
|
|
88
|
+
/** Channels of the notifications module a submission from the site also goes to (NOTIFICATIONS §15.2). */
|
|
89
|
+
notify_channels?: number[];
|
|
87
90
|
'antispam.honeypot'?: boolean;
|
|
88
91
|
'antispam.min_seconds'?: number;
|
|
89
92
|
'antispam.throttle'?: number;
|
|
@@ -101,8 +104,12 @@ export interface InboxForm {
|
|
|
101
104
|
* only because a server older than this field does not send it.
|
|
102
105
|
*/
|
|
103
106
|
recipients?: RecipientState[];
|
|
104
|
-
/** False when a submission would be written to nobody at all. */
|
|
107
|
+
/** False when a submission would be written to nobody at all — no letter and no channel. */
|
|
105
108
|
notifies?: boolean;
|
|
109
|
+
/** Whether `webx-ui/module-notifications` is installed: "Notify through" shows only then. */
|
|
110
|
+
notifications?: boolean;
|
|
111
|
+
/** The channels `options.notify_channels` holds, as saved, each with whether it sends. */
|
|
112
|
+
channels?: FormChannel[];
|
|
106
113
|
position: number;
|
|
107
114
|
/** Only where the query counted them — null on a form loaded on its own. */
|
|
108
115
|
submissions_count: number | null;
|
|
@@ -119,6 +126,17 @@ export interface InboxForm {
|
|
|
119
126
|
created_at: string | null;
|
|
120
127
|
updated_at: string | null;
|
|
121
128
|
}
|
|
129
|
+
/** A channel a form notifies through, as the server read it. */
|
|
130
|
+
export interface FormChannel {
|
|
131
|
+
id: number;
|
|
132
|
+
/** Null for a channel deleted for good. */
|
|
133
|
+
name: string | null;
|
|
134
|
+
provider: string | null;
|
|
135
|
+
enabled: boolean;
|
|
136
|
+
deleted: boolean;
|
|
137
|
+
/** Switched on, not in the bin, and for this event or any. */
|
|
138
|
+
sends: boolean;
|
|
139
|
+
}
|
|
122
140
|
export type CaptchaProvider = 'recaptcha' | 'turnstile';
|
|
123
141
|
/** How a provider runs on this site, and whether both halves of its keys are there. */
|
|
124
142
|
export interface CaptchaSite {
|
|
@@ -266,6 +284,25 @@ export interface SubmissionNotification {
|
|
|
266
284
|
at: string;
|
|
267
285
|
}[];
|
|
268
286
|
}
|
|
287
|
+
/** One row of the notifications module's log about a submission (NOTIFICATIONS §15.3). */
|
|
288
|
+
export interface ChannelDelivery {
|
|
289
|
+
id: number;
|
|
290
|
+
channel_id: number | null;
|
|
291
|
+
channel: string;
|
|
292
|
+
provider: string;
|
|
293
|
+
recipient: string;
|
|
294
|
+
recipient_label: string | null;
|
|
295
|
+
status: 'queued' | 'sent' | 'failed' | 'skipped';
|
|
296
|
+
/** The status and the reason in the notifications module's own words. */
|
|
297
|
+
status_label: string;
|
|
298
|
+
reason: string | null;
|
|
299
|
+
reason_label: string | null;
|
|
300
|
+
error: string | null;
|
|
301
|
+
attempts: number;
|
|
302
|
+
retryable: boolean;
|
|
303
|
+
created_at: string | null;
|
|
304
|
+
sent_at: string | null;
|
|
305
|
+
}
|
|
269
306
|
/** What the intake saw around the submission: the page, the language, the campaign. */
|
|
270
307
|
export interface SubmissionMeta {
|
|
271
308
|
ip?: string;
|
|
@@ -297,6 +334,11 @@ export interface InboxSubmission {
|
|
|
297
334
|
notify_error: string | null;
|
|
298
335
|
/** The same two read as a state, with how each letter went. */
|
|
299
336
|
notification: SubmissionNotification;
|
|
337
|
+
/**
|
|
338
|
+
* What the form's channels made of it, a row per recipient, newest first; null on a site
|
|
339
|
+
* without the notifications module, absent from a server older than it.
|
|
340
|
+
*/
|
|
341
|
+
channels?: ChannelDelivery[] | null;
|
|
300
342
|
/** The neighbours in the list this was opened from, so the arrows walk the same pile. */
|
|
301
343
|
previous_id: number | null;
|
|
302
344
|
next_id: number | null;
|
|
@@ -328,3 +370,10 @@ export interface SubmissionMassInput {
|
|
|
328
370
|
action: 'status' | 'read' | 'unread' | 'delete';
|
|
329
371
|
status_id?: number;
|
|
330
372
|
}
|
|
373
|
+
/**
|
|
374
|
+
* A form as the panel's relation target `inbox-form` describes it, with the slug under its own
|
|
375
|
+
* name — what `wx-inbox-form` keeps (`FormTarget::row()` on the server).
|
|
376
|
+
*/
|
|
377
|
+
export interface FormCandidate extends RelationCandidate {
|
|
378
|
+
slug?: string;
|
|
379
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webx-ui/module-inbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Forms and submissions for the WebX UI admin panel: the forms of a site, their fields, their statuses, and what has come in through them.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"vue-router": "^4.5.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@webx-ui/core": "^0.
|
|
48
|
-
"@webx-ui/module-admin": "^0.
|
|
47
|
+
"@webx-ui/core": "^0.42.0",
|
|
48
|
+
"@webx-ui/module-admin": "^0.29.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^24.10.1",
|