accrete 0.0.78__py3-none-any.whl → 0.0.80__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.
@@ -6,6 +6,7 @@ from .context import (
6
6
  ListContext,
7
7
  FormContext,
8
8
  ModalFormContext,
9
+ ModalContext,
9
10
  form_actions,
10
11
  list_page,
11
12
  detail_page,
@@ -1,6 +1,7 @@
1
1
  import logging
2
2
  import json
3
3
  from urllib.parse import quote_plus
4
+ from uuid import uuid4
4
5
  from dataclasses import dataclass, field
5
6
  from functools import partial
6
7
  from typing import Type, TypedDict, Callable
@@ -196,6 +197,19 @@ class ModalFormContext(BaseContext):
196
197
  blocking: bool = True
197
198
 
198
199
 
200
+ @dataclass
201
+ class ModalContext(BaseContext):
202
+
203
+ title: str
204
+ blocking: bool = False
205
+ modal_id: str = None
206
+
207
+ def __post_init__(self):
208
+ super().__post_init__()
209
+ if not self.modal_id:
210
+ self.modal_id = f'modal{str(uuid4())[:8]}'
211
+
212
+
199
213
  def cast_param(params: dict, param: str, cast_to: Callable, default):
200
214
  if param not in params:
201
215
  return default
@@ -20921,7 +20921,7 @@ select:focus {
20921
20921
  border-radius: var(--bulma-radius) !important;
20922
20922
  }
20923
20923
 
20924
- .card-header-icon > span.icon:hover {
20924
+ .card-header-icon:has(span.icon):hover {
20925
20925
  background: var(--accrete-hover-color);
20926
20926
  border-radius: var(--bulma-radius-small);
20927
20927
  }
@@ -409,7 +409,7 @@ select:focus {
409
409
  border-radius: var(--bulma-radius) !important;
410
410
  }
411
411
 
412
- .card-header-icon > span.icon:hover {
412
+ .card-header-icon:has(span.icon):hover {
413
413
  background: var(--accrete-hover-color);
414
414
  border-radius: var(--bulma-radius-small);
415
415
  }
@@ -0,0 +1,34 @@
1
+ {% load i18n %}
2
+
3
+ <div x-data="" x-ref="modal" class="modal is-active"
4
+ {% if blocking %}
5
+ hx-indicator="#{{ modal_id }}-indicator"
6
+ hx-disabled-elt="#{{ modal_id }}-background"
7
+ {% endif %}
8
+ >
9
+ <button id="{{ modal_id }}-background" class="modal-background" @click="$refs.modal.remove()" style="cursor: default"></button>
10
+ <div class="modal-card">
11
+ <header class="modal-card-head">
12
+ <p class="modal-card-title">
13
+ {{ title }}
14
+ </p>
15
+ <button class="delete filter-modal-close" aria-label="close" @click="$refs.modal.remove()"></button>
16
+ </header>
17
+ <section class="modal-card-body">
18
+ {% block modal_content %}{% endblock %}
19
+ </section>
20
+ <footer class="modal-card-foot">
21
+ {% block modal_footer %}
22
+ <div class="buttons" style="width: 100%">
23
+ {% block modal_buttons %}
24
+ {% endblock %}
25
+ </div>
26
+ {% endblock %}
27
+ </footer>
28
+ {% if blocking %}
29
+ <div id="{{ modal_id }}-indicator" class="htmx-indicator modal-request-overlay" style="position: absolute; inset: 0; background: rgba(47, 47, 62, 0.2)">
30
+ <progress class="progress is-success" max="100" style="position: absolute; inset: 0; width: 50%; margin-top: 25%; margin-left: 25%"></progress>
31
+ </div>
32
+ {% endif %}
33
+ </div>
34
+ </div>
@@ -36,8 +36,10 @@
36
36
  </div>
37
37
  {% endblock %}
38
38
  </footer>
39
- <div id="modal-{{ form_id }}-indicator" class="htmx-indicator modal-request-overlay" style="position: absolute; inset: 0; background: rgba(47, 47, 62, 0.2)">
40
- <progress class="progress is-success" max="100" style="position: absolute; inset: 0; width: 50%; margin-top: 25%; margin-left: 25%"></progress>
41
- </div>
39
+ {% if blocking %}
40
+ <div id="modal-{{ form_id }}-indicator" class="htmx-indicator modal-request-overlay" style="position: absolute; inset: 0; background: rgba(47, 47, 62, 0.2)">
41
+ <progress class="progress is-success" max="100" style="position: absolute; inset: 0; width: 50%; margin-top: 25%; margin-left: 25%"></progress>
42
+ </div>
43
+ {% endif %}
42
44
  </div>
43
45
  </div>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: accrete
3
- Version: 0.0.78
3
+ Version: 0.0.80
4
4
  Summary: Django Shared Schema Multi Tenant
5
5
  Author-email: Benedikt Jilek <benedikt.jilek@pm.me>
6
6
  License: Copyright (c) 2023 Benedikt Jilek
@@ -34,10 +34,10 @@ accrete/contrib/system_mail/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2
34
34
  accrete/contrib/system_mail/views.py,sha256=xc1IQHrsij7j33TUbo-_oewy3vs03pw_etpBWaMYJl0,63
35
35
  accrete/contrib/system_mail/migrations/0001_initial.py,sha256=6cwkkRXGjXvwXoMjjgmWmcPyXSTlUbhW1vMiHObk9MQ,1074
36
36
  accrete/contrib/system_mail/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
- accrete/contrib/ui/__init__.py,sha256=jU-3gQtEwtac-NPxFYCEoYF58WmCEanedXah4lETkWU,552
37
+ accrete/contrib/ui/__init__.py,sha256=RiJ8hNHSpkVfT_fpwP_3XXnNo9q5E-7G59xMC6PsrWE,570
38
38
  accrete/contrib/ui/admin.py,sha256=suMo4x8I3JBxAFBVIdE-5qnqZ6JAZV0FESABHOSc-vg,63
39
39
  accrete/contrib/ui/apps.py,sha256=E0ao2ox6PQ3ldfeR17FXJUUJuGiWjm2DPCxHbPXGzls,152
40
- accrete/contrib/ui/context.py,sha256=HZNKf_O71FxbH4kYXw-wUVQmUTkmCB19i6VyJL0FF3Q,10100
40
+ accrete/contrib/ui/context.py,sha256=qoGYYxkC1RTw3eCf3l-CJV7NUnNTn5-DDV46ObzocH8,10384
41
41
  accrete/contrib/ui/elements.py,sha256=rwXhRitKt70-ZT4yiLXvB7cp8jQbr02L7JpYwUy5jv4,1941
42
42
  accrete/contrib/ui/filter.py,sha256=UAIkUNKu2nVQLafwZlkQu4PDfOPyFM61e_mE7OWRhYs,12410
43
43
  accrete/contrib/ui/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
@@ -137,9 +137,9 @@ accrete/contrib/ui/static/bulma/versions/bulma-no-dark-mode.scss,sha256=w6Q80mCV
137
137
  accrete/contrib/ui/static/bulma/versions/bulma-no-helpers-prefixed.scss,sha256=6HCUc4hxyaj4_rHqUnoy7aMuFZECHDYh5jvp-1CEtfE,344
138
138
  accrete/contrib/ui/static/bulma/versions/bulma-no-helpers.scss,sha256=5dzAXSgReWUO8GXLbYTpOclPPD0xqvvBiCCX_GOR_5U,313
139
139
  accrete/contrib/ui/static/bulma/versions/bulma-prefixed.scss,sha256=Yj7oEO00jy_G_L32y6rwzp2P5p2YtQ2Pvq4aZhvBSE8,138
140
- accrete/contrib/ui/static/css/accrete.css,sha256=c-oLi3D4zZzuqhuo0KewXnGiANVUYigNxBahShS-BAU,606126
140
+ accrete/contrib/ui/static/css/accrete.css,sha256=XJkBhk_F1dJT2cgZaiGTd48Mv8fxV8GvEVBoiHVUVOQ,606129
141
141
  accrete/contrib/ui/static/css/accrete.css.map,sha256=k0gRC89RtEGAnAkJnuYUt7aRsyJ0NhUykcWLyhcoHV8,94502
142
- accrete/contrib/ui/static/css/accrete.scss,sha256=986ms9viu0TmObqQoUmFHim4VJrs_GX-3cVSvEd8OD8,11367
142
+ accrete/contrib/ui/static/css/accrete.scss,sha256=M6-e-Wlb1YjiRSzTByHIoTFRwUuz0iwftAPRIKrfaHo,11370
143
143
  accrete/contrib/ui/static/css/fa.css,sha256=wiz7ZSCn_btzhjKDQBms9Hx4sSeUYsDrTLg7roPstac,102641
144
144
  accrete/contrib/ui/static/css/icons.css,sha256=5550KHsaayeEtRaUdf0h7esQhyec-_5ZfecZ_sOC6v0,6334
145
145
  accrete/contrib/ui/static/icons/Logo.svg,sha256=hGZuxrAa-LRpFavFiF8Lnc7X9OQcqmb6Xl_dxx-27hM,1861
@@ -171,7 +171,8 @@ accrete/contrib/ui/templates/ui/table.html,sha256=8ELtgxoapCyNsvmGISAGXe712lG6Ak
171
171
  accrete/contrib/ui/templates/ui/partials/filter.html,sha256=2vmeL3980rMmkRnmVtZh9mBHe6S0PTMjaGIN1J6SpNM,7184
172
172
  accrete/contrib/ui/templates/ui/partials/form_errors.html,sha256=C5ktasYff2xBTiWfM6QR8qaGKSyK9QufB3B9N77KGpg,1386
173
173
  accrete/contrib/ui/templates/ui/partials/header.html,sha256=F-ffQGuqmL4ahhjW_tj9rCgrtqi1L-_KLRCs1ASmb90,6993
174
- accrete/contrib/ui/templates/ui/partials/modal_form.html,sha256=XCeKjhvIi-vGl9wbFT-eBuFgKNOdKrG9mrVA95lBMkg,2033
174
+ accrete/contrib/ui/templates/ui/partials/modal.html,sha256=0vfR0LSfvOo2oOFSGeJyLkmjpXbYV1tpAcvdkyHQGyQ,1438
175
+ accrete/contrib/ui/templates/ui/partials/modal_form.html,sha256=5P1n4ykVYvIYOO84VRwoOPR_jqXakmH51i8WyeMm-QQ,2103
175
176
  accrete/contrib/ui/templates/ui/partials/onchange_form.html,sha256=8wNgZYnpa6ttc-OraOi1i02isJCcnaMtYwsmObc3qcY,109
176
177
  accrete/contrib/ui/templates/ui/partials/pagination_detail.html,sha256=58nA3X7Il0FAD4VcYyr7tTGWRiVf_FN1TkImmKEpKHU,1014
177
178
  accrete/contrib/ui/templates/ui/partials/pagination_list.html,sha256=Eyx1lsk9UIFFYPICL7RuYeUFaKVlmvWVXnFCGR-II7k,1324
@@ -221,7 +222,7 @@ accrete/utils/dates.py,sha256=apM6kt6JhGrKgoT0jfav1W-8AUVTxNc9xt3fJQ2n0JI,1492
221
222
  accrete/utils/forms.py,sha256=Lll-DvAhKZDw72XeuCtb4wxQEJNFp7lQWh_Z1GyH3Zk,3049
222
223
  accrete/utils/http.py,sha256=mAtQRgADv7zu1_j7A-EKVyb-oqa5a21i4Gd0QfjzGV0,3540
223
224
  accrete/utils/models.py,sha256=EEhv7-sQVtQD24PEb3XcDUAh3VVhVFoMMLyFrDjGEaI,706
224
- accrete-0.0.78.dist-info/METADATA,sha256=esUu2SvV0VzrRo9zvqg88a4Q1Xw_q7LsJSG7fkzvcnM,4892
225
- accrete-0.0.78.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
226
- accrete-0.0.78.dist-info/licenses/LICENSE,sha256=_7laeMIHnsd3Y2vJEXDYXq_PEXxIcjgJsGt8UIKTRWc,1057
227
- accrete-0.0.78.dist-info/RECORD,,
225
+ accrete-0.0.80.dist-info/METADATA,sha256=aISJ1qmlxwcQrN1sX8tntqrCNy3yY_iHnj4aWHW_-5U,4892
226
+ accrete-0.0.80.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
227
+ accrete-0.0.80.dist-info/licenses/LICENSE,sha256=_7laeMIHnsd3Y2vJEXDYXq_PEXxIcjgJsGt8UIKTRWc,1057
228
+ accrete-0.0.80.dist-info/RECORD,,