comand-component-library 4.0.96 → 4.0.97

Sign up to get free protection for your applications and to get access to all the features.
@@ -9836,16 +9836,16 @@ function mw(e, t, n, o, i, s) {
9836
9836
  ]);
9837
9837
  }
9838
9838
  const TA = /* @__PURE__ */ j(dw, [["render", mw]]);
9839
- function Nr(e, t, n, o = !0) {
9840
- function i(s, r) {
9841
- return r && s < 10 ? "0" + s : s;
9839
+ function Nr(e, t, n, o = !0, i = !0) {
9840
+ function s(r, a) {
9841
+ return a && r < 10 ? "0" + r : r;
9842
9842
  }
9843
- return (s, r) => {
9843
+ return (r, a) => {
9844
9844
  if (n) {
9845
- let a = s, c = t;
9846
- return a > 12 && (a -= 12, c = n), i(a, o) + e + i(r, !0) + c;
9845
+ let c = r, l = t;
9846
+ return c > 12 && (i || (c -= 12), l = n), s(c, o) + e + s(a, !0) + l;
9847
9847
  }
9848
- return i(s, o) + e + i(r, !0) + t;
9848
+ return s(r, o) + e + s(a, !0) + t;
9849
9849
  };
9850
9850
  }
9851
9851
  const pw = {
@@ -9857,6 +9857,13 @@ const pw = {
9857
9857
  };
9858
9858
  },
9859
9859
  props: {
9860
+ /**
9861
+ * toggle 24- and 12-hours format
9862
+ */
9863
+ use24HoursFormat: {
9864
+ type: Boolean,
9865
+ required: !1
9866
+ },
9860
9867
  /**
9861
9868
  * list of opening-hours
9862
9869
  */
@@ -9898,7 +9905,7 @@ const pw = {
9898
9905
  e === "am" ? this.editableDay.amClosed = !this.editableDay.amClosed : this.editableDay.pmClosed = !this.editableDay.pmClosed;
9899
9906
  },
9900
9907
  getTime(e) {
9901
- return this.timeFormatter ? this.timeFormatter(e.hours, e.mins) : Nr(":", " " + this.abbreviationTextAm, " " + this.abbreviationTextPm, !1)(e.hours, e.mins);
9908
+ return this.timeFormatter ? this.timeFormatter(e.hours, e.mins) : Nr(":", " " + this.abbreviationTextAm, " " + this.abbreviationTextPm, !1, this.use24HoursFormat)(e.hours, e.mins);
9902
9909
  },
9903
9910
  updateHandlerProvider() {
9904
9911
  const e = this.editableDay;
@@ -9912,7 +9919,7 @@ const pw = {
9912
9919
  watch: {
9913
9920
  day: {
9914
9921
  handler() {
9915
- const e = Nr(":", "", "", !0);
9922
+ const e = Nr(":", "", "", !0, this.use24HoursFormat);
9916
9923
  this.editableDay = {
9917
9924
  day: this.day.day,
9918
9925
  amFrom: e(this.day.am.fromTime.hours, this.day.am.fromTime.mins),
@@ -10177,6 +10184,13 @@ const Aw = {
10177
10184
  type: Boolean,
10178
10185
  default: !0
10179
10186
  },
10187
+ /**
10188
+ * toggle 24- and 12-hours format
10189
+ */
10190
+ use24HoursFormat: {
10191
+ type: Boolean,
10192
+ default: !0
10193
+ },
10180
10194
  /**
10181
10195
  * properties for CmdLink-component
10182
10196
  */
@@ -10382,8 +10396,9 @@ function Vw(e, t, n, o, i, s) {
10382
10396
  day: p,
10383
10397
  separator: n.separator,
10384
10398
  abbreviationTextAm: n.abbreviationTextAm,
10385
- abbreviationTextPm: n.abbreviationTextPm
10386
- }, null, 8, ["day", "separator", "abbreviationTextAm", "abbreviationTextPm"])
10399
+ abbreviationTextPm: n.abbreviationTextPm,
10400
+ use24HoursFormat: n.use24HoursFormat
10401
+ }, null, 8, ["day", "separator", "abbreviationTextAm", "abbreviationTextPm", "use24HoursFormat"])
10387
10402
  ])
10388
10403
  ]),
10389
10404
  _: 2
@@ -10394,8 +10409,9 @@ function Vw(e, t, n, o, i, s) {
10394
10409
  day: p,
10395
10410
  separator: n.separator,
10396
10411
  abbreviationTextAm: n.abbreviationTextAm,
10397
- abbreviationTextPm: n.abbreviationTextPm
10398
- }, null, 8, ["day", "separator", "abbreviationTextAm", "abbreviationTextPm"]))), 128))
10412
+ abbreviationTextPm: n.abbreviationTextPm,
10413
+ use24HoursFormat: n.use24HoursFormat
10414
+ }, null, 8, ["day", "separator", "abbreviationTextAm", "abbreviationTextPm", "use24HoursFormat"]))), 128))
10399
10415
  ])),
10400
10416
  !e.editing && (n.textHolidays || n.textMiscInfo) ? (u(), f("div", Dw, [
10401
10417
  n.textHolidays ? (u(), f("p", jw, [