web-mojo 2.5.6 → 2.5.8
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 +15 -3
- package/dist/admin.cjs.js +1 -1
- package/dist/admin.cjs.js.map +1 -1
- package/dist/admin.es.js +1 -1
- package/dist/admin.es.js.map +1 -1
- package/dist/auth.cjs.js +1 -1
- package/dist/auth.es.js +1 -1
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.es.js +1 -1
- package/dist/chunks/{version-B1TH_fkK.js → version-CBPFfIng.js} +2 -2
- package/dist/chunks/{version-B1TH_fkK.js.map → version-CBPFfIng.js.map} +1 -1
- package/dist/chunks/{version-DlfxFCfQ.js → version-D8Oyq5Pb.js} +2 -2
- package/dist/chunks/{version-DlfxFCfQ.js.map → version-D8Oyq5Pb.js.map} +1 -1
- package/dist/docit.cjs.js +1 -1
- package/dist/docit.es.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/lightbox.cjs.js +1 -1
- package/dist/lightbox.es.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
### Admin · Group Auth Config editor (`GroupView` → Auth Config)
|
|
6
|
+
|
|
7
|
+
`GroupView` gains an **Auth Config** side-nav section (under the **Detail** divider, before **Metadata**, gated by the `sys.groups` / `sys.manage_groups` permission) for editing a group's `metadata.auth_config` — the structured config that drives the django-mojo–hosted login, registration, and passkey pages. Previously this was only editable as raw JSON through the generic Metadata section.
|
|
8
|
+
|
|
9
|
+
- **`GroupAuthConfigSection`** (`src/extensions/admin/account/groups/GroupAuthConfigSection.js`) is a `View` that embeds one `FormView` with a 3-tab `tabset`:
|
|
10
|
+
- **Theme** — text inputs for `app_title`, `logo_url`, `favicon_url`, `hero_image_url`, `hero_headline`, `hero_subheadline`, `back_to_website_url`, `terms_url`, `api_base`, `success_redirect`, `custom_css_url`; a `layout` select; a `custom_css` textarea.
|
|
11
|
+
- **Login** — a multiselect for `login.methods` (password / sms / passkey / magic / google / apple).
|
|
12
|
+
- **Registration** — an `enabled` toggle, `passkey_prompt` / `identity_field` selects, a `min_age` number, a `methods` multiselect, and a fixed 6-row grid for `registration.fields` (include / required / verify per canonical field; the `password` row is locked on).
|
|
13
|
+
- **Inherit-aware.** Each field shows the group's own override if set, otherwise the resolved/inherited value fetched once from `GET /api/auth/config?group_uuid=<uuid>`; text fields show the resolved value as placeholder. Only fields changed from that baseline are saved, so untouched fields keep inheriting.
|
|
14
|
+
- **Standard CRUD.** Saves a nested `{ metadata: { auth_config: {…} } }` via `model.save()` — django deep-merges the `metadata` JSONField, so sibling keys (timezone, domain, portal, …) survive. Server validation errors surface as a toast.
|
|
15
|
+
|
|
5
16
|
### Core · Detail Views can size their own row-view modal via `ViewClass.DIALOG_OPTIONS`
|
|
6
17
|
|
|
7
18
|
Dense detail Views (`UserView`, `GroupView`, …) opened as a row-view dialog were stuck at `Modal.dialog()`'s default `size: 'lg'`. The only way to widen them was to repeat `viewDialogOptions: { size: 'xl' }` in every TablePage / TableView / ListView that opened the View — easy to forget, and the View itself (which actually knows how much room it needs) had no say.
|
|
@@ -38,12 +49,13 @@ Operators previously had no UI for the `account.WebhookSubscription` rows that l
|
|
|
38
49
|
### Admin · Phone Config page (Twilio / AWS / Mojo) + downstream API-key provisioning
|
|
39
50
|
|
|
40
51
|
- **New `system/phonehub/config` page** registered under System → Phone Hub → **Config** (icon `bi-sliders`), gated on `manage_phone_config` / `manage_groups`. Per-row Provider / Active / Test Mode badges and column filters; default sort `-modified`; default filter `is_active=true`. Per `planning/done/admin-phone-config-mojo-provider.md`.
|
|
41
|
-
- **
|
|
52
|
+
- **Read-only `PhoneConfigView` detail + three-dots context menu** (mirrors `ApiKeyView`): header with provider / active / test badges, then Configuration / provider-settings / Metadata sections. All mutations live on the context menu — Edit, Test connection, Provision API key, Delete — rather than a button bar.
|
|
53
|
+
- **Single combined create/edit form driven by `showWhen`.** Both the table Add flow and the context-menu Edit open one form whose `provider` select reveals only the matching credential block: **Twilio** (`twilio_from_number`, `twilio_account_sid`, `twilio_auth_token`), **AWS SNS** (`aws_region`, `aws_sender_id`, `aws_access_key_id`, `aws_secret_access_key`), or **Mojo Remote** (`mojo_remote_url`, `mojo_api_key`). Hidden showWhen fields are auto-stripped from `getFormData()`, so switching providers and saving never bleeds the prior provider's typed-but-unsaved secret to the server. `PhoneConfig.FORM_DIALOG_CONFIG` opens the dialog at `lg` width.
|
|
42
54
|
- **Secrets are write-only.** Password inputs render with a `••••••••` placeholder; blank-on-save is stripped client-side via `PhoneConfig.SECRET_FIELDS` so an empty input never overwrites a stored credential. Backend response graphs already exclude the encrypted blob, so GET → form-prefill never round-trips a value.
|
|
43
|
-
- **Test
|
|
55
|
+
- **Test connection** posts `{test_connection: 1}` through `Model.save` (same endpoint) and surfaces the result inline in the detail view — green banner with `message` on success, red banner with the friendly-mapped error on failure.
|
|
44
56
|
- **Provision downstream API key flow** (Mojo provider rows only, gated on `manage_groups` / `manage_group`). Tailored one-purpose dialog with fixed permissions `{send_sms: true, comms: true}`; raw token revealed once in a dismissal-protected alert with copy-to-clipboard, then never shown again. Reuses the existing `ApiKey` model and its `resp.data.data.token` one-time pattern.
|
|
45
57
|
- **Cross-link from SMS table.** Provider chip on `system/phonehub/sms` is now value-mapped (twilio=info, aws=warning, mojo=primary) and Mojo rows render as a clickable anchor that navigates to `system/phonehub/config?provider=mojo&group=<sms.group.id>`. New `error_code` column with friendly labels for `timeout` / `http_<status>` / `remote_error` / `remote_failed` / `config_error` / credential codes.
|
|
46
|
-
- **No new framework primitives.** Pure admin-extension wiring around the existing `Model`, `Collection`, `FormView` (showWhen), `TablePage`, and `Modal.show/alert/form` surfaces. New files: `src/extensions/admin/messaging/sms/PhoneConfigTablePage.js`, `src/extensions/admin/messaging/sms/PhoneConfigView.js`. `PhoneConfig` model + `PhoneConfigForms` live alongside the existing PhoneNumber / SMS wrappers in `src/extensions/admin/models/Phonehub.js`.
|
|
58
|
+
- **No new framework primitives.** Pure admin-extension wiring around the existing `Model`, `Collection`, `FormView` (showWhen), `TablePage`, `ContextMenu`, and `Modal.show/alert/form` surfaces. New files: `src/extensions/admin/messaging/sms/PhoneConfigTablePage.js`, `src/extensions/admin/messaging/sms/PhoneConfigView.js`. `PhoneConfig` model + `PhoneConfigForms` live alongside the existing PhoneNumber / SMS wrappers in `src/extensions/admin/models/Phonehub.js`.
|
|
47
59
|
|
|
48
60
|
### Admin · GroupView Identity section exposes UUID (view + copy + edit + generate)
|
|
49
61
|
|