web-mojo 2.2.15 → 2.2.16
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 +9 -9
- 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 +3 -3
- package/dist/chunks/{ChatView-BJK6SF8T.js → ChatView-BqViL7e-.js} +2 -2
- package/dist/chunks/{ChatView-BJK6SF8T.js.map → ChatView-BqViL7e-.js.map} +1 -1
- package/dist/chunks/{ChatView-BPVE1u2i.js → ChatView-DMC-gH-t.js} +37 -9
- package/dist/chunks/{ChatView-BPVE1u2i.js.map → ChatView-DMC-gH-t.js.map} +1 -1
- package/dist/chunks/{Collection-zmb3xHhH.js → Collection-sSP1JF8d.js} +2 -2
- package/dist/chunks/{Collection-zmb3xHhH.js.map → Collection-sSP1JF8d.js.map} +1 -1
- package/dist/chunks/{ContextMenu-DPjJuxpq.js → ContextMenu-C9qnhdFg.js} +2 -2
- package/dist/chunks/{ContextMenu-DPjJuxpq.js.map → ContextMenu-C9qnhdFg.js.map} +1 -1
- package/dist/chunks/{Dialog-RzLLLfJD.js → Dialog-DgYEebtR.js} +3 -3
- package/dist/chunks/{Dialog-RzLLLfJD.js.map → Dialog-DgYEebtR.js.map} +1 -1
- package/dist/chunks/{Dialog--hl_Uh6X.js → Dialog-VyLukswR.js} +2 -2
- package/dist/chunks/{Dialog--hl_Uh6X.js.map → Dialog-VyLukswR.js.map} +1 -1
- package/dist/chunks/{FormView-C1emfj3B.js → FormView-DCI29KlM.js} +3 -3
- package/dist/chunks/FormView-DCI29KlM.js.map +1 -0
- package/dist/chunks/{FormView--WuITh01.js → FormView-GO8yahxE.js} +39 -5
- package/dist/chunks/FormView-GO8yahxE.js.map +1 -0
- package/dist/chunks/{ListView-BBZw7GUS.js → ListView-0fx1T87y.js} +2 -2
- package/dist/chunks/{ListView-BBZw7GUS.js.map → ListView-0fx1T87y.js.map} +1 -1
- package/dist/chunks/{MetricsMiniChartWidget-DoxqoF1X.js → MetricsMiniChartWidget-JLmDm3sm.js} +2 -2
- package/dist/chunks/{MetricsMiniChartWidget-DoxqoF1X.js.map → MetricsMiniChartWidget-JLmDm3sm.js.map} +1 -1
- package/dist/chunks/{MetricsMiniChartWidget-DyVs4Wt0.js → MetricsMiniChartWidget-XTU45k_e.js} +2 -2
- package/dist/chunks/{MetricsMiniChartWidget-DyVs4Wt0.js.map → MetricsMiniChartWidget-XTU45k_e.js.map} +1 -1
- package/dist/chunks/{PDFViewer-CHX2NLkG.js → PDFViewer-DMpN-d6N.js} +2 -2
- package/dist/chunks/{PDFViewer-CHX2NLkG.js.map → PDFViewer-DMpN-d6N.js.map} +1 -1
- package/dist/chunks/{PDFViewer-BxFcG82d.js → PDFViewer-DbPamhVj.js} +2 -2
- package/dist/chunks/{PDFViewer-BxFcG82d.js.map → PDFViewer-DbPamhVj.js.map} +1 -1
- package/dist/chunks/{TokenManager-DFWJ-cuN.js → TokenManager-A0zSdQ6i.js} +4 -4
- package/dist/chunks/{TokenManager-DFWJ-cuN.js.map → TokenManager-A0zSdQ6i.js.map} +1 -1
- package/dist/chunks/{TokenManager-Bi5eDY8Y.js → TokenManager-DH4-kElJ.js} +2 -2
- package/dist/chunks/{TokenManager-Bi5eDY8Y.js.map → TokenManager-DH4-kElJ.js.map} +1 -1
- package/dist/chunks/{version-BzRzH4mJ.js → version-BpfLBsbA.js} +2 -2
- package/dist/chunks/{version-BzRzH4mJ.js.map → version-BpfLBsbA.js.map} +1 -1
- package/dist/chunks/{version-S1OYxk1c.js → version-iQsUQBiz.js} +4 -4
- package/dist/chunks/{version-S1OYxk1c.js.map → version-iQsUQBiz.js.map} +1 -1
- package/dist/docit.cjs.js +1 -1
- package/dist/docit.es.js +5 -5
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +11 -11
- package/dist/lightbox.cjs.js +1 -1
- package/dist/lightbox.es.js +4 -4
- package/dist/map.es.js +1 -1
- package/dist/timeline.es.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/FormView--WuITh01.js.map +0 -1
- package/dist/chunks/FormView-C1emfj3B.js.map +0 -1
|
@@ -5089,11 +5089,12 @@ class DateRangePicker extends View {
|
|
|
5089
5089
|
picker.on("hide", () => {
|
|
5090
5090
|
this.emit("picker:hide");
|
|
5091
5091
|
});
|
|
5092
|
+
picker.on("ready", () => {
|
|
5093
|
+
this.applyInitialRange(picker);
|
|
5094
|
+
});
|
|
5092
5095
|
};
|
|
5093
5096
|
this.picker = new window.easepick.create(config);
|
|
5094
|
-
|
|
5095
|
-
this.picker.setDateRange(this.currentStartDate, this.currentEndDate);
|
|
5096
|
-
}
|
|
5097
|
+
this.applyInitialRange(this.picker);
|
|
5097
5098
|
} catch (error) {
|
|
5098
5099
|
console.error("Failed to initialize Easepick range picker:", error);
|
|
5099
5100
|
this.useNative = true;
|
|
@@ -5367,7 +5368,9 @@ class DateRangePicker extends View {
|
|
|
5367
5368
|
this.currentStartDate = startDate;
|
|
5368
5369
|
this.currentEndDate = endDate;
|
|
5369
5370
|
if (this.picker && this.easepickLoaded) {
|
|
5370
|
-
this.
|
|
5371
|
+
const start = this.normalizeDateValue(startDate);
|
|
5372
|
+
const end = this.normalizeDateValue(endDate);
|
|
5373
|
+
this.picker.setDateRange(start || null, end || null);
|
|
5371
5374
|
} else if (this.useNative) {
|
|
5372
5375
|
const startInput = this.element?.querySelector(`[name="${this.name}_start"]`);
|
|
5373
5376
|
const endInput = this.element?.querySelector(`[name="${this.name}_end"]`);
|
|
@@ -5382,6 +5385,37 @@ class DateRangePicker extends View {
|
|
|
5382
5385
|
this.updateHiddenInputs();
|
|
5383
5386
|
this.emit("range:set", { startDate, endDate });
|
|
5384
5387
|
}
|
|
5388
|
+
applyInitialRange(picker) {
|
|
5389
|
+
if (!picker || !(this.currentStartDate || this.currentEndDate)) {
|
|
5390
|
+
return;
|
|
5391
|
+
}
|
|
5392
|
+
const start = this.normalizeDateValue(this.currentStartDate);
|
|
5393
|
+
const end = this.normalizeDateValue(this.currentEndDate);
|
|
5394
|
+
if (start || end) {
|
|
5395
|
+
picker.setDateRange(start || null, end || null);
|
|
5396
|
+
}
|
|
5397
|
+
}
|
|
5398
|
+
normalizeDateValue(value) {
|
|
5399
|
+
if (!value && value !== 0) return null;
|
|
5400
|
+
if (value instanceof Date) {
|
|
5401
|
+
return isNaN(value) ? null : value;
|
|
5402
|
+
}
|
|
5403
|
+
const str = String(value).trim();
|
|
5404
|
+
if (!str) return null;
|
|
5405
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(str)) {
|
|
5406
|
+
const [year, month, day] = str.split("-").map(Number);
|
|
5407
|
+
const date2 = new Date(year, month - 1, day);
|
|
5408
|
+
return isNaN(date2) ? null : date2;
|
|
5409
|
+
}
|
|
5410
|
+
if (/^-?\d+$/.test(str)) {
|
|
5411
|
+
const num = Number(str);
|
|
5412
|
+
const ms = str.length <= 10 ? num * 1e3 : num;
|
|
5413
|
+
const date2 = new Date(ms);
|
|
5414
|
+
return isNaN(date2) ? null : date2;
|
|
5415
|
+
}
|
|
5416
|
+
const date = new Date(str);
|
|
5417
|
+
return isNaN(date) ? null : date;
|
|
5418
|
+
}
|
|
5385
5419
|
/**
|
|
5386
5420
|
* Get the current date range
|
|
5387
5421
|
*/
|
|
@@ -8549,4 +8583,4 @@ export {
|
|
|
8549
8583
|
applyFileDropMixin as a,
|
|
8550
8584
|
FormView$1 as b
|
|
8551
8585
|
};
|
|
8552
|
-
//# sourceMappingURL=FormView
|
|
8586
|
+
//# sourceMappingURL=FormView-GO8yahxE.js.map
|