@geotab/zenith 3.12.3-beta.0 → 3.13.0-beta.0
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/README.md +11 -3
- package/dist/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +29 -29
- package/dist/calendar/calendar.js +1 -1
- package/dist/chart/lineChart/getDefaultOptions.js +2 -7
- package/dist/chart/lineChart/useSummary.d.ts +2 -1
- package/dist/columnsSelector/columnsSelector.js +1 -1
- package/dist/commonHelpers/arrowNavigation/arrowNavigationHelper.d.ts +1 -1
- package/dist/commonHelpers/arrowNavigation/arrowNavigationHelper.js +29 -12
- package/dist/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.d.ts +2 -1
- package/dist/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.js +2 -2
- package/dist/commonHelpers/arrowNavigation/hooks/useManualScrolling.js +4 -2
- package/dist/commonHelpers/arrowNavigation/hooks/useScrollWhileHolding.js +12 -3
- package/dist/commonHelpers/arrowNavigation/hooks/useScrolling.js +18 -6
- package/dist/commonStyles/caption/caption.less +3 -5
- package/dist/commonStyles/colors/colors.less +4 -19
- package/dist/commonStyles/columnsList.less +1 -0
- package/dist/commonStyles/common.less +1 -2
- package/dist/commonStyles/ellipsis.less +1 -1
- package/dist/commonStyles/fonts/roboto.less +7 -7
- package/dist/commonStyles/link/link.less +1 -1
- package/dist/commonStyles/notSelectable.less +0 -4
- package/dist/commonStyles/pillStyles/pillContent.less +6 -2
- package/dist/commonStyles/pillStyles/pillStyles.less +1 -1
- package/dist/commonStyles/pillStyles/pillTextContent.less +3 -0
- package/dist/commonStyles/pillStyles/pillTypes.less +10 -0
- package/dist/commonStyles/popupMixin.less +2 -2
- package/dist/commonStyles/rangeFieldMixin.less +3 -6
- package/dist/commonStyles/shadows/shadows.less +3 -3
- package/dist/commonStyles/typography/typography.less +24 -24
- package/dist/dataFeed/dataFeed.js +28 -2
- package/dist/dataGrid/columns/actionsColumn/actionsButton.js +1 -1
- package/dist/dataGrid/withFlexibleColumns/withFlexibleColumns.js +1 -1
- package/dist/dataGrid/withSelectableRows/withSelectableRows.js +1 -1
- package/dist/dateInputInner/dateInputInnerControlBlock.js +57 -57
- package/dist/divider/divider.js +1 -1
- package/dist/dropdownRaw/dropdownRaw.js +1 -1
- package/dist/filtersBar/components/filtersBarPeriodPicker/filtersBarPeriodPicker.js +1 -1
- package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +31 -31
- package/dist/filtersBar/filtersContainer/filtersContainer.js +16 -5
- package/dist/header/components/collapsedItemsControl/collapsedItemsControl.js +1 -1
- package/dist/header/header.js +1 -1
- package/dist/header/headerMenu.js +1 -1
- package/dist/index.css +487 -571
- package/dist/list/itemData/itemDataInternal.js +1 -1
- package/dist/list/listItem/listItem.js +1 -1
- package/dist/menu/menu.js +1 -1
- package/dist/nav/navAddMenu/navAddMenu.js +1 -1
- package/dist/nav/navFooter/navFooter.js +4 -4
- package/dist/nav/navFooter/navFooterAction/navFooterAction.js +1 -1
- package/dist/nav/navHeader/navHeader.js +1 -1
- package/dist/nav/navHeader/navHeaderSearch/navHeaderSearch.js +1 -1
- package/dist/nav/navItem/navItem.js +2 -2
- package/dist/rangeRaw/rangeRaw.js +1 -1
- package/dist/rangeRaw/utils/rangeHelper.js +28 -28
- package/dist/sortControl/sortControl.js +1 -1
- package/dist/summary/summary.d.ts +3 -2
- package/dist/summary/summary.js +6 -2
- package/dist/summaryTileBar/summaryTileBar.js +3 -1
- package/dist/table/actions/actionsMenu.js +2 -2
- package/dist/table/flexible/columnsPopup.js +1 -1
- package/dist/table/table.js +5 -7
- package/dist/tabs/tabs.js +16 -5
- package/dist/toolbar/helpers/getWidthWithMargin.js +2 -2
- package/dist/tooltip/helpers/calculateArrowPosition.js +1 -7
- package/dist/tooltip/tooltip.js +7 -5
- package/dist/utils/localization/translations/ar.json +7 -7
- package/dist/utils/localization/translations/cs.json +7 -7
- package/dist/utils/localization/translations/da-DK.json +7 -7
- package/dist/utils/localization/translations/de.json +7 -7
- package/dist/utils/localization/translations/en.json +7 -7
- package/dist/utils/localization/translations/es.json +7 -7
- package/dist/utils/localization/translations/fi-FI.json +7 -7
- package/dist/utils/localization/translations/fr-FR.json +7 -7
- package/dist/utils/localization/translations/fr.json +7 -7
- package/dist/utils/localization/translations/hu-HU.json +7 -7
- package/dist/utils/localization/translations/id.json +7 -7
- package/dist/utils/localization/translations/it.json +7 -7
- package/dist/utils/localization/translations/ja.json +7 -7
- package/dist/utils/localization/translations/ko-KR.json +7 -7
- package/dist/utils/localization/translations/ms.json +7 -7
- package/dist/utils/localization/translations/nb-NO.json +7 -7
- package/dist/utils/localization/translations/nl.json +7 -7
- package/dist/utils/localization/translations/pl.json +7 -7
- package/dist/utils/localization/translations/pt-BR.json +7 -7
- package/dist/utils/localization/translations/pt-PT.json +7 -7
- package/dist/utils/localization/translations/ro-RO.json +7 -7
- package/dist/utils/localization/translations/sk-SK.json +7 -7
- package/dist/utils/localization/translations/sv.json +7 -7
- package/dist/utils/localization/translations/th.json +7 -7
- package/dist/utils/localization/translations/tr.json +7 -7
- package/dist/utils/localization/translations/zh-Hans.json +7 -7
- package/dist/utils/localization/translations/zh-TW.json +7 -7
- package/esm/advancedGroupsFilter/advancedGroupsFilterSectionTooltip.js +29 -29
- package/esm/calendar/calendar.js +1 -1
- package/esm/chart/lineChart/getDefaultOptions.js +2 -7
- package/esm/chart/lineChart/useSummary.d.ts +2 -1
- package/esm/columnsSelector/columnsSelector.js +1 -1
- package/esm/commonHelpers/arrowNavigation/arrowNavigationHelper.d.ts +1 -1
- package/esm/commonHelpers/arrowNavigation/arrowNavigationHelper.js +29 -12
- package/esm/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.d.ts +2 -1
- package/esm/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.js +2 -2
- package/esm/commonHelpers/arrowNavigation/hooks/useManualScrolling.js +4 -2
- package/esm/commonHelpers/arrowNavigation/hooks/useScrollWhileHolding.js +12 -3
- package/esm/commonHelpers/arrowNavigation/hooks/useScrolling.js +18 -6
- package/esm/dataFeed/dataFeed.js +28 -2
- package/esm/dataGrid/columns/actionsColumn/actionsButton.js +1 -1
- package/esm/dataGrid/withFlexibleColumns/withFlexibleColumns.js +1 -1
- package/esm/dataGrid/withSelectableRows/withSelectableRows.js +1 -1
- package/esm/dateInputInner/dateInputInnerControlBlock.js +57 -57
- package/esm/divider/divider.js +1 -1
- package/esm/dropdownRaw/dropdownRaw.js +1 -1
- package/esm/filtersBar/components/filtersBarPeriodPicker/filtersBarPeriodPicker.js +1 -1
- package/esm/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +31 -31
- package/esm/filtersBar/filtersContainer/filtersContainer.js +16 -5
- package/esm/header/components/collapsedItemsControl/collapsedItemsControl.js +1 -1
- package/esm/header/header.js +1 -1
- package/esm/header/headerMenu.js +1 -1
- package/esm/list/itemData/itemDataInternal.js +1 -1
- package/esm/list/listItem/listItem.js +1 -1
- package/esm/menu/menu.js +1 -1
- package/esm/nav/navAddMenu/navAddMenu.js +1 -1
- package/esm/nav/navFooter/navFooter.js +4 -4
- package/esm/nav/navFooter/navFooterAction/navFooterAction.js +1 -1
- package/esm/nav/navHeader/navHeader.js +1 -1
- package/esm/nav/navHeader/navHeaderSearch/navHeaderSearch.js +1 -1
- package/esm/nav/navItem/navItem.js +2 -2
- package/esm/rangeRaw/rangeRaw.js +1 -1
- package/esm/rangeRaw/utils/rangeHelper.js +28 -28
- package/esm/sortControl/sortControl.js +1 -1
- package/esm/summary/summary.d.ts +3 -2
- package/esm/summary/summary.js +6 -2
- package/esm/summaryTileBar/summaryTileBar.js +3 -1
- package/esm/table/actions/actionsMenu.js +2 -2
- package/esm/table/flexible/columnsPopup.js +1 -1
- package/esm/table/table.js +5 -7
- package/esm/tabs/tabs.js +16 -5
- package/esm/toolbar/helpers/getWidthWithMargin.js +2 -2
- package/esm/tooltip/helpers/calculateArrowPosition.js +1 -7
- package/esm/tooltip/tooltip.js +7 -5
- package/esm/utils/localization/translations/ar.json +7 -7
- package/esm/utils/localization/translations/cs.json +7 -7
- package/esm/utils/localization/translations/da-DK.json +7 -7
- package/esm/utils/localization/translations/de.json +7 -7
- package/esm/utils/localization/translations/en.json +7 -7
- package/esm/utils/localization/translations/es.json +7 -7
- package/esm/utils/localization/translations/fi-FI.json +7 -7
- package/esm/utils/localization/translations/fr-FR.json +7 -7
- package/esm/utils/localization/translations/fr.json +7 -7
- package/esm/utils/localization/translations/hu-HU.json +7 -7
- package/esm/utils/localization/translations/id.json +7 -7
- package/esm/utils/localization/translations/it.json +7 -7
- package/esm/utils/localization/translations/ja.json +7 -7
- package/esm/utils/localization/translations/ko-KR.json +7 -7
- package/esm/utils/localization/translations/ms.json +7 -7
- package/esm/utils/localization/translations/nb-NO.json +7 -7
- package/esm/utils/localization/translations/nl.json +7 -7
- package/esm/utils/localization/translations/pl.json +7 -7
- package/esm/utils/localization/translations/pt-BR.json +7 -7
- package/esm/utils/localization/translations/pt-PT.json +7 -7
- package/esm/utils/localization/translations/ro-RO.json +7 -7
- package/esm/utils/localization/translations/sk-SK.json +7 -7
- package/esm/utils/localization/translations/sv.json +7 -7
- package/esm/utils/localization/translations/th.json +7 -7
- package/esm/utils/localization/translations/tr.json +7 -7
- package/esm/utils/localization/translations/zh-Hans.json +7 -7
- package/esm/utils/localization/translations/zh-TW.json +7 -7
- package/package.json +10 -1
package/esm/divider/divider.js
CHANGED
|
@@ -2,6 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { classNames } from "../commonHelpers/classNames/classNames";
|
|
3
3
|
export const Divider = ({ className, spacing }) => {
|
|
4
4
|
const classes = classNames(["zen-divider", className !== null && className !== void 0 ? className : ""]);
|
|
5
|
-
const style = spacing ? {
|
|
5
|
+
const style = spacing ? { marginBlockStart: spacing, marginBlockEnd: spacing } : undefined;
|
|
6
6
|
return _jsx("hr", { className: classes, style: style, role: "separator" });
|
|
7
7
|
};
|
|
@@ -161,4 +161,4 @@ export const FiltersBarPeriodPicker = ({ props, hasApplyButton, className, useSi
|
|
|
161
161
|
const isUsePopup = options.length > sidePanelMaxGroupedItemsLength;
|
|
162
162
|
return (_jsx(SidePanelCell, { role: "group", labelledBy: filterBarLabelledId, titleId: filterBarLabelledId, title: sidePanelTitle, withoutSidePaddings: !isUsePopup, children: isUsePopup ? popup : component }));
|
|
163
163
|
};
|
|
164
|
-
export const TRANSLATIONS = ["Clear", "Reset", "Apply", "Date range filter", "The
|
|
164
|
+
export const TRANSLATIONS = ["Clear", "Reset", "Apply", "Date range filter", "The Start date cannot be empty.", "The End date cannot be empty."];
|
|
@@ -23,33 +23,33 @@ import { Pill } from "../../pill/pill";
|
|
|
23
23
|
import { zen } from "../../utils/zen";
|
|
24
24
|
import { usePortal } from "../../commonHelpers/hooks/usePortal";
|
|
25
25
|
import { useClientReady } from "../../commonHelpers/hooks/useClientReady";
|
|
26
|
-
injectString("cs", "Reset
|
|
27
|
-
injectString("da-DK", "Reset
|
|
28
|
-
injectString("de", "Reset
|
|
29
|
-
injectString("en", "Reset
|
|
30
|
-
injectString("es", "Reset
|
|
31
|
-
injectString("fi-FI", "Reset
|
|
32
|
-
injectString("fr", "Reset
|
|
33
|
-
injectString("fr-FR", "Reset
|
|
34
|
-
injectString("hu-HU", "Reset
|
|
35
|
-
injectString("id", "Reset
|
|
36
|
-
injectString("it", "Reset
|
|
37
|
-
injectString("ja", "Reset
|
|
38
|
-
injectString("ko-KR", "Reset
|
|
39
|
-
injectString("ms", "Reset
|
|
40
|
-
injectString("nb-NO", "Reset
|
|
41
|
-
injectString("nl", "Reset
|
|
42
|
-
injectString("pl", "Reset
|
|
43
|
-
injectString("pt-BR", "Reset
|
|
44
|
-
injectString("pt-PT", "Reset
|
|
45
|
-
injectString("sk-SK", "Reset
|
|
46
|
-
injectString("sv", "Reset
|
|
47
|
-
injectString("th", "Reset
|
|
48
|
-
injectString("tr", "Reset
|
|
49
|
-
injectString("zh-Hans", "Reset
|
|
50
|
-
injectString("zh-TW", "Reset
|
|
51
|
-
injectString("ro-RO", "Reset
|
|
52
|
-
injectString("ar", "Reset
|
|
26
|
+
injectString("cs", "Reset all", "Obnovit v\u0161e");
|
|
27
|
+
injectString("da-DK", "Reset all", "Nulstil alle");
|
|
28
|
+
injectString("de", "Reset all", "Alles zur\xFCcksetzen");
|
|
29
|
+
injectString("en", "Reset all", "Reset all");
|
|
30
|
+
injectString("es", "Reset all", "Restablecer todo");
|
|
31
|
+
injectString("fi-FI", "Reset all", "Palauta kaikki");
|
|
32
|
+
injectString("fr", "Reset all", "R\xE9initialiser tout");
|
|
33
|
+
injectString("fr-FR", "Reset all", "R\xE9initialiser tout");
|
|
34
|
+
injectString("hu-HU", "Reset all", "\xC1ll\xEDtsd vissza mindet.");
|
|
35
|
+
injectString("id", "Reset all", "Atur ulang semua");
|
|
36
|
+
injectString("it", "Reset all", "Ripristinare tutto");
|
|
37
|
+
injectString("ja", "Reset all", "\u3059\u3079\u3066\u30EA\u30BB\u30C3\u30C8");
|
|
38
|
+
injectString("ko-KR", "Reset all", "\uC804\uCCB4 \uC7AC\uC124\uC815");
|
|
39
|
+
injectString("ms", "Reset all", "Tetapkan semula semua");
|
|
40
|
+
injectString("nb-NO", "Reset all", "Tilbakestill alt");
|
|
41
|
+
injectString("nl", "Reset all", "Alles resetten");
|
|
42
|
+
injectString("pl", "Reset all", "Resetuj wszystko");
|
|
43
|
+
injectString("pt-BR", "Reset all", "Redefinir tudo");
|
|
44
|
+
injectString("pt-PT", "Reset all", "Redefinir tudo");
|
|
45
|
+
injectString("sk-SK", "Reset all", "Vynulova\u0165 v\u0161etko");
|
|
46
|
+
injectString("sv", "Reset all", "\xC5terst\xE4ll alla");
|
|
47
|
+
injectString("th", "Reset all", "\u0E23\u0E35\u0E40\u0E0B\u0E47\u0E15\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14");
|
|
48
|
+
injectString("tr", "Reset all", "T\xFCm\xFCn\xFC s\u0131f\u0131rla");
|
|
49
|
+
injectString("zh-Hans", "Reset all", "\u5168\u90E8\u91CD\u7F6E");
|
|
50
|
+
injectString("zh-TW", "Reset all", "\u5168\u90E8\u91CD\u8A2D");
|
|
51
|
+
injectString("ro-RO", "Reset all", "Reseta\u021Bi tot");
|
|
52
|
+
injectString("ar", "Reset all", "\u0625\u0639\u0627\u062F\u0629 \u062A\u0639\u064A\u064A\u0646 \u0627\u0644\u0643\u0644");
|
|
53
53
|
injectString("cs", "Cancel", "Zru\u0161it");
|
|
54
54
|
injectString("da-DK", "Cancel", "Annuller");
|
|
55
55
|
injectString("de", "Cancel", "Abbrechen");
|
|
@@ -184,7 +184,7 @@ export const FiltersBarSidePanel = ({
|
|
|
184
184
|
const {
|
|
185
185
|
translate
|
|
186
186
|
} = useLanguage();
|
|
187
|
-
const isLongTextLanguages = useMemo(() => `${translate("Reset
|
|
187
|
+
const isLongTextLanguages = useMemo(() => `${translate("Reset all")}${translate("Cancel")}${translate("Apply")}`.length > 31, [translate]);
|
|
188
188
|
const dataShieldId = useUniqueId();
|
|
189
189
|
const isMobile = useMobile();
|
|
190
190
|
const {
|
|
@@ -357,7 +357,7 @@ export const FiltersBarSidePanel = ({
|
|
|
357
357
|
className: "zen-side-panel-filters-bar__clear-button",
|
|
358
358
|
onClick: onResetFilters,
|
|
359
359
|
type: "tertiary",
|
|
360
|
-
children: translate("Reset
|
|
360
|
+
children: translate("Reset all")
|
|
361
361
|
})]
|
|
362
362
|
}) : _jsxs(_Fragment, {
|
|
363
363
|
children: [_jsx("div", {
|
|
@@ -366,7 +366,7 @@ export const FiltersBarSidePanel = ({
|
|
|
366
366
|
type: "tertiary",
|
|
367
367
|
className: "zen-side-panel-filters-bar__clear-button",
|
|
368
368
|
onClick: onResetFilters,
|
|
369
|
-
children: translate("Reset
|
|
369
|
+
children: translate("Reset all")
|
|
370
370
|
})
|
|
371
371
|
}), _jsxs("div", {
|
|
372
372
|
className: "zen-side-panel-filters-bar__footer-section",
|
|
@@ -399,4 +399,4 @@ export const FiltersBarSidePanel = ({
|
|
|
399
399
|
});
|
|
400
400
|
};
|
|
401
401
|
export const FiltersBarSidePanelContainer = _ => _jsx(_Fragment, {});
|
|
402
|
-
export const TRANSLATIONS = ["Apply", "Clear", "Reset
|
|
402
|
+
export const TRANSLATIONS = ["Apply", "Clear", "Reset all", "Close", "Cancel"];
|
|
@@ -8,6 +8,7 @@ import { IconChevronLeft } from "../../icons/iconChevronLeft";
|
|
|
8
8
|
import { useDirectionalIcon } from "../../utils/localization/useDirectionalIcon";
|
|
9
9
|
import { useLanguage } from "../../utils/localization/useLanguage";
|
|
10
10
|
import { useDriveClassName } from "../../utils/theme/useDriveClassName";
|
|
11
|
+
import { useIsRTL } from "../../utils/localization/useIsRTL";
|
|
11
12
|
import { zen } from "../../utils/zen";
|
|
12
13
|
injectString("cs", "Scroll to start", "P\u0159ej\xEDt na za\u010D\xE1tek");
|
|
13
14
|
injectString("da-DK", "Scroll to start", "Rul til start");
|
|
@@ -61,13 +62,22 @@ injectString("tr", "Scroll to end", "Sona kayd\u0131r");
|
|
|
61
62
|
injectString("zh-Hans", "Scroll to end", "\u6EDA\u52A8\u81F3\u672B\u5C3E");
|
|
62
63
|
injectString("zh-TW", "Scroll to end", "\u6372\u52D5\u81F3\u7D50\u5C3E\u8655");
|
|
63
64
|
injectString("ro-RO", "Scroll to end", "Derulare la sf\xE2r\u0219it");
|
|
64
|
-
const getScrollButtonType = element => {
|
|
65
|
+
const getScrollButtonType = (element, isRTL) => {
|
|
65
66
|
const scrollLeft = element.scrollLeft;
|
|
66
67
|
const scrollWidth = element.scrollWidth;
|
|
67
68
|
const clientWidth = element.clientWidth;
|
|
68
69
|
if (scrollLeft === 0 && scrollWidth === clientWidth) {
|
|
69
70
|
return "";
|
|
70
71
|
}
|
|
72
|
+
if (isRTL) {
|
|
73
|
+
if (scrollLeft < -1 && scrollLeft > clientWidth - scrollWidth + 1) {
|
|
74
|
+
return "both";
|
|
75
|
+
}
|
|
76
|
+
if (scrollLeft >= -1) {
|
|
77
|
+
return "start";
|
|
78
|
+
}
|
|
79
|
+
return "end";
|
|
80
|
+
}
|
|
71
81
|
if (scrollLeft > 0 && scrollWidth > clientWidth + scrollLeft + 1) {
|
|
72
82
|
return "both";
|
|
73
83
|
}
|
|
@@ -87,6 +97,7 @@ export const FiltersContainer = ({
|
|
|
87
97
|
} = useLanguage();
|
|
88
98
|
const ScrollStartIcon = useDirectionalIcon(IconChevronLeft, IconChevronRight);
|
|
89
99
|
const ScrollEndIcon = useDirectionalIcon(IconChevronRight, IconChevronLeft);
|
|
100
|
+
const isRTL = useIsRTL();
|
|
90
101
|
const gradientClass = "zen-filters-toolbar__gradient";
|
|
91
102
|
const scrollerClass = "zen-filters-toolbar__scroller";
|
|
92
103
|
const driveClassNameScroller = useDriveClassName(scrollerClass);
|
|
@@ -113,7 +124,7 @@ export const FiltersContainer = ({
|
|
|
113
124
|
if (scrollableElt) {
|
|
114
125
|
timer && ((_a = zen.clearTimeout) === null || _a === void 0 ? void 0 : _a.call(zen, timer));
|
|
115
126
|
timer = (_b = zen.setTimeout) === null || _b === void 0 ? void 0 : _b.call(zen, () => {
|
|
116
|
-
setScrollButtonType(getScrollButtonType(scrollableElt));
|
|
127
|
+
setScrollButtonType(getScrollButtonType(scrollableElt, isRTL));
|
|
117
128
|
}, 200);
|
|
118
129
|
}
|
|
119
130
|
};
|
|
@@ -127,12 +138,12 @@ export const FiltersContainer = ({
|
|
|
127
138
|
scrollableElement.removeEventListener("scroll", resizeHandler);
|
|
128
139
|
(_b = zen.removeEventListener) === null || _b === void 0 ? void 0 : _b.call(zen, "resize", resizeHandler);
|
|
129
140
|
};
|
|
130
|
-
}, [scrollableRef]);
|
|
141
|
+
}, [scrollableRef, isRTL]);
|
|
131
142
|
useEffect(() => {
|
|
132
143
|
if (scrollableRef.current) {
|
|
133
|
-
setScrollButtonType(getScrollButtonType(scrollableRef.current));
|
|
144
|
+
setScrollButtonType(getScrollButtonType(scrollableRef.current, isRTL));
|
|
134
145
|
}
|
|
135
|
-
}, [scrollableRef, children]);
|
|
146
|
+
}, [scrollableRef, children, isRTL]);
|
|
136
147
|
useEffect(() => {
|
|
137
148
|
var _a, _b, _c, _d;
|
|
138
149
|
if (showLeft) {
|
|
@@ -118,7 +118,7 @@ export const PageToolbarCollapsedItemsControl = ({
|
|
|
118
118
|
return items.length ? _jsx(Menu, {
|
|
119
119
|
title: translate("More"),
|
|
120
120
|
trigger: adjustmentButton,
|
|
121
|
-
alignment: "bottom-
|
|
121
|
+
alignment: "bottom-end",
|
|
122
122
|
children: items
|
|
123
123
|
}) : null;
|
|
124
124
|
};
|
package/esm/header/header.js
CHANGED
|
@@ -259,7 +259,7 @@ export const Header = ({ children, className, onFiltersBarOpen
|
|
|
259
259
|
if (!isClientReady) {
|
|
260
260
|
return null;
|
|
261
261
|
}
|
|
262
|
-
return (_jsx(HeaderMenuProvider, { alignment: "
|
|
262
|
+
return (_jsx(HeaderMenuProvider, { alignment: "start-top", children: _jsx(HeaderCustomContent.Provider, { value: { content, setContent }, children: _jsx(FiltersBarContextProvider, { value: { setFiltersBarToggleAllFiltersFn, onUpdateNumberOfChangedFiltersFn: setNumberOfChangedFilters }, children: _jsx(SearchContextProvider, { value: { setSearchComponent: handleSearchChange }, children: _jsx(TriggerContextProvider, { value: { triggerComponent: mobileFilterTrigger }, children: _jsxs("div", { className: fullClassName, ref: headerRef, children: [mainLineContainer, newLineContainer, tabs ? (_jsxs("div", { className: classNames([
|
|
263
263
|
"zen-main-header__tabs",
|
|
264
264
|
"zen-main-header--border",
|
|
265
265
|
isMobile ? "zen-main-header__tabs--mobile" : "",
|
package/esm/header/headerMenu.js
CHANGED
|
@@ -21,7 +21,7 @@ import { useDrive } from "../utils/theme/useDrive";
|
|
|
21
21
|
import { useDriveClassName } from "../utils/theme/useDriveClassName";
|
|
22
22
|
export const HeaderMenuDisplayName = "HeaderMenu";
|
|
23
23
|
export const HeaderMenu = (_a) => {
|
|
24
|
-
var { name, children, icon, iconSize = "large", className = "", important, alignment = "bottom-
|
|
24
|
+
var { name, children, icon, iconSize = "large", className = "", important, alignment = "bottom-end", inContextMenu, onlyIcon } = _a, restProps = __rest(_a, ["name", "children", "icon", "iconSize", "className", "important", "alignment", "inContextMenu", "onlyIcon"]);
|
|
25
25
|
const isMobile = useMobile();
|
|
26
26
|
const isDrive = useDrive();
|
|
27
27
|
const driveClassName = useDriveClassName("zen-header-button-with-dropdown");
|
|
@@ -124,7 +124,7 @@ export const ListItem = ({
|
|
|
124
124
|
}, action.name))
|
|
125
125
|
});
|
|
126
126
|
const menu = secondaryActions.length > 0 ? _jsx(Menu, {
|
|
127
|
-
alignment: "bottom-
|
|
127
|
+
alignment: "bottom-end",
|
|
128
128
|
title: translate("More"),
|
|
129
129
|
trigger: _jsx(Button, {
|
|
130
130
|
type: "tertiary-black",
|
package/esm/menu/menu.js
CHANGED
|
@@ -6,7 +6,7 @@ import { MenuItem } from "./components/menuItem";
|
|
|
6
6
|
import { MenuSeparator } from "./components/menuSeparator";
|
|
7
7
|
import { classNames } from "../commonHelpers/classNames/classNames";
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
|
-
export const Menu = ({ children, title, trigger, triggerRef, ariaLabel, ariaLabelledBy, alignment = "bottom-
|
|
9
|
+
export const Menu = ({ children, title, trigger, triggerRef, ariaLabel, ariaLabelledBy, alignment = "bottom-start", className }) => {
|
|
10
10
|
var _a;
|
|
11
11
|
const [isOpen, setIsOpen] = useState(false);
|
|
12
12
|
const innerRef = useRef(null);
|
|
@@ -24,7 +24,7 @@ export const NavAddMenu = ({ title, alignment, className, children }) => {
|
|
|
24
24
|
className: classNames(["zen-nav-item--level-2", child.props.className || ""]),
|
|
25
25
|
collapsed: false
|
|
26
26
|
}));
|
|
27
|
-
return (_jsx(NavItemContext, { value: { parentLevel: 2 }, children: _jsxs("div", { className: classNames(["zen-nav-header__actions", className || ""]), children: [_jsx(Tooltip, { trigger: _jsx(TextIconButton, { id: triggerId, title: title, className: classNames(["zen-nav-footer__actions-icon", className || ""]), icon: isOpen && !isMobile ? IconClose : IconPlus, iconSize: "large", ref: triggerRef, onClick: () => setIsOpen(!isOpen), role: !isMobile ? "menuitem" : undefined }), alignment: isMobile ? "
|
|
27
|
+
return (_jsx(NavItemContext, { value: { parentLevel: 2 }, children: _jsxs("div", { className: classNames(["zen-nav-header__actions", className || ""]), children: [_jsx(Tooltip, { trigger: _jsx(TextIconButton, { id: triggerId, title: title, className: classNames(["zen-nav-footer__actions-icon", className || ""]), icon: isOpen && !isMobile ? IconClose : IconPlus, iconSize: "large", ref: triggerRef, onClick: () => setIsOpen(!isOpen), role: !isMobile ? "menuitem" : undefined }), alignment: isMobile ? "start" : collapsed ? "end" : "top", children: title }), _jsx(ControlledMenu, { title: title, isOpen: isOpen, setIsOpen: setIsOpen, triggerRef: triggerRef, alignment: alignment, paddingX: 8, paddingY: 8, className: classNames([
|
|
28
28
|
"zen-nav-popup zen-nav-popup--narrow zen-nav-l2-popup zen-nav-l2-popup--narrow",
|
|
29
29
|
isMobile ? "zen-nav-popup--mobile zen-nav-l2-popup--mobile" : ""
|
|
30
30
|
]), listClassName: classNames([
|
|
@@ -82,8 +82,8 @@ const NavFooterBottom = ({
|
|
|
82
82
|
return cloneElement(childElement, Object.assign(Object.assign({}, childElement.props), {
|
|
83
83
|
collapsed: !isMobile,
|
|
84
84
|
className: classNames([childElement.props.className || "", "zen-nav-footer__button"]),
|
|
85
|
-
menuAlignment: "
|
|
86
|
-
tooltipAlignment: collapsed ? "
|
|
85
|
+
menuAlignment: "end-bottom",
|
|
86
|
+
tooltipAlignment: collapsed ? "end" : "top"
|
|
87
87
|
}));
|
|
88
88
|
})
|
|
89
89
|
});
|
|
@@ -106,8 +106,8 @@ const NavFooterEditButton = ({
|
|
|
106
106
|
collapsed: !isMobile,
|
|
107
107
|
primaryIcon: IconEdit,
|
|
108
108
|
onClick: () => onEditStateToggle === null || onEditStateToggle === void 0 ? void 0 : onEditStateToggle(true),
|
|
109
|
-
menuAlignment: "
|
|
110
|
-
tooltipAlignment: collapsed ? "
|
|
109
|
+
menuAlignment: "end-bottom",
|
|
110
|
+
tooltipAlignment: collapsed ? "end" : "top"
|
|
111
111
|
}, "edit-button");
|
|
112
112
|
};
|
|
113
113
|
NavFooterEditButton.displayName = "NavFooterEditButton";
|
|
@@ -85,7 +85,7 @@ const NavHeaderToggler = ({
|
|
|
85
85
|
collapsed: true,
|
|
86
86
|
isMenuItem: false,
|
|
87
87
|
onClick: () => onCollapseToggle && onCollapseToggle(!collapsed),
|
|
88
|
-
tooltipAlignment: collapsed ? "
|
|
88
|
+
tooltipAlignment: collapsed ? "end" : "bottom"
|
|
89
89
|
}, "collapse-button")
|
|
90
90
|
});
|
|
91
91
|
};
|
|
@@ -114,7 +114,7 @@ export const NavHeaderSearch = ({
|
|
|
114
114
|
collapsed: true,
|
|
115
115
|
isMenuItem: false,
|
|
116
116
|
onClick: () => onSearchToggle === null || onSearchToggle === void 0 ? void 0 : onSearchToggle(true),
|
|
117
|
-
tooltipAlignment: collapsed ? "
|
|
117
|
+
tooltipAlignment: collapsed ? "end" : "bottom"
|
|
118
118
|
}) : null, searchOpen || isMobile ? _jsx(SearchInput, {
|
|
119
119
|
autoFocus: true,
|
|
120
120
|
ariaLabel: translate("Search"),
|
|
@@ -24,7 +24,7 @@ import { useMobile } from "../../commonHelpers/hooks/useMobile";
|
|
|
24
24
|
const ICON_SIZE = "huge";
|
|
25
25
|
const SUBMENU_ICON_SIZE = "large";
|
|
26
26
|
export const NavItemContext = createContext({ parentLevel: 0 });
|
|
27
|
-
const defaultTooltipAlignment = "
|
|
27
|
+
const defaultTooltipAlignment = "end";
|
|
28
28
|
const isLinkNavItem = (item) => !!item.link;
|
|
29
29
|
const NavItemContent = ({ primaryIcon, secondaryIcon, isBeta, counter, collapsed, hasSubmenu, iconClass, level = 1, children }) => {
|
|
30
30
|
const primaryIconRef = useRef(null);
|
|
@@ -72,7 +72,7 @@ const LinkNavItem = (_a) => {
|
|
|
72
72
|
};
|
|
73
73
|
LinkNavItem.displayName = "LinkNavItem";
|
|
74
74
|
const ButtonNavItem = (_a) => {
|
|
75
|
-
var { className, title, onClick, collapsed, active, children, tabIndex, menuAlignment = "
|
|
75
|
+
var { className, title, onClick, collapsed, active, children, tabIndex, menuAlignment = "end-top", isMenuItem = true, tooltipAlignment = defaultTooltipAlignment, actionIcon, actionIconTitle, onActionIconClick, onDropdownStateChange } = _a, rest = __rest(_a, ["className", "title", "onClick", "collapsed", "active", "children", "tabIndex", "menuAlignment", "isMenuItem", "tooltipAlignment", "actionIcon", "actionIconTitle", "onActionIconClick", "onDropdownStateChange"]);
|
|
76
76
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
77
77
|
const { parentLevel = 0, closeParentMenu } = useContext(NavItemContext);
|
|
78
78
|
useEffect(() => {
|
package/esm/rangeRaw/rangeRaw.js
CHANGED
|
@@ -540,4 +540,4 @@ export const RangeRaw = props => {
|
|
|
540
540
|
})), isMobile ? memoizedMobileView : memoizedDesktopView]
|
|
541
541
|
});
|
|
542
542
|
};
|
|
543
|
-
export const TRANSLATIONS = ["Min", "Max", "Range Filter popup", "Clear", "Cancel", "Apply", "Must be less than the max", "Must be more than the min", "Must be more than {value}", "Must be less than {value}", "Must be in
|
|
543
|
+
export const TRANSLATIONS = ["Min", "Max", "Range Filter popup", "Clear", "Cancel", "Apply", "Must be less than the max", "Must be more than the min", "Must be more than {value}", "Must be less than {value}", "Must be in the {min} - {max} range", "The min value must be set", "The max value must be set", "{rangeName} values {values}"];
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { injectString } from "../../utils/localization/translationsDictionary";
|
|
2
|
-
injectString("cs", "Must be in
|
|
3
|
-
injectString("da-DK", "Must be in
|
|
4
|
-
injectString("de", "Must be in
|
|
5
|
-
injectString("en", "Must be in
|
|
6
|
-
injectString("es", "Must be in
|
|
7
|
-
injectString("fi-FI", "Must be in
|
|
8
|
-
injectString("fr", "Must be in
|
|
9
|
-
injectString("fr-FR", "Must be in
|
|
10
|
-
injectString("hu-HU", "Must be in
|
|
11
|
-
injectString("id", "Must be in
|
|
12
|
-
injectString("it", "Must be in
|
|
13
|
-
injectString("ja", "Must be in
|
|
14
|
-
injectString("ko-KR", "Must be in
|
|
15
|
-
injectString("ms", "Must be in
|
|
16
|
-
injectString("nb-NO", "Must be in
|
|
17
|
-
injectString("nl", "Must be in
|
|
18
|
-
injectString("pl", "Must be in
|
|
19
|
-
injectString("pt-BR", "Must be in
|
|
20
|
-
injectString("pt-PT", "Must be in
|
|
21
|
-
injectString("sk-SK", "Must be in
|
|
22
|
-
injectString("sv", "Must be in
|
|
23
|
-
injectString("th", "Must be in
|
|
24
|
-
injectString("tr", "Must be in
|
|
25
|
-
injectString("zh-Hans", "Must be in
|
|
26
|
-
injectString("zh-TW", "Must be in
|
|
27
|
-
injectString("ro-RO", "Must be in
|
|
28
|
-
injectString("ar", "Must be in
|
|
2
|
+
injectString("cs", "Must be in the {min} - {max} range", "Mus\xED b\xFDt v rozsahu {min}\u2013{max}");
|
|
3
|
+
injectString("da-DK", "Must be in the {min} - {max} range", "Skal v\xE6re i omr\xE5det {min} - {max}");
|
|
4
|
+
injectString("de", "Must be in the {min} - {max} range", "Muss zwischen {min} und {max} liegen");
|
|
5
|
+
injectString("en", "Must be in the {min} - {max} range", "Must be in the {min} - {max} range");
|
|
6
|
+
injectString("es", "Must be in the {min} - {max} range", "Debe estar en el rango {min}-{max}");
|
|
7
|
+
injectString("fi-FI", "Must be in the {min} - {max} range", "On oltava v\xE4lill\xE4 {min} - {max}");
|
|
8
|
+
injectString("fr", "Must be in the {min} - {max} range", "Doit \xEAtre compris dans la plage {min} - {max}");
|
|
9
|
+
injectString("fr-FR", "Must be in the {min} - {max} range", "Doit \xEAtre compris entre {min} et {max}");
|
|
10
|
+
injectString("hu-HU", "Must be in the {min} - {max} range", "A(z) {min} \xE9s {max} k\xF6z\xF6tti tartom\xE1nyban kell lennie.");
|
|
11
|
+
injectString("id", "Must be in the {min} - {max} range", "Harus berada dalam rentang {min} - {max}");
|
|
12
|
+
injectString("it", "Must be in the {min} - {max} range", "Deve rientrare nell'intervallo {min} - {max}");
|
|
13
|
+
injectString("ja", "Must be in the {min} - {max} range", "{min} \uFF5E {max} \u306E\u7BC4\u56F2\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059");
|
|
14
|
+
injectString("ko-KR", "Must be in the {min} - {max} range", "{min}~{max} \uBC94\uC704\uC5D0 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.");
|
|
15
|
+
injectString("ms", "Must be in the {min} - {max} range", "Mesti dalam julat {min} - {max}");
|
|
16
|
+
injectString("nb-NO", "Must be in the {min} - {max} range", "M\xE5 v\xE6re innenfor {min} - {max}");
|
|
17
|
+
injectString("nl", "Must be in the {min} - {max} range", "Moet binnen het bereik {min} - {max} liggen");
|
|
18
|
+
injectString("pl", "Must be in the {min} - {max} range", "Musi znajdowa\u0107 si\u0119 w zakresie {min}\u2013{max}");
|
|
19
|
+
injectString("pt-BR", "Must be in the {min} - {max} range", "Deve estar entre intervalo de {min} a {max}");
|
|
20
|
+
injectString("pt-PT", "Must be in the {min} - {max} range", "Deve estar no intervalo {min} - {max}");
|
|
21
|
+
injectString("sk-SK", "Must be in the {min} - {max} range", "Mus\xED by\u0165 v rozsahu {min} - {max}");
|
|
22
|
+
injectString("sv", "Must be in the {min} - {max} range", "M\xE5ste vara inom intervallet {min}\u2013{max}");
|
|
23
|
+
injectString("th", "Must be in the {min} - {max} range", "\u0E15\u0E49\u0E2D\u0E07\u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E0A\u0E48\u0E27\u0E07 {min} - {max}");
|
|
24
|
+
injectString("tr", "Must be in the {min} - {max} range", "{min} - {max} aral\u0131\u011F\u0131nda olmal\u0131d\u0131r");
|
|
25
|
+
injectString("zh-Hans", "Must be in the {min} - {max} range", "\u5FC5\u987B\u5904\u4E8E {min} \u81F3 {max} \u8303\u56F4\u5185");
|
|
26
|
+
injectString("zh-TW", "Must be in the {min} - {max} range", "\u5FC5\u9808\u5728 {min} - {max} \u7BC4\u570D\u5167");
|
|
27
|
+
injectString("ro-RO", "Must be in the {min} - {max} range", "Trebuie s\u0103 fie \xEEn intervalul {min}-{max}");
|
|
28
|
+
injectString("ar", "Must be in the {min} - {max} range", "\u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0641\u064A \u0627\u0644\u0646\u0637\u0627\u0642 {min} - {max}");
|
|
29
29
|
injectString("cs", "Must be more than {value}", "Mus\xED b\xFDt v\u011Bt\u0161\xED ne\u017E {value}");
|
|
30
30
|
injectString("da-DK", "Must be more than {value}", "Skal v\xE6re mere end {value}");
|
|
31
31
|
injectString("de", "Must be more than {value}", "Muss gr\xF6\xDFer sein als {value}");
|
|
@@ -190,7 +190,7 @@ injectString("ro-RO", "Must be more than the min", "Trebuie s\u0103 fie peste mi
|
|
|
190
190
|
injectString("ar", "Must be more than the min", "\u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0623\u0643\u062B\u0631 \u0645\u0646 \u0627\u0644\u062D\u062F \u0627\u0644\u0623\u062F\u0646\u0649");
|
|
191
191
|
export const getRangeError = (translateFn, currentVal, defMin, defMax) => {
|
|
192
192
|
if (defMin !== undefined && defMax !== undefined && currentVal !== null && (currentVal < defMin || currentVal > defMax)) {
|
|
193
|
-
return translateFn("Must be in
|
|
193
|
+
return translateFn("Must be in the {min} - {max} range").replace("{min}", defMin.toString()).replace("{max}", defMax.toString());
|
|
194
194
|
}
|
|
195
195
|
if (defMin !== undefined && currentVal !== null && currentVal < defMin) {
|
|
196
196
|
return translateFn("Must be more than {value}").replace("{value}", defMin.toString());
|
|
@@ -230,7 +230,7 @@ export const SortControl = ({
|
|
|
230
230
|
size: isDrive ? "huge" : "large"
|
|
231
231
|
})
|
|
232
232
|
}),
|
|
233
|
-
alignment: "bottom-
|
|
233
|
+
alignment: "bottom-start",
|
|
234
234
|
onOpenChange: isCurrentlyOpen => onOptionsToggle(isCurrentlyOpen),
|
|
235
235
|
children: _jsx(SelectList, {
|
|
236
236
|
id: "sortControlSelectList",
|
package/esm/summary/summary.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ import "./summary.less";
|
|
|
3
3
|
export interface ISummary {
|
|
4
4
|
color?: string;
|
|
5
5
|
title?: string;
|
|
6
|
-
value: string | number;
|
|
6
|
+
value: string | number | ReactNode;
|
|
7
|
+
prefix?: ReactNode;
|
|
7
8
|
unit?: string;
|
|
8
9
|
tooltip?: ReactNode;
|
|
9
10
|
more?: ReactNode;
|
|
@@ -11,4 +12,4 @@ export interface ISummary {
|
|
|
11
12
|
onToggle?: () => void;
|
|
12
13
|
description?: ReactNode;
|
|
13
14
|
}
|
|
14
|
-
export declare const Summary: ({ color, title, value, unit, tooltip, more, isEnabled, onToggle, description }: ISummary) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const Summary: ({ color, title, value, prefix, unit, tooltip, more, isEnabled, onToggle, description }: ISummary) => import("react/jsx-runtime").JSX.Element;
|
package/esm/summary/summary.js
CHANGED
|
@@ -63,6 +63,7 @@ export const Summary = ({
|
|
|
63
63
|
color,
|
|
64
64
|
title,
|
|
65
65
|
value,
|
|
66
|
+
prefix,
|
|
66
67
|
unit,
|
|
67
68
|
tooltip,
|
|
68
69
|
more,
|
|
@@ -107,9 +108,12 @@ export const Summary = ({
|
|
|
107
108
|
})]
|
|
108
109
|
}), _jsxs("div", {
|
|
109
110
|
className: "zen-summary__data",
|
|
110
|
-
children: [_jsx("div", {
|
|
111
|
+
children: [prefix && _jsx("div", {
|
|
112
|
+
className: "zen-summary__prefix",
|
|
113
|
+
children: prefix
|
|
114
|
+
}), _jsx("div", {
|
|
111
115
|
className: "zen-summary__value zen-ellipsis",
|
|
112
|
-
children: typeof value === "
|
|
116
|
+
children: typeof value === "number" ? value.toFixed(2) : value
|
|
113
117
|
}), unit && _jsx("div", {
|
|
114
118
|
className: "zen-summary__unit",
|
|
115
119
|
children: unit
|
|
@@ -5,16 +5,18 @@ import { ArrowNavButton } from "../commonHelpers/arrowNavigation/components/arro
|
|
|
5
5
|
import { useHoldOnScroll } from "../commonHelpers/arrowNavigation/hooks/useHoldOnScroll";
|
|
6
6
|
import { useScrolling } from "../commonHelpers/arrowNavigation/hooks/useScrolling";
|
|
7
7
|
import { useManualScrolling } from "../commonHelpers/arrowNavigation/hooks/useManualScrolling";
|
|
8
|
+
import { useIsRTL } from "../utils/localization/useIsRTL";
|
|
8
9
|
import { DeviceType } from "../commonHelpers/hooks/deviceType";
|
|
9
10
|
import { useDeviceType } from "../commonHelpers/hooks/useDeviceType";
|
|
10
11
|
export const SummaryTileBar = ({ className, children, role, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby }) => {
|
|
11
12
|
const { isScrollable, scrollableElementRef, onMouseDown, onMouseUp } = useHoldOnScroll();
|
|
12
13
|
const { scroll } = useManualScrolling({ elementRef: scrollableElementRef });
|
|
13
14
|
const { onScroll, state } = useScrolling();
|
|
15
|
+
const isRTL = useIsRTL();
|
|
14
16
|
const [deviceType, setDeviceType] = useState(DeviceType.Mobile);
|
|
15
17
|
const isMobile = deviceType === DeviceType.Mobile;
|
|
16
18
|
useDeviceType(setDeviceType);
|
|
17
|
-
return (_jsxs("div", { className: classNames(["zen-card-deck", isMobile ? "zen-card-deck--mobile" : "", className !== null && className !== void 0 ? className : ""]), children: [_jsx("div", { className: "zen-card-deck__cards-container", ref: scrollableElementRef, onScroll: onScroll, children: _jsx("ul", { className: "zen-card-deck__cards", role: role !== null && role !== void 0 ? role : "list", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, children: Children.map(children, child => (_jsx("li", { role: role === "tablist" ? "presentation" : undefined, children: child }))) }) }), !isScrollable && (_jsxs("div", { className: "zen-card-deck__arrows", children: [_jsx(ArrowNavButton, { className: "zen-card-deck__arrow-button", value: "left", isHidden: false, disabled: state.scrolledLeft, arrowButtonHandler: scroll, onMouseDown: onMouseDown, onMouseUp: onMouseUp }), _jsx(ArrowNavButton, { className: "zen-card-deck__arrow-button", value: "right", isHidden: false, disabled: state.scrolledRight, arrowButtonHandler: scroll, onMouseDown: onMouseDown, onMouseUp: onMouseUp })] }))] }));
|
|
19
|
+
return (_jsxs("div", { className: classNames(["zen-card-deck", isMobile ? "zen-card-deck--mobile" : "", className !== null && className !== void 0 ? className : ""]), children: [_jsx("div", { className: "zen-card-deck__cards-container", ref: scrollableElementRef, onScroll: onScroll, children: _jsx("ul", { className: "zen-card-deck__cards", role: role !== null && role !== void 0 ? role : "list", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, children: Children.map(children, child => (_jsx("li", { role: role === "tablist" ? "presentation" : undefined, children: child }))) }) }), !isScrollable && (_jsxs("div", { className: "zen-card-deck__arrows", children: [_jsx(ArrowNavButton, { className: "zen-card-deck__arrow-button", value: "left", action: isRTL ? "right" : undefined, isHidden: false, disabled: isRTL ? state.scrolledRight : state.scrolledLeft, arrowButtonHandler: scroll, onMouseDown: onMouseDown, onMouseUp: onMouseUp }), _jsx(ArrowNavButton, { className: "zen-card-deck__arrow-button", value: "right", action: isRTL ? "left" : undefined, isHidden: false, disabled: isRTL ? state.scrolledLeft : state.scrolledRight, arrowButtonHandler: scroll, onMouseDown: onMouseDown, onMouseUp: onMouseUp })] }))] }));
|
|
18
20
|
};
|
|
19
21
|
export const SummaryTileBarDisplayName = "SummaryTileBar";
|
|
20
22
|
SummaryTileBar.displayName = SummaryTileBarDisplayName;
|
|
@@ -168,7 +168,7 @@ export const ActionsMenu = ({
|
|
|
168
168
|
ariaLabelledBy: buttonId,
|
|
169
169
|
title: translate("Actions"),
|
|
170
170
|
triggerRef: ref,
|
|
171
|
-
alignment: "bottom-
|
|
171
|
+
alignment: "bottom-end",
|
|
172
172
|
children: menuItemsToRender
|
|
173
173
|
})]
|
|
174
174
|
});
|
|
@@ -179,7 +179,7 @@ export const ActionsMenu = ({
|
|
|
179
179
|
return _jsx(Menu, {
|
|
180
180
|
title: translate("Actions"),
|
|
181
181
|
trigger: trigger,
|
|
182
|
-
alignment: "bottom-
|
|
182
|
+
alignment: "bottom-end",
|
|
183
183
|
children: menuItems
|
|
184
184
|
});
|
|
185
185
|
};
|
|
@@ -68,7 +68,7 @@ export const ColumnsPopup = ({
|
|
|
68
68
|
return _jsx(Popup, {
|
|
69
69
|
ariaLabel: translate("Column Settings"),
|
|
70
70
|
triggerRef: triggerRef,
|
|
71
|
-
alignment: "bottom-
|
|
71
|
+
alignment: "bottom-end",
|
|
72
72
|
children: _jsx(ColumnSettings, {
|
|
73
73
|
onReset: onResetListener,
|
|
74
74
|
children: listOfColumns
|
package/esm/table/table.js
CHANGED
|
@@ -202,10 +202,8 @@ const TableInner = ({
|
|
|
202
202
|
const handleOnTriggerClick = useCallback(() => setSelectMode(prev => !prev), []);
|
|
203
203
|
const hasPostActions = useMemo(() => columnsPopup || isMobile && selectable || !isMobile && fullscreenButton || isFeedVisible, [columnsPopup, fullscreenButton, isFeedVisible, isMobile, selectable]);
|
|
204
204
|
const hasToolbar = useMemo(() => bulkActions || feedSortControl || pagination && !isMobile || other.length || columnsPopup || !isMobile && fullscreenButton || isFeedVisible, [bulkActions, columnsPopup, feedSortControl, fullscreenButton, isFeedVisible, isMobile, other.length, pagination]);
|
|
205
|
-
const gridAutoHeight = useMemo(() => contentHeight ? `${contentHeight}px` : undefined, [contentHeight]);
|
|
206
|
-
const
|
|
207
|
-
const gridHeight = useMemo(() => height || gridAutoHeight || minHeight, [gridAutoHeight, height]);
|
|
208
|
-
// TODO: disadvantages?
|
|
205
|
+
const gridAutoHeight = useMemo(() => contentHeight !== undefined ? `${contentHeight}px` : undefined, [contentHeight]);
|
|
206
|
+
const gridHeight = useMemo(() => height || gridAutoHeight, [gridAutoHeight, height]);
|
|
209
207
|
const {
|
|
210
208
|
gridClasses,
|
|
211
209
|
restClasses
|
|
@@ -213,10 +211,10 @@ const TableInner = ({
|
|
|
213
211
|
return _jsx(LayoutFullScreen, {
|
|
214
212
|
className: classNames([...gridClasses]),
|
|
215
213
|
children: _jsxs("div", {
|
|
216
|
-
style: {
|
|
214
|
+
style: gridHeight ? {
|
|
217
215
|
height: gridHeight
|
|
218
|
-
},
|
|
219
|
-
className: classNames(["zen-table-wrapper", hasToolbar ? "zen-table-wrapper--with-toolbar" : "", ...restClasses]),
|
|
216
|
+
} : undefined,
|
|
217
|
+
className: classNames(["zen-table-wrapper", gridHeight ? "" : "zen-table-wrapper--fit-content", hasToolbar ? "zen-table-wrapper--with-toolbar" : "", ...restClasses]),
|
|
220
218
|
children: [hasToolbar ? _jsxs(EntitiesListActions, {
|
|
221
219
|
gridType: isMobile ? DeviceType.Mobile : DeviceType.Desktop,
|
|
222
220
|
children: [_jsxs(EntitiesListActions.Actions, {
|