simple-module-branding 0.0.47__tar.gz → 0.0.49__tar.gz

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 (70) hide show
  1. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/.gitignore +6 -0
  2. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/PKG-INFO +9 -9
  3. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/README.md +3 -3
  4. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/core/constants.py +15 -2
  5. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/module.py +3 -15
  6. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/pages/Manage.tsx +1 -1
  7. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/pages/api.generated.ts +4 -0
  8. simple_module_branding-0.0.49/branding/pages/i18n.generated.ts +159 -0
  9. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/ui/components/BrandingPreview.tsx +0 -1
  10. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/ui/components/FooterField.tsx +0 -1
  11. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/web/endpoints/api.py +1 -1
  12. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/web/endpoints/views.py +1 -1
  13. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/pyproject.toml +6 -11
  14. simple_module_branding-0.0.47/branding/pages/api.ts +0 -9
  15. simple_module_branding-0.0.47/package.json +0 -15
  16. simple_module_branding-0.0.47/tsconfig.json +0 -10
  17. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/__init__.py +0 -0
  18. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/assets/__init__.py +0 -0
  19. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/assets/images.py +0 -0
  20. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/assets/reaper.py +0 -0
  21. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/contracts/__init__.py +0 -0
  22. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/contracts/schemas.py +0 -0
  23. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/core/__init__.py +0 -0
  24. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/core/presets.py +0 -0
  25. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/core/service.py +0 -0
  26. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/core/services.py +0 -0
  27. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/core/settings.py +0 -0
  28. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/core/tenant_branding.py +0 -0
  29. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/core/tenant_definitions.py +0 -0
  30. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/locales/de.json +0 -0
  31. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/locales/en.json +0 -0
  32. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/py.typed +0 -0
  33. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/ui/components/BannerField.tsx +0 -0
  34. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/ui/components/ColorField.tsx +0 -0
  35. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/ui/components/DesignPackField.tsx +0 -0
  36. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/ui/components/ImageDropzones.tsx +0 -0
  37. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/ui/components/PresetField.tsx +0 -0
  38. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/ui/components/PreviewSurfaces.tsx +0 -0
  39. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/ui/components/PreviewTabs.tsx +0 -0
  40. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/ui/components/dirty.ts +0 -0
  41. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/ui/components/hex.ts +0 -0
  42. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/web/__init__.py +0 -0
  43. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/web/deps.py +0 -0
  44. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/web/endpoints/__init__.py +0 -0
  45. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/web/endpoints/assets.py +0 -0
  46. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/web/endpoints/tenant_api.py +0 -0
  47. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/branding/web/shared_props.py +0 -0
  48. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/assets/images/test_branding_images.py +0 -0
  49. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/assets/images/test_branding_logo_dark.py +0 -0
  50. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/assets/reaper/test_branding_asset_lifecycle.py +0 -0
  51. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/assets/reaper/test_branding_reap.py +0 -0
  52. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/assets/reaper/test_branding_reap_ordering.py +0 -0
  53. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/core/module/test_branding.py +0 -0
  54. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/core/module/test_branding_menu_permission.py +0 -0
  55. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/core/module/test_branding_menu_section.py +0 -0
  56. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/core/presets/test_branding_presets.py +0 -0
  57. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/core/settings/test_branding_banner.py +0 -0
  58. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/core/settings/test_branding_design_pack.py +0 -0
  59. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/core/settings/test_branding_footer_links.py +0 -0
  60. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/core/settings/test_branding_footer_text.py +0 -0
  61. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/core/tenant_branding/test_branding_tenant_branding.py +0 -0
  62. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/core/tenant_branding/test_branding_tenant_branding_assets.py +0 -0
  63. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/core/tenant_branding/test_branding_tenant_branding_cost.py +0 -0
  64. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/core/tenant_branding/test_branding_tenant_review_fixes.py +0 -0
  65. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/web/endpoints/test_branding_clear_route_scope.py +0 -0
  66. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/web/endpoints/test_branding_platform_files.py +0 -0
  67. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests/web/endpoints/test_branding_public_assets.py +0 -0
  68. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests-js/branding_ManageSave.test.tsx +0 -0
  69. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests-js/color-field.test.tsx +0 -0
  70. {simple_module_branding-0.0.47 → simple_module_branding-0.0.49}/tests-js/dirty-state.test.tsx +0 -0
