satis 2.1.52 → 2.1.53

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f33daf604f4135d4096075528761e22049f97d12f4b908a3479f0e52d03ccaf1
4
- data.tar.gz: 00040d5267c53eb0cca689d969c035d114c4ee9633468fb9d65abfce923fb9fa
3
+ metadata.gz: 358cd4b72fd41d7611be2d1c2ddae7d64ee55ad9b9d68cd10169d30b9d241697
4
+ data.tar.gz: 538a47d63390c4c94c7497d73d5c95b9aaaa9e1dc22a22ace1d071f8a1350a24
5
5
  SHA512:
6
- metadata.gz: bc4cd1f571d86a277c605631e52657eeb244530976d5a37293fa68be3cc4630a1aea3b282a7c212ad0d6988915e76fd439373d01ab7e4539f0d5baceb036da9b
7
- data.tar.gz: 17eba6faa168759e865f40f042c346ba38169ca5169589370e64a84e2f76b4ec466c4eb864855041dbe4a1565d90aa7ba732d424cae9332c644d99520f795ccb
6
+ metadata.gz: c0c085c46aee29463647e80eb10bff6beb997aadb25e9464ee86f4758d969a574241659918342ad1b4ea06a42e36edcec171ef0209b30607bc070e4739963f17
7
+ data.tar.gz: 1966166a699aa72b262b909325569083365c63919bc238204a9b1c048d08b769366611e6e7a200d6ea1dfa9a507e53e1f683b7173c7df1b031520bf652e6b11b
@@ -136,5 +136,6 @@
136
136
  @apply hover:border-white;
137
137
  }
138
138
  .attachments__group .attachment-upload.upload-btn.attachments__attachment.dragging {
139
- @apply dark:bg-white dark:bg-opacity-75 bg-black bg-opacity-50 dark:text-black text-white;
139
+ @apply dark:bg-gray-700 dark:bg-opacity-75 bg-gray-200 bg-opacity-50 dark:text-black text-white;
140
+ transition: all 0.3s ease;
140
141
  }
@@ -10,17 +10,17 @@ div.satis-date-time-picker data-controller="satis-date-time-picker" data-satis-d
10
10
  .flex.justify-between.items-center.mb-2
11
11
  div
12
12
  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#previousYear"
13
- i.fal.fa-angle-double-left.text-gray-500.inline-flex.py-1
13
+ i.text-gray-500.inline-flex.py-1 class=Satis.config.icons[:previous_year]
14
14
  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"
15
- i.fal.fa-angle-left.text-gray-500.inline-flex.px-1.py-1
15
+ i.text-gray-500.inline-flex.px-1.py-1 class=Satis.config.icons[:previous_month]
16
16
  div.text-center
17
17
  span.text-lg.font-bold.text-gray-800.dark:text-gray-200 data-satis-date-time-picker-target="month"
18
18
  span.ml-1.text-lg.text-gray-600.dark:text-gray-200.font-normal data-satis-date-time-picker-target="year"
19
19
  div
20
20
  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"
21
- i.fal.fa-angle-right.text-gray-500.inline-flex.px-1.py-1
21
+ i.text-gray-500.inline-flex.px-1.py-1 class=Satis.config.icons[:next_month]
22
22
  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#nextYear"
23
- i.fal.fa-angle-double-right.text-gray-500.inline-flex.py-1
23
+ i.text-gray-500.inline-flex.py-1 class=Satis.config.icons[:next_year]
24
24
 
25
25
 
26
26
  .grid.grid-cols-7 data-satis-date-time-picker-target="weekDays"
@@ -1,7 +1,15 @@
1
1
  import ApplicationController from "satis/controllers/application_controller"
2
2
  import { createPopper } from "@popperjs/core"
3
+ import dayjs from "dayjs"
4
+ import customParseFormat from "dayjs/plugin/customParseFormat"
5
+ import localizedFormat from "dayjs/plugin/localizedFormat"
6
+ import utc from "dayjs/plugin/utc"
3
7
  import { debounce } from "satis/utils"
4
8
 
