domma-cms 1.6.59 → 1.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.
Files changed (143) hide show
  1. package/CHANGELOG.md +4344 -0
  2. package/README.md +1 -1
  3. package/admin/dist/domma/domma-tools.css +3 -3
  4. package/admin/dist/domma/domma-tools.min.js +3 -3
  5. package/admin/js/api.js +1 -1
  6. package/admin/js/app.js +2 -2
  7. package/admin/js/lib/draft-owner.js +1 -0
  8. package/admin/js/lib/effect-defs.js +1 -1
  9. package/admin/js/lib/effects-builder.js +2 -2
  10. package/admin/js/lib/page-editor-reference.js +5 -5
  11. package/admin/js/lib/shortcode-tags.js +1 -1
  12. package/admin/js/templates/docs/usage-shortcodes.html +39 -0
  13. package/admin/js/views/user-editor.js +1 -1
  14. package/docs/DommaFeatures.md +3005 -0
  15. package/docs/MultiTenant.md +176 -0
  16. package/docs/api-reference.md +1667 -0
  17. package/docs/cache.md +96 -0
  18. package/docs/configuration.md +1811 -0
  19. package/docs/editions-and-licences.md +190 -0
  20. package/docs/getting-started.md +201 -0
  21. package/docs/guides/form-triggers.md +260 -0
  22. package/docs/guides/mongodb-storage-adapter.md +282 -0
  23. package/docs/guides/multi-page-forms.md +121 -0
  24. package/docs/images/scribe-composer.png +0 -0
  25. package/docs/markdown-shortcodes.md +1738 -0
  26. package/docs/pentest-report-2026-04-03.md +181 -0
  27. package/docs/plans/2026-02-28-admin-topbar-login-forms.md +349 -0
  28. package/docs/plans/2026-02-28-domma-ui-polish.md +286 -0
  29. package/docs/plans/2026-02-28-reset-seed-fresh-commands.md +520 -0
  30. package/docs/plans/2026-03-02-cookie-consent-design.md +86 -0
  31. package/docs/plans/2026-03-02-cookie-consent-plugin.md +453 -0
  32. package/docs/plans/2026-03-02-tooltip-sweep-and-back-to-top-plugin-design.md +126 -0
  33. package/docs/plans/2026-03-02-tooltip-sweep-back-to-top.md +427 -0
  34. package/docs/plans/2026-03-05-cookie-consent-btt-core.md +115 -0
  35. package/docs/plans/2026-03-05-custom-css-migrate-to-core-design.md +35 -0
  36. package/docs/plans/2026-03-05-custom-css-migrate-to-core.md +352 -0
  37. package/docs/plans/2026-03-05-scribe-script-shortcode.md +373 -0
  38. package/docs/plans/2026-03-05-user-types-design.md +139 -0
  39. package/docs/plans/2026-03-05-user-types-implementation.md +1035 -0
  40. package/docs/plans/2026-03-09-page-editor-view-cta-inserts-design.md +78 -0
  41. package/docs/plans/2026-03-09-page-editor-view-cta-inserts.md +388 -0
  42. package/docs/plans/2026-03-09-pro-documentation-design.md +80 -0
  43. package/docs/plans/2026-03-09-pro-documentation.md +1017 -0
  44. package/docs/plans/2026-06-10-core-project-design.md +240 -0
  45. package/docs/plugin-development.md +827 -0
  46. package/docs/recruitment-recipe.md +501 -0
  47. package/docs/scaffolding.md +312 -0
  48. package/docs/screenshots/calculator-floating.png +0 -0
  49. package/docs/screenshots/calculator-standard.png +0 -0
  50. package/docs/screenshots/email-settings.png +0 -0
  51. package/docs/screenshots/messages-count.png +0 -0
  52. package/docs/structure/user-types.md +107 -0
  53. package/docs/superpowers/plans/2026-05-25-admin-sidebar-via-menus.md +1112 -0
  54. package/docs/superpowers/plans/2026-06-08-navbar-mobile-drawer-and-menu-enrichment.md +1161 -0
  55. package/docs/superpowers/plans/2026-06-25-domma-docs-project.md +695 -0
  56. package/docs/superpowers/plans/2026-06-26-surveys-HANDOFF.md +68 -0
  57. package/docs/superpowers/plans/2026-06-26-surveys-pro-plugin.md +1902 -0
  58. package/docs/superpowers/plans/2026-08-19-collection-context-sort-export.md +1577 -0
  59. package/docs/superpowers/plans/2026-10-09-content-api.md +1192 -0
  60. package/docs/superpowers/specs/2026-03-12-form-followup-actions-design.md +152 -0
  61. package/docs/superpowers/specs/2026-03-12-page-editor-form-insert-and-per-page-theme-design.md +115 -0
  62. package/docs/superpowers/specs/2026-03-17-nav-hidden-items-design.md +85 -0
  63. package/docs/superpowers/specs/2026-03-19-accordion-insert-design.md +175 -0
  64. package/docs/superpowers/specs/2026-03-25-static-block-shortcode-design.md +153 -0
  65. package/docs/superpowers/specs/2026-03-25-text-shortcode-design.md +168 -0
  66. package/docs/superpowers/specs/2026-04-05-card-builder-design.md +315 -0
  67. package/docs/superpowers/specs/2026-04-06-insert-builders-design.md +278 -0
  68. package/docs/superpowers/specs/2026-04-06-layouts-design.md +226 -0
  69. package/docs/superpowers/specs/2026-04-07-blog-plugin-design.md +300 -0
  70. package/docs/superpowers/specs/2026-04-07-calendar-plugin-design.md +538 -0
  71. package/docs/superpowers/specs/2026-04-17-components-area-design.md +368 -0
  72. package/docs/superpowers/specs/2026-05-02-effects-slideover-overhaul-design.md +193 -0
  73. package/docs/superpowers/specs/2026-05-06-dashboard-rebuild-design.md +257 -0
  74. package/docs/superpowers/specs/2026-05-24-menus-design.md +466 -0
  75. package/docs/superpowers/specs/2026-05-25-admin-sidebar-via-menus-design.md +358 -0
  76. package/docs/superpowers/specs/2026-05-25-projects-design.md +380 -0
  77. package/docs/superpowers/specs/2026-06-08-navbar-mobile-drawer-and-menu-enrichment-design.md +292 -0
  78. package/docs/superpowers/specs/2026-06-08-sidebar-tools-plugins-folders-design.md +59 -0
  79. package/docs/superpowers/specs/2026-06-25-domma-docs-project-design.md +192 -0
  80. package/docs/superpowers/specs/2026-06-26-domma-charts-upstream-proposal.md +44 -0
  81. package/docs/superpowers/specs/2026-06-26-manager-scheduler-upstream-proposal.md +46 -0
  82. package/docs/superpowers/specs/2026-06-26-surveys-pro-plugin-design.md +206 -0
  83. package/docs/superpowers/specs/2026-07-02-shortcode-context-menu-design.md +96 -0
  84. package/docs/superpowers/specs/2026-08-19-collection-context-sort-export-design.md +330 -0
  85. package/docs/superpowers/specs/2026-09-22-dcms-marketplace-design.md +1150 -0
  86. package/docs/superpowers/specs/2026-10-09-content-api-design.md +325 -0
  87. package/docs/superpowers/specs/plans/2026-03-12-form-followup-actions.md +624 -0
  88. package/docs/superpowers/specs/plans/2026-03-12-page-editor-form-insert-and-per-page-theme.md +125 -0
  89. package/docs/superpowers/specs/plans/2026-03-17-nav-hidden-items.md +578 -0
  90. package/docs/superpowers/specs/plans/2026-03-19-accordion-insert.md +635 -0
  91. package/docs/superpowers/specs/plans/2026-03-25-text-shortcode.md +545 -0
  92. package/docs/superpowers/specs/plans/2026-04-05-card-builder.md +1970 -0
  93. package/docs/superpowers/specs/plans/2026-04-06-insert-builders.md +1049 -0
  94. package/docs/superpowers/specs/plans/2026-04-06-layouts.md +1015 -0
  95. package/docs/superpowers/specs/plans/2026-04-07-calendar-plugin.md +1526 -0
  96. package/docs/superpowers/specs/plans/2026-04-08-plugin-monetisation-split.md +242 -0
  97. package/docs/superpowers/specs/plans/2026-04-17-components-area.md +2038 -0
  98. package/docs/superpowers/specs/plans/2026-05-02-effects-slideover-overhaul.md +2335 -0
  99. package/docs/superpowers/specs/plans/2026-05-06-dashboard-rebuild.md +1999 -0
  100. package/docs/superpowers/specs/plans/2026-05-17-cache-system.md +1436 -0
  101. package/docs/superpowers/specs/plans/2026-05-24-menus.md +3096 -0
  102. package/docs/superpowers/specs/plans/2026-05-25-projects.md +2869 -0
  103. package/docs/superpowers/specs/plans/2026-09-22-marketplace-step2-consolidation.md +505 -0
  104. package/docs/superpowers/specs/plans/2026-09-22-marketplace-step3-catalogue-and-key.md +154 -0
  105. package/docs/superpowers/specs/plans/2026-09-22-tools-promotion.md +260 -0
  106. package/docs/theming.md +320 -0
  107. package/package.json +2 -2
  108. package/plugins/_lib/admin/mail/keyboard.js +49 -0
  109. package/plugins/_lib/admin/mail/reader-view.js +4 -2
  110. package/public/js/celebrations/core/canvas.js +1 -1
  111. package/public/js/celebrations/index.js +1 -1
  112. package/public/js/celebrations/licenses/ABeeZee-Regular-OFL.txt +93 -0
  113. package/public/js/celebrations/licenses/Allura-Regular-OFL.txt +93 -0
  114. package/public/js/celebrations/message-attrs.mjs +1 -0
  115. package/public/js/celebrations/themes/anniversary.js +1 -0
  116. package/public/js/celebrations/themes/autumn.js +1 -0
  117. package/public/js/celebrations/themes/birthday.js +1 -0
  118. package/public/js/celebrations/themes/butterfly-flight.js +1 -0
  119. package/public/js/celebrations/themes/calendar.js +1 -0
  120. package/public/js/celebrations/themes/chinese-new-year-dates.js +1 -0
  121. package/public/js/celebrations/themes/chinese-new-year.js +1 -0
  122. package/public/js/celebrations/themes/christmas.js +1 -1
  123. package/public/js/celebrations/themes/easter.js +1 -0
  124. package/public/js/celebrations/themes/garden-drawing.js +1 -0
  125. package/public/js/celebrations/themes/garden.js +1 -0
  126. package/public/js/celebrations/themes/graduation.js +1 -0
  127. package/public/js/celebrations/themes/greeting.js +1 -0
  128. package/public/js/celebrations/themes/make-it-rain.js +1 -0
  129. package/public/js/celebrations/themes/money-rain.js +1 -0
  130. package/public/js/celebrations/themes/new-year.js +1 -0
  131. package/public/js/celebrations/themes/occasion-drawing.js +1 -0
  132. package/public/js/celebrations/themes/occasions.js +1 -0
  133. package/public/js/celebrations/themes/rain-control.js +1 -0
  134. package/public/js/celebrations/themes/sparkler-font-data.js +1 -0
  135. package/public/js/celebrations/themes/sparkler-font.js +1 -0
  136. package/public/js/celebrations/themes/sparkler-writing.js +1 -0
  137. package/public/js/celebrations/themes/summer-garden.js +1 -0
  138. package/public/js/celebrations/themes/winter.js +1 -0
  139. package/public/js/celebrations/trait-data.mjs +1 -1
  140. package/public/js/effects.js +1 -1
  141. package/scripts/build.js +4 -0
  142. package/server/services/markdown.js +5 -2
  143. package/server/templates/page.html +1 -1
