@antelopejs/dms 0.24.2 → 0.24.3-next.1066.g4f2d355

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 (130) hide show
  1. package/README.md +2 -2
  2. package/dist/attachments/constraints.d.ts +13 -1
  3. package/dist/attachments/constraints.js +9 -3
  4. package/dist/attachments/constraints.js.map +1 -1
  5. package/dist/attachments/file-not-found.d.ts +1 -0
  6. package/dist/attachments/file-not-found.js +8 -0
  7. package/dist/attachments/file-not-found.js.map +1 -0
  8. package/dist/attachments/read.js +3 -2
  9. package/dist/attachments/read.js.map +1 -1
  10. package/dist/attachments/registry.js +1 -1
  11. package/dist/attachments/registry.js.map +1 -1
  12. package/dist/attachments/save.js +7 -4
  13. package/dist/attachments/save.js.map +1 -1
  14. package/dist/config/internal/state.js.map +1 -1
  15. package/dist/e2e/json.d.mts +0 -5
  16. package/dist/implementations/dms/guards.d.ts +1 -1
  17. package/dist/implementations/dms/guards.js +7 -2
  18. package/dist/implementations/dms/guards.js.map +1 -1
  19. package/dist/implementations/dms/page/preview-pages.js +1 -1
  20. package/dist/implementations/dms/page/preview-pages.js.map +1 -1
  21. package/dist/implementations/dms/page/public-layout.js +2 -2
  22. package/dist/implementations/dms/page/public-layout.js.map +1 -1
  23. package/dist/implementations/dms/page/registry.js +3 -2
  24. package/dist/implementations/dms/page/registry.js.map +1 -1
  25. package/dist/implementations/dms/permission-preview.js +2 -2
  26. package/dist/implementations/dms/permission-preview.js.map +1 -1
  27. package/dist/implementations/dms-auth/index.js +5 -5
  28. package/dist/implementations/dms-auth/index.js.map +1 -1
  29. package/dist/implementations/dms-base/bulk-selection.js +9 -2
  30. package/dist/implementations/dms-base/bulk-selection.js.map +1 -1
  31. package/dist/implementations/dms-base/footer-summary.js.map +1 -1
  32. package/dist/implementations/dms-base/search-route.js +1 -1
  33. package/dist/implementations/dms-base/search-route.js.map +1 -1
  34. package/dist/implementations/dms-builder/engine/compose-page.js +1 -1
  35. package/dist/implementations/dms-builder/engine/compose-page.js.map +1 -1
  36. package/dist/implementations/dms-builder/engine/driver-packages.js +49 -35
  37. package/dist/implementations/dms-builder/engine/driver-packages.js.map +1 -1
  38. package/dist/implementations/dms-builder/engine/driver-probe.js +7 -7
  39. package/dist/implementations/dms-builder/engine/driver-probe.js.map +1 -1
  40. package/dist/implementations/dms-builder/engine/map-resources-repairs.js.map +1 -1
  41. package/dist/implementations/dms-builder/engine/page-draft-validation.js +2 -2
  42. package/dist/implementations/dms-builder/engine/page-draft-validation.js.map +1 -1
  43. package/dist/implementations/dms-builder/engine/preview.js +2 -2
  44. package/dist/implementations/dms-builder/engine/preview.js.map +1 -1
  45. package/dist/implementations/dms-builder/engine/project.js.map +1 -1
  46. package/dist/implementations/dms-builder/engine/theme-app-config.js +2 -4
  47. package/dist/implementations/dms-builder/engine/theme-app-config.js.map +1 -1
  48. package/dist/implementations/dms-builder/engine/theme-svg.js.map +1 -1
  49. package/dist/mcp/access.js +2 -1
  50. package/dist/mcp/access.js.map +1 -1
  51. package/dist/mockup/history-routes.js +11 -14
  52. package/dist/mockup/history-routes.js.map +1 -1
  53. package/dist/mockup/manage-routes.js +6 -7
  54. package/dist/mockup/manage-routes.js.map +1 -1
  55. package/dist/mockup/presence-routes.js +12 -14
  56. package/dist/mockup/presence-routes.js.map +1 -1
  57. package/dist/mockup/refusals.d.ts +18 -0
  58. package/dist/mockup/refusals.js +23 -0
  59. package/dist/mockup/refusals.js.map +1 -0
  60. package/dist/mockup/routes.js +21 -24
  61. package/dist/mockup/routes.js.map +1 -1
  62. package/dist/mockup/source-routes.js +7 -9
  63. package/dist/mockup/source-routes.js.map +1 -1
  64. package/dist/pages/settings/users/account-activity-feed.js +2 -2
  65. package/dist/pages/settings/users/account-activity-feed.js.map +1 -1
  66. package/dist/pages/settings/users/member-invite-batch.js +1 -1
  67. package/dist/pages/settings/users/member-invite-batch.js.map +1 -1
  68. package/dist/routes/files.js +2 -2
  69. package/dist/routes/files.js.map +1 -1
  70. package/dist/store/interfaces.js +1 -1
  71. package/dist/store/interfaces.js.map +1 -1
  72. package/dist/store/operations.js +3 -2
  73. package/dist/store/operations.js.map +1 -1
  74. package/dist/utils/export-jobs-run.js +5 -4
  75. package/dist/utils/export-jobs-run.js.map +1 -1
  76. package/dist/utils/page-access.js +1 -1
  77. package/dist/utils/page-access.js.map +1 -1
  78. package/e2e/json.mjs +0 -6
  79. package/frontend-vue/layers/dms-auth/server/accounts.ts +0 -8
  80. package/frontend-vue/layers/dms-core/app/build/composables/user/preferencesCookie.ts +2 -2
  81. package/frontend-vue/layers/dms-core/app/build/utils/crossTab.ts +16 -18
  82. package/frontend-vue/layers/dms-core/app/build/utils/permission-preview.ts +3 -1
  83. package/frontend-vue/layers/dms-core/app/build/utils/sharedRealtimeConnection.ts +6 -8
  84. package/frontend-vue/layers/dms-core/app/composables/period/compareResolvers.ts +16 -16
  85. package/frontend-vue/layers/dms-core/app/composables/period/presetResolvers.ts +1 -0
  86. package/frontend-vue/layers/dms-core/app/composables/useFieldErrors.ts +7 -9
  87. package/frontend-vue/layers/dms-core/app/composables/useFormValidation.ts +0 -6
  88. package/frontend-vue/layers/dms-core/app/composables/user/usePreferences.ts +1 -1
  89. package/frontend-vue/layers/dms-core/app/utils/row-action-rule-evaluator.ts +2 -2
  90. package/frontend-vue/layers/dms-core/app/utils/stringTypeParser.ts +8 -11
  91. package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +81 -0
  92. package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +81 -0
  93. package/frontend-vue/layers/dms-core/shared/types/runtime-config.d.ts +2 -2
  94. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/members/MemberRolePicker.vue +6 -7
  95. package/frontend-vue/layers/dms-layout/app/build/composables/dev-reload/useDevReloadHolder.ts +0 -9
  96. package/frontend-vue/layers/dms-layout/app/components/navigation/NavigationMenu.vue +19 -16
  97. package/frontend-vue/layers/dms-layout/app/emails/components/email-logo.ts +5 -7
  98. package/frontend-vue/layers/dms-layout/app/theme/actions.ts +11 -11
  99. package/frontend-vue/layers/dms-layout/app/theme/data.ts +9 -11
  100. package/frontend-vue/layers/dms-layout/app/theme/form-controls.ts +8 -15
  101. package/frontend-vue/layers/dms-layout/app/theme/navigation.ts +12 -12
  102. package/frontend-vue/layers/dms-ui/app/build/composables/containers/drawerSize.ts +4 -1
  103. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/defaultIdentityCells.ts +1 -1
  104. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/metricCells.ts +3 -1
  105. package/frontend-vue/layers/dms-ui/app/build/composables/form/formValidation.ts +12 -14
  106. package/frontend-vue/layers/dms-ui/app/build/composables/form/useFormModel.ts +1 -1
  107. package/frontend-vue/layers/dms-ui/app/build/composables/layout/sidePanelState.ts +3 -1
  108. package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnHeaders.ts +6 -6
  109. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/registerDefaultFunctions.ts +1 -1
  110. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/groupedRows.ts +1 -0
  111. package/frontend-vue/layers/dms-ui/app/build/composables/unsaved-changes/formValue.ts +4 -6
  112. package/frontend-vue/layers/dms-ui/app/build/composables/unsaved-changes/registry.ts +0 -10
  113. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewMessages.ts +0 -6
  114. package/frontend-vue/layers/dms-ui/app/build/utils/codeHighlight.ts +1 -1
  115. package/frontend-vue/layers/dms-ui/app/build/utils/codeLanguages.ts +10 -2
  116. package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +0 -5
  117. package/frontend-vue/layers/dms-ui/app/build/utils/mockupCatalog.ts +0 -5
  118. package/frontend-vue/layers/dms-ui/app/build/utils/mockupSections.ts +4 -6
  119. package/frontend-vue/layers/dms-ui/app/build/utils/mockupSpec.ts +7 -7
  120. package/frontend-vue/layers/dms-ui/app/build/utils/sketch.ts +5 -1
  121. package/frontend-vue/layers/dms-ui/app/build/utils/tone.ts +3 -1
  122. package/frontend-vue/layers/dms-ui/app/build/utils/urlVariables.ts +5 -2
  123. package/frontend-vue/layers/dms-ui/app/components/block-preview/MockupViewer.vue +0 -9
  124. package/frontend-vue/layers/dms-ui/app/composables/chart/formatValue.ts +3 -1
  125. package/frontend-vue/layers/dms-ui/app/composables/chart/useChartTheme.ts +5 -1
  126. package/frontend-vue/layers/dms-ui/app/composables/containers/useDrawer.ts +3 -1
  127. package/frontend-vue/layers/dms-ui/app/composables/form/useForm.ts +2 -2
  128. package/frontend-vue/package.json +1 -1
  129. package/frontend-vue/scripts/check-invariants.mjs +21 -0
  130. package/package.json +8 -8
