django-smartbase-admin 1.0.13__py3-none-any.whl → 1.0.15__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.
Files changed (53) hide show
  1. django_smartbase_admin/admin/admin_base.py +21 -2
  2. django_smartbase_admin/admin/site.py +7 -1
  3. django_smartbase_admin/admin/widgets.py +19 -7
  4. django_smartbase_admin/engine/admin_base_view.py +14 -0
  5. django_smartbase_admin/engine/configuration.py +25 -25
  6. django_smartbase_admin/engine/menu_item.py +8 -5
  7. django_smartbase_admin/locale/sk/LC_MESSAGES/django.mo +0 -0
  8. django_smartbase_admin/locale/sk/LC_MESSAGES/django.po +22 -13
  9. django_smartbase_admin/migrations/0005_sbadminuserconfiguration.py +26 -0
  10. django_smartbase_admin/models.py +33 -0
  11. django_smartbase_admin/services/configuration.py +13 -0
  12. django_smartbase_admin/static/sb_admin/build/tailwind_config_partials/colors.js +4 -0
  13. django_smartbase_admin/static/sb_admin/css/ckeditor/ckeditor_content_dark.css +208 -0
  14. django_smartbase_admin/static/sb_admin/dist/calendar.js +1 -1
  15. django_smartbase_admin/static/sb_admin/dist/calendar_style.css +1 -1
  16. django_smartbase_admin/static/sb_admin/dist/chart.js +1 -1
  17. django_smartbase_admin/static/sb_admin/dist/main.js +1 -1
  18. django_smartbase_admin/static/sb_admin/dist/main_style.css +1 -1
  19. django_smartbase_admin/static/sb_admin/dist/table.js +1 -1
  20. django_smartbase_admin/static/sb_admin/sprites/sb_admin/Moon.svg +3 -0
  21. django_smartbase_admin/static/sb_admin/sprites/sb_admin/Sun-one.svg +3 -0
  22. django_smartbase_admin/static/sb_admin/src/css/_base.css +1 -1
  23. django_smartbase_admin/static/sb_admin/src/css/_colors.css +257 -82
  24. django_smartbase_admin/static/sb_admin/src/css/_components.css +1 -1
  25. django_smartbase_admin/static/sb_admin/src/css/_tabulator.css +2 -2
  26. django_smartbase_admin/static/sb_admin/src/css/calendar.css +3 -3
  27. django_smartbase_admin/static/sb_admin/src/css/components/_button.css +1 -1
  28. django_smartbase_admin/static/sb_admin/src/css/components/_dropdown.css +25 -7
  29. django_smartbase_admin/static/sb_admin/src/css/components/_input.css +33 -2
  30. django_smartbase_admin/static/sb_admin/src/css/components/_modal.css +1 -1
  31. django_smartbase_admin/static/sb_admin/src/css/components/_query-builder.css +1 -7
  32. django_smartbase_admin/static/sb_admin/src/css/style.css +1 -1
  33. django_smartbase_admin/static/sb_admin/src/js/main.js +58 -15
  34. django_smartbase_admin/static/sb_admin/src/js/multiselect.js +14 -21
  35. django_smartbase_admin/static/sb_admin/src/js/utils.js +47 -23
  36. django_smartbase_admin/templates/sb_admin/actions/change_form.html +25 -23
  37. django_smartbase_admin/templates/sb_admin/filter_widgets/advanced_filters/multiple_choice_field.html +1 -1
  38. django_smartbase_admin/templates/sb_admin/filter_widgets/radio_choice_field.html +1 -1
  39. django_smartbase_admin/templates/sb_admin/includes/inline_fieldset.html +11 -11
  40. django_smartbase_admin/templates/sb_admin/navigation.html +9 -7
  41. django_smartbase_admin/templates/sb_admin/sb_admin_base_no_sidebar.html +1 -1
  42. django_smartbase_admin/templates/sb_admin/sprites/sb_admin.svg +1 -1
  43. django_smartbase_admin/templates/sb_admin/tailwind_whitelist.html +2 -1
  44. django_smartbase_admin/templates/sb_admin/widgets/{checkbox_select.html → checkbox_dropdown.html} +2 -2
  45. django_smartbase_admin/templates/sb_admin/widgets/radio.html +3 -2
  46. django_smartbase_admin/templates/sb_admin/widgets/radio_dropdown.html +30 -0
  47. django_smartbase_admin/utils.py +4 -1
  48. django_smartbase_admin/views/translations_view.py +9 -3
  49. django_smartbase_admin/views/user_config_view.py +35 -0
  50. {django_smartbase_admin-1.0.13.dist-info → django_smartbase_admin-1.0.15.dist-info}/METADATA +1 -1
  51. {django_smartbase_admin-1.0.13.dist-info → django_smartbase_admin-1.0.15.dist-info}/RECORD +53 -47
  52. {django_smartbase_admin-1.0.13.dist-info → django_smartbase_admin-1.0.15.dist-info}/LICENSE.md +0 -0
  53. {django_smartbase_admin-1.0.13.dist-info → django_smartbase_admin-1.0.15.dist-info}/WHEEL +0 -0
