@optifye/dashboard-core 6.10.45 → 6.10.46
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/index.js +7 -32
- package/dist/index.mjs +7 -32
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30328,37 +30328,13 @@ var HourlyOutputChartComponent = ({
|
|
|
30328
30328
|
}, []);
|
|
30329
30329
|
const xAxisConfig = React26__namespace.default.useMemo(() => {
|
|
30330
30330
|
if (containerWidth >= 960) {
|
|
30331
|
-
return { interval: 0, angle: -45, height: 92, tickFont: 10, tickMargin: 12
|
|
30331
|
+
return { interval: 0, angle: -45, height: 92, tickFont: 10, tickMargin: 12 };
|
|
30332
30332
|
}
|
|
30333
30333
|
if (containerWidth >= 760) {
|
|
30334
|
-
return { interval: 0, angle: -35, height: 76, tickFont: 9, tickMargin: 8
|
|
30334
|
+
return { interval: 0, angle: -35, height: 76, tickFont: 9, tickMargin: 8 };
|
|
30335
30335
|
}
|
|
30336
|
-
return { interval: 0, angle: -30, height: 64, tickFont: 9, tickMargin: 6
|
|
30336
|
+
return { interval: 0, angle: -30, height: 64, tickFont: 9, tickMargin: 6 };
|
|
30337
30337
|
}, [containerWidth]);
|
|
30338
|
-
const formatXAxisTick = React26__namespace.default.useCallback((raw) => {
|
|
30339
|
-
const label = typeof raw === "string" ? raw : String(raw);
|
|
30340
|
-
if (xAxisConfig.labelMode === "full") return label;
|
|
30341
|
-
const parts = label.split("-");
|
|
30342
|
-
if (parts.length !== 2) return label;
|
|
30343
|
-
const parsePart = (part) => {
|
|
30344
|
-
const match = part.match(/^(\d{1,2})(?::(\d{2}))?(AM|PM)$/);
|
|
30345
|
-
if (!match) return null;
|
|
30346
|
-
const [, hh, mm, meridiem] = match;
|
|
30347
|
-
const time2 = mm ? `${hh}:${mm}` : hh;
|
|
30348
|
-
const merShort = meridiem === "AM" ? "A" : "P";
|
|
30349
|
-
return { time: time2, meridiem, merShort };
|
|
30350
|
-
};
|
|
30351
|
-
const start = parsePart(parts[0]);
|
|
30352
|
-
const end = parsePart(parts[1]);
|
|
30353
|
-
if (!start || !end) return label;
|
|
30354
|
-
if (xAxisConfig.labelMode === "start") {
|
|
30355
|
-
return `${start.time}${start.merShort}`;
|
|
30356
|
-
}
|
|
30357
|
-
if (start.meridiem === end.meridiem) {
|
|
30358
|
-
return `${start.time}-${end.time}${end.merShort}`;
|
|
30359
|
-
}
|
|
30360
|
-
return `${start.time}${start.merShort}-${end.time}${end.merShort}`;
|
|
30361
|
-
}, [xAxisConfig.labelMode]);
|
|
30362
30338
|
const formatHour = React26__namespace.default.useCallback((hourIndex) => {
|
|
30363
30339
|
const isLastHour = hourIndex === SHIFT_DURATION - 1;
|
|
30364
30340
|
const startDecimalHour = shiftStartTime.decimalHour + hourIndex;
|
|
@@ -30568,7 +30544,7 @@ var HourlyOutputChartComponent = ({
|
|
|
30568
30544
|
right: 10,
|
|
30569
30545
|
bottom: 10,
|
|
30570
30546
|
// Small bottom margin
|
|
30571
|
-
left:
|
|
30547
|
+
left: 6
|
|
30572
30548
|
},
|
|
30573
30549
|
barCategoryGap: "25%",
|
|
30574
30550
|
children: [
|
|
@@ -30582,8 +30558,7 @@ var HourlyOutputChartComponent = ({
|
|
|
30582
30558
|
angle: xAxisConfig.angle,
|
|
30583
30559
|
textAnchor: "end",
|
|
30584
30560
|
tickMargin: xAxisConfig.tickMargin,
|
|
30585
|
-
height: xAxisConfig.height
|
|
30586
|
-
tickFormatter: formatXAxisTick
|
|
30561
|
+
height: xAxisConfig.height
|
|
30587
30562
|
}
|
|
30588
30563
|
),
|
|
30589
30564
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -30591,7 +30566,7 @@ var HourlyOutputChartComponent = ({
|
|
|
30591
30566
|
{
|
|
30592
30567
|
yAxisId: "default",
|
|
30593
30568
|
tickMargin: 8,
|
|
30594
|
-
width:
|
|
30569
|
+
width: 48,
|
|
30595
30570
|
domain: [0, maxYValue],
|
|
30596
30571
|
ticks: generateYAxisTicks(),
|
|
30597
30572
|
tickFormatter: (value) => value,
|
|
@@ -30600,7 +30575,7 @@ var HourlyOutputChartComponent = ({
|
|
|
30600
30575
|
return /* @__PURE__ */ jsxRuntime.jsx("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30601
30576
|
"text",
|
|
30602
30577
|
{
|
|
30603
|
-
x:
|
|
30578
|
+
x: -2,
|
|
30604
30579
|
y: 0,
|
|
30605
30580
|
dy: 4,
|
|
30606
30581
|
textAnchor: "end",
|
package/dist/index.mjs
CHANGED
|
@@ -30299,37 +30299,13 @@ var HourlyOutputChartComponent = ({
|
|
|
30299
30299
|
}, []);
|
|
30300
30300
|
const xAxisConfig = React26__default.useMemo(() => {
|
|
30301
30301
|
if (containerWidth >= 960) {
|
|
30302
|
-
return { interval: 0, angle: -45, height: 92, tickFont: 10, tickMargin: 12
|
|
30302
|
+
return { interval: 0, angle: -45, height: 92, tickFont: 10, tickMargin: 12 };
|
|
30303
30303
|
}
|
|
30304
30304
|
if (containerWidth >= 760) {
|
|
30305
|
-
return { interval: 0, angle: -35, height: 76, tickFont: 9, tickMargin: 8
|
|
30305
|
+
return { interval: 0, angle: -35, height: 76, tickFont: 9, tickMargin: 8 };
|
|
30306
30306
|
}
|
|
30307
|
-
return { interval: 0, angle: -30, height: 64, tickFont: 9, tickMargin: 6
|
|
30307
|
+
return { interval: 0, angle: -30, height: 64, tickFont: 9, tickMargin: 6 };
|
|
30308
30308
|
}, [containerWidth]);
|
|
30309
|
-
const formatXAxisTick = React26__default.useCallback((raw) => {
|
|
30310
|
-
const label = typeof raw === "string" ? raw : String(raw);
|
|
30311
|
-
if (xAxisConfig.labelMode === "full") return label;
|
|
30312
|
-
const parts = label.split("-");
|
|
30313
|
-
if (parts.length !== 2) return label;
|
|
30314
|
-
const parsePart = (part) => {
|
|
30315
|
-
const match = part.match(/^(\d{1,2})(?::(\d{2}))?(AM|PM)$/);
|
|
30316
|
-
if (!match) return null;
|
|
30317
|
-
const [, hh, mm, meridiem] = match;
|
|
30318
|
-
const time2 = mm ? `${hh}:${mm}` : hh;
|
|
30319
|
-
const merShort = meridiem === "AM" ? "A" : "P";
|
|
30320
|
-
return { time: time2, meridiem, merShort };
|
|
30321
|
-
};
|
|
30322
|
-
const start = parsePart(parts[0]);
|
|
30323
|
-
const end = parsePart(parts[1]);
|
|
30324
|
-
if (!start || !end) return label;
|
|
30325
|
-
if (xAxisConfig.labelMode === "start") {
|
|
30326
|
-
return `${start.time}${start.merShort}`;
|
|
30327
|
-
}
|
|
30328
|
-
if (start.meridiem === end.meridiem) {
|
|
30329
|
-
return `${start.time}-${end.time}${end.merShort}`;
|
|
30330
|
-
}
|
|
30331
|
-
return `${start.time}${start.merShort}-${end.time}${end.merShort}`;
|
|
30332
|
-
}, [xAxisConfig.labelMode]);
|
|
30333
30309
|
const formatHour = React26__default.useCallback((hourIndex) => {
|
|
30334
30310
|
const isLastHour = hourIndex === SHIFT_DURATION - 1;
|
|
30335
30311
|
const startDecimalHour = shiftStartTime.decimalHour + hourIndex;
|
|
@@ -30539,7 +30515,7 @@ var HourlyOutputChartComponent = ({
|
|
|
30539
30515
|
right: 10,
|
|
30540
30516
|
bottom: 10,
|
|
30541
30517
|
// Small bottom margin
|
|
30542
|
-
left:
|
|
30518
|
+
left: 6
|
|
30543
30519
|
},
|
|
30544
30520
|
barCategoryGap: "25%",
|
|
30545
30521
|
children: [
|
|
@@ -30553,8 +30529,7 @@ var HourlyOutputChartComponent = ({
|
|
|
30553
30529
|
angle: xAxisConfig.angle,
|
|
30554
30530
|
textAnchor: "end",
|
|
30555
30531
|
tickMargin: xAxisConfig.tickMargin,
|
|
30556
|
-
height: xAxisConfig.height
|
|
30557
|
-
tickFormatter: formatXAxisTick
|
|
30532
|
+
height: xAxisConfig.height
|
|
30558
30533
|
}
|
|
30559
30534
|
),
|
|
30560
30535
|
/* @__PURE__ */ jsx(
|
|
@@ -30562,7 +30537,7 @@ var HourlyOutputChartComponent = ({
|
|
|
30562
30537
|
{
|
|
30563
30538
|
yAxisId: "default",
|
|
30564
30539
|
tickMargin: 8,
|
|
30565
|
-
width:
|
|
30540
|
+
width: 48,
|
|
30566
30541
|
domain: [0, maxYValue],
|
|
30567
30542
|
ticks: generateYAxisTicks(),
|
|
30568
30543
|
tickFormatter: (value) => value,
|
|
@@ -30571,7 +30546,7 @@ var HourlyOutputChartComponent = ({
|
|
|
30571
30546
|
return /* @__PURE__ */ jsx("g", { transform: `translate(${x},${y})`, children: /* @__PURE__ */ jsx(
|
|
30572
30547
|
"text",
|
|
30573
30548
|
{
|
|
30574
|
-
x:
|
|
30549
|
+
x: -2,
|
|
30575
30550
|
y: 0,
|
|
30576
30551
|
dy: 4,
|
|
30577
30552
|
textAnchor: "end",
|