@@ -32,14 +32,14 @@ function isWholeDayRange(range: PeriodRange): boolean {
32
32
  const MONTHS_PER_YEAR = 12;
33
33
  const MONTHS_PER_QUARTER = 3;
34
34
 
35
- const PRESET_MONTH_SPANS: Partial<Record<PeriodPreset, number>> = {
36
- "this-month": 1,
37
- "last-month": 1,
38
- "this-quarter": MONTHS_PER_QUARTER,
39
- "last-quarter": MONTHS_PER_QUARTER,
40
- ytd: MONTHS_PER_YEAR,
41
- "last-year": MONTHS_PER_YEAR,
42
- };
35
+ const PRESET_MONTH_SPANS: ReadonlyMap<PeriodPreset, number> = new Map([
36
+ ["this-month", 1],
37
+ ["last-month", 1],
38
+ ["this-quarter", MONTHS_PER_QUARTER],
39
+ ["last-quarter", MONTHS_PER_QUARTER],
40
+ ["ytd", MONTHS_PER_YEAR],
41
+ ["last-year", MONTHS_PER_YEAR],
42
+ ]);
43
43
 
44
44
  /** What a comparison is resolved against beyond the range itself. */
45
45
  export interface ComparisonContext {
@@ -91,7 +91,7 @@ function calendarMonthSpan(
91
91
  preset: PeriodPreset | undefined,
92
92
  ): number | undefined {
93
93
  if (!isMonthStart(range.from)) return undefined;
94
- const presetSpan = preset ? PRESET_MONTH_SPANS[preset] : undefined;
94
+ const presetSpan = preset ? PRESET_MONTH_SPANS.get(preset) : undefined;
95
95
  if (presetSpan) return presetSpan;
96
96
  const end = afterRange(range);
97
97
  return isMonthStart(end) ? monthsBetween(range.from, end) : undefined;
@@ -183,13 +183,13 @@ function shiftPreviousYear(
183
183
  };
184
184
  }
185
185
 
186
- const COMPARISON_RESOLVERS: Record<
187
- Exclude<PeriodComparison, "none" | "custom">,
186
+ const COMPARISON_RESOLVERS: ReadonlyMap<
187
+ PeriodComparison,
188
188
  (range: PeriodRange, context: ComparisonContext) => PeriodRange
189
- > = {
190
- "previous-period": shiftPreviousPeriod,
191
- "previous-year": shiftPreviousYear,
192
- };
189
+ > = new Map([
190
+ ["previous-period", shiftPreviousPeriod],
191
+ ["previous-year", shiftPreviousYear],
192
+ ]);
193
193
 
194
194
  /**
195
195
  * Resolves the range a period is compared against.
@@ -216,5 +216,5 @@ export function resolveComparisonRange(
216
216
  ): PeriodRange | null {
217
217
  if (comparison === "none" || !range) return null;
218
218
  if (comparison === "custom") return customRange;
219
- return COMPARISON_RESOLVERS[comparison](range, context);
219
+ return COMPARISON_RESOLVERS.get(comparison)?.(range, context) ?? null;
220
220
  }
@@ -184,5 +184,6 @@ export function resolvePresetRange(
184
184
  fallbackRange: PeriodRange,
185
185
  ): PeriodRange | null {
186
186
  if (preset === "custom") return fallbackRange;
187
+ if (!Object.hasOwn(PRESET_RANGE_RESOLVERS, preset)) return fallbackRange;
187
188
  return PRESET_RANGE_RESOLVERS[preset](now);
188
189
  }
@@ -3,15 +3,6 @@ import type { I18nTranslate } from "./translation/useTranslation";
3
3
  import { resolveApiErrorMessage } from "./resolveApiError";
4
4
  import { isBoolean, isNumber, isObject, isString } from "../utils/type-check";
5
5
 
6
- /**
7
- * The dashboard's error rule: an error that belongs to one field (a value
8
- * refused by validation, a wrong current password, an address already used,
9
- * a name already taken…) shows under that field only; anything else (network
10
- * failure, permission denied, rate limit, server error) is a toast.
11
- *
12
- * This module tells the two apart from what `$authFetch` / `$fetch` threw.
13
- */
14
-
15
6
  /** An API error tied to one field, before translation. */
16
7
  export interface ApiFieldError {
17
8
  /** Id of the field, as the form names it (the request body key). */
@@ -485,6 +476,13 @@ export interface HandleApiErrorOptions {
485
476
  }
486
477
 
487
478
  /**
479
+ * The dashboard's error rule: an error that belongs to one field (a value
480
+ * refused by validation, a wrong current password, an address already used,
481
+ * a name already taken…) shows under that field only; anything else (network
482
+ * failure, permission denied, rate limit, server error) is a toast.
483
+ *
484
+ * This module tells the two apart from what `$authFetch` / `$fetch` threw.
485
+ *
488
486
  * Inline errors of a form, following the dashboard's error rule: a
489
487
  * field-tied error shows under its field (red text, the control marked
490
488
  * `aria-invalid` and described by it, focused on a failed submit), anything
@@ -8,12 +8,6 @@ import {
8
8
  import { type ValidationIssue, validationIssueMessage } from "./useFieldErrors";
9
9
  import { isBoolean, isNumber, isObject, isString } from "../utils/type-check";
10
10
 
11
- /**
12
- * Client-side checks of the hand-built forms (auth pages, onboarding,
13
- * settings panels), worded like the DMS form: an empty required control says
14
- * "This field is required.", a malformed one says why, under the control.
15
- */
16
-
17
11
  /** A required control left empty. */
18
12
  export const REQUIRED_MESSAGE = "$dms.field_errors.required";
19
13
  /** A code entry (PIN cells) filled only in part. */
@@ -90,7 +90,7 @@ export const usePreferences = () => {
90
90
  if (lastKey === undefined) return;
91
91
  const next = toPlainTree(tree.value);
92
92
  const parent = keys.length === 0 ? next : readAt(next, keys);
93
- if (!isBranch(parent) || !(lastKey in parent)) return;
93
+ if (!isBranch(parent) || !Object.hasOwn(parent, lastKey)) return;
94
94
 
95
95
  Reflect.deleteProperty(parent, lastKey);
96
96
  commit(next);
@@ -20,11 +20,11 @@ export const evaluateRowActionRule: RuleEvaluator = (rule, row) => {
20
20
  if ("or" in rule) return rule.or.some((r) => evaluateRowActionRule(r, row));
21
21
  if ("not" in rule) return !evaluateRowActionRule(rule.not, row);
22
22
 
23
- if (FIELD_KEY in rule) {
23
+ if (Object.hasOwn(rule, FIELD_KEY)) {
24
24
  const ruleObj: RuleDictionary = rule;
25
25
  const fieldValue: unknown = get(row, rule.field);
26
26
  for (const [operator, def] of Object.entries(FIELD_OPERATORS)) {
27
- if (operator in ruleObj) {
27
+ if (Object.hasOwn(ruleObj, operator)) {
28
28
  const ruleValue = ruleObj[operator];
29
29
  if (!def.isArray) return def.compare(fieldValue, ruleValue);
30
30
  const ruleValues: unknown[] | undefined = Array.isArray(ruleValue)
@@ -3,20 +3,17 @@ import type { JsonValue } from "../types/json";
3
3
 
4
4
  export type Primitive = JsonValue | Date | undefined;
5
5
 
6
- const KEYWORD_VALUES: Record<
7
- Parameters<typeof isKeyword>[0],
8
- ReturnType<typeof parse>
9
- > = {
10
- true: true,
11
- false: false,
12
- null: null,
13
- undefined: undefined,
14
- };
6
+ const KEYWORD_VALUES: ReadonlyMap<string, ReturnType<typeof parse>> = new Map([
7
+ ["true", true],
8
+ ["false", false],
9
+ ["null", null],
10
+ ["undefined", undefined],
11
+ ]);
15
12
 
16
13
  const PARSER_REGISTRY = [
17
14
  {
18
15
  test: isKeyword,
19
- parse: (value: string) => KEYWORD_VALUES[value],
16
+ parse: (value: string) => KEYWORD_VALUES.get(value),
20
17
  },
21
18
  {
22
19
  test: isStringNumber,
@@ -53,7 +50,7 @@ export function parseObject(items: Array<{ key: string; value: string }>) {
53
50
  }
54
51
 
55
52
  export function isKeyword(value: string): boolean {
56
- return Object.keys(KEYWORD_VALUES).includes(value);
53
+ return KEYWORD_VALUES.has(value);
57
54
  }
58
55
 
59
56
  export function isStringNumber(value: string): boolean {
@@ -637,6 +637,87 @@
637
637
  "userId": "User",
638
638
  "userIds": "Users"
639
639
  }
640
+ },
641
+ "refusals": {
642
+ "auth": {
643
+ "unauthorized": "Unauthorized",
644
+ "invalid_session_token": "Invalid session token",
645
+ "no_token_provided": "No JWT token provided",
646
+ "email_not_validated": "Email not validated",
647
+ "owner_only": "Owner-only"
648
+ },
649
+ "export": {
650
+ "not_accessible": "Export not accessible",
651
+ "not_found": "Export not found"
652
+ },
653
+ "archive": {
654
+ "cannot_view_archived": "Forbidden: cannot view archived rows"
655
+ },
656
+ "permissions": {
657
+ "missing_permission": "Forbidden: missing permission {permissionId}",
658
+ "missing_any_permission": "Forbidden: missing one of the permissions {permissionIds}",
659
+ "action_declares_no_permission": "Forbidden: action \"{actionId}\" declares no permission"
660
+ },
661
+ "table": {
662
+ "row_not_found": "Row not found",
663
+ "edit_not_allowed": "Edit not allowed: the row does not satisfy the action's rules"
664
+ },
665
+ "file": {
666
+ "not_found": "File not found",
667
+ "access_denied": "File access denied."
668
+ },
669
+ "upload": {
670
+ "invalid_field_token": "Upload rejected: missing or invalid attachment field token.",
671
+ "rejected": "Upload rejected: the file exceeds the allowed size or type.",
672
+ "file_too_large": "Upload rejected: the file exceeds this field's maximum size of {maxSize} bytes.",
673
+ "type_not_allowed": "Upload rejected: type \"{mimetype}\" is not allowed for this field (allowed: {allowed}).",
674
+ "file_not_stored": "A submitted file was never stored. Upload it again."
675
+ },
676
+ "body": {
677
+ "too_deep": "The JSON body nests more than {maxDepth} levels deep.",
678
+ "invalid_json": "The request body is not valid JSON.",
679
+ "not_an_object": "The request body must be a JSON object."
680
+ },
681
+ "connection": {
682
+ "read_only": "Connection \"{connection}\" is read-only: the project allows no changes to its tables."
683
+ },
684
+ "tenant": {
685
+ "admission_paused": "Tenant lifecycle admission is paused"
686
+ },
687
+ "invite": {
688
+ "retired_while_reissued": "Invitation was retired while it was reissued",
689
+ "creation_pending": "Invitation creation is still pending",
690
+ "different_decision": "Invitation already has a different terminal decision",
691
+ "different_replacement": "Invitation already has a different replacement",
692
+ "expired_before_acceptance": "Invitation expired before acceptance",
693
+ "created_concurrently": "Invitation for this email was created concurrently with other content"
694
+ },
695
+ "mockup": {
696
+ "not_found": "Mockup not found",
697
+ "version_not_found": "Version not found",
698
+ "page_not_found": "Page not found",
699
+ "fixture_not_found": "Fixture not found",
700
+ "rows_not_found": "Array of rows not found",
701
+ "example_not_found": "Example not found",
702
+ "annotation_not_found": "Annotation not found",
703
+ "node_not_found": "Node at this path not found",
704
+ "page_node_not_found": "Node at this page and path not found",
705
+ "row_not_found": "Row not found",
706
+ "route_not_found": "Route not found",
707
+ "lock_not_found": "Lock not found",
708
+ "spec_not_object": "spec.json holds no JSON object",
709
+ "spec_changed": "spec.json changed since it was read",
710
+ "lock_spec_changed": "spec.json changed since it was read, so the pointer may name another block: read it again and retake the lock",
711
+ "lock_ambiguous_ids": "Another block has the same ids as this one, so a lock cannot tell them apart: give one of them another id",
712
+ "note_ambiguous_ids": "Another block has the same ids as this one, so a note cannot tell them apart: give one of them another id",
713
+ "lock_spec_invalid": "spec.json is not a valid spec, so the block cannot get an id",
714
+ "note_spec_invalid": "spec.json is not a valid spec, so the note's block cannot get an id",
715
+ "row_not_object": "A row is a JSON object",
716
+ "exists": "Another mockup already has this name",
717
+ "no_free_name": "No free name for the copy: give one",
718
+ "no_event_stream": "This viewer has no event stream open on the mockup",
719
+ "block_held": "{holder} is editing this block"
720
+ }
640
721
  }
641
722
  }
642
723
  }
@@ -637,6 +637,87 @@
637
637
  "userId": "Utilisateur",
638
638
  "userIds": "Utilisateurs"
639
639
  }
640
+ },
641
+ "refusals": {
642
+ "auth": {
643
+ "unauthorized": "Non autorisé",
644
+ "invalid_session_token": "Jeton de session invalide",
645
+ "no_token_provided": "Aucun jeton JWT fourni",
646
+ "email_not_validated": "Adresse e-mail non validée",
647
+ "owner_only": "Réservé aux propriétaires"
648
+ },
649
+ "export": {
650
+ "not_accessible": "Export inaccessible",
651
+ "not_found": "Export introuvable"
652
+ },
653
+ "archive": {
654
+ "cannot_view_archived": "Interdit : vous ne pouvez pas voir les lignes archivées"
655
+ },
656
+ "permissions": {
657
+ "missing_permission": "Interdit : permission {permissionId} manquante",
658
+ "missing_any_permission": "Interdit : il manque l'une des permissions {permissionIds}",
659
+ "action_declares_no_permission": "Interdit : l'action \"{actionId}\" ne déclare aucune permission"
660
+ },
661
+ "table": {
662
+ "row_not_found": "Ligne introuvable",
663
+ "edit_not_allowed": "Modification refusée : la ligne ne respecte pas les règles de l'action"
664
+ },
665
+ "file": {
666
+ "not_found": "Fichier introuvable",
667
+ "access_denied": "Accès au fichier refusé."
668
+ },
669
+ "upload": {
670
+ "invalid_field_token": "Envoi refusé : jeton du champ de pièce jointe manquant ou invalide.",
671
+ "rejected": "Envoi refusé : le fichier dépasse la taille autorisée ou n'a pas un type autorisé.",
672
+ "file_too_large": "Envoi refusé : le fichier dépasse la taille maximale de {maxSize} octets de ce champ.",
673
+ "type_not_allowed": "Envoi refusé : le type \"{mimetype}\" n'est pas autorisé pour ce champ (autorisés : {allowed}).",
674
+ "file_not_stored": "Un fichier envoyé n'a jamais été enregistré. Envoyez-le de nouveau."
675
+ },
676
+ "body": {
677
+ "too_deep": "Le corps JSON est imbriqué sur plus de {maxDepth} niveaux.",
678
+ "invalid_json": "Le corps de la requête n'est pas un JSON valide.",
679
+ "not_an_object": "Le corps de la requête doit être un objet JSON."
680
+ },
681
+ "connection": {
682
+ "read_only": "La connexion \"{connection}\" est en lecture seule : le projet n'autorise aucune modification de ses tables."
683
+ },
684
+ "tenant": {
685
+ "admission_paused": "L'admission du cycle de vie de l'espace est suspendue"
686
+ },
687
+ "invite": {
688
+ "retired_while_reissued": "L'invitation a été retirée pendant sa réémission",
689
+ "creation_pending": "La création de l'invitation est toujours en cours",
690
+ "different_decision": "L'invitation a déjà une autre décision finale",
691
+ "different_replacement": "L'invitation a déjà un autre remplacement",
692
+ "expired_before_acceptance": "L'invitation a expiré avant d'être acceptée",
693
+ "created_concurrently": "Une invitation pour cette adresse e-mail a été créée en parallèle avec un autre contenu"
694
+ },
695
+ "mockup": {
696
+ "not_found": "Maquette introuvable",
697
+ "version_not_found": "Version introuvable",
698
+ "page_not_found": "Page introuvable",
699
+ "fixture_not_found": "Jeu de données introuvable",
700
+ "rows_not_found": "Liste de lignes introuvable",
701
+ "example_not_found": "Exemple introuvable",
702
+ "annotation_not_found": "Annotation introuvable",
703
+ "node_not_found": "Nœud introuvable à ce chemin",
704
+ "page_node_not_found": "Nœud introuvable à cette page et à ce chemin",
705
+ "row_not_found": "Ligne introuvable",
706
+ "route_not_found": "Route introuvable",
707
+ "lock_not_found": "Verrou introuvable",
708
+ "spec_not_object": "spec.json ne contient aucun objet JSON",
709
+ "spec_changed": "spec.json a changé depuis sa lecture",
710
+ "lock_spec_changed": "spec.json a changé depuis sa lecture, le pointeur peut donc désigner un autre bloc : relisez-le et reprenez le verrou",
711
+ "lock_ambiguous_ids": "Un autre bloc a les mêmes identifiants que celui-ci, un verrou ne peut donc pas les distinguer : donnez un autre identifiant à l'un d'eux",
712
+ "note_ambiguous_ids": "Un autre bloc a les mêmes identifiants que celui-ci, une note ne peut donc pas les distinguer : donnez un autre identifiant à l'un d'eux",
713
+ "lock_spec_invalid": "spec.json n'est pas une spec valide, le bloc ne peut donc pas recevoir d'identifiant",
714
+ "note_spec_invalid": "spec.json n'est pas une spec valide, le bloc de la note ne peut donc pas recevoir d'identifiant",
715
+ "row_not_object": "Une ligne est un objet JSON",
716
+ "exists": "Une autre maquette porte déjà ce nom",
717
+ "no_free_name": "Aucun nom libre pour la copie : donnez-en un",
718
+ "no_event_stream": "Ce lecteur n'a aucun flux d'événements ouvert sur la maquette",
719
+ "block_held": "{holder} modifie ce bloc"
720
+ }
640
721
  }
641
722
  }
642
723
  }
@@ -1,3 +1,5 @@
1
+ import type { User } from "../../app/types/user";
2
+
1
3
  interface DmsOAuthProviderDescriptor {
2
4
  id: string;
3
5
  label: string;
@@ -56,8 +58,6 @@ interface DmsBrowserSession {
56
58
  }
57
59
 
58
60
  declare module "#dms/frontend-module" {
59
- import type { User } from "../../app/types/user";
60
-
61
61
  interface PublicRuntimeConfig {
62
62
  dms: DmsPublicConfig;
63
63
  }
@@ -10,13 +10,6 @@ import DmsChipGroup, {
10
10
  type ChipGroupItem,
11
11
  } from "#dms-ui/app/entries/components/form/ChipGroup";
12
12
 
13
- /**
14
- * The roles of a member as pills, one per role of the workspace, each with
15
- * what it grants: the invite form and the members table's "Change roles"
16
- * form both pick roles with it. A form field: `v-model` is the list of role
17
- * ids, the wrapping `UFormField`'s error rings the pills in the error ink.
18
- */
19
-
20
13
  interface RoleOption {
21
14
  _id: string;
22
15
  name: string;
@@ -64,6 +57,12 @@ interface Props {
64
57
  allowEmpty?: boolean;
65
58
  }
66
59
 
60
+ /**
61
+ * The roles of a member as pills, one per role of the workspace, each with
62
+ * what it grants: the invite form and the members table's "Change roles"
63
+ * form both pick roles with it. A form field: `v-model` is the list of role
64
+ * ids, the wrapping `UFormField`'s error rings the pills in the error ink.
65
+ */
67
66
  const props = defineProps<Props>();
68
67
  const model = defineModel<string[] | null | undefined>();
69
68
 
@@ -105,15 +105,6 @@ async function softRefresh(
105
105
  return committed;
106
106
  }
107
107
 
108
- /**
109
- * The single dev-reload mechanism, with its dependencies passed in so it can be
110
- * exercised without a DMS app runtime.
111
- *
112
- * Both entry points — the SSE `reload` event and a module's `awaitRoute` —
113
- * funnel through the same route-readiness loop and the same in-flight refresh,
114
- * so a module never polls the layout on its own and never races the plugin with
115
- * a second fetch loop.
116
- */
117
108
  /**
118
109
  * Everything the loops below share: the app they drive, the clock they read,
119
110
  * and the one in-flight pass they coalesce on.
@@ -140,32 +140,33 @@ function resolveMenuBadge(
140
140
 
141
141
  const preview = usePermissionPreview();
142
142
  const { t } = useI18n();
143
- const PREVIEW_ENTRY_LINK_CLASSES: Record<PreviewEntryState, string> = {
144
- hidden: "text-muted dms-hatch-locked",
145
- partial: "dms-hatch-partial",
146
- };
147
- const PREVIEW_LOCK_TONES: Record<PreviewEntryState, string> = {
148
- hidden: "text-error",
149
- partial: "text-warning",
150
- };
151
- const PREVIEW_ENTRY_TITLES: Record<PreviewEntryState, string> = {
152
- hidden: "page.settings.roles.preview.menu_hidden",
153
- partial: "page.settings.roles.preview.menu_partial",
154
- };
143
+ const PREVIEW_ENTRY_LINK_CLASSES: ReadonlyMap<PreviewEntryState, string> =
144
+ new Map([
145
+ ["hidden", "text-muted dms-hatch-locked"],
146
+ ["partial", "dms-hatch-partial"],
147
+ ]);
148
+ const PREVIEW_LOCK_TONES: ReadonlyMap<PreviewEntryState, string> = new Map([
149
+ ["hidden", "text-error"],
150
+ ["partial", "text-warning"],
151
+ ]);
152
+ const PREVIEW_ENTRY_TITLES: ReadonlyMap<PreviewEntryState, string> = new Map([
153
+ ["hidden", "page.settings.roles.preview.menu_hidden"],
154
+ ["partial", "page.settings.roles.preview.menu_partial"],
155
+ ]);
155
156
 
156
157
  function drawPreviewEntry(
157
158
  item: DmsMenuItem,
158
159
  state: PreviewEntryState,
159
160
  ): DmsMenuItem {
160
161
  const hasChildren = (item.children?.length ?? 0) > 0;
161
- const title = t(PREVIEW_ENTRY_TITLES[state], {
162
+ const title = t(PREVIEW_ENTRY_TITLES.get(state) ?? "", {
162
163
  role: preview.session.value?.roleName ?? "",
163
164
  });
164
165
  const result: DmsMenuItem = {
165
166
  ...item,
166
167
  previewState: state,
167
168
  previewLocked: state === "hidden",
168
- class: [item.class, PREVIEW_ENTRY_LINK_CLASSES[state]],
169
+ class: [item.class, PREVIEW_ENTRY_LINK_CLASSES.get(state)],
169
170
  title,
170
171
  "aria-label": `${String(item.label ?? "")} · ${title}`,
171
172
  };
@@ -175,7 +176,7 @@ function drawPreviewEntry(
175
176
  result.ui = {
176
177
  ...UNSET_MENU_ITEM_UI,
177
178
  ...item.ui,
178
- linkTrailingIcon: `size-3.5 ${PREVIEW_LOCK_TONES[state]}`,
179
+ linkTrailingIcon: `size-3.5 ${PREVIEW_LOCK_TONES.get(state) ?? ""}`,
179
180
  };
180
181
  }
181
182
  return result;
@@ -346,7 +347,9 @@ function onStateChange(id: string, open: boolean): void {
346
347
  :name="PREVIEW_LOCK_ICON"
347
348
  :class="
348
349
  ui.linkLeadingIcon({
349
- class: PREVIEW_LOCK_TONES[item.previewState as PreviewEntryState],
350
+ class: PREVIEW_LOCK_TONES.get(
351
+ item.previewState as PreviewEntryState,
352
+ ),
350
353
  active,
351
354
  disabled: !!item.disabled,
352
355
  })
@@ -1,10 +1,3 @@
1
- /**
2
- * Which logo URL an email may carry. A recipient's mail client fetches the
3
- * image from the internet, so it needs an absolute public http(s) URL; Gmail
4
- * and Outlook also refuse SVG. A logo that fails either test is left out
5
- * rather than drawn as a broken image.
6
- */
7
-
8
1
  const ROOT_PATH = "/";
9
2
  const WEB_PROTOCOLS = ["http:", "https:"];
10
3
  const SVG_PATH = /\.svg(?:[?#]|$)/i;
@@ -38,6 +31,11 @@ export function isPublicEmailHost(hostname: string): boolean {
38
31
  }
39
32
 
40
33
  /**
34
+ * Which logo URL an email may carry. A recipient's mail client fetches the
35
+ * image from the internet, so it needs an absolute public http(s) URL; Gmail
36
+ * and Outlook also refuse SVG. A logo that fails either test is left out
37
+ * rather than drawn as a broken image.
38
+ *
41
39
  * The logo URL an email may use: `logoPath` made absolute against
42
40
  * `clientBaseUrl` when it starts with `/`, or `""` when it is an SVG, not
43
41
  * http(s), or served from a host a mail client cannot reach (localhost, a
@@ -1,13 +1,3 @@
1
- /**
2
- * Nuxt UI themes of the action and label primitives (DMS design v2, mockup
3
- * components/button.html, badge.html, kbd.html and tabs.html), spread into
4
- * the app config `ui` key. Each entry extends the Nuxt UI default theme: slot
5
- * and variant classes are appended and tailwind-merged over it, and compound
6
- * variants run after the defaults, so they win over them.
7
- *
8
- * Every class stays a literal string so Tailwind finds it when scanning.
9
- */
10
-
11
1
  /** Semantic fills that are not the accent: bright steps with dark ink, as the accent fill. */
12
2
  const SOLID_FILL_COMPOUNDS = [
13
3
  {
@@ -359,7 +349,17 @@ const tabsTheme = {
359
349
  ],
360
350
  };
361
351
 
362
- /** Action and label primitive themes, spread into `ui` of the app config. */
352
+ /**
353
+ * Nuxt UI themes of the action and label primitives (DMS design v2, mockup
354
+ * components/button.html, badge.html, kbd.html and tabs.html), spread into
355
+ * the app config `ui` key. Each entry extends the Nuxt UI default theme: slot
356
+ * and variant classes are appended and tailwind-merged over it, and compound
357
+ * variants run after the defaults, so they win over them.
358
+ *
359
+ * Every class stays a literal string so Tailwind finds it when scanning.
360
+ *
361
+ * Action and label primitive themes, spread into `ui` of the app config.
362
+ */
363
363
  export const actionsTheme = {
364
364
  button: buttonTheme,
365
365
  badge: badgeTheme,
@@ -1,14 +1,4 @@
1
1
  import { EYEBROW_CLASS } from "#dms-ui/app/entries/utils/eyebrow";
2
- /**
3
- * Nuxt UI themes of the data display primitives (DMS design v2, mockup
4
- * components/table.html, form.html tree picker, shell.html dots and
5
- * auth.html separator), spread into the app config `ui` key. Each entry
6
- * extends the Nuxt UI default theme: slot and variant classes are appended
7
- * and tailwind-merged over it, and compound variants run after the defaults.
8
- *
9
- * Every class stays a literal string so Tailwind finds it when scanning.
10
- */
11
-
12
2
  /**
13
3
  * A plain UTable reads like the DMS table (build/components/table/Table.vue):
14
4
  * mono eyebrow headers on the muted band, 44px rows on hairline dividers,
@@ -164,7 +154,15 @@ const emptyTheme = {
164
154
  },
165
155
  };
166
156
 
167
- /** Data display primitive themes, spread into `ui` of the app config. */
157
+ /**
158
+ * Nuxt UI themes of the data display primitives (DMS design v2: the mockup's
159
+ * table, form tree picker, shell dots and auth separator), spread into the app
160
+ * config `ui` key. Each entry extends the Nuxt UI default theme: slot and
161
+ * variant classes are appended and tailwind-merged over it, and compound
162
+ * variants run after the defaults.
163
+ *
164
+ * Every class stays a literal string so Tailwind finds it when scanning.
165
+ */
168
166
  export const dataTheme = {
169
167
  table: tableTheme,
170
168
  tree: treeTheme,
@@ -6,15 +6,6 @@ import {
6
6
  } from "./choice-controls";
7
7
  import { pinInputTheme } from "./pin-input";
8
8
 
9
- /**
10
- * Nuxt UI themes of the form controls (DMS design v2, mockup
11
- * components/input.html, select.html, checkbox.html and form.html), spread
12
- * into the app config `ui` key. Each entry extends the Nuxt UI default theme:
13
- * slot and variant classes are appended and tailwind-merged over it.
14
- *
15
- * Every class stays a literal string so Tailwind finds it when scanning.
16
- */
17
-
18
9
  /**
19
10
  * v2 field surface: the recessed --dms-bg-field on a 1px accented border
20
11
  * with the xs shadow, a stronger border on hover and the muted band when
@@ -221,12 +212,6 @@ const inputTagsTheme = {
221
212
  compoundVariants: [...FIELD_STATE_COMPOUNDS, ...FIELD_TEXT_COMPOUNDS],
222
213
  };
223
214
 
224
- /**
225
- * v2 choice card (`.check-card`, `variant="card"` on UCheckbox,
226
- * UCheckboxGroup and URadioGroup): a bordered card tile, the whole tile is
227
- * the hit area; selected = accent border, accent-line halo and the tint;
228
- * disabled = muted band at half opacity. Put an icon well in the label slot.
229
- */
230
215
  /**
231
216
  * Date field: the text-field looks with mono tabular segments; the focused
232
217
  * segment takes the accent tint. Nuxt UI turns `focus:` into `has-focus:`
@@ -374,6 +359,14 @@ const fileUploadTheme = {
374
359
  ],
375
360
  };
376
361
 
362
+ /**
363
+ * Nuxt UI themes of the form controls (DMS design v2, mockup
364
+ * components/input.html, select.html, checkbox.html and form.html), spread
365
+ * into the app config `ui` key. Each entry extends the Nuxt UI default theme:
366
+ * slot and variant classes are appended and tailwind-merged over it.
367
+ *
368
+ * Every class stays a literal string so Tailwind finds it when scanning.
369
+ */
377
370
  export const formControlsTheme = {
378
371
  input: inputTheme,
379
372
  textarea: {
@@ -1,14 +1,3 @@
1
- /**
2
- * Nuxt UI themes of the navigation primitives (DMS design v2, mockup
3
- * components/navigation.html, onboarding/*.html step indicator and
4
- * settings/security.html setup steps), spread into the app config `ui` key.
5
- * Each entry extends the Nuxt UI default theme: slot and variant classes are
6
- * appended and tailwind-merged over it, and compound variants run after the
7
- * defaults, so they win over them.
8
- *
9
- * Every class stays a literal string so Tailwind finds it when scanning.
10
- */
11
-
12
1
  /**
13
2
  * v2 stepper. Horizontal is the onboarding `.au-steps` row: the label sits
14
3
  * beside its dot and a 28px hairline joins the steps (the container is
@@ -282,7 +271,18 @@ const dashboardSidebarTheme = {
282
271
  },
283
272
  };
284
273
 
285
- /** Navigation primitive themes, spread into `ui` of the app config. */
274
+ /**
275
+ * Nuxt UI themes of the navigation primitives (DMS design v2, mockup
276
+ * components/navigation.html, onboarding/*.html step indicator and
277
+ * settings/security.html setup steps), spread into the app config `ui` key.
278
+ * Each entry extends the Nuxt UI default theme: slot and variant classes are
279
+ * appended and tailwind-merged over it, and compound variants run after the
280
+ * defaults, so they win over them.
281
+ *
282
+ * Every class stays a literal string so Tailwind finds it when scanning.
283
+ *
284
+ * Navigation primitive themes, spread into `ui` of the app config.
285
+ */
286
286
  export const navigationTheme = {
287
287
  stepper: stepperTheme,
288
288
  pagination: paginationTheme,