satis 2.1.57 → 2.1.59
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.
- checksums.yaml +4 -4
- data/app/components/satis/date_time_picker/component.html.slim +15 -13
- data/app/components/satis/date_time_picker/component_controller.js +14 -1
- data/app/components/satis/sidebar/component.css +5 -11
- data/app/components/satis/sidebar/component.html.slim +1 -1
- data/lib/satis/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a368acef4349c5b5a184cb72f89358f9f9e75f24bd90de4ea72af051de2acb64
|
4
|
+
data.tar.gz: c0dd0dbdc9e29ddd712b1cfdc4a496e0740ce19ffe8a1db414d9898ae4aefaa4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da89648a391ea4c44469010366ff6218d12e9c2228473f0ddc828a0d9690c099ca7c42f6aff96607faa0b0ae27aca8eecea01e046b99f9daecd807374eb1dee0
|
7
|
+
data.tar.gz: 812f0521e6438eacac5e042b28690d9da2e1038b64ef2965086089cbf6f60698b424af3ef465d0db3005e2846eaeffe5efd64da57152db1f0d180100712419c3
|
@@ -8,25 +8,27 @@ div.satis-date-time-picker data-controller="satis-date-time-picker" data-satis-d
|
|
8
8
|
|
9
9
|
.container.z-10.shadow.bg-white.border.border-gray-300.dark:bg-gray-800.dark:border-gray-700.rounded.p-4.w-96 class="#{inline ? 'inline-block' : 'hidden'}" data-satis-date-time-picker-target="calendarView"
|
10
10
|
.flex.justify-between.items-center.mb-2
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
button type="button" class="transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 rounded-full" data-action="satis-date-time-picker#previousMonth"
|
12
|
+
i.text-gray-500.inline-flex.px-1.py-1 class=Satis.config.icons[:previous_month]
|
13
|
+
|
14
|
+
.flex.items-center.justify-center.gap-1.text-center.flex-grow
|
15
15
|
span.text-lg.font-bold.text-gray-800.dark:text-gray-200 data-satis-date-time-picker-target="month"
|
16
|
-
|
17
|
-
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
16
|
+
div.relative.flex.items-center
|
17
|
+
select.appearance-none.border-none.bg-transparent.text-lg.font-normal.text-gray-600.dark:text-gray-200.focus:outline-none.focus:ring-0.overflow-y-auto.max-h-12 data-satis-date-time-picker-target="select" data-action="change->satis-date-time-picker#selectYear"
|
18
|
+
- current_year = Time.current.year
|
19
|
+
- (current_year - 100..current_year + 100).each do |year|
|
20
|
+
- selected = true if year == current_year
|
21
|
+
option value=year selected=selected data-satis-date-time-picker-target="year" = year
|
22
|
+
|
23
|
+
button type="button" class="transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 rounded-full" data-action="satis-date-time-picker#nextMonth"
|
24
|
+
i.text-gray-500.inline-flex.px-1.py-1 class=Satis.config.icons[:next_month]
|
23
25
|
|
24
26
|
.grid.grid-cols-7 data-satis-date-time-picker-target="weekDays"
|
25
27
|
template data-satis-date-time-picker-target="weekDayTemplate"
|
26
28
|
div.px-2.w-8
|
27
29
|
div.text-gray-800.dark:text-gray-200.font-medium.text-center.text-xs ${name}
|
28
30
|
|
29
|
-
.grid.grid-cols-7 data-satis-date-time-picker-target="days"
|
31
|
+
.grid.grid-cols-7.grid-rows-6 data-satis-date-time-picker-target="days"
|
30
32
|
|
31
33
|
- if time_picker
|
32
34
|
.flex.items-center.py-2.space-x-2
|
@@ -48,4 +50,4 @@ div.satis-date-time-picker data-controller="satis-date-time-picker" data-satis-d
|
|
48
50
|
.text-center.border.p-1.border-transparent.text-sm
|
49
51
|
template data-satis-date-time-picker-target="dayTemplate"
|
50
52
|
div
|
51
|
-
a.block.w-
|
53
|
+
a.block.w-10.h-10.cursor-pointer.text-center.text-sm.rounded-full.flex.items-center.justify-center.transition.ease-in-out.duration-100.hover:bg-primary-200 data-action="satis-date-time-picker#selectDay" ${day}
|
@@ -425,7 +425,20 @@ export default class DateTimePickerComponentController extends ApplicationContro
|
|
425
425
|
// Refreshes the calendar
|
426
426
|
refreshCalendar(refreshInputs) {
|
427
427
|
this.monthTarget.innerHTML = this.monthName
|
428
|
-
|
428
|
+
|
429
|
+
if(this.hiddenInputTarget.value != "") {
|
430
|
+
const year = this.displayValue.getFullYear()
|
431
|
+
const selectElement = document.querySelector('[data-satis-date-time-picker-target="select"]')
|
432
|
+
const options = selectElement.querySelectorAll('option')
|
433
|
+
|
434
|
+
options.forEach(option => {
|
435
|
+
if (parseInt(option.value) === year) {
|
436
|
+
option.selected = true
|
437
|
+
} else {
|
438
|
+
option.selected = false
|
439
|
+
}
|
440
|
+
})
|
441
|
+
}
|
429
442
|
|
430
443
|
this.weekDaysTarget.innerHTML = ""
|
431
444
|
this.getWeekDays(this.localeValue).forEach((dayName) => {
|
@@ -1,19 +1,15 @@
|
|
1
1
|
.h-screen.flex .sidebar {
|
2
2
|
@apply dark:bg-gray-700 bg-white;
|
3
3
|
width: 260px;
|
4
|
-
height:
|
4
|
+
height: calc(100% - 4rem);
|
5
5
|
top: 0;
|
6
6
|
left: 0;
|
7
|
-
margin-top:
|
7
|
+
margin-top: 4rem;
|
8
8
|
position: absolute;
|
9
9
|
overflow: visible;
|
10
10
|
overflow-y: scroll;
|
11
11
|
scrollbar-width: none;
|
12
|
-
border-top-right-radius: 8px;
|
13
|
-
border-top-left-radius: 8px;
|
14
|
-
border-bottom-right-radius: 8px;
|
15
12
|
z-index: 999;
|
16
|
-
box-shadow: 5px 0 5px -5px rgba(31, 38, 135, 0.37);
|
17
13
|
transition: backdrop-filter 0.3s ease-in-out, transform 0.3s ease-in-out;
|
18
14
|
|
19
15
|
}
|
@@ -32,8 +28,8 @@
|
|
32
28
|
overflow: visible;
|
33
29
|
top: 0;
|
34
30
|
left: 0;
|
35
|
-
height:
|
36
|
-
margin-top:
|
31
|
+
height: calc(100% - 4rem);
|
32
|
+
margin-top: 4rem;
|
37
33
|
width: 60px;
|
38
34
|
z-index: 999;
|
39
35
|
scrollbar-width: none;
|
@@ -45,7 +41,7 @@
|
|
45
41
|
|
46
42
|
|
47
43
|
.h-screen.flex .topbar {
|
48
|
-
@apply bg-white dark:bg-gray-800
|
44
|
+
@apply bg-white dark:bg-gray-800;
|
49
45
|
height: 4rem;
|
50
46
|
display: flex;
|
51
47
|
max-width: 100%;
|
@@ -53,8 +49,6 @@
|
|
53
49
|
margin-left: 0;
|
54
50
|
position: relative;
|
55
51
|
z-index: 10000;
|
56
|
-
border-bottom-left-radius: 8px;
|
57
|
-
border-bottom-right-radius: 8px;
|
58
52
|
transition: backdrop-filter 0.3s ease-in-out, transform 0.3s ease-in-out;
|
59
53
|
}
|
60
54
|
|
data/lib/satis/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: satis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.59
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom de Grunt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: browser
|