9
+ dayjs.extend(customParseFormat)
10
+ dayjs.extend(localizedFormat)
11
+ dayjs.extend(utc)
12
+
5
13
  export default class DateTimePickerComponentController extends ApplicationController {
6
14
  static targets = [
7
15
  "input",
@@ -165,13 +173,13 @@ export default class DateTimePickerComponentController extends ApplicationContro
165
173
  }
166
174
 
167
175
  previousYear(event) {
168
- this.displayValue = new Date(new Date(this.displayValue).setFullYear(this.displayValue.getFullYear() - 1));
169
- this.refreshCalendar(false);
176
+ this.displayValue = new Date(new Date(this.displayValue).setFullYear(this.displayValue.getFullYear() - 1))
177
+ this.refreshCalendar(false)
170
178
  }
171
179
 
172
180
  nextYear(event) {
173
- this.displayValue = new Date(new Date(this.displayValue).setFullYear(this.displayValue.getFullYear() + 1));
174
- this.refreshCalendar(false);
181
+ this.displayValue = new Date(new Date(this.displayValue).setFullYear(this.displayValue.getFullYear() + 1))
182
+ this.refreshCalendar(false)
175
183
  }
176
184
 
177
185
  clickedOutside(event) {
@@ -266,21 +274,71 @@ export default class DateTimePickerComponentController extends ApplicationContro
266
274
  }
267
275
 
268
276
  dateTimeEntered(event) {
269
- // FIXME: This doesn't work properly yet
270
- // let newValue
271
- // try {
272
- // newValue = new Date(this.inputTarget.value)
273
- // } catch (error) {}
274
- // if (!isNaN(newValue.getTime())) {
275
- // this.selectedValue = [newValue]
276
- // this.refreshCalendar()
277
- // }
277
+ const inputValue = this.inputTarget.value;
278
+
279
+ if (inputValue.length < 10) return;
280
+
281
+ const locale = this.localeValue || navigator.language;
282
+ const defaultFormat = this.formatValue || "YYYY-MM-DD HH:mm:ss";
283
+ dayjs.locale(locale);
284
+
285
+ const formats = [
286
+ defaultFormat,
287
+ 'YYYY-MM-DD',
288
+ 'YYYY/MM/DD',
289
+ 'DD/MM/YYYY',
290
+ 'DD.MM.YYYY',
291
+ "DD-MM-YYYY",
292
+ "DD-MM-YYYY HH:mm",
293
+ "dddd, MMMM DD, YYYY h:mma",
294
+ "dddd, MMMM DD, YYYY h:mm A"
295
+ ];
296
+
297
+ let parsedDate = null;
298
+
299
+ for (const format of formats) {
300
+ parsedDate = dayjs(inputValue, format, locale, true);
301
+ if (parsedDate.isValid()) {
302
+ break;
303
+ }
304
+ }
305
+
306
+ if (parsedDate && parsedDate.isValid()) {
307
+ this.selectedValue = [parsedDate.toDate()];
308
+ this.refreshCalendar(true);
309
+ this.refreshInputs();
310
+ } else {
311
+ console.warn("Invalid date/time entered");
312
+ const currentDate = dayjs().toDate();
313
+ this.selectedValue = [currentDate];
314
+ this.refreshCalendar(true);
315
+ this.refreshInputs();
316
+ }
317
+
278
318
  }
279
319
 
320
+
280
321
  selectDay(event) {
281
322
  let oldCurrentValue = this.selectedValue[0]
323
+ let dayType = event.target.dataset.type
324
+ let selectedDate = new Date(this.displayValue)
325
+
326
+ if (dayType === "prev") {
327
+ if (this.rangeValue) {
328
+ return false
329
+ }
330
+ selectedDate.setMonth(this.displayValue.getMonth() - 1)
331
+ } else if (dayType === "next") {
332
+ if (this.rangeValue) {
333
+ return false
334
+ }
335
+ selectedDate.setMonth(this.displayValue.getMonth() + 1)
336
+ }
337
+
338
+ selectedDate.setDate(+event.target.innerText)
339
+
282
340
  if (!this.rangeValue && !this.multipleValue) {
283
- this.selectedValue[0] = new Date(new Date(this.displayValue).setDate(+event.target.innerText))
341
+ this.selectedValue[0] = selectedDate
284
342
  if (this.timePickerValue && oldCurrentValue) {
285
343
  this.selectedValue[0].setHours(oldCurrentValue.getHours())
286
344
  this.selectedValue[0].setMinutes(oldCurrentValue.getMinutes())
@@ -304,6 +362,7 @@ export default class DateTimePickerComponentController extends ApplicationContro
304
362
  this.currentSelectNr += 1
305
363
  }
306
364
 
365
+ this.refreshInputs()
307
366
  this.refreshCalendar()
308
367
 
309
368
  if (!this.rangeValue || this.selectedValue.length == 2) {
@@ -392,46 +451,19 @@ export default class DateTimePickerComponentController extends ApplicationContro
392
451
  this.minutesTarget.value = "00" // FIXME: Should be 0:00 in locale
393
452
  }
394
453
  }
395
- this.daysTarget.innerHTML = ""
396
454
 
397
- this.monthDays.forEach((day) => {
398
- if (day == " ") {
399
- this.daysTarget.insertAdjacentHTML("beforeend", this.emtpyTemplateTarget.innerHTML)
400
- } else {
401
- let date = new Date(new Date(this.displayValue).setDate(day))
455
+ let days = this.generateDays()
402
456
 
403
- let tmpDiv = document.createElement("div")
404
- tmpDiv.innerHTML = this.dayTemplateTarget.innerHTML.replace(/\${day}/g, day)
457
+ this.daysTarget.innerHTML = ""
458
+ days.forEach((day) => {
459
+ let tmpDiv = document.createElement("div")
460
+ tmpDiv.innerHTML = this.dayTemplateTarget.innerHTML.replace(/\${day}/g, day.date.getDate())
461
+ let div = tmpDiv.querySelector(".text-center")
405
462
 
406
- if (this.isToday(date)) {
407
- let div = tmpDiv.querySelector(".text-center")
408
- div.classList.add("border-red-500", "border")
409
- }
410
- let div = tmpDiv.querySelector(".text-center")
411
-
412
- if (this.isSelected(date)) {
413
- if (this.rangeValue && this.selectedValue.length == 2) {
414
- if (this.isDate(this.selectedValue[0], date)) {
415
- div.classList.add("bg-primary-500", "text-white", "dark:text-gray-200")
416
- div.classList.remove("rounded-r-full")
417
- } else if (this.isDate(this.selectedValue[1], date)) {
418
- div.classList.add("bg-primary-500", "text-white", "dark:text-gray-200")
419
- div.classList.remove("rounded-l-full")
420
- } else if (this.isSelected(date)) {
421
- div.classList.remove("rounded-r-full")
422
- div.classList.remove("rounded-l-full")
423
- div.classList.add("bg-primary-200", "text-white", "dark:text-gray-200")
424
- }
425
- } else {
426
- div.classList.add("bg-primary-500", "text-white", "dark:text-gray-200")
427
- }
428
- } else {
429
- div.classList.add("text-gray-700", "dark:text-gray-300")
430
- }
463
+ this.applyDayStyles(div, day)
431
464
 
432
- this.daysTarget.insertAdjacentHTML("beforeend", tmpDiv.innerHTML)
433
- tmpDiv.remove()
434
- }
465
+ this.daysTarget.insertAdjacentHTML("beforeend", tmpDiv.innerHTML)
466
+ tmpDiv.remove()
435
467
  })
436
468
 
437
469
  if (refreshInputs != false) {
@@ -443,6 +475,91 @@ export default class DateTimePickerComponentController extends ApplicationContro
443
475
  }
444
476
  }
445
477
 
478
+ generateDays() {
479
+ let days = []
480
+ const firstDayOfMonth = new Date(this.displayValue.getFullYear(), this.displayValue.getMonth(), 1)
481
+ const lastDayOfMonth = new Date(this.displayValue.getFullYear(), this.displayValue.getMonth() + 1, 0)
482
+ const startDayOfWeek = (firstDayOfMonth.getDay() - this.weekStartValue + 7) % 7
483
+ const endDayOfWeek = (6 - lastDayOfMonth.getDay() + this.weekStartValue + 7) % 7
484
+ const previousMonthLastDate = new Date(this.displayValue.getFullYear(), this.displayValue.getMonth(), 0).getDate()
485
+
486
+ // Previous month's days
487
+ for (let i = startDayOfWeek; i > 0; i--) {
488
+ const day = previousMonthLastDate - i + 1
489
+ days.push({
490
+ date: new Date(this.displayValue.getFullYear(), this.displayValue.getMonth() - 1, day),
491
+ type: "prev",
492
+ })
493
+ }
494
+
495
+ // Current month's days
496
+ for (let i = 1; i <= lastDayOfMonth.getDate(); i++) {
497
+ days.push({
498
+ date: new Date(this.displayValue.getFullYear(), this.displayValue.getMonth(), i),
499
+ type: "current",
500
+ })
501
+ }
502
+
503
+ // Next month's days
504
+ for (let i = 1; i <= endDayOfWeek; i++) {
505
+ days.push({
506
+ date: new Date(this.displayValue.getFullYear(), this.displayValue.getMonth() + 1, i),
507
+ type: "next",
508
+ })
509
+ }
510
+
511
+ return days
512
+ }
513
+
514
+ applyDayStyles(div, day) {
515
+ if (day.type === "prev" || day.type === "next") {
516
+ div.classList.add("text-gray-400", "hover:bg-gray-200", "cursor-pointer")
517
+ div.dataset.type = day.type
518
+
519
+ this.addDayClickListener(div, day)
520
+ } else {
521
+ div.classList.add("text-gray-700", "dark:text-gray-300")
522
+
523
+ if (this.isToday(day.date)) {
524
+ div.classList.add("border-red-500", "border")
525
+ }
526
+
527
+ if (this.isSelected(day.date)) {
528
+ if (this.rangeValue && this.selectedValue.length == 2) {
529
+ if (this.isDate(this.selectedValue[0], day.date)) {
530
+ div.classList.add("bg-primary-500", "text-white", "dark:text-gray-200")
531
+ div.classList.remove("rounded-r-full")
532
+ } else if (this.isDate(this.selectedValue[1], day.date)) {
533
+ div.classList.add("bg-primary-500", "text-white", "dark:text-gray-200")
534
+ div.classList.remove("rounded-l-full")
535
+ } else if (this.isSelected(day.date)) {
536
+ div.classList.remove("rounded-r-full")
537
+ div.classList.remove("rounded-l-full")
538
+ div.classList.add("bg-primary-200", "text-white", "dark:text-gray-200")
539
+ }
540
+ } else {
541
+ div.classList.add("bg-primary-500", "text-white", "dark:text-gray-200")
542
+ }
543
+ } else {
544
+ div.classList.add("text-gray-700", "dark:text-gray-300")
545
+ }
546
+ }
547
+ }
548
+
549
+ addDayClickListener(div, day) {
550
+ if (day.type === "prev" || day.type === "next") {
551
+ div.addEventListener("click", () => {
552
+ this.displayValue = new Date(day.date.getFullYear(), day.date.getMonth(), 1)
553
+ this.selectedValue[0] = new Date(day.date)
554
+ this.refreshCalendar(true)
555
+
556
+ if (!this.inlineValue) {
557
+ this.hideCalendar()
558
+ }
559
+ })
560
+ }
561
+ }
562
+
446
563
  // Format the given Date into an ISO8601 string whilst preserving the given timezone
447
564
  iso8601(date) {
448
565
  let tzo = -date.getTimezoneOffset(),
data/config/importmap.rb CHANGED
@@ -13,7 +13,7 @@ pin_all_from Satis::Engine.root.join("app/javascript/satis/elements"), under: "s
13
13
  pin_all_from Satis::Engine.root.join("app/components/satis"), under: "satis/components", to: "satis"
14
14
 
15
15
  pin "tippy.js", preload: false # @6.3.7
16
- pin "@popperjs/core", to: 'popper.js.js', preload: false
16
+ pin "@popperjs/core", to: "popper.js.js", preload: false
17
17
  pin "leaflet", to: "leaflet.js", preload: false
18
18
  pin "sortablejs", to: "sortablejs.js", preload: false # @1.15.2
19
19
  pin "@rails/actiontext", to: "@rails--actiontext.js" # @7.1.3
@@ -48,3 +48,7 @@ pin "@lezer/markdown", to: "@lezer--markdown.js" # @1.2.0
48
48
  pin "intl-tel-input", to: "intl-tel-input.js" # @19.5.6
49
49
  pin "intl-tel-input-utils", to: "intl-tel-input-utils.js" # @19.5.6
50
50
  pin "pickr", to: "pickr.es5.min.js" # @0.1.4
51
+ pin "dayjs" # @1.11.13
52
+ pin "dayjs/plugin/customParseFormat", to: "dayjs--plugin--customParseFormat.js" # @1.11.13
53
+ pin "dayjs/plugin/localizedFormat", to: "dayjs--plugin--localizedFormat.js" # @1.11.13
54
+ pin "dayjs/plugin/utc", to: "dayjs--plugin--utc.js" # @1.11.13
@@ -15,7 +15,7 @@ module Satis
15
15
 
16
16
  def set_defaults!
17
17
  self.class.schema.each do |name, default|
18
- instance_variable_set("@#{name}", default)
18
+ instance_variable_set(:"@#{name}", default)
19
19
  end
20
20
  end
21
21
 
@@ -33,6 +33,13 @@ module Satis
33
33
  option :confirm_before_leave, default: false
34
34
  option :current_user, default: lambda {}
35
35
 
36
+ option :icons, default: {
37
+ previous_year: "fa-solid fa-angle-double-left",
38
+ previous_month: "fa-solid fa-angle-left",
39
+ next_month: "fa-solid fa-angle-right",
40
+ next_year: "fa-solid fa-angle-double-right"
41
+ }
42
+
36
43
  option(:default_help_text, default: lambda do |template, object, key, additional_scope|
37
44
  scope = help_scope(template, object, additional_scope)
38
45
 
@@ -80,7 +87,7 @@ module Satis
80
87
  def configure
81
88
  yield(config)
82
89
  end
83
- alias setup configure
90
+ alias_method :setup, :configure
84
91
 
85
92
  def reset_config!
86
93
  @config = Configuration.new
data/lib/satis/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Satis
2
- VERSION = "2.1.52"
2
+ VERSION = "2.1.53"
3
3
  end
@@ -0,0 +1,4 @@
1
+ // dayjs/plugin/customParseFormat@1.11.13 downloaded from https://ga.jspm.io/npm:dayjs@1.11.13/plugin/customParseFormat.js
2
+
3
+ var e=typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:global;var t={};!function(e,n){t=n()}(0,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,i=/\d\d/,o=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,h={},a=function(e){return(e=+e)+(e>68?1900:2e3)};var f=function(t){return function(n){(this||e)[t]=+n}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){((this||e).zone||((this||e).zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(t)}],u=function(e){var t=h[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=h.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},m={A:[s,function(t){(this||e).afternoon=d(t,!1)}],a:[s,function(t){(this||e).afternoon=d(t,!0)}],Q:[r,function(t){(this||e).month=3*(t-1)+1}],S:[r,function(t){(this||e).milliseconds=100*+t}],SS:[i,function(t){(this||e).milliseconds=10*+t}],SSS:[/\d{3}/,function(t){(this||e).milliseconds=+t}],s:[o,f("seconds")],ss:[o,f("seconds")],m:[o,f("minutes")],mm:[o,f("minutes")],H:[o,f("hours")],h:[o,f("hours")],HH:[o,f("hours")],hh:[o,f("hours")],D:[o,f("day")],DD:[i,f("day")],Do:[s,function(t){var n=h.ordinal,r=t.match(/\d+/);if((this||e).day=r[0],n)for(var i=1;i<=31;i+=1)n(i).replace(/\[|\]/g,"")===t&&((this||e).day=i)}],w:[o,f("week")],ww:[i,f("week")],M:[o,f("month")],MM:[i,f("month")],MMM:[s,function(t){var n=u("months"),r=(u("monthsShort")||n.map((function(e){return e.slice(0,3)}))).indexOf(t)+1;if(r<1)throw new Error;(this||e).month=r%12||r}],MMMM:[s,function(t){var n=u("months").indexOf(t)+1;if(n<1)throw new Error;(this||e).month=n%12||n}],Y:[/[+-]?\d+/,f("year")],YY:[i,function(t){(this||e).year=a(t)}],YYYY:[/\d{4}/,f("year")],Z:c,ZZ:c};function l(e){var r,i;r=e,i=h&&h.formats;for(var o=(e=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var o=r&&r.toUpperCase();return n||i[r]||t[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(n),s=o.length,c=0;c<s;c+=1){var M=o[c],Y=m[M],v=Y&&Y[0],D=Y&&Y[1];o[c]=D?{regex:v,parser:D}:M.replace(/^\[|\]$/g,"")}return function(e){for(var t={},n=0,r=0;n<s;n+=1){var i=o[n];if("string"==typeof i)r+=i.length;else{var h=i.regex,c=i.parser,m=e.slice(r),M=h.exec(m)[0];c.call(t,M),e=e.replace(M,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(t,n,r){r.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(a=t.parseTwoDigitYear);var i=n.prototype,o=i.parse;i.parse=function(t){var n=t.date,i=t.utc,s=t.args;(this||e).$u=i;var c=s[1];if("string"==typeof c){var m=!0===s[2],M=!0===s[3],Y=m||M,v=s[2];M&&(v=s[2]),h=this.$locale(),!m&&v&&(h=r.Ls[v]),(this||e).$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,h=i.day,c=i.hours,m=i.minutes,M=i.seconds,Y=i.milliseconds,v=i.zone,D=i.week,p=new Date,w=h||(o||s?1:p.getDate()),g=o||p.getFullYear(),L=0;o&&!s||(L=s>0?s-1:p.getMonth());var y,$=c||0,x=m||0,S=M||0,T=Y||0;return v?new Date(Date.UTC(g,L,w,$,x,S,T+60*v.offset*1e3)):n?new Date(Date.UTC(g,L,w,$,x,S,T)):(y=new Date(g,L,w,$,x,S,T),D&&(y=r(y).week(D).toDate()),y)}catch(e){return new Date("")}}(n,c,i,r),this.init(),v&&!0!==v&&((this||e).$L=this.locale(v).$L),Y&&n!=this.format(c)&&((this||e).$d=new Date("")),h={}}else if(c instanceof Array)for(var D=c.length,p=1;p<=D;p+=1){s[1]=c[p-1];var w=r.apply(this||e,s);if(w.isValid()){(this||e).$d=w.$d,(this||e).$L=w.$L,this.init();break}p===D&&((this||e).$d=new Date(""))}else o.call(this||e,t)}}}));var n=t;export{n as default};
4
+
@@ -0,0 +1,4 @@
1
+ // dayjs/plugin/localizedFormat@1.11.13 downloaded from https://ga.jspm.io/npm:dayjs@1.11.13/plugin/localizedFormat.js
2
+
3
+ var r=typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:global;var e={};!function(r,t){e=t()}(0,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,n,o){var M=n.prototype,a=M.format;o.en.formats=e,M.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,o=function(r,t){return r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(r,n,o){var M=o&&o.toUpperCase();return n||t[o]||e[o]||t[M].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(r,e,t){return e||t.slice(1)}))}))}(t,void 0===n?{}:n);return a.call(this||r,o)}}}));var t=e;export{t as default};
4
+
@@ -0,0 +1,4 @@
1
+ // dayjs/plugin/utc@1.11.13 downloaded from https://ga.jspm.io/npm:dayjs@1.11.13/plugin/utc.js
2
+
3
+ var t=typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:global;var i={};!function(t,s){i=s()}(0,(function(){var i="minute",s=/[+-]\d\d(?::?\d\d)?/g,e=/([+-]|\d\d)/g;return function(f,n,r){var u=n.prototype;r.utc=function(t){var i={date:t,utc:!0,args:arguments};return new n(i)},u.utc=function(s){var e=r(this.toDate(),{locale:(this||t).$L,utc:!0});return s?e.add(this.utcOffset(),i):e},u.local=function(){return r(this.toDate(),{locale:(this||t).$L,utc:!1})};var a=u.parse;u.parse=function(i){i.utc&&((this||t).$u=!0),this.$utils().u(i.$offset)||((this||t).$offset=i.$offset),a.call(this||t,i)};var o=u.init;u.init=function(){if((this||t).$u){var i=(this||t).$d;(this||t).$y=i.getUTCFullYear(),(this||t).$M=i.getUTCMonth(),(this||t).$D=i.getUTCDate(),(this||t).$W=i.getUTCDay(),(this||t).$H=i.getUTCHours(),(this||t).$m=i.getUTCMinutes(),(this||t).$s=i.getUTCSeconds(),(this||t).$ms=i.getUTCMilliseconds()}else o.call(this||t)};var h=u.utcOffset;u.utcOffset=function(f,n){var r=this.$utils().u;if(r(f))return(this||t).$u?0:r((this||t).$offset)?h.call(this||t):(this||t).$offset;if("string"==typeof f&&(f=function(t){void 0===t&&(t="");var i=t.match(s);if(!i)return null;var f=(""+i[0]).match(e)||["-",0,0],n=f[0],r=60*+f[1]+ +f[2];return 0===r?0:"+"===n?r:-r}(f),null===f))return this||t;var u=Math.abs(f)<=16?60*f:f,a=this||t;if(n)return a.$offset=u,a.$u=0===f,a;if(0!==f){var o=(this||t).$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(a=this.local().add(u+o,i)).$offset=u,a.$x.$localOffset=o}else a=this.utc();return a};var l=u.format;u.format=function(i){var s=i||((this||t).$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this||t,s)},u.valueOf=function(){var i=this.$utils().u((this||t).$offset)?0:(this||t).$offset+((this||t).$x.$localOffset||(this||t).$d.getTimezoneOffset());return(this||t).$d.valueOf()-6e4*i},u.isUTC=function(){return!!(this||t).$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var c=u.toDate;u.toDate=function(i){return"s"===i&&(this||t).$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this||t)};var $=u.diff;u.diff=function(i,s,e){if(i&&(this||t).$u===i.$u)return $.call(this||t,i,s,e);var f=this.local(),n=r(i).local();return $.call(f,n,s,e)}}}));var s=i;export{s as default};
4
+
@@ -0,0 +1,4 @@
1
+ // dayjs@1.11.13 downloaded from https://ga.jspm.io/npm:dayjs@1.11.13/dayjs.min.js
2
+
3
+ var e=typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:global;var n={};!function(e,r){n=r()}(0,(function(){var n=1e3,r=6e4,s=36e5,i="millisecond",u="second",a="minute",o="hour",c="day",f="week",v="month",g="quarter",p="year",w="date",b="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var n=["th","st","nd","rd"],r=e%100;return"["+e+(n[(r-20)%10]||n[r]||n[0])+"]"}},m=function(e,n,r){var s=String(e);return!s||s.length>=n?e:""+Array(n+1-s.length).join(r)+e},Y={s:m,z:function(e){var n=-e.utcOffset(),r=Math.abs(n),s=Math.floor(r/60),i=r%60;return(n<=0?"+":"-")+m(s,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),s=e.clone().add(r,v),i=n-s<0,u=e.clone().add(r+(i?-1:1),v);return+(-(r+(n-s)/(i?s-u:u-s))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:v,y:p,w:f,d:c,D:w,h:o,m:a,s:u,ms:i,Q:g}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},H="en",x={};x[H]=T;var L="$isDayjsObject",S=function(e){return e instanceof A||!(!e||!e[L])},W=function t(e,n,r){var s;if(!e)return H;if("string"==typeof e){var i=e.toLowerCase();x[i]&&(s=i),n&&(x[i]=n,s=i);var u=e.split("-");if(!s&&u.length>1)return t(u[0])}else{var a=e.name;x[a]=e,s=a}return!r&&s&&(H=s),s||!r&&H},O=function(e,n){if(S(e))return e.clone();var r="object"==typeof n?n:{};return r.date=e,r.args=arguments,new A(r)},C=Y;C.l=W,C.i=S,C.w=function(e,n){return O(e,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var A=function(){function M(n){(this||e).$L=W(n.locale,null,!0),this.parse(n),(this||e).$x=(this||e).$x||n.x||{},(this||e)[L]=!0}var T=M.prototype;return T.parse=function(n){(this||e).$d=function(e){var n=e.date,r=e.utc;if(null===n)return new Date(NaN);if(C.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var s=n.match(_);if(s){var i=s[2]-1||0,u=(s[7]||"0").substring(0,3);return r?new Date(Date.UTC(s[1],i,s[3]||1,s[4]||0,s[5]||0,s[6]||0,u)):new Date(s[1],i,s[3]||1,s[4]||0,s[5]||0,s[6]||0,u)}}return new Date(n)}(n),this.init()},T.init=function(){var n=(this||e).$d;(this||e).$y=n.getFullYear(),(this||e).$M=n.getMonth(),(this||e).$D=n.getDate(),(this||e).$W=n.getDay(),(this||e).$H=n.getHours(),(this||e).$m=n.getMinutes(),(this||e).$s=n.getSeconds(),(this||e).$ms=n.getMilliseconds()},T.$utils=function(){return C},T.isValid=function(){return!((this||e).$d.toString()===b)},T.isSame=function(e,n){var r=O(e);return this.startOf(n)<=r&&r<=this.endOf(n)},T.isAfter=function(e,n){return O(e)<this.startOf(n)},T.isBefore=function(e,n){return this.endOf(n)<O(e)},T.$g=function(n,r,s){return C.u(n)?(this||e)[r]:this.set(s,n)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return(this||e).$d.getTime()},T.startOf=function(n,r){var s=this||e,i=!!C.u(r)||r,g=C.p(n),l=function(e,n){var r=C.w(s.$u?Date.UTC(s.$y,n,e):new Date(s.$y,n,e),s);return i?r:r.endOf(c)},$=function(e,n){return C.w(s.toDate()[e].apply(s.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(n)),s)},b=(this||e).$W,_=(this||e).$M,k=(this||e).$D,T="set"+((this||e).$u?"UTC":"");switch(g){case p:return i?l(1,0):l(31,11);case v:return i?l(1,_):l(0,_+1);case f:var Y=this.$locale().weekStart||0,H=(b<Y?b+7:b)-Y;return l(i?k-H:k+(6-H),_);case c:case w:return $(T+"Hours",0);case o:return $(T+"Minutes",1);case a:return $(T+"Seconds",2);case u:return $(T+"Milliseconds",3);default:return this.clone()}},T.endOf=function(e){return this.startOf(e,!1)},T.$set=function(n,r){var s,f=C.p(n),g="set"+((this||e).$u?"UTC":""),b=(s={},s[c]=g+"Date",s[w]=g+"Date",s[v]=g+"Month",s[p]=g+"FullYear",s[o]=g+"Hours",s[a]=g+"Minutes",s[u]=g+"Seconds",s[i]=g+"Milliseconds",s)[f],_=f===c?(this||e).$D+(r-(this||e).$W):r;if(f===v||f===p){var k=this.clone().set(w,1);k.$d[b](_),k.init(),(this||e).$d=k.set(w,Math.min((this||e).$D,k.daysInMonth())).$d}else b&&(this||e).$d[b](_);return this.init(),this||e},T.set=function(e,n){return this.clone().$set(e,n)},T.get=function(e){return this[C.p(e)]()},T.add=function(i,g){var w,b=this||e;i=Number(i);var _=C.p(g),y=function(e){var n=O(b);return C.w(n.date(n.date()+Math.round(e*i)),b)};if(_===v)return this.set(v,(this||e).$M+i);if(_===p)return this.set(p,(this||e).$y+i);if(_===c)return y(1);if(_===f)return y(7);var k=(w={},w[a]=r,w[o]=s,w[u]=n,w)[_]||1,T=(this||e).$d.getTime()+i*k;return C.w(T,this||e)},T.subtract=function(e,n){return this.add(-1*e,n)},T.format=function(n){var r=this||e,s=this.$locale();if(!this.isValid())return s.invalidDate||b;var i=n||"YYYY-MM-DDTHH:mm:ssZ",u=C.z(this||e),a=(this||e).$H,o=(this||e).$m,c=(this||e).$M,f=s.weekdays,v=s.months,g=s.meridiem,h=function(e,n,s,u){return e&&(e[n]||e(r,i))||s[n].slice(0,u)},d=function(e){return C.s(a%12||12,e,"0")},p=g||function(e,n,r){var s=e<12?"AM":"PM";return r?s.toLowerCase():s};return i.replace(k,(function(e,n){return n||function(e){switch(e){case"YY":return String(r.$y).slice(-2);case"YYYY":return C.s(r.$y,4,"0");case"M":return c+1;case"MM":return C.s(c+1,2,"0");case"MMM":return h(s.monthsShort,c,v,3);case"MMMM":return h(v,c);case"D":return r.$D;case"DD":return C.s(r.$D,2,"0");case"d":return String(r.$W);case"dd":return h(s.weekdaysMin,r.$W,f,2);case"ddd":return h(s.weekdaysShort,r.$W,f,3);case"dddd":return f[r.$W];case"H":return String(a);case"HH":return C.s(a,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return p(a,o,!0);case"A":return p(a,o,!1);case"m":return String(o);case"mm":return C.s(o,2,"0");case"s":return String(r.$s);case"ss":return C.s(r.$s,2,"0");case"SSS":return C.s(r.$ms,3,"0");case"Z":return u}return null}(e)||u.replace(":","")}))},T.utcOffset=function(){return 15*-Math.round((this||e).$d.getTimezoneOffset()/15)},T.diff=function(i,w,b){var _,k=this||e,T=C.p(w),Y=O(i),H=(Y.utcOffset()-this.utcOffset())*r,x=(this||e)-Y,D=function(){return C.m(k,Y)};switch(T){case p:_=D()/12;break;case v:_=D();break;case g:_=D()/3;break;case f:_=(x-H)/6048e5;break;case c:_=(x-H)/864e5;break;case o:_=x/s;break;case a:_=x/r;break;case u:_=x/n;break;default:_=x}return b?_:C.a(_)},T.daysInMonth=function(){return this.endOf(v).$D},T.$locale=function(){return x[(this||e).$L]},T.locale=function(n,r){if(!n)return(this||e).$L;var s=this.clone(),i=W(n,r,!0);return i&&(s.$L=i),s},T.clone=function(){return C.w((this||e).$d,this||e)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return(this||e).$d.toISOString()},T.toString=function(){return(this||e).$d.toUTCString()},M}(),I=A.prototype;return O.prototype=I,[["$ms",i],["$s",u],["$m",a],["$H",o],["$W",c],["$M",v],["$y",p],["$D",w]].forEach((function(e){I[e[1]]=function(n){return this.$g(n,e[0],e[1])}})),O.extend=function(e,n){return e.$i||(e(n,A,O),e.$i=!0),O},O.locale=W,O.isDayjs=S,O.unix=function(e){return O(1e3*e)},O.en=x[H],O.Ls=x,O.p={},O}));var r=n;export{r as default};
4
+
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.52
4
+ version: 2.1.53
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-01-23 00:00:00.000000000 Z
11
+ date: 2025-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser
@@ -959,6 +959,10 @@ files:
959
959
  - vendor/javascript/codemirror.js
960
960
  - vendor/javascript/crelt.js
961
961
  - vendor/javascript/data.min.js
962
+ - vendor/javascript/dayjs--plugin--customParseFormat.js
963
+ - vendor/javascript/dayjs--plugin--localizedFormat.js
964
+ - vendor/javascript/dayjs--plugin--utc.js
965
+ - vendor/javascript/dayjs.js
962
966
  - vendor/javascript/intl-tel-input-utils.js
963
967
  - vendor/javascript/intl-tel-input.js
964
968
  - vendor/javascript/leaflet.js