@@ -0,0 +1,208 @@
1
+ body
2
+ {
3
+ /* Font */
4
+ /* Emoji fonts are added to visualise them nicely in Internet Explorer. */
5
+ font-family: sans-serif, Arial, Verdana, "Trebuchet MS", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
6
+ font-size: 12px;
7
+
8
+ /* Text color */
9
+ color: #ffffff;
10
+
11
+ /* Remove the background color to make it transparent. */
12
+ background-color: #2B3645;
13
+
14
+ margin: 20px;
15
+ }
16
+
17
+ .cke_panel_listItem.cke_selected a, .cke_panel_listItem a:hover, .cke_panel_listItem a:focus, .cke_panel_listItem a:active {
18
+ background-color: #111827;
19
+ }
20
+
21
+
22
+ .cke_editable
23
+ {
24
+ font-size: 13px;
25
+ line-height: 1.6;
26
+
27
+ /* Fix for missing scrollbars with RTL texts. (#10488) */
28
+ word-wrap: break-word;
29
+ }
30
+
31
+ blockquote
32
+ {
33
+ font-style: italic;
34
+ font-family: Georgia, Times, "Times New Roman", serif;
35
+ padding: 2px 0;
36
+ border-style: solid;
37
+ border-color: #ccc;
38
+ border-width: 0;
39
+ }
40
+
41
+ .cke_contents_ltr blockquote
42
+ {
43
+ padding-left: 20px;
44
+ padding-right: 8px;
45
+ border-left-width: 5px;
46
+ }
47
+
48
+ .cke_contents_rtl blockquote
49
+ {
50
+ padding-left: 8px;
51
+ padding-right: 20px;
52
+ border-right-width: 5px;
53
+ }
54
+
55
+ a
56
+ {
57
+ color: #0782C1;
58
+ }
59
+
60
+ ol,ul,dl
61
+ {
62
+ /* IE7: reset rtl list margin. (#7334) */
63
+ *margin-right: 0px;
64
+ /* Preserved spaces for list items with text direction different than the list. (#6249,#8049)*/
65
+ padding: 0 40px;
66
+ }
67
+
68
+ h1,h2,h3,h4,h5,h6
69
+ {
70
+ font-weight: normal;
71
+ line-height: 1.2;
72
+ }
73
+
74
+ hr
75
+ {
76
+ border: 0px;
77
+ border-top: 1px solid #ccc;
78
+ }
79
+
80
+ img.right
81
+ {
82
+ border: 1px solid #ccc;
83
+ float: right;
84
+ margin-left: 15px;
85
+ padding: 5px;
86
+ }
87
+
88
+ img.left
89
+ {
90
+ border: 1px solid #ccc;
91
+ float: left;
92
+ margin-right: 15px;
93
+ padding: 5px;
94
+ }
95
+
96
+ pre
97
+ {
98
+ white-space: pre-wrap; /* CSS 2.1 */
99
+ word-wrap: break-word; /* IE7 */
100
+ -moz-tab-size: 4;
101
+ tab-size: 4;
102
+ }
103
+
104
+ .marker
105
+ {
106
+ background-color: Yellow;
107
+ }
108
+
109
+ span[lang]
110
+ {
111
+ font-style: italic;
112
+ }
113
+
114
+ figure
115
+ {
116
+ text-align: center;
117
+ outline: solid 1px #ccc;
118
+ background: rgba(0,0,0,0.05);
119
+ padding: 10px;
120
+ margin: 10px 20px;
121
+ display: inline-block;
122
+ }
123
+
124
+ figure > figcaption
125
+ {
126
+ text-align: center;
127
+ display: block; /* For IE8 */
128
+ }
129
+
130
+ a > img {
131
+ padding: 1px;
132
+ margin: 1px;
133
+ border: none;
134
+ outline: 1px solid #0782C1;
135
+ }
136
+
137
+ /* Widget Styles */
138
+ .code-featured
139
+ {
140
+ border: 5px solid red;
141
+ }
142
+
143
+ .math-featured
144
+ {
145
+ padding: 20px;
146
+ box-shadow: 0 0 2px rgba(200, 0, 0, 1);
147
+ background-color: rgba(255, 0, 0, 0.05);
148
+ margin: 10px;
149
+ }
150
+
151
+ .image-clean
152
+ {
153
+ border: 0;
154
+ background: none;
155
+ padding: 0;
156
+ }
157
+
158
+ .image-clean > figcaption
159
+ {
160
+ font-size: .9em;
161
+ text-align: right;
162
+ }
163
+
164
+ .image-grayscale
165
+ {
166
+ background-color: white;
167
+ color: #666;
168
+ }
169
+
170
+ .image-grayscale img, img.image-grayscale
171
+ {
172
+ filter: grayscale(100%);
173
+ }
174
+
175
+ .embed-240p
176
+ {
177
+ max-width: 426px;
178
+ max-height: 240px;
179
+ margin:0 auto;
180
+ }
181
+
182
+ .embed-360p
183
+ {
184
+ max-width: 640px;
185
+ max-height: 360px;
186
+ margin:0 auto;
187
+ }
188
+
189
+ .embed-480p
190
+ {
191
+ max-width: 854px;
192
+ max-height: 480px;
193
+ margin:0 auto;
194
+ }
195
+
196
+ .embed-720p
197
+ {
198
+ max-width: 1280px;
199
+ max-height: 720px;
200
+ margin:0 auto;
201
+ }
202
+
203
+ .embed-1080p
204
+ {
205
+ max-width: 1920px;
206
+ max-height: 1080px;
207
+ margin:0 auto;
208
+ }
@@ -1 +1 @@
1
- (()=>{"use strict";const e=e=>{const t=e.dataset.filterId||e.id,n=e.dataset.labelSeparator||", ",s=document.querySelector(`#${t}-value`);if(!s)return;const r=e.dataset.label;if(r)return s.innerHTML=r,s;const i=(e=>{try{return JSON.parse(e)}catch(e){}return e})(e.value);if(""===e.value||"[]"===e.value)return e.dataset.emptyLabel?s.innerHTML=e.dataset.emptyLabel:s.innerHTML="",s;if("object"==typeof i){const e=[],t=Object.values(i);let r=!1;for(let[n,s]of t.entries()){if(n===window.sb_admin_const.MULTISELECT_FILTER_MAX_CHOICES_SHOWN)break;if(!(t.length>1&&s.value===window.sb_admin_const.SELECT_ALL_KEYWORD)){if(n===window.sb_admin_const.MULTISELECT_FILTER_MAX_CHOICES_SHOWN-2&&t[n+2]){e.push(s.label),r=!0;break}e.push(s.label)}}let a=e.join(n);r&&(a=a.substring(0,a.length),a+="... +"+(t.length-window.sb_admin_const.MULTISELECT_FILTER_MAX_CHOICES_SHOWN+1)),s.innerHTML=a}else try{s.innerHTML=e.options[e.selectedIndex].text}catch(t){const n=document.querySelector(`label[for=${e.id}]`);if(n)s.innerHTML=n.innerText;else{let t;try{t=document.querySelector(`label[for=${e.id}_${e.value}]`)}catch(e){t=null}s.innerHTML=t?t.innerText:i}}return s};window.SBAdminCalendarClass=class{constructor(e){if(this.options=e,this.calendar=null,this.options.calendarOptions=this.options.calendarOptions||{},!Object.hasOwn(this.options.calendarOptions,"events")||!this.options.calendarOptions.events)throw Error("Missing events property!");"string"==typeof this.options.calendarOptions.events&&(this.options.calendarOptions.events={url:this.options.calendarOptions.events}),this.options.calendarOptions.events.extraParams=this.options.calendarOptions.events.extraParams||{},this.options.calendarOptions.events.extraParams=()=>({...this.options.calendarOptions.events.extraParams||{},...this.getFilterData()}),this.initCalendar(),this.initFilters()}initCalendar(){const e=document.getElementById(`${this.options.widgetId}-calendar`);this.calendar=new FullCalendar.Calendar(e,this.options.calendarOptions||{}),this.calendar.render()}getFilterData(){const e=document.querySelector(`#${this.options.widgetId}-filter-form`),t=new FormData(e).entries(),n={};for(const[e,s]of t)s&&(n[e]=s);return n}initFilters(){var t,n;t=`[form="${this.options.widgetId}-filter-form"]`,n=t=>{this.calendar.refetchEvents(),e(t.target)},document.querySelectorAll(t).forEach((e=>{e.addEventListener("change",n),e.addEventListener("keypress",(t=>{if(13===t.keyCode)return e.blur(),t.preventDefault(),e.focus(),!0})),e.addEventListener("SBAutocompleteChange",n)}))}}})();
1
+ (()=>{"use strict";const e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:", ";const n=[],s=Object.values(e);let r=!1;for(let[e,t]of s.entries()){if(e===window.sb_admin_const.MULTISELECT_FILTER_MAX_CHOICES_SHOWN)break;if(!(s.length>1&&t.value===window.sb_admin_const.SELECT_ALL_KEYWORD)){if(e===window.sb_admin_const.MULTISELECT_FILTER_MAX_CHOICES_SHOWN-2&&s[e+2]){n.push(t.label),r=!0;break}n.push(t.label)}}let i=n.join(t);return r&&(i=i.substring(0,i.length),i+="... +"+(s.length-window.sb_admin_const.MULTISELECT_FILTER_MAX_CHOICES_SHOWN+1)),i},t=t=>{const n=t.dataset.filterId||t.id,s=t.dataset.labelSeparator||", ",r=document.querySelector(`#${n}-value`);if(!r)return;const i=t.dataset.label;if(i)return r.innerHTML=i,r;const a=(e=>{try{return JSON.parse(e)}catch(e){}return e})(t.value);if(""===t.value||"[]"===t.value)return t.dataset.emptyLabel?r.innerHTML=t.dataset.emptyLabel:r.innerHTML="",r;if("object"==typeof a)r.innerHTML=e(a,s);else try{r.innerHTML=t.options[t.selectedIndex].text}catch(e){const n=document.querySelector(`label[for=${t.id}]`);if(n)r.innerHTML=n.innerText;else{let e;try{e=document.querySelector(`label[for=${t.id}_${t.value}]`)}catch(t){e=null}r.innerHTML=e?e.innerText:a}}return r};window.SBAdminCalendarClass=class{constructor(e){if(this.options=e,this.calendar=null,this.options.calendarOptions=this.options.calendarOptions||{},!Object.hasOwn(this.options.calendarOptions,"events")||!this.options.calendarOptions.events)throw Error("Missing events property!");"string"==typeof this.options.calendarOptions.events&&(this.options.calendarOptions.events={url:this.options.calendarOptions.events}),this.options.calendarOptions.events.extraParams=this.options.calendarOptions.events.extraParams||{},this.options.calendarOptions.events.extraParams=()=>({...this.options.calendarOptions.events.extraParams||{},...this.getFilterData()}),this.initCalendar(),this.initFilters()}initCalendar(){const e=document.getElementById(`${this.options.widgetId}-calendar`);this.calendar=new FullCalendar.Calendar(e,this.options.calendarOptions||{}),this.calendar.render()}getFilterData(){const e=document.querySelector(`#${this.options.widgetId}-filter-form`),t=new FormData(e).entries(),n={};for(const[e,s]of t)s&&(n[e]=s);return n}initFilters(){var e,n;e=`[form="${this.options.widgetId}-filter-form"]`,n=e=>{this.calendar.refetchEvents(),t(e.target)},document.querySelectorAll(e).forEach((e=>{e.addEventListener("change",n),e.addEventListener("keypress",(t=>{if(13===t.keyCode)return e.blur(),t.preventDefault(),e.focus(),!0})),e.addEventListener("SBAutocompleteChange",n)}))}}})();
@@ -1 +1 @@
1
- :root{--fc-small-font-size:.75rem;--fc-border-color:var(--color-dark-200);--fc-today-bg-color:var(--color-primary-50);--fc-neutral-bg-color:var(--color-dark-100)}.fc-theme-standard th.fc-col-header-cell{background-color:var(--color-dark-100);padding:.5rem 1.5rem}.fc-theme-standard td.fc-daygrid-day{padding:.5rem}.fc table{font-size:.75rem;line-height:1.25rem}.fc .fc-col-header-cell-cushion{font-size:.875rem;font-weight:500;line-height:1.25rem;padding:0}.fc .fc-daygrid-day{height:9rem}.fc .fc-day-other{background-color:var(--color-dark-100)}.fc .fc-day-other .fc-daygrid-day-top{opacity:1}.fc .fc-day-other .fc-daygrid-day-top .fc-daygrid-day-number{color:var(--color-dark)}.fc .fc-day-other .fc-daygrid-day-events{opacity:.6}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before,.fc .fc-daygrid-day-events:after,.fc .fc-daygrid-day-events:before,.fc .fc-daygrid-day-frame:after,.fc .fc-daygrid-day-frame:before,.fc .fc-daygrid-event-harness:after,.fc .fc-daygrid-event-harness:before{display:none}.fc .fc-daygrid-day-events,.fc .fc-daygrid-day-frame{display:flex;flex-direction:column;gap:.25rem}.fc .fc-daygrid-day-events{margin:0}.fc .fc-daygrid-day-top{flex-direction:row}.fc .fc-daygrid-day-number{align-items:center;color:var(--color-dark-900);display:flex;font-weight:600;height:1.5rem;justify-content:center;line-height:1;padding:.25rem;width:1.5rem}.fc .fc-day-today .fc-daygrid-day-number{background-color:var(--color-primary);border-radius:9999px;color:var(--color-light)}.fc .fc-daygrid-event{display:flex;gap:.25rem;margin:0!important}.fc .fc-daygrid-dot-event{border-color:var(--color-dark-200);border-radius:6px;border-width:1px;height:1.5rem;padding:0 .5rem}.fc .fc-daygrid-dot-event .fc-event-time{display:none}.fc .fc-daygrid-dot-event .fc-event-title{color:var(--color-dark-900);font-weight:400;line-height:1rem;text-overflow:ellipsis}.fc .fc-daygrid-event-dot{border-color:currentColor;border-radius:9999px;border-width:2px;box-sizing:border-box;flex-shrink:0;height:.75rem;margin:0;width:.75rem}.fc .fc-daygrid-day-bottom{font-size:.75rem;line-height:1.25rem;margin:0!important}.fc .fc-daygrid-more-link{margin:0;padding:0}.fc .fc-daygrid-more-link:hover{background:none}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{margin-bottom:0;min-height:4rem}.fc .fc-daygrid-day-bg{display:none}.fc .fc-popover{z-index:10}.fc .fc-popover .fc-popover-header{padding:.25rem}.fc .fc-popover .fc-popover-title{font-size:.875rem;line-height:1.25rem}.fc .fc-popover .fc-popover-body{display:flex;flex-direction:column;gap:.25rem;padding:.5rem}.fc .fc-scrollgrid{border-left-width:0}.fc .fc-scrollgrid-section>td,.fc .fc-scrollgrid-section>th{border:0}
1
+ :root{--fc-small-font-size:.75rem;--fc-border-color:var(--color-dark-200);--fc-today-bg-color:var(--color-primary-50);--fc-neutral-bg-color:var(--color-bg-elevated)}.fc-theme-standard th.fc-col-header-cell{background-color:var(--color-bg);padding:.5rem 1.5rem}.fc-theme-standard td.fc-daygrid-day{padding:.5rem}.fc table{font-size:.75rem;line-height:1.25rem}.fc .fc-col-header-cell-cushion{font-size:.875rem;font-weight:500;line-height:1.25rem;padding:0}.fc .fc-daygrid-day{height:9rem}.fc .fc-day-other{background-color:var(--color-bg)}.fc .fc-day-other .fc-daygrid-day-top{opacity:1}.fc .fc-day-other .fc-daygrid-day-top .fc-daygrid-day-number{color:var(--color-dark)}.fc .fc-day-other .fc-daygrid-day-events{opacity:.6}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before,.fc .fc-daygrid-day-events:after,.fc .fc-daygrid-day-events:before,.fc .fc-daygrid-day-frame:after,.fc .fc-daygrid-day-frame:before,.fc .fc-daygrid-event-harness:after,.fc .fc-daygrid-event-harness:before{display:none}.fc .fc-daygrid-day-events,.fc .fc-daygrid-day-frame{display:flex;flex-direction:column;gap:.25rem}.fc .fc-daygrid-day-events{margin:0}.fc .fc-daygrid-day-top{flex-direction:row}.fc .fc-daygrid-day-number{align-items:center;color:var(--color-dark-900);display:flex;font-weight:600;height:1.5rem;justify-content:center;line-height:1;padding:.25rem;width:1.5rem}.fc .fc-day-today .fc-daygrid-day-number{background-color:var(--color-primary);border-radius:9999px;color:var(--color-light)}.fc .fc-daygrid-event{display:flex;gap:.25rem;margin:0!important}.fc .fc-daygrid-dot-event{border-color:var(--color-dark-200);border-radius:6px;border-width:1px;height:1.5rem;padding:0 .5rem}.fc .fc-daygrid-dot-event .fc-event-time{display:none}.fc .fc-daygrid-dot-event .fc-event-title{color:var(--color-dark-900);font-weight:400;line-height:1rem;text-overflow:ellipsis}.fc .fc-daygrid-event-dot{border-color:currentColor;border-radius:9999px;border-width:2px;box-sizing:border-box;flex-shrink:0;height:.75rem;margin:0;width:.75rem}.fc .fc-daygrid-day-bottom{font-size:.75rem;line-height:1.25rem;margin:0!important}.fc .fc-daygrid-more-link{margin:0;padding:0}.fc .fc-daygrid-more-link:hover{background:none}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{margin-bottom:0;min-height:4rem}.fc .fc-daygrid-day-bg{display:none}.fc .fc-popover{z-index:10}.fc .fc-popover .fc-popover-header{padding:.25rem}.fc .fc-popover .fc-popover-title{font-size:.875rem;line-height:1.25rem}.fc .fc-popover .fc-popover-body{display:flex;flex-direction:column;gap:.25rem;padding:.5rem}.fc .fc-scrollgrid{border-left-width:0}.fc .fc-scrollgrid-section>td,.fc .fc-scrollgrid-section>th{border:0}