@@ -0,0 +1,68 @@
1
+ # Surveys Pro Plugin - Wake-up Handoff (2026-06-26)
2
+
3
+ Branch: **`feat/surveys-plugin`** (off `main`). Working tree clean except your pre-existing
4
+ `content/collections/projects/data.json` change (untouched by me).
5
+
6
+ ## Status: 19 of 20 tasks done. Server side fully built + tested. UI built but NOT browser-verified.
7
+
8
+ ### Done & node-verified (32 tests passing, one commit per task)
9
+ - 4 collection schemas (`surveys-contacts/groups/surveys/invites`)
10
+ - Libs: `tokens`, `ledger`, `submit` (intrinsic anonymity - full two-stage reviewed), `audience`, `campaigns`, `sending`, `stats` (with the `renderDistribution` charts seam)
11
+ - Admin API `plugin.js`: campaign + audience CRUD, import-from-contacts, send/reminder, stats, export, `[survey]` shortcode registration, `surveys` permission family
12
+ - Public `plugin.public.js`: tokenised submit endpoint, hosted page `GET /survey/:slug`, scheduler `/due-work` + `/run` contract (DRY `runSend`)
13
+
14
+ Run the suite:
15
+ ```
16
+ node --test tests/surveys/tokens.test.js tests/surveys/ledger.test.js tests/surveys/submit.test.js \
17
+ tests/surveys/audience.test.js tests/surveys/campaigns.test.js tests/surveys/sending.test.js \
18
+ tests/surveys/stats.test.js tests/surveys/plugin-admin.test.js tests/surveys/plugin-send.test.js \
19
+ tests/surveys/public-submit.test.js tests/surveys/due-work.test.js
20
+ ```
21
+
22
+ ### Built but UNVERIFIED (no browser run - honesty rule: I did not click anything)
23
+ - Hosted page `templates/survey-page.html` + client `public/survey.mjs` + `public/survey.css`
24
+ - Admin views: `surveys.js`, `survey-editor.js`, `audience.js`, `results.js` (+ templates) + `public/dist-shared.mjs`
25
+
26
+ ## The ONE remaining task (10.2) - do this together when you're back
27
+
28
+ ### Step 1 - Enable + restart (YOURS; I must not touch the always-on :4096 server)
29
+ 1. Confirm the server will run from this branch (`git branch --show-current` → `feat/surveys-plugin`).
30
+ 2. Enable the plugin: add/confirm `surveys` enabled in `config/plugins.json` (check an existing entry's shape first - I deliberately did NOT edit this file).
31
+ 3. Optionally set a `schedulerToken` under the surveys plugin settings in `config/plugins.json` (a `dcms_...` value) so `/due-work` + `/run` are reachable by domma-cms-manager; leave empty to keep them 403/disabled.
32
+ 4. Restart the server so `setupPlugin` seeds the four real collections (the stub-schema test artefacts were removed, so the real field schemas will seed cleanly).
33
+ 5. Grant the `surveys` permission to your admin role in the role editor (it is NOT back-filled - same gotcha as Menus/Projects).
34
+
35
+ ### Step 2 - Browser verification pass (MINE, once the server is up at 192.168.1.4:4096)
36
+ I'll load each surface and fix issues. **Known likely fixes (flagged by the implementers, unverified):**
37
+
38
+ **Hosted page / client / shortcode (`survey.mjs`, `[survey]`):**
39
+ **A source-grounded correction pass (commits after the first UI build) already resolved the items struck through below - confirmed against the real Domma source, but still browser-UNVERIFIED.**
40
+
41
+ **Resolved by source-grounded corrections (verify in browser, but should be right):**
42
+ - ~~Embed mount bug~~ - `survey.mjs` now scans BOTH `#survey-mount` (hosted) and `.survey-mount` (embed).
43
+ - ~~`F.create` signature~~ - `survey-editor.js`/`audience.js` now use the canonical `F.create(blueprintObject, defaults, {showSubmitButton:false}).renderTo()` with `[name=]` value collection + own Save button (transcribed from `admin/js/views/collection-entries.js`; field types `string`/`textarea`/`multiselect`/`select` verified against Domma's `_buildInput`).
44
+ - ~~Inline `onclick`~~ - list view now uses `data-slug` + unnamespaced `$container.off('click',…).on('click',…)` delegation (proven api-tokens.js pattern; DOMPurify strips inline onclick).
45
+ - ~~Icons missing~~ - `send`/`bell`/`clipboard-list`/`bar-chart`/`edit`/`arrow-left` all CONFIRMED to exist as Domma icon keys.
46
+ - ~~`E.modal` shape~~ - `{element, open(), close()}` confirmed correct (collection-entries.js:389).
47
+ - ~~`T.create` columns~~ - `{key, title, render→HTML string}` confirmed correct; native el via `.get(0)`.
48
+ - ~~`templateUrl` leading slash~~ - `/plugins/surveys/admin/templates/…` matches the working contacts plugin.
49
+
50
+ **Still genuinely needing a browser (could not confirm from source):**
51
+ 1. Hosted client: `Domma.forms.render(wrapper, blueprint, initialData, {onSubmit})` - is `onSubmit` the real submission hook (vs. the form firing its own POST)? Highest-risk hosted-page item.
52
+ 2. `multiselect` for `groupIds` pre-highlighting selected options on EDIT; `date` value round-trip for `opensAt`/`closesAt`.
53
+ 3. `<script type="module">` in the `[survey]` shortcode output may be stripped by the page sanitiser → embed may need an injection snippet / `site.js` hook to load `survey.mjs`. (Hosted page loads it directly - fine.)
54
+ 4. `.mjs` MIME from the `/plugins/` static mount executes as a module; dist asset paths in `survey-page.html`.
55
+ 5. Shared import `import {renderDistribution} from '/plugins/surveys/public/dist-shared.mjs'` resolves in the admin module loader.
56
+ 6. Authed blob download for CSV/JSON export.
57
+
58
+ ### Step 3 - End-to-end smoke (together)
59
+ - Create a Form → create a Survey (identified) → add contacts to a group → Send → open the hosted link `/survey/<slug>?t=<code>` → complete → confirm Results show 100% + the answer; reload → "already completed".
60
+ - Repeat with an **anonymous** survey; confirm the CSV/JSON export contains **no** contact identity.
61
+
62
+ ## Carried-forward concerns (documented, not bugs to fix now)
63
+ - One-response-per-invite is **not atomic** on the file adapter (check-then-act race on concurrent same-token submits). Documented in `plugins/surveys/CLAUDE.md`; mitigation noted on plan Task 8.1.
64
+ - Anonymity is **row-level, not timing-proof** (ledger `completedAt` ↔ response `createdAt` correlation at low volume). Documented in CLAUDE.md.
65
+
66
+ ## Upstream stubs (separate repos, not this branch)
67
+ - `docs/superpowers/specs/2026-06-26-domma-charts-upstream-proposal.md` (`domma-js`)
68
+ - `docs/superpowers/specs/2026-06-26-manager-scheduler-upstream-proposal.md` (`domma-cms-manager`)