accrete 0.0.50__py3-none-any.whl → 0.0.51__py3-none-any.whl

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.
@@ -16,6 +16,7 @@ from .context import (
16
16
  get_table_fields
17
17
  )
18
18
  from .elements import (
19
+ ClientActionGroup,
19
20
  ClientAction,
20
21
  ActionMethod,
21
22
  BreadCrumb,
@@ -10,7 +10,8 @@ from django.core import paginator
10
10
  from django.forms import Form, ModelForm
11
11
  from accrete.annotation import Annotation
12
12
  from .elements import (
13
- ClientAction, BreadCrumb, TableField, TableFieldType, TableFieldAlignment
13
+ ClientAction, BreadCrumb, TableField, TableFieldType, TableFieldAlignment,
14
+ ClientActionGroup
14
15
  )
15
16
  from .filter import Filter
16
17
 
@@ -32,7 +33,7 @@ class Context:
32
33
 
33
34
  title: str = ''
34
35
  breadcrumbs: list[BreadCrumb] = field(default_factory=list)
35
- actions: list[ClientAction] = field(default_factory=list)
36
+ actions: list[ClientAction | ClientActionGroup] = field(default_factory=list)
36
37
  kwargs: dict = field(default_factory=dict)
37
38
 
38
39
  def __post_init__(self):
@@ -25,6 +25,15 @@ class ActionMethod(Enum):
25
25
  DELETE = 'hx-delete'
26
26
 
27
27
 
28
+ @dataclass
29
+ class ClientActionGroup:
30
+
31
+ name: str
32
+ actions: list[ActionMethod] = field(default_factory=list)
33
+ icon: Icon | type[Enum] = None
34
+ icon_only: bool = False
35
+
36
+
28
37
  @dataclass
29
38
  class ClientAction:
30
39