web-mojo 2.2.2 → 2.2.4
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.
- package/dist/admin.cjs.js +1 -1
- package/dist/admin.es.js +12 -12
- package/dist/auth.cjs.js +1 -1
- package/dist/auth.es.js +1 -1
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.es.js +4 -4
- package/dist/chunks/{ChatView-CWNoGk-B.js → ChatView-DZ7f2Rl5.js} +7 -7
- package/dist/chunks/{ChatView-CWNoGk-B.js.map → ChatView-DZ7f2Rl5.js.map} +1 -1
- package/dist/chunks/{ChatView-DSEEMnNt.js → ChatView-DoA8h81E.js} +2 -2
- package/dist/chunks/{ChatView-DSEEMnNt.js.map → ChatView-DoA8h81E.js.map} +1 -1
- package/dist/chunks/{Collection-CqLcHgQG.js → Collection-CREl6Fa9.js} +2 -2
- package/dist/chunks/{Collection-CqLcHgQG.js.map → Collection-CREl6Fa9.js.map} +1 -1
- package/dist/chunks/{Collection-C7rteLDn.js → Collection-DJaa8dhS.js} +2 -2
- package/dist/chunks/{Collection-C7rteLDn.js.map → Collection-DJaa8dhS.js.map} +1 -1
- package/dist/chunks/{ContextMenu-JJ51hS-a.js → ContextMenu-CvLNRuJb.js} +3 -3
- package/dist/chunks/{ContextMenu-JJ51hS-a.js.map → ContextMenu-CvLNRuJb.js.map} +1 -1
- package/dist/chunks/{ContextMenu-BY3BgxM5.js → ContextMenu-DvsDXgOe.js} +2 -2
- package/dist/chunks/{ContextMenu-BY3BgxM5.js.map → ContextMenu-DvsDXgOe.js.map} +1 -1
- package/dist/chunks/{DataView-CsYXM9vF.js → DataView-Bm8dffDn.js} +2 -2
- package/dist/chunks/{DataView-CsYXM9vF.js.map → DataView-Bm8dffDn.js.map} +1 -1
- package/dist/chunks/{DataView-CHvoEI4M.js → DataView-gc1VouWJ.js} +2 -2
- package/dist/chunks/{DataView-CHvoEI4M.js.map → DataView-gc1VouWJ.js.map} +1 -1
- package/dist/chunks/{Dialog-BKPwBCDC.js → Dialog-Cl_rBFSh.js} +2 -2
- package/dist/chunks/{Dialog-BKPwBCDC.js.map → Dialog-Cl_rBFSh.js.map} +1 -1
- package/dist/chunks/{Dialog-D4DsB-N1.js → Dialog-LPU__Q7Z.js} +5 -5
- package/dist/chunks/{Dialog-D4DsB-N1.js.map → Dialog-LPU__Q7Z.js.map} +1 -1
- package/dist/chunks/{FormView-DYX_yeho.js → FormView-Cc5iagqS.js} +2 -2
- package/dist/chunks/{FormView-DYX_yeho.js.map → FormView-Cc5iagqS.js.map} +1 -1
- package/dist/chunks/{FormView-B9nIO_AX.js → FormView-DMMUiciW.js} +2 -2
- package/dist/chunks/{FormView-B9nIO_AX.js.map → FormView-DMMUiciW.js.map} +1 -1
- package/dist/chunks/{ListView-DWaowghQ.js → ListView-8FqhYWRU.js} +3 -3
- package/dist/chunks/{ListView-DWaowghQ.js.map → ListView-8FqhYWRU.js.map} +1 -1
- package/dist/chunks/{ListView-D2vt0koT.js → ListView-Xcsfu4IL.js} +2 -2
- package/dist/chunks/{ListView-D2vt0koT.js.map → ListView-Xcsfu4IL.js.map} +1 -1
- package/dist/chunks/{MetricsMiniChartWidget-BfZ-dcbW.js → MetricsMiniChartWidget-BuvhT5NG.js} +2 -2
- package/dist/chunks/{MetricsMiniChartWidget-BfZ-dcbW.js.map → MetricsMiniChartWidget-BuvhT5NG.js.map} +1 -1
- package/dist/chunks/{MetricsMiniChartWidget-Cl-TA-Q9.js → MetricsMiniChartWidget-CsawNLeS.js} +4 -4
- package/dist/chunks/{MetricsMiniChartWidget-Cl-TA-Q9.js.map → MetricsMiniChartWidget-CsawNLeS.js.map} +1 -1
- package/dist/chunks/{PDFViewer-Cgr3T15i.js → PDFViewer-Bg06w3Cu.js} +2 -2
- package/dist/chunks/{PDFViewer-Cgr3T15i.js.map → PDFViewer-Bg06w3Cu.js.map} +1 -1
- package/dist/chunks/{PDFViewer-Bzifr-dn.js → PDFViewer-Dr72gJt1.js} +3 -3
- package/dist/chunks/{PDFViewer-Bzifr-dn.js.map → PDFViewer-Dr72gJt1.js.map} +1 -1
- package/dist/chunks/Rest-29RtA7pe.js +2 -0
- package/dist/chunks/Rest-29RtA7pe.js.map +1 -0
- package/dist/chunks/{Rest-C3fPzCIA.js → Rest-BoKp2Hj4.js} +34 -1
- package/dist/chunks/Rest-BoKp2Hj4.js.map +1 -0
- package/dist/chunks/TokenManager-Bh1WshcR.js +2 -0
- package/dist/chunks/TokenManager-Bh1WshcR.js.map +1 -0
- package/dist/chunks/{TokenManager-CoHKTGNX.js → TokenManager-BoolOcxQ.js} +26 -11
- package/dist/chunks/TokenManager-BoolOcxQ.js.map +1 -0
- package/dist/chunks/{WebSocketClient-Dzwprd15.js → WebSocketClient-DcJBT-iB.js} +2 -2
- package/dist/chunks/{WebSocketClient-Dzwprd15.js.map → WebSocketClient-DcJBT-iB.js.map} +1 -1
- package/dist/chunks/{WebSocketClient-CkAL55qy.js → WebSocketClient-Do0CazHx.js} +2 -2
- package/dist/chunks/{WebSocketClient-CkAL55qy.js.map → WebSocketClient-Do0CazHx.js.map} +1 -1
- package/dist/chunks/{version-CJnLNR-g.js → version-Bado0p82.js} +2 -2
- package/dist/chunks/{version-CJnLNR-g.js.map → version-Bado0p82.js.map} +1 -1
- package/dist/chunks/{version-Bl3PlRrV.js → version-_FYWwpG_.js} +4 -4
- package/dist/chunks/{version-Bl3PlRrV.js.map → version-_FYWwpG_.js.map} +1 -1
- package/dist/docit.cjs.js +1 -1
- package/dist/docit.es.js +6 -6
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +15 -15
- package/dist/lightbox.cjs.js +1 -1
- package/dist/lightbox.es.js +5 -5
- package/dist/map.cjs.js +1 -1
- package/dist/map.es.js +2 -2
- package/dist/timeline.cjs.js +1 -1
- package/dist/timeline.es.js +4 -4
- package/package.json +1 -1
- package/dist/chunks/Rest-C3fPzCIA.js.map +0 -1
- package/dist/chunks/Rest-DYPLEzNy.js +0 -2
- package/dist/chunks/Rest-DYPLEzNy.js.map +0 -1
- package/dist/chunks/TokenManager-CoHKTGNX.js.map +0 -1
- package/dist/chunks/TokenManager-DSyRWlvc.js +0 -2
- package/dist/chunks/TokenManager-DSyRWlvc.js.map +0 -1
|
@@ -26,6 +26,8 @@ class DataFormatter {
|
|
|
26
26
|
this.register("datetime", this.datetime.bind(this));
|
|
27
27
|
this.register("datetime_tz", this.datetime_tz.bind(this));
|
|
28
28
|
this.register("datatime_tz", this.datetime_tz.bind(this));
|
|
29
|
+
this.register("date_range", this.date_range.bind(this));
|
|
30
|
+
this.register("datetime_range", this.datetime_range.bind(this));
|
|
29
31
|
this.register("relative", this.relative.bind(this));
|
|
30
32
|
this.register("fromNow", this.relative.bind(this));
|
|
31
33
|
this.register("relative_short", this.relative_short.bind(this));
|
|
@@ -598,6 +600,37 @@ class DataFormatter {
|
|
|
598
600
|
throw new Error("Value doesn't look like epoch seconds or ms");
|
|
599
601
|
}
|
|
600
602
|
}
|
|
603
|
+
/**
|
|
604
|
+
* Format date range
|
|
605
|
+
* @param {*} startValue - Start date (required)
|
|
606
|
+
* @param {*} endValue - End date (defaults to now)
|
|
607
|
+
* @param {string} format - Date format (defaults to 'MM/DD/YYYY')
|
|
608
|
+
* @returns {string} Formatted date range (e.g., "01/01/2025 - 01/31/2025")
|
|
609
|
+
*/
|
|
610
|
+
date_range(startValue, endValue = null, format = "MM/DD/YYYY") {
|
|
611
|
+
if (!startValue) return "";
|
|
612
|
+
const endVal = endValue || /* @__PURE__ */ new Date();
|
|
613
|
+
const startStr = this.date(startValue, format);
|
|
614
|
+
const endStr = this.date(endVal, format);
|
|
615
|
+
if (!startStr || !endStr) return "";
|
|
616
|
+
return `${startStr} - ${endStr}`;
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Format datetime range
|
|
620
|
+
* @param {*} startValue - Start datetime (required)
|
|
621
|
+
* @param {*} endValue - End datetime (defaults to now)
|
|
622
|
+
* @param {string} dateFormat - Date format (defaults to 'MM/DD/YYYY')
|
|
623
|
+
* @param {string} timeFormat - Time format (defaults to 'HH:mm')
|
|
624
|
+
* @returns {string} Formatted datetime range (e.g., "01/01/2025 14:30 - 01/31/2025 16:45")
|
|
625
|
+
*/
|
|
626
|
+
datetime_range(startValue, endValue = null, dateFormat = "MM/DD/YYYY", timeFormat = "HH:mm") {
|
|
627
|
+
if (!startValue) return "";
|
|
628
|
+
const endVal = endValue || /* @__PURE__ */ new Date();
|
|
629
|
+
const startStr = this.datetime(startValue, dateFormat, timeFormat);
|
|
630
|
+
const endStr = this.datetime(endVal, dateFormat, timeFormat);
|
|
631
|
+
if (!startStr || !endStr) return "";
|
|
632
|
+
return `${startStr} - ${endStr}`;
|
|
633
|
+
}
|
|
601
634
|
/**
|
|
602
635
|
* Format relative time
|
|
603
636
|
* @param {*} value - Date value
|
|
@@ -4132,4 +4165,4 @@ export {
|
|
|
4132
4165
|
dataFormatter as d,
|
|
4133
4166
|
rest as r
|
|
4134
4167
|
};
|
|
4135
|
-
//# sourceMappingURL=Rest-
|
|
4168
|
+
//# sourceMappingURL=Rest-BoKp2Hj4.js.map
|