@scalio-cloud/ui 0.96.0 → 0.98.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalio-cloud/ui",
3
- "version": "0.96.0",
3
+ "version": "0.98.0",
4
4
  "description": "Scalio Control Room design tokens, Tailwind preset, self-hosted fonts, the shared app header, sign-in layout, sidebar and page blocks",
5
5
  "license": "SEE LICENSE IN README.md",
6
6
  "private": false,
package/react/agents.js CHANGED
@@ -480,7 +480,7 @@ function AgentsPanel(props) {
480
480
  }, [load, props.refreshMs]);
481
481
 
482
482
  const offered = (data && data.roles) || [];
483
- const selectedRoles = codeRoles || offered.map((r) => r.name);
483
+ const selectedRoles = codeRoles || []; // none preselected: the admin picks the roles (no Active Directory by default)
484
484
 
485
485
  const run = async (fn, okText) => {
486
486
  setBusy(true);
package/react/audit.js CHANGED
@@ -6,6 +6,7 @@ const React = require("react");
6
6
  const h = React.createElement;
7
7
  const Icons = require("./icons");
8
8
  const { SubNav } = require("./nav");
9
+ const { trapTab } = require("./wizard");
9
10
 
10
11
  const LABELS = {
11
12
  de: {
@@ -231,9 +232,18 @@ function Dialog({ title, onClose, children, testId, closeLabel }) {
231
232
  document.addEventListener("keydown", key);
232
233
  return () => document.removeEventListener("keydown", key);
233
234
  }, [onClose]);
235
+ // Like askConfirm (dialog.js): focus goes in on open, Tab stays inside, focus returns to the trigger on close.
236
+ const panel = React.useRef(null);
237
+ React.useEffect(() => {
238
+ const before = document.activeElement;
239
+ const close = panel.current && panel.current.querySelector('[data-testid="dialog-close"]');
240
+ if (close) close.focus();
241
+ else if (panel.current) panel.current.focus();
242
+ return () => { if (before && typeof before.focus === "function" && document.contains(before)) before.focus(); };
243
+ }, []);
234
244
  return h("div", { className: "scalio-dialog-root" },
235
245
  h("div", { className: "scalio-dialog-backdrop", onClick: onClose }),
236
- h("div", { className: "scalio-dialog scalio-audit-dialog", role: "dialog", "aria-modal": "true", "aria-label": title, "data-testid": testId },
246
+ h("div", { ref: panel, tabIndex: -1, onKeyDown: (e) => { if (e.key === "Tab") trapTab(e, panel.current); }, className: "scalio-dialog scalio-audit-dialog", role: "dialog", "aria-modal": "true", "aria-label": title, "data-testid": testId },
237
247
  h("div", { className: "scalio-dialog-head" },
238
248
  h("div", { className: "scalio-dialog-title" }, title),
239
249
  h("button", { type: "button", className: "scalio-btn is-ghost scalio-btn-icon", onClick: onClose, "aria-label": closeLabel || "×", "data-testid": "dialog-close" },
package/react/mail.js CHANGED
@@ -308,7 +308,7 @@ function select(id, value, options, onChange, extra) {
308
308
  // the app's own texts, e.g. Citadel «Mit Scalio Schreiben setzt Citadel das Senderecht selbst»).
309
309
  // With scalio-platform 0.60.0 settings and the test mail answer carry from_name_applies, from_name_hint and
310
310
  // from_name_hint_de: when applies is false (e.g. Microsoft 365 sends with the mailbox's display name) the sender name
311
- // has no effect; the field is locked and the hint shown. Without these fields (older backends) nothing changes.
311
+ // has no effect; the field is locked and the hint shown, but only for the ways graph, tenant and default (never for SMTP). Without these fields (older backends) nothing changes.
312
312
  function pickNameInfo(src) {
313
313
  return { applies: src.from_name_applies !== false, hint: src.from_name_hint || "", hint_de: src.from_name_hint_de || "" };
314
314
  }
@@ -500,7 +500,9 @@ function MailTransport(props) {
500
500
  const providers = (form.providers || ["off", "smtp", "graph"]).filter((id) => L.providers[id]);
501
501
  // ADR 0090: the default from Compass or the installation (scalio-platform 0.19.0); never a secret in it
502
502
  const dflt = form.default || null;
503
- const nameInfoNow = nameInfo || (typeof form.from_name_applies === "boolean" ? pickNameInfo(form) : null);
503
+ // The lock and the hint follow the chosen way, not the stored answer: with SMTP the name always applies (free at once).
504
+ const nameWayCounts = form.provider === "graph" || form.provider === "tenant" || form.provider === "default";
505
+ const nameInfoNow = !nameWayCounts ? null : nameInfo || (typeof form.from_name_applies === "boolean" ? pickNameInfo(form) : null);
504
506
  const nameLocked = !!(nameInfoNow && !nameInfoNow.applies);
505
507
  const nameHint = nameHintText(nameInfoNow, lang);
506
508
  const defaultUsable = !!(dflt && dflt.available);