@@ -67,3 +67,9 @@ host/client_app/.playwright-cli/*
67
67
  .verify/
68
68
  /openapi.json
69
69
  qa-shots/
70
+
71
+ host/client_app/.module-tsconfig
72
+
73
+ # Incremental generation cache
74
+ .smpy/gen.json
75
+ .smpy/gen.*.tmp
@@ -1,17 +1,17 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: simple_module_branding
3
- Version: 0.0.47
3
+ Version: 0.0.49
4
4
  Summary: Customisable application branding (name, logo, favicon, primary colour) for simple_module apps
5
5
  Project-URL: Repository, https://github.com/antosubash/simple_module_python
6
6
  Author-email: Anto Subash <antosubash@live.com>
7
7
  License-Expression: MIT
8
8
  Keywords: branding,simple-module,theming,white-label
9
9
  Requires-Python: >=3.12
10
- Requires-Dist: simple-module-core==0.0.47
11
- Requires-Dist: simple-module-db==0.0.47
12
- Requires-Dist: simple-module-file-storage==0.0.47
13
- Requires-Dist: simple-module-hosting==0.0.47
14
- Requires-Dist: simple-module-settings==0.0.47
10
+ Requires-Dist: simple-module-core==0.0.49
11
+ Requires-Dist: simple-module-db==0.0.49
12
+ Requires-Dist: simple-module-file-storage==0.0.49
13
+ Requires-Dist: simple-module-hosting==0.0.49
14
+ Requires-Dist: simple-module-settings==0.0.49
15
15
  Description-Content-Type: text/markdown
16
16
 
17
17
  # simple_module_branding
@@ -20,14 +20,14 @@ Customisable application branding for [simple_module_python](https://github.com/
20
20
 
21
21
  An administrator can set the **application name**, **logo** (plus an optional
22
22
  **dark-background variant**), **favicon** and **primary brand colour** from the
23
- admin UI (`/branding`), and those values are
23
+ admin UI (`/admin/branding`), and those values are
24
24
  applied everywhere the framework would otherwise show the default identity —
25
25
  the sidebar/header logo and name, the browser tab title, the favicon, and the
26
26
  primary accent colour.
27
27
 
28
28
  ## Screenshots
29
29
 
30
- The admin page at `/branding`, and the same app rebranded as "Acme Analytics"
30
+ The admin page at `/admin/branding`, and the same app rebranded as "Acme Analytics"
31
31
  (custom logo + name + primary colour) across the sidebar and dashboard:
32
32
 
33
33
  | Admin page | Branding applied | Across the app |
@@ -53,7 +53,7 @@ modules to be installed too.
53
53
  ## Usage
54
54
 
55
55
  1. Sign in as an admin and open **Branding** in the sidebar (or visit
56
- `/branding`).
56
+ `/admin/branding`).
57
57
  2. Set the application name, pick a primary colour, and upload a logo and/or
58
58
  favicon. Changes apply immediately across the app.
59
59
 
@@ -4,14 +4,14 @@ Customisable application branding for [simple_module_python](https://github.com/
4
4
 
5
5
  An administrator can set the **application name**, **logo** (plus an optional
6
6
  **dark-background variant**), **favicon** and **primary brand colour** from the
7
- admin UI (`/branding`), and those values are
7
+ admin UI (`/admin/branding`), and those values are
8
8
  applied everywhere the framework would otherwise show the default identity —
9
9
  the sidebar/header logo and name, the browser tab title, the favicon, and the
10
10
  primary accent colour.
11
11
 
12
12
  ## Screenshots
13
13
 
14
- The admin page at `/branding`, and the same app rebranded as "Acme Analytics"
14
+ The admin page at `/admin/branding`, and the same app rebranded as "Acme Analytics"
15
15
  (custom logo + name + primary colour) across the sidebar and dashboard:
16
16
 
17
17
  | Admin page | Branding applied | Across the app |
@@ -37,7 +37,7 @@ modules to be installed too.
37
37
  ## Usage
38
38
 
39
39
  1. Sign in as an admin and open **Branding** in the sidebar (or visit
40
- `/branding`).
40
+ `/admin/branding`).
41
41
  2. Set the application name, pick a primary colour, and upload a logo and/or
42
42
  favicon. Changes apply immediately across the app.
43
43
 
@@ -5,7 +5,9 @@ from __future__ import annotations
5
5
  import re
6
6
  from typing import Final
7
7
 
8
+ from simple_module_core.deprecation import deprecate
8
9
  from simple_module_core.design_packs import SLUG_RE
10
+ from simple_module_core.permissions import PermissionCatalogue
9
11
 
10
12
  ROUTE_PREFIX: Final = "/api/branding"
11
13
  VIEW_PREFIX: Final = "/admin/branding"
@@ -25,8 +27,19 @@ _MODULE_FILE_STORAGE: Final = "FileStorage"
25
27
  # asserts the literal matches this constant.
26
28
  _PAGE_MANAGE: Final = "Branding/Manage"
27
29
 
28
- PERM_VIEW: Final = "branding.view"
29
- PERM_MANAGE: Final = "branding.manage"
30
+
31
+ class Permissions(PermissionCatalogue, group="Branding", label_key="branding.permission_group"):
32
+ VIEW = "branding.view"
33
+ MANAGE = "branding.manage"
34
+
35
+
36
+ deprecate(
37
+ "branding PERM_* constants",
38
+ remove_in="0.0.50",
39
+ use="branding.core.constants.Permissions",
40
+ )
41
+ PERM_VIEW: Final = Permissions.VIEW
42
+
30
43
 
31
44
  # A #rrggbb hex colour (single source of truth for both the settings and the
32
45
  # update-DTO validators).
@@ -7,14 +7,11 @@ page through a registered Inertia shared-props provider.
7
7
 
8
8
  from __future__ import annotations
9
9
 
10
- import importlib.resources
11
- from pathlib import Path
12
10
  from typing import TYPE_CHECKING
13
11
 
14
12
  from fastapi import APIRouter, FastAPI
15
13
  from simple_module_core.menu import MenuItem, MenuRegistry, MenuSection
16
14
  from simple_module_core.module import ModuleBase, ModuleMeta
17
- from simple_module_core.permissions import PermissionRegistry
18
15
  from simple_module_core.public_routes import PublicRouteRegistry
19
16
 
20
17
  from branding.core import constants
@@ -25,6 +22,8 @@ if TYPE_CHECKING:
25
22
 
26
23
 
27
24
  class BrandingModule(ModuleBase):
25
+ permissions = constants.Permissions
26
+
28
27
  meta = ModuleMeta(
29
28
  name="Branding",
30
29
  route_prefix=constants.ROUTE_PREFIX,
@@ -61,13 +60,6 @@ class BrandingModule(ModuleBase):
61
60
 
62
61
  subscribe(bus, app)
63
62
 
64
- def register_permissions(self, registry: PermissionRegistry) -> None:
65
- registry.add_group(
66
- "Branding",
67
- [constants.PERM_VIEW, constants.PERM_MANAGE],
68
- label_key="branding.permission_group",
69
- )
70
-
71
63
  def register_public_routes(self, registry: PublicRouteRegistry) -> None:
72
64
  """Let a logged-out visitor fetch the logo and favicon.
73
65
 
@@ -92,7 +84,7 @@ class BrandingModule(ModuleBase):
92
84
  section=MenuSection.ADMIN_SIDEBAR,
93
85
  group="Appearance",
94
86
  group_key="ui.nav_groups.appearance",
95
- permissions=[constants.PERM_VIEW],
87
+ permissions=[constants.Permissions.VIEW],
96
88
  )
97
89
  )
98
90
 
@@ -116,7 +108,3 @@ class BrandingModule(ModuleBase):
116
108
  from branding.web.shared_props import branding_shared_props
117
109
 
118
110
  register_inertia_shared_provider(app, branding_shared_props)
119
-
120
- def locale_dirs(self) -> dict[str, Path]:
121
- base = Path(str(importlib.resources.files(__package__) / "locales"))
122
- return {constants.PACKAGE: base}
@@ -19,7 +19,7 @@ import { isValidColor, normalizeHex } from '../ui/components/hex';
19
19
  import { ImageDropzones, type ImageKind } from '../ui/components/ImageDropzones';
20
20
  import { PresetField, type PresetOption } from '../ui/components/PresetField';
21
21
  import { PreviewTabs } from '../ui/components/PreviewTabs';
22
- import { api } from './api';
22
+ import { api } from './api.generated';
23
23
 
24
24
  /** Matches `BUILTIN_PRESETS[0]` in `branding/presets.py`. */
