axidio-styleguide-library1-v2 0.3.3 → 0.3.5
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.
|
@@ -7968,12 +7968,17 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7968
7968
|
// If header is hidden (compact mobile)
|
|
7969
7969
|
if (!self.isHeaderVisible) {
|
|
7970
7970
|
const labelInfo = hasDateAndTime(d);
|
|
7971
|
+
// Extract week number if present
|
|
7972
|
+
const getWeekNumber = (text) => {
|
|
7973
|
+
const match = text.match(/(?:week|wk|w)\s*(\d+)/i);
|
|
7974
|
+
return match ? `W${match[1]}` : null;
|
|
7975
|
+
};
|
|
7971
7976
|
// If it has both date and week, split them
|
|
7972
7977
|
if (labelInfo.isDate && labelInfo.isWeek) {
|
|
7973
7978
|
const datePart = d.match(/\d{2}[-\/]\d{2}[-\/]\d{2,4}/)?.[0] || '';
|
|
7974
|
-
const
|
|
7975
|
-
if (
|
|
7976
|
-
return `${datePart}\
|
|
7979
|
+
const weekPart = getWeekNumber(d);
|
|
7980
|
+
if (weekPart) {
|
|
7981
|
+
return `${datePart}\n${weekPart}`;
|
|
7977
7982
|
}
|
|
7978
7983
|
}
|
|
7979
7984
|
// If it's just a date, return it unchanged
|
|
@@ -7982,9 +7987,9 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
|
|
|
7982
7987
|
}
|
|
7983
7988
|
// If it has just week number, format it
|
|
7984
7989
|
if (labelInfo.isWeek) {
|
|
7985
|
-
const
|
|
7986
|
-
if (
|
|
7987
|
-
return
|
|
7990
|
+
const weekPart = getWeekNumber(d);
|
|
7991
|
+
if (weekPart) {
|
|
7992
|
+
return weekPart;
|
|
7988
7993
|
}
|
|
7989
7994
|
}
|
|
7990
7995
|
// For non-date labels, trim as before
|