@vectoriox/iox-ui 5.132.0 → 5.133.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/composite-core/index.d.ts +19 -2
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +51 -6
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-mail-core.mjs +80 -2
- package/fesm2022/vectoriox-iox-ui-mail-core.mjs.map +1 -1
- package/mail-core/index.d.ts +127 -39
- package/package.json +1 -1
- package/src/composite-core/consent.ts +6 -2
- package/src/composite-core/shop-runtime.ts +47 -3
- package/src/composite-core/shop.ts +5 -0
- package/src/mail-core/mail-standing.ts +58 -0
- package/src/mail-core/mail-vocabulary.ts +3 -0
- package/src/mail-core/mail-wire.ts +62 -1
- package/src/mail-core/public-api.ts +4 -1
- package/styles/iox-design.css +14 -1
|
@@ -34,6 +34,8 @@ export enum MailSender {
|
|
|
34
34
|
FormDelivery = 'form-delivery',
|
|
35
35
|
/** the `sendEmail` element action — to the author's fixed address */
|
|
36
36
|
SendEmailAction = 'send-email-action',
|
|
37
|
+
/** Settings ▸ Email ▸ Send a test email — to the signed-in person's own address only (ML3-D3) */
|
|
38
|
+
TestEmail = 'test-email',
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
/** ONE table: what kind of mail each sender sends (R-ML1). Only reminders are marketing. */
|
|
@@ -45,6 +47,7 @@ export const MAIL_KIND_OF_SENDER: Readonly<Record<MailSender, MailKind>> = {
|
|
|
45
47
|
[MailSender.Reminder]: MailKind.Marketing,
|
|
46
48
|
[MailSender.FormDelivery]: MailKind.Transactional,
|
|
47
49
|
[MailSender.SendEmailAction]: MailKind.Transactional,
|
|
50
|
+
[MailSender.TestEmail]: MailKind.Transactional,
|
|
48
51
|
};
|
|
49
52
|
|
|
50
53
|
export function mailKindOf(sender: MailSender): MailKind {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { MailKind, MailRefusal, MailResultStatus, MailSenderState, MarketingPauseReason } from './mail-vocabulary';
|
|
1
|
+
import { MailKind, MailMode, MailRefusal, MailResultStatus, MailSenderState, MarketingPauseReason } from './mail-vocabulary';
|
|
2
|
+
import type { MailRoute } from './mail-route';
|
|
3
|
+
import type { MailStanding } from './mail-standing';
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* The relay's wire (iox-control-plane `src/mail/`, its `openapi.json` tag `instances`). The studio calls back with its
|
|
@@ -85,9 +87,68 @@ export interface RelayUsage {
|
|
|
85
87
|
month: RelayMonth;
|
|
86
88
|
suppressions: number;
|
|
87
89
|
marketingPaused: { at: string; reason: MarketingPauseReason | string } | null;
|
|
90
|
+
/** where the studio's owner changes its plan (the portal's studio page); absent/null = nowhere to send them */
|
|
91
|
+
upgradeUrl?: string | null;
|
|
88
92
|
}
|
|
89
93
|
|
|
90
94
|
export interface RelayResponse {
|
|
91
95
|
results: RelayResult[];
|
|
92
96
|
usage: RelayUsage;
|
|
93
97
|
}
|
|
98
|
+
|
|
99
|
+
/** The mailer row's Reply-To (ML3-D1) — absent/blank = the relay's default, the studio's owner. */
|
|
100
|
+
export const MAILER_REPLY_TO_KEY = 'replyTo';
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* What the MAILER connector reports about itself (its E3 `details`), read by Settings ▸ Email, System Health and Home
|
|
104
|
+
* (iox-mail-plan ML3). Never a key. Own mode carries `mode` alone (plus what Mailjet's check found).
|
|
105
|
+
*/
|
|
106
|
+
export interface MailerDetails {
|
|
107
|
+
mode: MailMode;
|
|
108
|
+
/** IOX mode only: `mailStandingOf(usage)` */
|
|
109
|
+
standing?: MailStanding;
|
|
110
|
+
senderState?: MailSenderState;
|
|
111
|
+
/** the transactional From — `<studio>@mail.iox.studio` */
|
|
112
|
+
from?: string | null;
|
|
113
|
+
/** the reminders' From — `<studio>@news.mail.iox.studio` */
|
|
114
|
+
marketingFrom?: string | null;
|
|
115
|
+
/** where replies go now: the row's `replyTo`, else the relay's default (the owner) */
|
|
116
|
+
replyTo?: string | null;
|
|
117
|
+
/** the row's own Reply-To, as typed — null when it uses the default */
|
|
118
|
+
replyToSet?: string | null;
|
|
119
|
+
quota?: number | null;
|
|
120
|
+
ceiling?: number | null;
|
|
121
|
+
periodStart?: string | null;
|
|
122
|
+
periodEnd?: string | null;
|
|
123
|
+
month?: RelayMonth | null;
|
|
124
|
+
suppressions?: number;
|
|
125
|
+
marketingPaused?: RelayUsage['marketingPaused'];
|
|
126
|
+
/** this studio's emails refused for good in the last seven days (the outbox's own count) */
|
|
127
|
+
notSentThisWeek?: number;
|
|
128
|
+
upgradeUrl?: string | null;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** At most this many test emails an hour, per studio (ML3-D3) — each counts against the month like any email. */
|
|
132
|
+
export const MAIL_TEST_PER_HOUR = 5;
|
|
133
|
+
|
|
134
|
+
/** What became of a test email. */
|
|
135
|
+
export enum MailTestOutcome {
|
|
136
|
+
/** handed to IOX mail's relay or the studio's own Mailjet, which took it */
|
|
137
|
+
Sent = 'sent',
|
|
138
|
+
/** stored in IOX mail's outbox — the relay could not take it now; it goes when it can */
|
|
139
|
+
Queued = 'queued',
|
|
140
|
+
/** refused: no route, the relay's reason, Mailjet's words */
|
|
141
|
+
Refused = 'refused',
|
|
142
|
+
/** this hour's test emails are used */
|
|
143
|
+
Limited = 'limited',
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** `POST admin/api/org/:orgId/connectors/mailer/test-email` — the answer Settings ▸ Email shows in place. */
|
|
147
|
+
export interface MailTestAnswer {
|
|
148
|
+
outcome: MailTestOutcome;
|
|
149
|
+
/** the signed-in person's own address — the only one a test goes to */
|
|
150
|
+
to: string;
|
|
151
|
+
route: MailRoute;
|
|
152
|
+
/** the relay's reason, or Mailjet's words — never a stack */
|
|
153
|
+
detail: string | null;
|
|
154
|
+
}
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
* @vectoriox/iox-ui/mail-core — IOX Mail's shared, FRAMEWORK-FREE vocabulary (iox-mail-plan ML2): a message's kind,
|
|
3
3
|
* who sends it, the relay's wire (`POST /instances/me/mail`, its usage) and refusals, and the ONE route rule — the
|
|
4
4
|
* studio's own active mailer wins, else IOX mail when the plan has it. The control plane (the relay), iox-cms (the
|
|
5
|
-
* transport and the MAILER connector) and the admin (Settings ▸ Email, ML3) speak it
|
|
5
|
+
* transport and the MAILER connector) and the admin (Settings ▸ Email, ML3) speak it — and ML3 adds the ONE reading
|
|
6
|
+
* of a studio's month (`mailStandingOf`: low at 80%, full, the 2× ceiling, paused, off), the connector's `MailerDetails`,
|
|
7
|
+
* the Reply-To check and the test email's answer. It imports nothing.
|
|
6
8
|
* ⚠️ Not re-exported from the main entry. Consumers wire the usual trio — ng-package raw-ts assets, jest
|
|
7
9
|
* moduleNameMapper, tsconfig paths — or `nest start` dies with ERR_REQUIRE_ESM.
|
|
8
10
|
*/
|
|
9
11
|
export * from './mail-vocabulary';
|
|
10
12
|
export * from './mail-wire';
|
|
11
13
|
export * from './mail-route';
|
|
14
|
+
export * from './mail-standing';
|
package/styles/iox-design.css
CHANGED
|
@@ -458,6 +458,16 @@ dialog[data-iox-dialog] {
|
|
|
458
458
|
overscroll-behavior: contain;
|
|
459
459
|
}
|
|
460
460
|
|
|
461
|
+
/* iox-ui#95: a dialog that shows its ✕ keeps room for it. The ✕ sits 10px in from the top-end corner (28px on the site,
|
|
462
|
+
26px on the canvas), and nothing else knew it was there — the consent banner's Reject and its heading ran under it.
|
|
463
|
+
The close side's padding is at least 48px (10 + 28 + a 10px gap), never less than the look's own; logical, so a
|
|
464
|
+
Hebrew dialog keeps the room on its left. A dialog with no ✕ (a navigation drawer closes from its own button) is
|
|
465
|
+
untouched. The engine's <dialog> and the canvas twin's surface, one rule. */
|
|
466
|
+
dialog[data-iox-dialog]:has(> .iox-dialog-close),
|
|
467
|
+
.dialog-surface:has(> .dialog-close) {
|
|
468
|
+
padding-inline-end: max(var(--iox-dialog-pad, 0px), 48px);
|
|
469
|
+
}
|
|
470
|
+
|
|
461
471
|
/* A navigation's link lists (board 1): no underline at rest — the current page's link is the one
|
|
462
472
|
underlined (the link's `current` state, link-current-decoration). Keyed on the list's ROLE, so a
|
|
463
473
|
composed or adopted header and its drawer read it and no Link holds a literal over its element style.
|
|
@@ -1577,7 +1587,10 @@ html:has(.iox-bar-reserve) .iox-toasts[data-iox-edge='bottom'] { bottom: calc(16
|
|
|
1577
1587
|
/* An empty bag: no count on the bag button; the drawer shows its "empty" words and nothing else of the bag. */
|
|
1578
1588
|
.iox-role-shop-cart-button[data-iox-cart-empty] .iox-role-shop-cart-count { display: none !important; }
|
|
1579
1589
|
.iox-role-shop-cart-drawer[data-iox-cart-empty] :is(.iox-role-shop-cart-lines, .iox-role-shop-cart-summary, .iox-role-shop-cart-vat-note,
|
|
1580
|
-
.iox-role-shop-
|
|
1590
|
+
.iox-role-shop-cart-shipping-note) { display: none !important; }
|
|
1591
|
+
/* …and no Check out — unless this browser holds an unpaid order (client-engine#23): then Check out reads "Continue to
|
|
1592
|
+
payment" and goes back to the order (the shop runtime swaps its words). */
|
|
1593
|
+
.iox-role-shop-cart-drawer[data-iox-cart-empty]:not([data-iox-cart-waiting]) .iox-role-shop-checkout { display: none !important; }
|
|
1581
1594
|
.iox-role-shop-cart-drawer:not([data-iox-cart-empty]) .iox-role-shop-cart-empty { display: none !important; }
|
|
1582
1595
|
/* The bag button anchors its count to its corner (the count is positioned by its own node). */
|
|
1583
1596
|
.iox-role-shop-cart-count { pointer-events: none; }
|