25
25
  const DEFAULT_SWATCH = '#0f766e';
@@ -1,6 +1,8 @@
1
1
  // AUTO-GENERATED by `smpy openapi gen-types` from the Branding module's /api
2
2
  // operations — do not edit. Regenerate with `smpy openapi gen-types --module branding`
3
3
  // (`make gen-api-types` in the framework repo).
4
+ import { createApi } from '@simple-module-py/ui/lib/api';
5
+
4
6
  /**
5
7
  * This file was auto-generated by openapi-typescript.
6
8
  * Do not make direct changes to the file.
@@ -616,3 +618,5 @@ export interface operations {
616
618
  };
617
619
  };
618
620
  }
621
+
622
+ export const api = createApi<paths>();
@@ -0,0 +1,159 @@
1
+ import '@simple-module-py/i18n';
2
+
3
+ // AUTO-GENERATED by simple_module_hosting.i18n_manifest — do not edit by hand.
4
+ // Regenerate by booting the host in development mode or `make gen-i18n`.
5
+
6
+ export const keys = {
7
+ branding: {
8
+ manage: {
9
+ app_name_label: 'branding.manage.app_name_label',
10
+ banner_label: 'branding.manage.banner_label',
11
+ banner_placeholder: 'branding.manage.banner_placeholder',
12
+ banner_severity_danger: 'branding.manage.banner_severity_danger',
13
+ banner_severity_info: 'branding.manage.banner_severity_info',
14
+ banner_severity_label: 'branding.manage.banner_severity_label',
15
+ banner_severity_warning: 'branding.manage.banner_severity_warning',
16
+ description: 'branding.manage.description',
17
+ design_pack_empty: 'branding.manage.design_pack_empty',
18
+ design_pack_inline: 'branding.manage.design_pack_inline',
19
+ design_pack_label: 'branding.manage.design_pack_label',
20
+ design_pack_none: 'branding.manage.design_pack_none',
21
+ discard: 'branding.manage.discard',
22
+ dropzone_favicon: 'branding.manage.dropzone_favicon',
23
+ dropzone_upload: 'branding.manage.dropzone_upload',
24
+ error_toast: 'branding.manage.error_toast',
25
+ favicon_label: 'branding.manage.favicon_label',
26
+ footer_link_add_cancel: 'branding.manage.footer_link_add_cancel',
27
+ footer_link_add_confirm: 'branding.manage.footer_link_add_confirm',
28
+ footer_link_href_label: 'branding.manage.footer_link_href_label',
29
+ footer_link_href_placeholder: 'branding.manage.footer_link_href_placeholder',
30
+ footer_link_label_label: 'branding.manage.footer_link_label_label',
31
+ footer_link_label_placeholder: 'branding.manage.footer_link_label_placeholder',
32
+ footer_links_add: 'branding.manage.footer_links_add',
33
+ footer_links_label: 'branding.manage.footer_links_label',
34
+ footer_text_placeholder: 'branding.manage.footer_text_placeholder',
35
+ images_label: 'branding.manage.images_label',
36
+ logo_dark_label: 'branding.manage.logo_dark_label',
37
+ logo_label: 'branding.manage.logo_label',
38
+ preset_label: 'branding.manage.preset_label',
39
+ preview_caption: 'branding.manage.preview_caption',
40
+ preview_email_action: 'branding.manage.preview_email_action',
41
+ preview_email_subject: 'branding.manage.preview_email_subject',
42
+ preview_signin_action: 'branding.manage.preview_signin_action',
43
+ preview_signin_heading: 'branding.manage.preview_signin_heading',
44
+ preview_tab_app: 'branding.manage.preview_tab_app',
45
+ preview_tab_email: 'branding.manage.preview_tab_email',
46
+ preview_tab_signin: 'branding.manage.preview_tab_signin',
47
+ preview_tabs_label: 'branding.manage.preview_tabs_label',
48
+ preview_title: 'branding.manage.preview_title',
49
+ primary_color_invalid: 'branding.manage.primary_color_invalid',
50
+ primary_color_label: 'branding.manage.primary_color_label',
51
+ publish: 'branding.manage.publish',
52
+ publish_note: 'branding.manage.publish_note',
53
+ publishing: 'branding.manage.publishing',
54
+ remove_button: 'branding.manage.remove_button',
55
+ saved_toast: 'branding.manage.saved_toast',
56
+ title: 'branding.manage.title',
57
+ unsaved_changes: 'branding.manage.unsaved_changes',
58
+ unsaved_changes_one: 'branding.manage.unsaved_changes_one',
59
+ unsaved_changes_other: 'branding.manage.unsaved_changes_other',
60
+ upload_error_toast: 'branding.manage.upload_error_toast',
61
+ },
62
+ nav: {
63
+ branding: 'branding.nav.branding',
64
+ },
65
+ permission_group: 'branding.permission_group',
66
+ tenant_setting_labels: {
67
+ app_name: 'branding.tenant_setting_labels.app_name',
68
+ design_pack: 'branding.tenant_setting_labels.design_pack',
69
+ favicon_file_id: 'branding.tenant_setting_labels.favicon_file_id',
70
+ footer_text: 'branding.tenant_setting_labels.footer_text',
71
+ logo_dark_file_id: 'branding.tenant_setting_labels.logo_dark_file_id',
72
+ logo_file_id: 'branding.tenant_setting_labels.logo_file_id',
73
+ primary_color: 'branding.tenant_setting_labels.primary_color',
74
+ },
75
+ tenant_settings: {
76
+ app_name: 'branding.tenant_settings.app_name',
77
+ design_pack: 'branding.tenant_settings.design_pack',
78
+ favicon_file_id: 'branding.tenant_settings.favicon_file_id',
79
+ footer_text: 'branding.tenant_settings.footer_text',
80
+ logo_dark_file_id: 'branding.tenant_settings.logo_dark_file_id',
81
+ logo_file_id: 'branding.tenant_settings.logo_file_id',
82
+ primary_color: 'branding.tenant_settings.primary_color',
83
+ },
84
+ },
85
+ } as const;
86
+
87
+ type ModuleTranslationResources = {
88
+ readonly 'branding.manage.app_name_label': '';
89
+ readonly 'branding.manage.banner_label': '';
90
+ readonly 'branding.manage.banner_placeholder': '';
91
+ readonly 'branding.manage.banner_severity_danger': '';
92
+ readonly 'branding.manage.banner_severity_info': '';
93
+ readonly 'branding.manage.banner_severity_label': '';
94
+ readonly 'branding.manage.banner_severity_warning': '';
95
+ readonly 'branding.manage.description': '';
96
+ readonly 'branding.manage.design_pack_empty': '';
97
+ readonly 'branding.manage.design_pack_inline': '';
98
+ readonly 'branding.manage.design_pack_label': '';
99
+ readonly 'branding.manage.design_pack_none': '';
100
+ readonly 'branding.manage.discard': '';
101
+ readonly 'branding.manage.dropzone_favicon': '';
102
+ readonly 'branding.manage.dropzone_upload': '';
103
+ readonly 'branding.manage.error_toast': '';
104
+ readonly 'branding.manage.favicon_label': '';
105
+ readonly 'branding.manage.footer_link_add_cancel': '';
106
+ readonly 'branding.manage.footer_link_add_confirm': '';
107
+ readonly 'branding.manage.footer_link_href_label': '';
108
+ readonly 'branding.manage.footer_link_href_placeholder': '';
109
+ readonly 'branding.manage.footer_link_label_label': '';
110
+ readonly 'branding.manage.footer_link_label_placeholder': '';
111
+ readonly 'branding.manage.footer_links_add': '';
112
+ readonly 'branding.manage.footer_links_label': '';
113
+ readonly 'branding.manage.footer_text_placeholder': '';
114
+ readonly 'branding.manage.images_label': '';
115
+ readonly 'branding.manage.logo_dark_label': '';
116
+ readonly 'branding.manage.logo_label': '';
117
+ readonly 'branding.manage.preset_label': '';
118
+ readonly 'branding.manage.preview_caption': '';
119
+ readonly 'branding.manage.preview_email_action': '';
120
+ readonly 'branding.manage.preview_email_subject': '';
121
+ readonly 'branding.manage.preview_signin_action': '';
122
+ readonly 'branding.manage.preview_signin_heading': '';
123
+ readonly 'branding.manage.preview_tab_app': '';
124
+ readonly 'branding.manage.preview_tab_email': '';
125
+ readonly 'branding.manage.preview_tab_signin': '';
126
+ readonly 'branding.manage.preview_tabs_label': '';
127
+ readonly 'branding.manage.preview_title': '';
128
+ readonly 'branding.manage.primary_color_invalid': '';
129
+ readonly 'branding.manage.primary_color_label': '';
130
+ readonly 'branding.manage.publish': '';
131
+ readonly 'branding.manage.publish_note': '';
132
+ readonly 'branding.manage.publishing': '';
133
+ readonly 'branding.manage.remove_button': '';
134
+ readonly 'branding.manage.saved_toast': '';
135
+ readonly 'branding.manage.title': '';
136
+ readonly 'branding.manage.unsaved_changes_one': '';
137
+ readonly 'branding.manage.unsaved_changes_other': '';
138
+ readonly 'branding.manage.upload_error_toast': '';
139
+ readonly 'branding.nav.branding': '';
140
+ readonly 'branding.permission_group': '';
141
+ readonly 'branding.tenant_setting_labels.app_name': '';
142
+ readonly 'branding.tenant_setting_labels.design_pack': '';
143
+ readonly 'branding.tenant_setting_labels.favicon_file_id': '';
144
+ readonly 'branding.tenant_setting_labels.footer_text': '';
145
+ readonly 'branding.tenant_setting_labels.logo_dark_file_id': '';
146
+ readonly 'branding.tenant_setting_labels.logo_file_id': '';
147
+ readonly 'branding.tenant_setting_labels.primary_color': '';
148
+ readonly 'branding.tenant_settings.app_name': '';
149
+ readonly 'branding.tenant_settings.design_pack': '';
150
+ readonly 'branding.tenant_settings.favicon_file_id': '';
151
+ readonly 'branding.tenant_settings.footer_text': '';
152
+ readonly 'branding.tenant_settings.logo_dark_file_id': '';
153
+ readonly 'branding.tenant_settings.logo_file_id': '';
154
+ readonly 'branding.tenant_settings.primary_color': '';
155
+ };
156
+
157
+ declare module '@simple-module-py/i18n' {
158
+ interface TranslationResources extends ModuleTranslationResources {}
159
+ }
@@ -111,7 +111,6 @@ export function BrandingPreview({ brand }: { brand: PreviewBrand }) {
111
111
  <div
112
112
  // Decorative bars: two menu entries can share a label, and the
113
113
  // list is static within a render.
114
- // biome-ignore lint/suspicious/noArrayIndexKey: see above
115
114
  key={`${label}-${index}`}
116
115
  className="h-2 rounded-[3px] bg-white/10"
117
116
  />
@@ -75,7 +75,6 @@ export function FooterField({ text, onTextChange, links, onChange, disabled }: F
75
75
  <span
76
76
  // Index-keyed on purpose: rows have no id and nothing enforces href
77
77
  // uniqueness, so a value-derived key would collide on duplicates.
78
- // biome-ignore lint/suspicious/noArrayIndexKey: see above
79
78
  key={index}
80
79
  className="inline-flex items-center gap-2 rounded-full border border-border px-3 py-1 text-[12.5px]"
81
80
  >
@@ -20,7 +20,7 @@ router = APIRouter()
20
20
  # not the uploading admin's active organisation's, and the anonymous asset
21
21
  # routes must find them with no tenant bound (see ``file_storage.core.scope``).
22
22
 
23
- _MANAGE = Depends(RequiresPermission(constants.PERM_MANAGE))
23
+ _MANAGE = Depends(RequiresPermission(constants.Permissions.MANAGE))
24
24
 
25
25
 
26
26
  def _validate_design_pack(request: Request, changes: dict) -> None:
@@ -17,7 +17,7 @@ router = APIRouter()
17
17
  @router.get(
18
18
  "/",
19
19
  response_model=None,
20
- dependencies=[Depends(RequiresPermission(constants.PERM_VIEW))],
20
+ dependencies=[Depends(RequiresPermission(constants.Permissions.VIEW))],
21
21
  )
22
22
  async def manage(request: Request, inertia: InertiaDep) -> InertiaResponse:
23
23
  # Current branding is delivered through the shared ``branding`` prop (the
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "simple_module_branding"
3
- version = "0.0.47"
3
+ version = "0.0.49"
4
4
  description = "Customisable application branding (name, logo, favicon, primary colour) for simple_module apps"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -8,11 +8,11 @@ authors = [{ name = "Anto Subash", email = "antosubash@live.com" }]
8
8
  keywords = ["simple-module", "branding", "theming", "white-label"]
9
9
  requires-python = ">=3.12"
10
10
  dependencies = [
11
- "simple_module_core==0.0.47",
12
- "simple_module_db==0.0.47",
13
- "simple_module_hosting==0.0.47",
14
- "simple_module_settings==0.0.47",
15
- "simple_module_file_storage==0.0.47",
11
+ "simple_module_core==0.0.49",
12
+ "simple_module_db==0.0.49",
13
+ "simple_module_hosting==0.0.49",
14
+ "simple_module_settings==0.0.49",
15
+ "simple_module_file_storage==0.0.49",
16
16
  ]
17
17
 
18
18
  [project.urls]
@@ -28,11 +28,6 @@ build-backend = "hatchling.build"
28
28
  [tool.hatch.build.targets.wheel]
29
29
  packages = ["branding"]
30
30
 
31
- # Ship the module-root package.json inside the wheel so the host can
32
- # discover JS deps via importlib.resources after a pip install.
33
- [tool.hatch.build.targets.wheel.force-include]
34
- "package.json" = "branding/package.json"
35
-
36
31
  [tool.uv.sources]
37
32
  simple_module_core = { workspace = true }
38
33
  simple_module_db = { workspace = true }
@@ -1,9 +0,0 @@
1
- /**
2
- * Typed client for this module's `/api` routes (#504). The `paths` types are
3
- * generated from the routes — regenerate with `make gen-api-types` (or
4
- * `smpy openapi gen-types --module branding`), never edit them by hand.
5
- */
6
- import { createApi } from '@simple-module-py/ui/lib/api';
7
- import type { paths } from './api.generated';
8
-
9
- export const api = createApi<paths>();
@@ -1,15 +0,0 @@
1
- {
2
- "name": "@simple-module-py/branding",
3
- "version": "0.0.47",
4
- "private": true,
5
- "description": "Frontend assets for the Branding module",
6
- "peerDependencies": {
7
- "@inertiajs/react": "^3.11.0",
8
- "@simple-module-py/ui": "*",
9
- "react": "^19.0.0",
10
- "react-dom": "^19.3.1"
11
- },
12
- "devDependencies": {
13
- "@simple-module-py/tsconfig": "*"
14
- }
15
- }
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "@simple-module-py/tsconfig/base.json",
3
- "compilerOptions": {
4
- "paths": {
5
- "@/*": ["./branding/*"],
6
- "@simple-module-py/ui/*": ["../../packages/ui/src/*"]
7
- }
8
- },
9
- "include": ["branding/**/*.ts", "branding/**/*.tsx", "tests-js/**/*.ts", "tests-js/**/*.tsx"]
10
- }