cm-admin 3.0.1 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +124 -93
- data/app/assets/javascripts/cm_admin/local-time.js +4 -0
- data/app/assets/javascripts/cm_admin/scaffolds.js +4 -0
- data/app/assets/javascripts/cm_admin/shared_scaffolds.js +2 -0
- data/cm_admin.gemspec +1 -1
- data/config/importmap.rb +1 -0
- data/lib/cm_admin/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92c1ac381c7141e2801cb3f7fe4910054b334a23e7ccde418eaa399cf00cd97a
|
4
|
+
data.tar.gz: 53c22100fca22f60e04c750fa23b8cb3132d225e8f9854242b258f054aa345c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc716f2b0f3ae3eedd90366398f5c4d6951e4deb04b8dfe5b3a260f98ef6d47293e03a14bd7d848c9367c1a5a22c266f1fd49ca4818c8249104cb5cf9acb0506
|
7
|
+
data.tar.gz: befabc92fca92618d6a7d743fa28ae44c133364d5827cce882012e96768013fa030a91ef06d2aa8a370aa020bfc6a50002d3e2ea2ae3d92eb59a2c55bc6ec1bd
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cm-admin (3.0.
|
4
|
+
cm-admin (3.0.3)
|
5
5
|
caxlsx_rails
|
6
6
|
cocoon (~> 1.2.15)
|
7
7
|
csv-importer (~> 0.8.2)
|
8
8
|
importmap-rails
|
9
|
-
local_time (~>
|
9
|
+
local_time (~> 3.0.2)
|
10
10
|
pagy (~> 4.11.0)
|
11
11
|
pundit (~> 2.2.0)
|
12
12
|
rails (>= 6.0)
|
@@ -16,110 +16,127 @@ PATH
|
|
16
16
|
GEM
|
17
17
|
remote: https://rubygems.org/
|
18
18
|
specs:
|
19
|
-
actioncable (7.
|
20
|
-
actionpack (= 7.
|
21
|
-
activesupport (= 7.
|
19
|
+
actioncable (7.1.4.1)
|
20
|
+
actionpack (= 7.1.4.1)
|
21
|
+
activesupport (= 7.1.4.1)
|
22
22
|
nio4r (~> 2.0)
|
23
23
|
websocket-driver (>= 0.6.1)
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
24
|
+
zeitwerk (~> 2.6)
|
25
|
+
actionmailbox (7.1.4.1)
|
26
|
+
actionpack (= 7.1.4.1)
|
27
|
+
activejob (= 7.1.4.1)
|
28
|
+
activerecord (= 7.1.4.1)
|
29
|
+
activestorage (= 7.1.4.1)
|
30
|
+
activesupport (= 7.1.4.1)
|
30
31
|
mail (>= 2.7.1)
|
31
32
|
net-imap
|
32
33
|
net-pop
|
33
34
|
net-smtp
|
34
|
-
actionmailer (7.
|
35
|
-
actionpack (= 7.
|
36
|
-
actionview (= 7.
|
37
|
-
activejob (= 7.
|
38
|
-
activesupport (= 7.
|
35
|
+
actionmailer (7.1.4.1)
|
36
|
+
actionpack (= 7.1.4.1)
|
37
|
+
actionview (= 7.1.4.1)
|
38
|
+
activejob (= 7.1.4.1)
|
39
|
+
activesupport (= 7.1.4.1)
|
39
40
|
mail (~> 2.5, >= 2.5.4)
|
40
41
|
net-imap
|
41
42
|
net-pop
|
42
43
|
net-smtp
|
43
|
-
rails-dom-testing (~> 2.
|
44
|
-
actionpack (7.
|
45
|
-
actionview (= 7.
|
46
|
-
activesupport (= 7.
|
47
|
-
|
44
|
+
rails-dom-testing (~> 2.2)
|
45
|
+
actionpack (7.1.4.1)
|
46
|
+
actionview (= 7.1.4.1)
|
47
|
+
activesupport (= 7.1.4.1)
|
48
|
+
nokogiri (>= 1.8.5)
|
49
|
+
racc
|
50
|
+
rack (>= 2.2.4)
|
51
|
+
rack-session (>= 1.0.1)
|
48
52
|
rack-test (>= 0.6.3)
|
49
|
-
rails-dom-testing (~> 2.
|
50
|
-
rails-html-sanitizer (~> 1.
|
51
|
-
actiontext (7.
|
52
|
-
actionpack (= 7.
|
53
|
-
activerecord (= 7.
|
54
|
-
activestorage (= 7.
|
55
|
-
activesupport (= 7.
|
53
|
+
rails-dom-testing (~> 2.2)
|
54
|
+
rails-html-sanitizer (~> 1.6)
|
55
|
+
actiontext (7.1.4.1)
|
56
|
+
actionpack (= 7.1.4.1)
|
57
|
+
activerecord (= 7.1.4.1)
|
58
|
+
activestorage (= 7.1.4.1)
|
59
|
+
activesupport (= 7.1.4.1)
|
56
60
|
globalid (>= 0.6.0)
|
57
61
|
nokogiri (>= 1.8.5)
|
58
|
-
actionview (7.
|
59
|
-
activesupport (= 7.
|
62
|
+
actionview (7.1.4.1)
|
63
|
+
activesupport (= 7.1.4.1)
|
60
64
|
builder (~> 3.1)
|
61
|
-
erubi (~> 1.
|
62
|
-
rails-dom-testing (~> 2.
|
63
|
-
rails-html-sanitizer (~> 1.
|
64
|
-
activejob (7.
|
65
|
-
activesupport (= 7.
|
65
|
+
erubi (~> 1.11)
|
66
|
+
rails-dom-testing (~> 2.2)
|
67
|
+
rails-html-sanitizer (~> 1.6)
|
68
|
+
activejob (7.1.4.1)
|
69
|
+
activesupport (= 7.1.4.1)
|
66
70
|
globalid (>= 0.3.6)
|
67
|
-
activemodel (7.
|
68
|
-
activesupport (= 7.
|
69
|
-
activerecord (7.
|
70
|
-
activemodel (= 7.
|
71
|
-
activesupport (= 7.
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
71
|
+
activemodel (7.1.4.1)
|
72
|
+
activesupport (= 7.1.4.1)
|
73
|
+
activerecord (7.1.4.1)
|
74
|
+
activemodel (= 7.1.4.1)
|
75
|
+
activesupport (= 7.1.4.1)
|
76
|
+
timeout (>= 0.4.0)
|
77
|
+
activestorage (7.1.4.1)
|
78
|
+
actionpack (= 7.1.4.1)
|
79
|
+
activejob (= 7.1.4.1)
|
80
|
+
activerecord (= 7.1.4.1)
|
81
|
+
activesupport (= 7.1.4.1)
|
77
82
|
marcel (~> 1.0)
|
78
|
-
|
79
|
-
|
83
|
+
activesupport (7.1.4.1)
|
84
|
+
base64
|
85
|
+
bigdecimal
|
80
86
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
87
|
+
connection_pool (>= 2.2.5)
|
88
|
+
drb
|
81
89
|
i18n (>= 1.6, < 2)
|
82
90
|
minitest (>= 5.1)
|
91
|
+
mutex_m
|
83
92
|
tzinfo (~> 2.0)
|
84
93
|
ast (2.4.2)
|
85
94
|
axiom-types (0.1.1)
|
86
95
|
descendants_tracker (~> 0.0.4)
|
87
96
|
ice_nine (~> 0.11.0)
|
88
97
|
thread_safe (~> 0.3, >= 0.3.1)
|
98
|
+
base64 (0.2.0)
|
99
|
+
bigdecimal (3.1.8)
|
89
100
|
builder (3.3.0)
|
90
101
|
caxlsx (4.1.0)
|
91
102
|
htmlentities (~> 4.3, >= 4.3.4)
|
92
103
|
marcel (~> 1.0)
|
93
104
|
nokogiri (~> 1.10, >= 1.10.4)
|
94
105
|
rubyzip (>= 1.3.0, < 3)
|
95
|
-
caxlsx_rails (0.6.
|
106
|
+
caxlsx_rails (0.6.4)
|
96
107
|
actionpack (>= 3.1)
|
97
108
|
caxlsx (>= 3.0)
|
98
109
|
cocoon (1.2.15)
|
99
110
|
coercible (1.0.0)
|
100
111
|
descendants_tracker (~> 0.0.1)
|
101
112
|
concurrent-ruby (1.3.4)
|
113
|
+
connection_pool (2.4.1)
|
102
114
|
crass (1.0.6)
|
103
115
|
csv-importer (0.8.2)
|
104
116
|
virtus
|
105
117
|
date (3.3.4)
|
106
118
|
descendants_tracker (0.0.4)
|
107
119
|
thread_safe (~> 0.3, >= 0.3.1)
|
108
|
-
diff-lcs (1.
|
109
|
-
|
120
|
+
diff-lcs (1.5.1)
|
121
|
+
drb (2.2.1)
|
122
|
+
erubi (1.13.0)
|
110
123
|
globalid (1.2.1)
|
111
124
|
activesupport (>= 6.1)
|
112
125
|
htmlentities (4.3.4)
|
113
126
|
i18n (1.14.6)
|
114
127
|
concurrent-ruby (~> 1.0)
|
115
128
|
ice_nine (0.11.2)
|
116
|
-
importmap-rails (2.0.
|
129
|
+
importmap-rails (2.0.3)
|
117
130
|
actionpack (>= 6.0.0)
|
118
131
|
activesupport (>= 6.0.0)
|
119
132
|
railties (>= 6.0.0)
|
133
|
+
io-console (0.7.2)
|
134
|
+
irb (1.14.1)
|
135
|
+
rdoc (>= 4.0.0)
|
136
|
+
reline (>= 0.4.2)
|
120
137
|
json (2.7.2)
|
121
138
|
language_server-protocol (3.17.0.3)
|
122
|
-
local_time (
|
139
|
+
local_time (3.0.2)
|
123
140
|
loofah (2.22.0)
|
124
141
|
crass (~> 1.0.2)
|
125
142
|
nokogiri (>= 1.12.0)
|
@@ -129,11 +146,11 @@ GEM
|
|
129
146
|
net-pop
|
130
147
|
net-smtp
|
131
148
|
marcel (1.0.4)
|
132
|
-
method_source (1.1.0)
|
133
149
|
mini_mime (1.1.5)
|
134
150
|
mini_portile2 (2.8.7)
|
135
151
|
minitest (5.25.1)
|
136
|
-
|
152
|
+
mutex_m (0.2.0)
|
153
|
+
net-imap (0.4.17)
|
137
154
|
date
|
138
155
|
net-protocol
|
139
156
|
net-pop (0.1.2)
|
@@ -143,40 +160,47 @@ GEM
|
|
143
160
|
net-smtp (0.5.0)
|
144
161
|
net-protocol
|
145
162
|
nio4r (2.7.3)
|
146
|
-
nokogiri (1.16.
|
163
|
+
nokogiri (1.16.7)
|
147
164
|
mini_portile2 (~> 2.8.2)
|
148
165
|
racc (~> 1.4)
|
149
|
-
nokogiri (1.16.
|
166
|
+
nokogiri (1.16.7-arm64-darwin)
|
150
167
|
racc (~> 1.4)
|
151
|
-
nokogiri (1.16.
|
168
|
+
nokogiri (1.16.7-x86_64-linux)
|
152
169
|
racc (~> 1.4)
|
153
170
|
pagy (4.11.0)
|
154
171
|
parallel (1.26.3)
|
155
172
|
parser (3.3.5.0)
|
156
173
|
ast (~> 2.4.1)
|
157
174
|
racc
|
175
|
+
psych (5.1.2)
|
176
|
+
stringio
|
158
177
|
pundit (2.2.0)
|
159
178
|
activesupport (>= 3.0.0)
|
160
179
|
racc (1.8.1)
|
161
|
-
rack (
|
180
|
+
rack (3.1.8)
|
162
181
|
rack-proxy (0.7.7)
|
163
182
|
rack
|
183
|
+
rack-session (2.0.0)
|
184
|
+
rack (>= 3.0.0)
|
164
185
|
rack-test (2.1.0)
|
165
186
|
rack (>= 1.3)
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
187
|
+
rackup (2.1.0)
|
188
|
+
rack (>= 3)
|
189
|
+
webrick (~> 1.8)
|
190
|
+
rails (7.1.4.1)
|
191
|
+
actioncable (= 7.1.4.1)
|
192
|
+
actionmailbox (= 7.1.4.1)
|
193
|
+
actionmailer (= 7.1.4.1)
|
194
|
+
actionpack (= 7.1.4.1)
|
195
|
+
actiontext (= 7.1.4.1)
|
196
|
+
actionview (= 7.1.4.1)
|
197
|
+
activejob (= 7.1.4.1)
|
198
|
+
activemodel (= 7.1.4.1)
|
199
|
+
activerecord (= 7.1.4.1)
|
200
|
+
activestorage (= 7.1.4.1)
|
201
|
+
activesupport (= 7.1.4.1)
|
178
202
|
bundler (>= 1.15.0)
|
179
|
-
railties (= 7.
|
203
|
+
railties (= 7.1.4.1)
|
180
204
|
rails-dom-testing (2.2.0)
|
181
205
|
activesupport (>= 5.0.0)
|
182
206
|
minitest
|
@@ -184,30 +208,35 @@ GEM
|
|
184
208
|
rails-html-sanitizer (1.6.0)
|
185
209
|
loofah (~> 2.21)
|
186
210
|
nokogiri (~> 1.14)
|
187
|
-
railties (7.
|
188
|
-
actionpack (= 7.
|
189
|
-
activesupport (= 7.
|
190
|
-
|
211
|
+
railties (7.1.4.1)
|
212
|
+
actionpack (= 7.1.4.1)
|
213
|
+
activesupport (= 7.1.4.1)
|
214
|
+
irb
|
215
|
+
rackup (>= 1.0.0)
|
191
216
|
rake (>= 12.2)
|
192
|
-
thor (~> 1.0)
|
193
|
-
zeitwerk (~> 2.
|
217
|
+
thor (~> 1.0, >= 1.2.2)
|
218
|
+
zeitwerk (~> 2.6)
|
194
219
|
rainbow (3.1.1)
|
195
220
|
rake (12.3.3)
|
221
|
+
rdoc (6.7.0)
|
222
|
+
psych (>= 4.0.0)
|
196
223
|
regexp_parser (2.9.2)
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
rspec-
|
201
|
-
|
202
|
-
rspec-
|
203
|
-
rspec-
|
224
|
+
reline (0.5.10)
|
225
|
+
io-console (~> 0.5)
|
226
|
+
rspec (3.13.0)
|
227
|
+
rspec-core (~> 3.13.0)
|
228
|
+
rspec-expectations (~> 3.13.0)
|
229
|
+
rspec-mocks (~> 3.13.0)
|
230
|
+
rspec-core (3.13.2)
|
231
|
+
rspec-support (~> 3.13.0)
|
232
|
+
rspec-expectations (3.13.3)
|
204
233
|
diff-lcs (>= 1.2.0, < 2.0)
|
205
|
-
rspec-support (~> 3.
|
206
|
-
rspec-mocks (3.
|
234
|
+
rspec-support (~> 3.13.0)
|
235
|
+
rspec-mocks (3.13.2)
|
207
236
|
diff-lcs (>= 1.2.0, < 2.0)
|
208
|
-
rspec-support (~> 3.
|
209
|
-
rspec-support (3.
|
210
|
-
rubocop (1.
|
237
|
+
rspec-support (~> 3.13.0)
|
238
|
+
rspec-support (3.13.1)
|
239
|
+
rubocop (1.67.0)
|
211
240
|
json (~> 2.3)
|
212
241
|
language_server-protocol (>= 3.17.0)
|
213
242
|
parallel (~> 1.10)
|
@@ -219,7 +248,7 @@ GEM
|
|
219
248
|
unicode-display_width (>= 2.4.0, < 3.0)
|
220
249
|
rubocop-ast (1.32.3)
|
221
250
|
parser (>= 3.3.1.0)
|
222
|
-
rubocop-performance (1.
|
251
|
+
rubocop-performance (1.22.1)
|
223
252
|
rubocop (>= 1.48.1, < 2.0)
|
224
253
|
rubocop-ast (>= 1.31.1, < 2.0)
|
225
254
|
rubocop-rails (2.26.2)
|
@@ -233,10 +262,11 @@ GEM
|
|
233
262
|
slim (4.1.0)
|
234
263
|
temple (>= 0.7.6, < 0.9)
|
235
264
|
tilt (>= 2.0.6, < 2.1)
|
265
|
+
stringio (3.1.1)
|
236
266
|
temple (0.8.2)
|
237
|
-
thor (1.3.
|
267
|
+
thor (1.3.2)
|
238
268
|
thread_safe (0.3.6)
|
239
|
-
tilt (2.0.
|
269
|
+
tilt (2.0.11)
|
240
270
|
timeout (0.4.1)
|
241
271
|
tzinfo (2.0.6)
|
242
272
|
concurrent-ruby (~> 1.0)
|
@@ -250,10 +280,11 @@ GEM
|
|
250
280
|
rack-proxy (>= 0.6.1)
|
251
281
|
railties (>= 5.2)
|
252
282
|
semantic_range (>= 2.3.0)
|
283
|
+
webrick (1.8.2)
|
253
284
|
websocket-driver (0.7.6)
|
254
285
|
websocket-extensions (>= 0.1.0)
|
255
286
|
websocket-extensions (0.1.5)
|
256
|
-
zeitwerk (2.6.
|
287
|
+
zeitwerk (2.6.18)
|
257
288
|
|
258
289
|
PLATFORMS
|
259
290
|
arm64-darwin-20
|
@@ -0,0 +1,4 @@
|
|
1
|
+
// local-time@3.0.2 downloaded from https://ga.jspm.io/npm:local-time@3.0.2/app/assets/javascripts/local-time.es2017-esm.js
|
2
|
+
|
3
|
+
var t;t={config:{},run:function(){return this.getController().processElements()},process:function(...t){var e,r,a;for(r=0,a=t.length;r<a;r++)e=t[r],this.getController().processElement(e);return t.length},getController:function(){return null!=this.controller?this.controller:this.controller=new t.Controller}};var e,r,a,n,s,i,o,u,l,c,d,m,h,f,g,p,S,v,y,T,b,M,D,w,E,I,C,N,A,O,$,F,Y,k,W,L=t;L.config.useFormat24=!1,L.config.i18n={en:{date:{dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbrDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbrMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yesterday:"yesterday",today:"today",tomorrow:"tomorrow",on:"on {date}",formats:{default:"%b %e, %Y",thisYear:"%b %e"}},time:{am:"am",pm:"pm",singular:"a {time}",singularAn:"an {time}",elapsed:"{time} ago",second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",formats:{default:"%l:%M%P",default_24h:"%H:%M"}},datetime:{at:"{date} at {time}",formats:{default:"%B %e, %Y at %l:%M%P %Z",default_24h:"%B %e, %Y at %H:%M %Z"}}}},L.config.locale="en",L.config.defaultLocale="en",L.config.timerInterval=6e4,a=!isNaN(Date.parse("2011-01-01T12:00:00-05:00")),L.parseDate=function(t){return t=t.toString(),a||(t=r(t)),new Date(Date.parse(t))},e=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(Z|[-+]?[\d:]+)$/,r=function(t){var r,a,n,s,i,o,u,l,c,d;if(s=t.match(e))return[r,c,o,a,n,i,l,d]=s,"Z"!==d&&(u=d.replace(":","")),`${c}/${o}/${a} ${n}:${i}:${l} GMT${[u]}`},L.elementMatchesSelector=(n=document.documentElement,s=null!=(i=null!=(o=null!=(u=null!=(l=n.matches)?l:n.matchesSelector)?u:n.webkitMatchesSelector)?o:n.mozMatchesSelector)?i:n.msMatchesSelector,function(t,e){if((null!=t?t.nodeType:void 0)===Node.ELEMENT_NODE)return s.call(t,e)}),({config:c}=L),({i18n:m}=c),L.getI18nValue=function(t="",{locale:e}={locale:c.locale}){var r;return null!=(r=d(m[e],t))?r:e!==c.defaultLocale?L.getI18nValue(t,{locale:c.defaultLocale}):void 0},L.translate=function(t,e={},r){var a,n,s;for(a in s=L.getI18nValue(t,r),e)n=e[a],s=s.replace(`{${a}}`,n);return s},d=function(t,e){var r,a,n,s,i;for(i=t,r=0,n=(s=e.split(".")).length;r<n;r++){if(null==i[a=s[r]])return null;i=i[a]}return i},({getI18nValue:f,translate:M}=L),b="function"==typeof("undefined"!=typeof Intl&&null!==Intl?Intl.DateTimeFormat:void 0),g={"Central European Standard Time":"CET","Central European Summer Time":"CEST","China Standard Time":"CST","Israel Daylight Time":"IDT","Israel Standard Time":"IST","Moscow Standard Time":"MSK","Philippine Standard Time":"PHT","Singapore Standard Time":"SGT","Western Indonesia Time":"WIB"},L.knownEdgeCaseTimeZones=g,L.strftime=T=function(t,e){var r,a,n,s,i,o,u;return a=t.getDay(),r=t.getDate(),i=t.getMonth(),u=t.getFullYear(),n=t.getHours(),s=t.getMinutes(),o=t.getSeconds(),e.replace(/%(-?)([%aAbBcdeHIlmMpPSwyYZ])/g,(function(e,l,c){switch(c){case"%":return"%";case"a":return f("date.abbrDayNames")[a];case"A":return f("date.dayNames")[a];case"b":return f("date.abbrMonthNames")[i];case"B":return f("date.monthNames")[i];case"c":return t.toString();case"d":return p(r,l);case"e":return r;case"H":return p(n,l);case"I":return p(T(t,"%l"),l);case"l":return 0===n||12===n?12:(n+12)%12;case"m":return p(i+1,l);case"M":return p(s,l);case"p":return M("time."+(n>11?"pm":"am")).toUpperCase();case"P":return M("time."+(n>11?"pm":"am"));case"S":return p(o,l);case"w":return a;case"y":return p(u%100,l);case"Y":return u;case"Z":return S(t)}}))},p=function(t,e){return"-"===e?t:`0${t}`.slice(-2)},S=function(t){var e,r,a;return(r=h(t))?g[r]:(a=y(t,{allowGMT:!1}))||(a=v(t))?a:(e=y(t,{allowGMT:!0}))?e:""},h=function(t){return Object.keys(g).find((function(e){return b?new Date(t).toLocaleString("en-US",{timeZoneName:"long"}).includes(e):t.toString().includes(e)}))},y=function(t,{allowGMT:e}){var r;if(b&&(r=new Date(t).toLocaleString("en-US",{timeZoneName:"short"}).split(" ").pop(),e||!r.includes("GMT")))return r},v=function(t){var e,r,a,n,s;return(e=null!=(r=(s=t.toString()).match(/\(([\w\s]+)\)$/))?r[1]:void 0)?/\s/.test(e)?e.match(/\b(\w)/g).join(""):e:(e=null!=(a=s.match(/(\w{3,4})\s\d{4}$/))?a[1]:void 0)||(e=null!=(n=s.match(/(UTC[\+\-]\d+)/))?n[1]:void 0)?e:void 0},L.CalendarDate=class{static fromDate(t){return new this(t.getFullYear(),t.getMonth()+1,t.getDate())}static today(){return this.fromDate(new Date)}constructor(t,e,r){this.date=new Date(Date.UTC(t,e-1)),this.date.setUTCDate(r),this.year=this.date.getUTCFullYear(),this.month=this.date.getUTCMonth()+1,this.day=this.date.getUTCDate(),this.value=this.date.getTime()}equals(t){return(null!=t?t.value:void 0)===this.value}is(t){return this.equals(t)}isToday(){return this.is(this.constructor.today())}occursOnSameYearAs(t){return this.year===(null!=t?t.year:void 0)}occursThisYear(){return this.occursOnSameYearAs(this.constructor.today())}daysSince(t){if(t)return(this.date-t.date)/864e5}daysPassed(){return this.constructor.today().daysSince(this)}},({strftime:E,translate:I,getI18nValue:w,config:D}=L),L.RelativeTime=class{constructor(t){this.date=t,this.calendarDate=L.CalendarDate.fromDate(this.date)}toString(){var t,e;return(e=this.toTimeElapsedString())?I("time.elapsed",{time:e}):(t=this.toWeekdayString())?(e=this.toTimeString(),I("datetime.at",{date:t,time:e})):I("date.on",{date:this.toDateString()})}toTimeOrDateString(){return this.calendarDate.isToday()?this.toTimeString():this.toDateString()}toTimeElapsedString(){var t,e,r,a,n;return r=(new Date).getTime()-this.date.getTime(),a=Math.round(r/1e3),e=Math.round(a/60),t=Math.round(e/60),r<0?null:a<10?(n=I("time.second"),I("time.singular",{time:n})):a<45?`${a} ${I("time.seconds")}`:a<90?(n=I("time.minute"),I("time.singular",{time:n})):e<45?`${e} ${I("time.minutes")}`:e<90?(n=I("time.hour"),I("time.singularAn",{time:n})):t<24?`${t} ${I("time.hours")}`:""}toWeekdayString(){switch(this.calendarDate.daysPassed()){case 0:return I("date.today");case 1:return I("date.yesterday");case-1:return I("date.tomorrow");case 2:case 3:case 4:case 5:case 6:return E(this.date,"%A");default:return""}}toDateString(){var t;return t=this.calendarDate.occursThisYear()?w("date.formats.thisYear"):w("date.formats.default"),E(this.date,t)}toTimeString(){var t;return t=D.useFormat24?"default_24h":"default",E(this.date,w(`time.formats.${t}`))}},({elementMatchesSelector:C}=L),L.PageObserver=class{constructor(t,e){this.processMutations=this.processMutations.bind(this),this.processInsertion=this.processInsertion.bind(this),this.selector=t,this.callback=e}start(){if(!this.started)return this.observeWithMutationObserver()||this.observeWithMutationEvent(),this.started=!0}observeWithMutationObserver(){if("undefined"!=typeof MutationObserver&&null!==MutationObserver)return new MutationObserver(this.processMutations).observe(document.documentElement,{childList:!0,subtree:!0}),!0}observeWithMutationEvent(){return addEventListener("DOMNodeInserted",this.processInsertion,!1),!0}findSignificantElements(t){var e;return e=[],(null!=t?t.nodeType:void 0)===Node.ELEMENT_NODE&&(C(t,this.selector)&&e.push(t),e.push(...t.querySelectorAll(this.selector))),e}processMutations(t){var e,r,a,n,s,i,o,u;for(e=[],r=0,n=t.length;r<n;r++)if("childList"===(i=t[r]).type)for(a=0,s=(u=i.addedNodes).length;a<s;a++)o=u[a],e.push(...this.findSignificantElements(o));return this.notify(e)}processInsertion(t){var e;return e=this.findSignificantElements(t.target),this.notify(e)}notify(t){if(null!=t?t.length:void 0)return"function"==typeof this.callback?this.callback(t):void 0}},({parseDate:O,strftime:$,getI18nValue:A,config:N}=L),L.Controller=function(){var t,e,r,a;return t="time[data-local]:not([data-localized])",e=function(t){return t.setAttribute("data-localized","")},r=function(t){return t.setAttribute("data-processed-at",(new Date).toISOString())},a=function(t){return new L.RelativeTime(t)},class{constructor(){this.processElements=this.processElements.bind(this),this.pageObserver=new L.PageObserver(t,this.processElements)}start(){if(!this.started)return this.processElements(),this.startTimer(),this.pageObserver.start(),this.started=!0}startTimer(){var t;if(t=N.timerInterval)return null!=this.timer?this.timer:this.timer=setInterval(this.processElements,t)}processElements(e=document.querySelectorAll(t)){var r,a,n;for(a=0,n=e.length;a<n;a++)r=e[a],this.processElement(r);return e.length}processElement(t){var n,s,i,o,u,l;if(n=t.getAttribute("datetime"),i=t.getAttribute("data-local"),s=N.useFormat24&&t.getAttribute("data-format24")||t.getAttribute("data-format"),o=O(n),!isNaN(o))return t.hasAttribute("title")||(l=N.useFormat24?"default_24h":"default",u=$(o,A(`datetime.formats.${l}`)),t.setAttribute("title",u)),r(t),t.textContent=function(){switch(i){case"time":return e(t),$(o,s);case"date":return e(t),a(o).toDateString();case"time-ago":return a(o).toString();case"time-or-date":return a(o).toTimeOrDateString();case"weekday":return a(o).toWeekdayString();case"weekday-or-date":return a(o).toWeekdayString()||a(o).toDateString()}}()}}}.call(window),W=!1,F=function(){return document.attachEvent?"complete"===document.readyState:"loading"!==document.readyState},Y=function(t){var e;return null!=(e="function"==typeof requestAnimationFrame?requestAnimationFrame(t):void 0)?e:setTimeout(t,17)},k=function(){return L.getController().start()},L.start=function(){return W?L.run():(W=!0,"undefined"!=typeof MutationObserver&&null!==MutationObserver||F()?k():Y(k))},L.processing=function(){return L.getController().started},window.LocalTime===L&&L.start();export{L as default};
|
4
|
+
|
@@ -18,6 +18,7 @@ import "flatpickr";
|
|
18
18
|
import "trix";
|
19
19
|
import "@rails/actiontext";
|
20
20
|
import Select2 from "select2";
|
21
|
+
import LocalTime from "./local-time"
|
21
22
|
Select2();
|
22
23
|
|
23
24
|
// import '@nathanvda/cocoon'
|
@@ -36,7 +37,10 @@ document.addEventListener("turbo:load", function () {
|
|
36
37
|
$(".select-2").select2({
|
37
38
|
theme: "bootstrap-5",
|
38
39
|
});
|
40
|
+
LocalTime.start()
|
41
|
+
|
39
42
|
setup_select_2_ajax();
|
43
|
+
|
40
44
|
const bsToast = $('[data-behaviour="toast"]')[0];
|
41
45
|
if (bsToast) {
|
42
46
|
const toast = new bootstrap.Toast(bsToast);
|
@@ -245,4 +245,6 @@ export function initializeComponents() {
|
|
245
245
|
var headerElemHeight = $(".page-top-bar").height() + 64;
|
246
246
|
var calculatedHeight = "calc(100vh - " + headerElemHeight + "px" + ")";
|
247
247
|
$(".table-wrapper").css("maxHeight", calculatedHeight);
|
248
|
+
|
249
|
+
LocalTime.start()
|
248
250
|
}
|
data/cm_admin.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_runtime_dependency 'caxlsx_rails'
|
32
32
|
spec.add_runtime_dependency 'cocoon', '~> 1.2.15'
|
33
33
|
spec.add_runtime_dependency 'csv-importer', '~> 0.8.2'
|
34
|
-
spec.add_runtime_dependency 'local_time', '~>
|
34
|
+
spec.add_runtime_dependency 'local_time', '~> 3.0.2'
|
35
35
|
spec.add_runtime_dependency 'pagy', '~> 4.11.0'
|
36
36
|
spec.add_runtime_dependency 'pundit', '~> 2.2.0'
|
37
37
|
spec.add_runtime_dependency('rails', '>= 6.0')
|
data/config/importmap.rb
CHANGED
@@ -9,3 +9,4 @@ pin '@rails/actiontext', to: 'https://ga.jspm.io/npm:@rails/actiontext@7.1.3-4/a
|
|
9
9
|
pin 'daterangepicker', to: 'https://ga.jspm.io/npm:daterangepicker@3.1.0/daterangepicker.js'
|
10
10
|
pin '@nathanvda/cocoon', to: 'https://ga.jspm.io/npm:@nathanvda/cocoon@1.2.14/cocoon.js'
|
11
11
|
pin 'select2', to: 'https://ga.jspm.io/npm:select2@4.1.0-rc.0/dist/js/select2.js'
|
12
|
+
pin "local-time" # @3.0.2
|
data/lib/cm_admin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cm-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: exe
|
16
16
|
cert_chain: []
|
17
|
-
date: 2024-10-
|
17
|
+
date: 2024-10-23 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: caxlsx_rails
|
@@ -64,14 +64,14 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version:
|
67
|
+
version: 3.0.2
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
74
|
+
version: 3.0.2
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: pagy
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -213,6 +213,7 @@ files:
|
|
213
213
|
- app/assets/javascripts/cm_admin/filters.js
|
214
214
|
- app/assets/javascripts/cm_admin/form_validation.js
|
215
215
|
- app/assets/javascripts/cm_admin/kanban.js
|
216
|
+
- app/assets/javascripts/cm_admin/local-time.js
|
216
217
|
- app/assets/javascripts/cm_admin/quick_search.js
|
217
218
|
- app/assets/javascripts/cm_admin/scaffolds.js
|
218
219
|
- app/assets/javascripts/cm_admin/shared_scaffolds.js
|