@geotab/zenith 3.10.0-beta.7 → 3.11.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 +33 -0
- package/dist/calendar/calendar.js +7 -4
- package/dist/card/components/title.js +4 -1
- package/dist/card/components/titleLink.js +5 -2
- package/dist/chart/barChart/getDefaultOptions.d.ts +2 -1
- package/dist/chart/barChart/getDefaultOptions.js +5 -2
- package/dist/chart/barChart.js +6 -4
- package/dist/chart/lineChart/getDefaultOptions.d.ts +2 -1
- package/dist/chart/lineChart/getDefaultOptions.js +5 -2
- package/dist/chart/lineChart.js +4 -2
- package/dist/checkboxListWithAction/checkboxListWithAction.js +4 -1
- package/dist/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.js +4 -1
- package/dist/commonStyles/pillStyles/pillContent.less +13 -14
- package/dist/commonStyles/pillStyles/pillStyles.less +4 -5
- package/dist/commonStyles/pillStyles/pillTextContent.less +2 -2
- package/dist/commonStyles/typography/typography.less +579 -19
- package/dist/controlledPopup/controlledPopup.d.ts +1 -0
- package/dist/controlledPopup/controlledPopup.js +3 -1
- package/dist/dataGrid/cell/cell.d.ts +2 -1
- package/dist/dataGrid/cell/cell.js +2 -2
- package/dist/dataGrid/dataGrid.js +7 -4
- package/dist/dataGrid/listColumn.d.ts +2 -0
- package/dist/dataGrid/row/row.d.ts +2 -1
- package/dist/dataGrid/row/row.js +13 -9
- package/dist/dataGrid/withFlexibleColumns/components/columnSettingsList.js +2 -1
- package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +4 -0
- package/dist/dateRangeInner/dateRangeInner.js +5 -2
- package/dist/dateRangeRaw/dateRangeRaw.js +5 -2
- package/dist/dateRangeRaw/utils/parseLabel.js +1 -1
- package/dist/dropdownRaw/dropdownRaw.js +12 -6
- package/dist/fileUpload/components/dropZoneContent.js +100 -100
- package/dist/fileUpload/fileUpload.js +100 -100
- package/dist/filters/components/filtersSearchList.js +4 -1
- package/dist/filtersBar/filtersContainer/filtersContainer.js +62 -61
- package/dist/formStepperButtons/formStepperButtons.js +4 -1
- package/dist/groupsFilterRaw/groupsFilterAdjustmentState.js +4 -1
- package/dist/groupsFilterRaw/groupsFilterInitialState.js +4 -1
- package/dist/header/headerBack.js +4 -1
- package/dist/icons/iconAlignLeft.js +1 -3
- package/dist/icons/iconAlignmentLeft.js +1 -3
- package/dist/icons/iconAlignmentRight.js +1 -3
- package/dist/icons/iconArrowBottomLeft.js +1 -3
- package/dist/icons/iconArrowBottomRight.js +1 -3
- package/dist/icons/iconArrowLeftPath.js +1 -3
- package/dist/icons/iconArrowRight.js +1 -3
- package/dist/icons/iconArrowRightCircle.js +1 -3
- package/dist/icons/iconArrowRightPath.js +1 -3
- package/dist/icons/iconArrowTopLeft.js +1 -3
- package/dist/icons/iconArrowTopRight.js +1 -3
- package/dist/icons/iconChevronDoubleRight.js +1 -3
- package/dist/icons/iconChevronRight.js +1 -3
- package/dist/icons/iconChevronRightSmall.js +1 -3
- package/dist/icons/iconCornerDownLeft.js +1 -3
- package/dist/icons/iconCornerDownRight.js +1 -3
- package/dist/icons/iconCornerLeftDown.js +1 -3
- package/dist/icons/iconCornerLeftUp.js +1 -3
- package/dist/icons/iconCornerRightDown.js +1 -3
- package/dist/icons/iconCornerRightUp.js +1 -3
- package/dist/icons/iconCornerUpLeft.js +1 -3
- package/dist/icons/iconCornerUpRight.js +1 -3
- package/dist/index.css +3257 -2925
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/lineChartMini/lineChartMini.js +15 -3
- package/dist/list/itemData/itemDataInternal.js +4 -1
- package/dist/list/list.d.ts +1 -0
- package/dist/list/list.js +2 -2
- package/dist/list/listItem/listItem.d.ts +1 -3
- package/dist/list/listItem/listItem.js +6 -5
- package/dist/menu/components/controlledMenuList/controlledMenuList.d.ts +27 -0
- package/dist/menu/components/controlledMenuList/controlledMenuList.js +126 -0
- package/dist/menu/components/createControlledMenuList.d.ts +37 -0
- package/dist/menu/components/createControlledMenuList.js +55 -0
- package/dist/menu/components/createMenuItem.d.ts +67 -0
- package/dist/menu/components/createMenuItem.js +97 -0
- package/dist/menu/components/menuButton.js +12 -3
- package/dist/menu/components/menuItem.d.ts +1 -2
- package/dist/menu/components/menuItem.js +20 -74
- package/dist/menu/contexts/usePathContext.d.ts +2 -0
- package/dist/menu/contexts/usePathContext.js +9 -0
- package/dist/menu/controlledMenu.js +8 -175
- package/dist/menu/utils/buildMenuContent.d.ts +2 -0
- package/dist/menu/utils/buildMenuContent.js +38 -0
- package/dist/menu/utils/findContent.d.ts +2 -2
- package/dist/menu/utils/findContent.js +4 -3
- package/dist/menu/utils/getItemLabel.d.ts +2 -0
- package/dist/menu/utils/getItemLabel.js +8 -0
- package/dist/menu/utils/getSafeRel.d.ts +1 -0
- package/dist/menu/utils/getSafeRel.js +14 -0
- package/dist/menu/utils/isMenuItem.d.ts +2 -0
- package/dist/menu/utils/isMenuItem.js +13 -0
- package/dist/menu/utils/isSafeHref.d.ts +1 -0
- package/dist/menu/utils/isSafeHref.js +10 -0
- package/dist/menu/utils/normalizeSeparators.d.ts +2 -0
- package/dist/menu/utils/normalizeSeparators.js +23 -0
- package/dist/menu/utils/resolveKeys.d.ts +12 -0
- package/dist/menu/utils/resolveKeys.js +22 -0
- package/dist/menu/utils/useLastValidSheet.d.ts +7 -0
- package/dist/menu/utils/useLastValidSheet.js +30 -0
- package/dist/menu/utils/useMenuItemCore.d.ts +31 -0
- package/dist/menu/utils/useMenuItemCore.js +54 -0
- package/dist/menu/utils/useMenuItemKeyboardNav.d.ts +2 -0
- package/dist/menu/utils/useMenuItemKeyboardNav.js +15 -0
- package/dist/menu/utils/useMenuListKeyboardNav.d.ts +12 -0
- package/dist/menu/utils/useMenuListKeyboardNav.js +77 -0
- package/dist/menu/utils/useMenuPath.d.ts +6 -0
- package/dist/menu/utils/useMenuPath.js +35 -0
- package/dist/nav/navItem/navItem.js +10 -5
- package/dist/nav/navSection/navSection.js +7 -5
- package/dist/pagination/paginationArrow.js +10 -3
- package/dist/radioGroupRaw/radioGroupRaw.js +2 -1
- package/dist/rangeRaw/rangeRaw.js +0 -1
- package/dist/selectList/selectList.helpers.d.ts +1 -1
- package/dist/selectList/selectList.helpers.js +29 -4
- package/dist/selectList/selectList.js +3 -1
- package/dist/selectList/selectList.reducer.js +1 -2
- package/dist/selectList/selectListItem.js +4 -1
- package/dist/sortControl/sortControl.js +59 -4
- package/dist/table/children/useTableChildren.d.ts +1 -1
- package/dist/table/children/useTableChildren.js +3 -3
- package/dist/table/flexible/columnsList.js +4 -2
- package/dist/table/selectable/useSelectableRows.d.ts +8 -0
- package/dist/table/selectable/useSelectableRows.js +14 -6
- package/dist/table/table.js +1 -7
- package/dist/tabs/tabs.js +60 -58
- package/dist/tabs/tabsTestHelper.js +2 -2
- package/dist/timePickerRaw/timePickerRaw.js +1 -1
- package/dist/toggleButtonRaw/toggleButtonRaw.js +5 -2
- package/dist/utils/localization/translations/ar.json +3 -1
- package/dist/utils/localization/translations/cs.json +9 -5
- package/dist/utils/localization/translations/da-DK.json +9 -5
- package/dist/utils/localization/translations/de.json +9 -5
- package/dist/utils/localization/translations/en.json +5 -1
- package/dist/utils/localization/translations/es.json +9 -5
- package/dist/utils/localization/translations/fi-FI.json +9 -5
- package/dist/utils/localization/translations/fr-FR.json +9 -5
- package/dist/utils/localization/translations/fr.json +9 -5
- package/dist/utils/localization/translations/hu-HU.json +9 -5
- package/dist/utils/localization/translations/id.json +9 -5
- package/dist/utils/localization/translations/it.json +9 -5
- package/dist/utils/localization/translations/ja.json +9 -5
- package/dist/utils/localization/translations/ko-KR.json +9 -5
- package/dist/utils/localization/translations/ms.json +9 -5
- package/dist/utils/localization/translations/nb-NO.json +9 -5
- package/dist/utils/localization/translations/nl.json +9 -5
- package/dist/utils/localization/translations/pl.json +9 -5
- package/dist/utils/localization/translations/pt-BR.json +9 -5
- package/dist/utils/localization/translations/pt-PT.json +9 -5
- package/dist/utils/localization/translations/ro-RO.json +9 -5
- package/dist/utils/localization/translations/sk-SK.json +9 -5
- package/dist/utils/localization/translations/sv.json +9 -5
- package/dist/utils/localization/translations/th.json +9 -5
- package/dist/utils/localization/translations/tr.json +9 -5
- package/dist/utils/localization/translations/zh-Hans.json +9 -5
- package/dist/utils/localization/translations/zh-TW.json +9 -5
- package/dist/utils/localization/useDirectionalIcon.d.ts +3 -0
- package/dist/utils/localization/useDirectionalIcon.js +9 -0
- package/dist/utils/positioningUtils/alignments.d.ts +2 -2
- package/dist/utils/positioningUtils/alignments.js +2 -2
- package/dist/utils/positioningUtils/calculatePosition.js +4 -6
- package/esm/calendar/calendar.js +7 -4
- package/esm/card/components/title.js +4 -1
- package/esm/card/components/titleLink.js +5 -2
- package/esm/chart/barChart/getDefaultOptions.d.ts +2 -1
- package/esm/chart/barChart/getDefaultOptions.js +5 -2
- package/esm/chart/barChart.js +6 -4
- package/esm/chart/lineChart/getDefaultOptions.d.ts +2 -1
- package/esm/chart/lineChart/getDefaultOptions.js +5 -2
- package/esm/chart/lineChart.js +4 -2
- package/esm/checkboxListWithAction/checkboxListWithAction.js +4 -1
- package/esm/commonHelpers/arrowNavigation/components/arrowButton/arrowButton.js +4 -1
- package/esm/controlledPopup/controlledPopup.d.ts +1 -0
- package/esm/controlledPopup/controlledPopup.js +3 -1
- package/esm/dataGrid/cell/cell.d.ts +2 -1
- package/esm/dataGrid/cell/cell.js +2 -2
- package/esm/dataGrid/dataGrid.js +7 -4
- package/esm/dataGrid/listColumn.d.ts +2 -0
- package/esm/dataGrid/row/row.d.ts +2 -1
- package/esm/dataGrid/row/row.js +13 -9
- package/esm/dataGrid/withFlexibleColumns/components/columnSettingsList.js +2 -1
- package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +4 -0
- package/esm/dateRangeInner/dateRangeInner.js +5 -2
- package/esm/dateRangeRaw/dateRangeRaw.js +5 -2
- package/esm/dateRangeRaw/utils/parseLabel.js +1 -1
- package/esm/dropdownRaw/dropdownRaw.js +12 -6
- package/esm/fileUpload/components/dropZoneContent.js +100 -100
- package/esm/fileUpload/fileUpload.js +100 -100
- package/esm/filters/components/filtersSearchList.js +4 -1
- package/esm/filtersBar/filtersContainer/filtersContainer.js +62 -61
- package/esm/formStepperButtons/formStepperButtons.js +4 -1
- package/esm/groupsFilterRaw/groupsFilterAdjustmentState.js +4 -1
- package/esm/groupsFilterRaw/groupsFilterInitialState.js +4 -1
- package/esm/header/headerBack.js +4 -1
- package/esm/icons/iconAlignLeft.js +1 -3
- package/esm/icons/iconAlignmentLeft.js +1 -3
- package/esm/icons/iconAlignmentRight.js +1 -3
- package/esm/icons/iconArrowBottomLeft.js +1 -3
- package/esm/icons/iconArrowBottomRight.js +1 -3
- package/esm/icons/iconArrowLeftPath.js +1 -3
- package/esm/icons/iconArrowRight.js +1 -3
- package/esm/icons/iconArrowRightCircle.js +1 -3
- package/esm/icons/iconArrowRightPath.js +1 -3
- package/esm/icons/iconArrowTopLeft.js +1 -3
- package/esm/icons/iconArrowTopRight.js +1 -3
- package/esm/icons/iconChevronDoubleRight.js +1 -3
- package/esm/icons/iconChevronRight.js +1 -3
- package/esm/icons/iconChevronRightSmall.js +1 -3
- package/esm/icons/iconCornerDownLeft.js +1 -3
- package/esm/icons/iconCornerDownRight.js +1 -3
- package/esm/icons/iconCornerLeftDown.js +1 -3
- package/esm/icons/iconCornerLeftUp.js +1 -3
- package/esm/icons/iconCornerRightDown.js +1 -3
- package/esm/icons/iconCornerRightUp.js +1 -3
- package/esm/icons/iconCornerUpLeft.js +1 -3
- package/esm/icons/iconCornerUpRight.js +1 -3
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/lineChartMini/lineChartMini.js +15 -3
- package/esm/list/itemData/itemDataInternal.js +4 -1
- package/esm/list/list.d.ts +1 -0
- package/esm/list/list.js +2 -2
- package/esm/list/listItem/listItem.d.ts +1 -3
- package/esm/list/listItem/listItem.js +6 -5
- package/esm/menu/components/controlledMenuList/controlledMenuList.d.ts +27 -0
- package/esm/menu/components/controlledMenuList/controlledMenuList.js +123 -0
- package/esm/menu/components/createControlledMenuList.d.ts +37 -0
- package/esm/menu/components/createControlledMenuList.js +51 -0
- package/esm/menu/components/createMenuItem.d.ts +67 -0
- package/esm/menu/components/createMenuItem.js +93 -0
- package/esm/menu/components/menuButton.js +12 -3
- package/esm/menu/components/menuItem.d.ts +1 -2
- package/esm/menu/components/menuItem.js +20 -74
- package/esm/menu/contexts/usePathContext.d.ts +2 -0
- package/esm/menu/contexts/usePathContext.js +5 -0
- package/esm/menu/controlledMenu.js +10 -177
- package/esm/menu/utils/buildMenuContent.d.ts +2 -0
- package/esm/menu/utils/buildMenuContent.js +34 -0
- package/esm/menu/utils/findContent.d.ts +2 -2
- package/esm/menu/utils/findContent.js +4 -3
- package/esm/menu/utils/getItemLabel.d.ts +2 -0
- package/esm/menu/utils/getItemLabel.js +4 -0
- package/esm/menu/utils/getSafeRel.d.ts +1 -0
- package/esm/menu/utils/getSafeRel.js +10 -0
- package/esm/menu/utils/isMenuItem.d.ts +2 -0
- package/esm/menu/utils/isMenuItem.js +9 -0
- package/esm/menu/utils/isSafeHref.d.ts +1 -0
- package/esm/menu/utils/isSafeHref.js +6 -0
- package/esm/menu/utils/normalizeSeparators.d.ts +2 -0
- package/esm/menu/utils/normalizeSeparators.js +19 -0
- package/esm/menu/utils/resolveKeys.d.ts +12 -0
- package/esm/menu/utils/resolveKeys.js +18 -0
- package/esm/menu/utils/useLastValidSheet.d.ts +7 -0
- package/esm/menu/utils/useLastValidSheet.js +26 -0
- package/esm/menu/utils/useMenuItemCore.d.ts +31 -0
- package/esm/menu/utils/useMenuItemCore.js +50 -0
- package/esm/menu/utils/useMenuItemKeyboardNav.d.ts +2 -0
- package/esm/menu/utils/useMenuItemKeyboardNav.js +11 -0
- package/esm/menu/utils/useMenuListKeyboardNav.d.ts +12 -0
- package/esm/menu/utils/useMenuListKeyboardNav.js +73 -0
- package/esm/menu/utils/useMenuPath.d.ts +6 -0
- package/esm/menu/utils/useMenuPath.js +31 -0
- package/esm/nav/navItem/navItem.js +10 -5
- package/esm/nav/navSection/navSection.js +7 -5
- package/esm/pagination/paginationArrow.js +10 -3
- package/esm/radioGroupRaw/radioGroupRaw.js +2 -1
- package/esm/rangeRaw/rangeRaw.js +0 -1
- package/esm/selectList/selectList.helpers.d.ts +1 -1
- package/esm/selectList/selectList.helpers.js +29 -4
- package/esm/selectList/selectList.js +3 -1
- package/esm/selectList/selectList.reducer.js +1 -2
- package/esm/selectList/selectListItem.js +4 -1
- package/esm/sortControl/sortControl.js +59 -4
- package/esm/table/children/useTableChildren.d.ts +1 -1
- package/esm/table/children/useTableChildren.js +3 -3
- package/esm/table/flexible/columnsList.js +4 -2
- package/esm/table/selectable/useSelectableRows.d.ts +8 -0
- package/esm/table/selectable/useSelectableRows.js +14 -6
- package/esm/table/table.js +1 -7
- package/esm/tabs/tabs.js +60 -58
- package/esm/tabs/tabsTestHelper.js +2 -2
- package/esm/testHelpers/mockAbsoluteAlignment.d.ts +1 -0
- package/esm/testHelpers/mockAbsoluteAlignment.js +10 -0
- package/esm/timePickerRaw/timePickerRaw.js +1 -1
- package/esm/toggleButtonRaw/toggleButtonRaw.js +5 -2
- package/esm/utils/localization/translations/ar.json +3 -1
- package/esm/utils/localization/translations/cs.json +9 -5
- package/esm/utils/localization/translations/da-DK.json +9 -5
- package/esm/utils/localization/translations/de.json +9 -5
- package/esm/utils/localization/translations/en.json +5 -1
- package/esm/utils/localization/translations/es.json +9 -5
- package/esm/utils/localization/translations/fi-FI.json +9 -5
- package/esm/utils/localization/translations/fr-FR.json +9 -5
- package/esm/utils/localization/translations/fr.json +9 -5
- package/esm/utils/localization/translations/hu-HU.json +9 -5
- package/esm/utils/localization/translations/id.json +9 -5
- package/esm/utils/localization/translations/it.json +9 -5
- package/esm/utils/localization/translations/ja.json +9 -5
- package/esm/utils/localization/translations/ko-KR.json +9 -5
- package/esm/utils/localization/translations/ms.json +9 -5
- package/esm/utils/localization/translations/nb-NO.json +9 -5
- package/esm/utils/localization/translations/nl.json +9 -5
- package/esm/utils/localization/translations/pl.json +9 -5
- package/esm/utils/localization/translations/pt-BR.json +9 -5
- package/esm/utils/localization/translations/pt-PT.json +9 -5
- package/esm/utils/localization/translations/ro-RO.json +9 -5
- package/esm/utils/localization/translations/sk-SK.json +9 -5
- package/esm/utils/localization/translations/sv.json +9 -5
- package/esm/utils/localization/translations/th.json +9 -5
- package/esm/utils/localization/translations/tr.json +9 -5
- package/esm/utils/localization/translations/zh-Hans.json +9 -5
- package/esm/utils/localization/translations/zh-TW.json +9 -5
- package/esm/utils/localization/useDirectionalIcon.d.ts +3 -0
- package/esm/utils/localization/useDirectionalIcon.js +5 -0
- package/esm/utils/positioningUtils/alignments.d.ts +2 -2
- package/esm/utils/positioningUtils/alignments.js +2 -2
- package/esm/utils/positioningUtils/calculatePosition.js +4 -6
- package/package.json +123 -122
|
@@ -6,10 +6,12 @@ const react_1 = require("react");
|
|
|
6
6
|
const absolute_1 = require("../absolute/absolute");
|
|
7
7
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
8
8
|
const useClientReady_1 = require("../commonHelpers/hooks/useClientReady");
|
|
9
|
+
const useRTLAlignment_1 = require("../utils/localization/useRTLAlignment");
|
|
9
10
|
const ControlledPopup = ({ isOpen, id, paddingX, paddingY, triggerRef, className, children, alignment, inline, onOpenChange, useTrapFocusWithTrigger, shouldHoldScroll, ariaLabel, ariaLabelledby, recalculateOnScroll, closeOnScroll, preventAttributesAutoSet, focusOnOpen, role = "dialog" }) => {
|
|
10
11
|
const autoId = (0, react_1.useId)();
|
|
11
12
|
const popupId = id || autoId;
|
|
12
13
|
const isClientReady = (0, useClientReady_1.useClientReady)();
|
|
14
|
+
const rtlAlignment = (0, useRTLAlignment_1.useRTLAlignment)(alignment !== null && alignment !== void 0 ? alignment : "bottom-left");
|
|
13
15
|
(0, react_1.useEffect)(() => {
|
|
14
16
|
if (!triggerRef.current || !isClientReady) {
|
|
15
17
|
return;
|
|
@@ -24,6 +26,6 @@ const ControlledPopup = ({ isOpen, id, paddingX, paddingY, triggerRef, className
|
|
|
24
26
|
triggerRef.current.setAttribute("aria-expanded", isOpen ? "true" : "false");
|
|
25
27
|
triggerRef.current.setAttribute("aria-controls", popupId);
|
|
26
28
|
}, [triggerRef, isOpen, popupId, preventAttributesAutoSet, isClientReady]);
|
|
27
|
-
return ((0, jsx_runtime_1.jsx)(absolute_1.Absolute, Object.assign({ triggerRef: triggerRef, alignment:
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)(absolute_1.Absolute, Object.assign({ triggerRef: triggerRef, alignment: rtlAlignment, id: popupId, isOpen: isOpen, className: (0, classNames_1.classNames)(["zen-popup", className ? className : ""]), paddingX: paddingX, paddingY: paddingY, inline: inline, onOpenChange: onOpenChange, useTrapFocusWithTrigger: useTrapFocusWithTrigger, shouldHoldScroll: shouldHoldScroll }, (role !== false && typeof role === "string" ? { role } : {}), (role !== false && ariaLabel ? { ariaLabel } : {}), (role !== false && ariaLabelledby ? { ariaLabelledby } : {}), { recalculateOnScroll: recalculateOnScroll, closeOnScroll: closeOnScroll, focusOnOpen: focusOnOpen, children: children })));
|
|
28
30
|
};
|
|
29
31
|
exports.ControlledPopup = ControlledPopup;
|
|
@@ -13,8 +13,9 @@ export interface IDataGridCell<T extends IEntityWithId> extends IZenComponentPro
|
|
|
13
13
|
defaultValue: string | undefined;
|
|
14
14
|
entity: T;
|
|
15
15
|
width?: number;
|
|
16
|
+
maxWidth?: number;
|
|
16
17
|
colspan?: number;
|
|
17
18
|
onClick?: () => void;
|
|
18
19
|
isActive?: boolean;
|
|
19
20
|
}
|
|
20
|
-
export declare const DataGridCell: <T extends IEntityWithId>({ index, limited, visibleOnHover, isVisible, width, render, renderWrappers, renderPlaceholder, defaultValue, entity, colspan, className, onClick, isActive }: IDataGridCell<T>) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const DataGridCell: <T extends IEntityWithId>({ index, limited, visibleOnHover, isVisible, width, maxWidth, render, renderWrappers, renderPlaceholder, defaultValue, entity, colspan, className, onClick, isActive }: IDataGridCell<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,7 +7,7 @@ const classNames_1 = require("../../commonHelpers/classNames/classNames");
|
|
|
7
7
|
const basicColumn_1 = require("../columns/basicColumn");
|
|
8
8
|
const isActiveElement_1 = require("../../list/utils/isActiveElement");
|
|
9
9
|
const zen_1 = require("../../utils/zen");
|
|
10
|
-
const Cell = ({ index, limited, visibleOnHover, isVisible, width, render, renderWrappers, renderPlaceholder, defaultValue, entity, colspan, className, onClick, isActive }) => {
|
|
10
|
+
const Cell = ({ index, limited, visibleOnHover, isVisible, width, maxWidth, render, renderWrappers, renderPlaceholder, defaultValue, entity, colspan, className, onClick, isActive }) => {
|
|
11
11
|
const [content, setContent] = (0, react_1.useState)("");
|
|
12
12
|
const placeholderRenderer = (0, react_1.useCallback)(() => {
|
|
13
13
|
const renderFn = renderPlaceholder || (() => "...");
|
|
@@ -72,6 +72,6 @@ const Cell = ({ index, limited, visibleOnHover, isVisible, width, render, render
|
|
|
72
72
|
visibleOnHover ? "zen-data-grid__row-cell--visible-on-hover" : "",
|
|
73
73
|
onClick ? "zen-data-grid__row-cell--clickable" : "",
|
|
74
74
|
limited ? "zen-ellipsis" : ""
|
|
75
|
-
]), style: { minWidth: width || "auto", maxWidth: width || "auto" }, role: "gridcell", children: content }));
|
|
75
|
+
]), style: { minWidth: width || "auto", maxWidth: maxWidth ? `${Math.max(width !== null && width !== void 0 ? width : 0, maxWidth)}px` : width || "auto" }, role: "gridcell", children: content }));
|
|
76
76
|
};
|
|
77
77
|
exports.DataGridCell = (0, react_1.memo)(Cell);
|
|
@@ -57,7 +57,7 @@ const getHeaderPropsFromWrappers = wrappers => wrappers.reduce((result, wrapper)
|
|
|
57
57
|
const props = (_a = wrapper.getHeaderProps) === null || _a === void 0 ? void 0 : _a.call(wrapper);
|
|
58
58
|
return props ? Object.assign(Object.assign({}, result), props) : result;
|
|
59
59
|
}, {});
|
|
60
|
-
const getColumnWidth = defaultWidth => Math.floor(Math.max(defaultWidth, exports.MIN_CELL_WIDTH));
|
|
60
|
+
const getColumnWidth = (defaultWidth, minWidth) => Math.floor(Math.max(defaultWidth, minWidth !== null && minWidth !== void 0 ? minWidth : exports.MIN_CELL_WIDTH));
|
|
61
61
|
const EmptyList = ({
|
|
62
62
|
children
|
|
63
63
|
}) => (0, jsx_runtime_1.jsx)("div", {
|
|
@@ -154,12 +154,13 @@ const DataGridInner = ({
|
|
|
154
154
|
setVisibleRows(visible);
|
|
155
155
|
}, [entities]);
|
|
156
156
|
const listOfDefaultWidthColumns = (0, react_1.useMemo)(() => columnsList.map(column => column.meta.defaultWidth), [columnsList]);
|
|
157
|
+
const listOfMinWidthColumns = (0, react_1.useMemo)(() => columnsList.map(column => column.meta.minWidth), [columnsList]);
|
|
157
158
|
const {
|
|
158
159
|
result: observerResult
|
|
159
160
|
} = (0, useResizeObserver_1.useResizeObserver)({
|
|
160
161
|
target: gridRef.current
|
|
161
162
|
});
|
|
162
|
-
const allocatedSpace = listOfDefaultWidthColumns.reduce((acc, width) => acc + (width === undefined ? 0 : getColumnWidth(width)), 0);
|
|
163
|
+
const allocatedSpace = listOfDefaultWidthColumns.reduce((acc, width, index) => acc + (width === undefined ? 0 : getColumnWidth(width, listOfMinWidthColumns[index])), 0);
|
|
163
164
|
const unallocatedSpace = observerResult && observerResult.contentRect.width - allocatedSpace || 0;
|
|
164
165
|
const flexibleColumnsQty = listOfDefaultWidthColumns.filter(width => width === undefined).length;
|
|
165
166
|
const flexibleColumnWidth = getColumnWidth(unallocatedSpace / flexibleColumnsQty);
|
|
@@ -182,18 +183,19 @@ const DataGridInner = ({
|
|
|
182
183
|
}, [updateScroll, scheduleLazyRender]);
|
|
183
184
|
const getCellParams = (0, react_1.useCallback)(columnIndex => {
|
|
184
185
|
const defaultWidth = listOfDefaultWidthColumns[columnIndex];
|
|
186
|
+
const minWidth = listOfMinWidthColumns[columnIndex];
|
|
185
187
|
const limited = !!defaultWidth && defaultWidth > 0;
|
|
186
188
|
const isFirst = columnIndex === 0;
|
|
187
189
|
const isLast = columnIndex === listOfDefaultWidthColumns.length - 1;
|
|
188
190
|
// If the column is the last one or doesn't have a default width, it should be limited to the remaining space
|
|
189
|
-
const width = getColumnWidth(defaultWidth || flexibleColumnWidth);
|
|
191
|
+
const width = getColumnWidth(defaultWidth || flexibleColumnWidth, minWidth);
|
|
190
192
|
return {
|
|
191
193
|
limited,
|
|
192
194
|
isFirst,
|
|
193
195
|
isLast,
|
|
194
196
|
width
|
|
195
197
|
};
|
|
196
|
-
}, [listOfDefaultWidthColumns, flexibleColumnWidth]);
|
|
198
|
+
}, [listOfDefaultWidthColumns, listOfMinWidthColumns, flexibleColumnWidth]);
|
|
197
199
|
const renderHeaderCell = (0, react_1.useCallback)((column, columnIndex) => {
|
|
198
200
|
var _a;
|
|
199
201
|
const {
|
|
@@ -232,6 +234,7 @@ const DataGridInner = ({
|
|
|
232
234
|
expanded: expandedRows && expandedRows.indexOf(entity.id) > -1,
|
|
233
235
|
onExpandedChange: entity.children && entity.children.length > 0 ? isExpanded => onExpandedChange && onExpandedChange(entity.id, isExpanded) : undefined,
|
|
234
236
|
isActive: active === entity.id,
|
|
237
|
+
active: active,
|
|
235
238
|
onClick: onClick,
|
|
236
239
|
isTreeGrid: isTreeGrid,
|
|
237
240
|
ariaPosinset: entityIndex + 1,
|
|
@@ -2,6 +2,8 @@ import { ReactNode } from "react";
|
|
|
2
2
|
import { ColumnSortDirection } from "../table/table";
|
|
3
3
|
export interface IListColumnMeta<T, N = T> {
|
|
4
4
|
readonly defaultWidth?: number;
|
|
5
|
+
readonly minWidth?: number;
|
|
6
|
+
readonly maxWidth?: number;
|
|
5
7
|
readonly defaultValue?: string;
|
|
6
8
|
readonly lazyLoad?: boolean;
|
|
7
9
|
readonly visibleOnHover?: boolean;
|
|
@@ -16,7 +16,8 @@ export interface IDataGridRow<T extends IRowEntity<N>, N extends IEntityWithId>
|
|
|
16
16
|
ariaPosinset: number;
|
|
17
17
|
ariaSetsize: number;
|
|
18
18
|
isActive?: boolean;
|
|
19
|
+
active?: string;
|
|
19
20
|
onClick?: (id: string) => void;
|
|
20
21
|
}
|
|
21
22
|
export declare const MIN_CELL_WIDTH = 100;
|
|
22
|
-
export declare const DataGridRow: <T extends IRowEntity<N>, N extends IEntityWithId = T>({ id, entity, columns, visibleRows, flexibleColumnWidth, isLastRow, className, expanded, onExpandedChange, isTreeGrid, ariaPosinset, ariaSetsize, onClick, isActive }: IDataGridRow<T, N>) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const DataGridRow: <T extends IRowEntity<N>, N extends IEntityWithId = T>({ id, entity, columns, visibleRows, flexibleColumnWidth, isLastRow, className, expanded, onExpandedChange, isTreeGrid, ariaPosinset, ariaSetsize, onClick, isActive, active }: IDataGridRow<T, N>) => import("react/jsx-runtime").JSX.Element;
|
package/dist/dataGrid/row/row.js
CHANGED
|
@@ -6,10 +6,12 @@ const react_1 = require("react");
|
|
|
6
6
|
const classNames_1 = require("../../commonHelpers/classNames/classNames");
|
|
7
7
|
const cell_1 = require("../cell/cell");
|
|
8
8
|
exports.MIN_CELL_WIDTH = 100;
|
|
9
|
-
const getColumnWidth = (defaultWidth) => Math.floor(Math.max(defaultWidth, exports.MIN_CELL_WIDTH));
|
|
10
|
-
const Row = ({ id, entity, columns, visibleRows, flexibleColumnWidth, isLastRow, className, expanded, onExpandedChange, isTreeGrid, ariaPosinset, ariaSetsize, onClick, isActive }) => {
|
|
9
|
+
const getColumnWidth = (defaultWidth, minWidth) => Math.floor(Math.max(defaultWidth, minWidth !== null && minWidth !== void 0 ? minWidth : exports.MIN_CELL_WIDTH));
|
|
10
|
+
const Row = ({ id, entity, columns, visibleRows, flexibleColumnWidth, isLastRow, className, expanded, onExpandedChange, isTreeGrid, ariaPosinset, ariaSetsize, onClick, isActive, active }) => {
|
|
11
11
|
const isVisible = visibleRows.has(entity.id);
|
|
12
12
|
const listOfDefaultWidthColumns = (0, react_1.useMemo)(() => columns.map(column => column.meta.defaultWidth), [columns]);
|
|
13
|
+
const listOfMinWidthColumns = (0, react_1.useMemo)(() => columns.map(column => column.meta.minWidth), [columns]);
|
|
14
|
+
const listOfMaxWidthColumns = (0, react_1.useMemo)(() => columns.map(column => column.meta.maxWidth), [columns]);
|
|
13
15
|
const getColWidth = (0, react_1.useCallback)((columnIndex, colspan) => {
|
|
14
16
|
const colsp = colspan || 1;
|
|
15
17
|
let columnWidth = 0;
|
|
@@ -18,26 +20,28 @@ const Row = ({ id, entity, columns, visibleRows, flexibleColumnWidth, isLastRow,
|
|
|
18
20
|
continue;
|
|
19
21
|
}
|
|
20
22
|
const defaultWidth = listOfDefaultWidthColumns[columnIndex + i];
|
|
23
|
+
const minWidth = listOfMinWidthColumns[columnIndex + i];
|
|
21
24
|
// If the column is the last one or doesn't have a default width, it should be limited to the remaining space
|
|
22
|
-
const width = getColumnWidth(defaultWidth || flexibleColumnWidth);
|
|
25
|
+
const width = getColumnWidth(defaultWidth || flexibleColumnWidth, minWidth);
|
|
23
26
|
columnWidth += width;
|
|
24
27
|
}
|
|
25
28
|
return columnWidth;
|
|
26
|
-
}, [flexibleColumnWidth, listOfDefaultWidthColumns]);
|
|
29
|
+
}, [flexibleColumnWidth, listOfDefaultWidthColumns, listOfMinWidthColumns]);
|
|
27
30
|
const getCellParams = (0, react_1.useCallback)((columnIndex, colspan) => {
|
|
28
31
|
const width = getColWidth(columnIndex, colspan);
|
|
29
32
|
const defaultWidth = listOfDefaultWidthColumns[columnIndex];
|
|
33
|
+
const maxWidth = listOfMaxWidthColumns[columnIndex];
|
|
30
34
|
const limited = !!defaultWidth && defaultWidth > 0;
|
|
31
35
|
const isFirst = columnIndex === 0;
|
|
32
36
|
const isLast = columnIndex === listOfDefaultWidthColumns.length - 1;
|
|
33
|
-
return { limited, isFirst, isLast, width };
|
|
34
|
-
}, [getColWidth, listOfDefaultWidthColumns]);
|
|
37
|
+
return { limited, isFirst, isLast, width, maxWidth };
|
|
38
|
+
}, [getColWidth, listOfDefaultWidthColumns, listOfMaxWidthColumns]);
|
|
35
39
|
const mainRowId = (0, react_1.useId)();
|
|
36
40
|
const renderCells = (0, react_1.useCallback)((rowEntity, isNested) => columns.reduce((acc, column, index) => {
|
|
37
41
|
const colspanFn = column.colspan;
|
|
38
42
|
let colspan = colspanFn ? (typeof colspanFn === "function" ? colspanFn(rowEntity) : colspanFn) : undefined;
|
|
39
43
|
colspan = colspan && colspan > 1 ? colspan : undefined;
|
|
40
|
-
const { limited, width } = getCellParams(index, colspan);
|
|
44
|
+
const { limited, width, maxWidth } = getCellParams(index, colspan);
|
|
41
45
|
if (acc.colspan > 0) {
|
|
42
46
|
acc.colspan--;
|
|
43
47
|
return acc;
|
|
@@ -52,9 +56,9 @@ const Row = ({ id, entity, columns, visibleRows, flexibleColumnWidth, isLastRow,
|
|
|
52
56
|
? column.columnComponent.renderNested.bind(column.columnComponent)
|
|
53
57
|
: column.columnComponent.render.bind(column.columnComponent))
|
|
54
58
|
: column.columnComponent.render.bind(column.columnComponent);
|
|
55
|
-
acc.cells.push((0, jsx_runtime_1.jsx)(cell_1.DataGridCell, { render: e => renderFn(e, isNested), renderPlaceholder: column.meta.renderPlaceholder, renderWrappers: renderWrappers, defaultValue: column.meta.defaultValue, entity: rowEntity, index: index, limited: limited, visibleOnHover: column.meta.visibleOnHover, width: column.meta.visibleOnHover ? 0 : width, isVisible: isVisible, colspan: colspan, onClick: !isNested && onExpandedChange ? () => onExpandedChange(!expanded) : onClick ? () => onClick(rowEntity.id) : undefined, isActive: isActive, className: isNested ? "zen-data-grid__row-cell--nested" : "" }, `${rowEntity.id}_${column.name}`));
|
|
59
|
+
acc.cells.push((0, jsx_runtime_1.jsx)(cell_1.DataGridCell, { render: e => renderFn(e, isNested), renderPlaceholder: column.meta.renderPlaceholder, renderWrappers: renderWrappers, defaultValue: column.meta.defaultValue, entity: rowEntity, index: index, limited: limited, visibleOnHover: column.meta.visibleOnHover, width: column.meta.visibleOnHover ? 0 : width, maxWidth: column.meta.visibleOnHover ? undefined : maxWidth, isVisible: isVisible, colspan: colspan, onClick: !isNested && onExpandedChange ? () => onExpandedChange(!expanded) : onClick ? () => onClick(rowEntity.id) : undefined, isActive: isNested ? active === rowEntity.id : isActive || active === rowEntity.id, className: isNested ? "zen-data-grid__row-cell--nested" : "" }, `${rowEntity.id}_${column.name}`));
|
|
56
60
|
return acc;
|
|
57
|
-
}, { cells: [], colspan: 0 }).cells, [columns, expanded, getCellParams, isVisible, onExpandedChange, isActive, onClick]);
|
|
61
|
+
}, { cells: [], colspan: 0 }).cells, [columns, expanded, getCellParams, isVisible, onExpandedChange, isActive, active, onClick]);
|
|
58
62
|
const cells = (0, react_1.useMemo)(() => renderCells(entity, false), [entity, renderCells]);
|
|
59
63
|
const nestedCells = (0, react_1.useMemo)(() => (expanded && entity.children ? entity.children : []).map(nestedEntity => renderCells(nestedEntity, true)), [entity.children, expanded, renderCells]);
|
|
60
64
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("tr", { "data-row-id": id, id: mainRowId, role: "row", "aria-level": isTreeGrid ? 1 : undefined, "aria-posinset": isTreeGrid ? ariaPosinset : undefined, "aria-setsize": isTreeGrid ? ariaSetsize : undefined, "aria-expanded": isTreeGrid ? expanded : undefined, className: (0, classNames_1.classNames)(["zen-data-grid__row", className || "", isLastRow ? "zen-data-grid__row--last" : ""]), children: cells }, mainRowId), nestedCells.map((nestedRow, index) => ((0, jsx_runtime_1.jsx)("tr", { id: `${mainRowId}_child_${index}`, role: "row", "aria-level": 2, "aria-posinset": index + 1, "aria-setsize": nestedCells.length, className: "zen-data-grid__row zen-data-grid__row--nested", children: nestedRow }, `${mainRowId}_child_${index}`)))] }));
|
|
@@ -21,6 +21,7 @@ const SubColumnsList = ({ title, columns, settings, disabledColumns, onChange, s
|
|
|
21
21
|
showCheckbox: true,
|
|
22
22
|
children: c.title
|
|
23
23
|
})), [columns, disabledColumns, sortColumnsInt]);
|
|
24
|
+
const allDisabled = (0, react_1.useMemo)(() => items.every(item => item.disabled), [items]);
|
|
24
25
|
const state = columns.reduce((res, c) => {
|
|
25
26
|
res.set(c.id, settings.get(c.name) !== false ? checkboxState_1.CheckboxState.On : checkboxState_1.CheckboxState.Off);
|
|
26
27
|
return res;
|
|
@@ -33,7 +34,7 @@ const SubColumnsList = ({ title, columns, settings, disabledColumns, onChange, s
|
|
|
33
34
|
});
|
|
34
35
|
onChange && onChange(newSettings);
|
|
35
36
|
}, [columns, settings, onChange]);
|
|
36
|
-
const list = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsx)(selectList_1.SelectList, { id: id, items: items, value: state, title: title || "", multiselect: true, showCheckbox: true, onChange: onChangeItem }), [id, items, state, title, onChangeItem]);
|
|
37
|
+
const list = (0, react_1.useMemo)(() => ((0, jsx_runtime_1.jsx)(selectList_1.SelectList, { id: id, items: items, value: state, title: title || "", multiselect: true, showCheckbox: true, onChange: onChangeItem, disabled: allDisabled })), [id, items, state, title, onChangeItem, allDisabled]);
|
|
37
38
|
if (!title) {
|
|
38
39
|
return list;
|
|
39
40
|
}
|
|
@@ -7,6 +7,10 @@ import { DeviceType } from "../../../../commonHelpers/hooks/deviceType";
|
|
|
7
7
|
type TBulkAction = IBulkActionLink | IBulkActionButton;
|
|
8
8
|
export interface IBulkActionsProps extends IZenComponentProps {
|
|
9
9
|
selected: number;
|
|
10
|
+
/**
|
|
11
|
+
* When `true`, displays "All selected" instead of a count, and enables action buttons
|
|
12
|
+
* even when `selected` is 0 (i.e., cross-page "select all" is active).
|
|
13
|
+
*/
|
|
10
14
|
allSelected?: boolean;
|
|
11
15
|
onClearSelection: () => void;
|
|
12
16
|
onSelectAll?: () => void;
|
|
@@ -41,6 +41,8 @@ const useLanguage_1 = require("../utils/localization/useLanguage");
|
|
|
41
41
|
const userFormatContext_1 = require("../utils/userFormat/userFormatContext");
|
|
42
42
|
const formatDate_1 = require("../utils/formatDate");
|
|
43
43
|
const iconChevronRight_1 = require("../icons/iconChevronRight");
|
|
44
|
+
const iconChevronLeft_1 = require("../icons/iconChevronLeft");
|
|
45
|
+
const useDirectionalIcon_1 = require("../utils/localization/useDirectionalIcon");
|
|
44
46
|
const dateRange_1 = require("../dateRange/dateRange");
|
|
45
47
|
const normalizeDates_1 = require("../filtersBar/components/filtersBarPeriodPicker/normalizeDates");
|
|
46
48
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
@@ -68,6 +70,7 @@ const DateRangeInner = ({
|
|
|
68
70
|
translate
|
|
69
71
|
} = (0, useLanguage_1.useLanguage)();
|
|
70
72
|
const isMobileView = !!setShowMobileCalendar;
|
|
73
|
+
const ChevronIcon = (0, useDirectionalIcon_1.useDirectionalIcon)(iconChevronRight_1.IconChevronRight, iconChevronLeft_1.IconChevronLeft);
|
|
71
74
|
const {
|
|
72
75
|
dateFormat,
|
|
73
76
|
weekStartsOnSunday,
|
|
@@ -106,7 +109,7 @@ const DateRangeInner = ({
|
|
|
106
109
|
}) : null]
|
|
107
110
|
}), (0, jsx_runtime_1.jsx)("div", {
|
|
108
111
|
className: "zen-date-range-inner__mobile-custom-icon-wrapper",
|
|
109
|
-
children: (0, jsx_runtime_1.jsx)(
|
|
112
|
+
children: (0, jsx_runtime_1.jsx)(ChevronIcon, {
|
|
110
113
|
size: "large"
|
|
111
114
|
})
|
|
112
115
|
})]
|
|
@@ -127,7 +130,7 @@ const DateRangeInner = ({
|
|
|
127
130
|
key: option.id
|
|
128
131
|
}));
|
|
129
132
|
return optionsToPass;
|
|
130
|
-
}, [calendarLabel, isMobileView, onOptionSelect, options, selection, setShowMobileCalendar]);
|
|
133
|
+
}, [ChevronIcon, calendarLabel, isMobileView, onOptionSelect, options, selection, setShowMobileCalendar]);
|
|
131
134
|
const calendarId = (0, react_1.useMemo)(() => `${id}-calendar`, [id]);
|
|
132
135
|
const optionSelectHandler = (0, react_1.useCallback)(e => {
|
|
133
136
|
let selectedValue = e.target.value;
|
|
@@ -247,6 +247,7 @@ const areMapsEqual_1 = require("./utils/areMapsEqual");
|
|
|
247
247
|
const iconChevronLeftSmall_1 = require("../icons/iconChevronLeftSmall");
|
|
248
248
|
const useDrive_1 = require("../utils/theme/useDrive");
|
|
249
249
|
const iconChevronRightSmall_1 = require("../icons/iconChevronRightSmall");
|
|
250
|
+
const useDirectionalIcon_1 = require("../utils/localization/useDirectionalIcon");
|
|
250
251
|
const reviewTextControl_1 = require("../formGroup/components/reviewTextControl");
|
|
251
252
|
const chip_1 = require("../chip/chip");
|
|
252
253
|
const chipStatusProvider_1 = require("../chip/chipStatusProvider");
|
|
@@ -298,6 +299,8 @@ const DateRangeRaw = props => {
|
|
|
298
299
|
} = (0, useLanguage_1.useLanguage)();
|
|
299
300
|
const isMobile = (0, useMobile_1.useMobile)();
|
|
300
301
|
const isDrive = (0, useDrive_1.useDrive)();
|
|
302
|
+
const PrevStepperIcon = (0, useDirectionalIcon_1.useDirectionalIcon)(iconChevronLeftSmall_1.IconChevronLeftSmall, iconChevronRightSmall_1.IconChevronRightSmall);
|
|
303
|
+
const NextStepperIcon = (0, useDirectionalIcon_1.useDirectionalIcon)(iconChevronRightSmall_1.IconChevronRightSmall, iconChevronLeftSmall_1.IconChevronLeftSmall);
|
|
301
304
|
const chipStatus = (0, chipStatusProvider_1.useChipStatus)();
|
|
302
305
|
const driveWrapperTriggerClassName = (0, useDriveClassName_1.useDriveClassName)("zen-date-range-wrapper");
|
|
303
306
|
const mobileWrapperTriggerClassName = (0, useMobileClassName_1.useMobileClassName)("zen-date-range-wrapper");
|
|
@@ -704,7 +707,7 @@ const DateRangeRaw = props => {
|
|
|
704
707
|
className: (0, classNames_1.classNames)(["zen-date-range__stepper", "zen-date-range__stepper--left"]),
|
|
705
708
|
title: translate("Previous"),
|
|
706
709
|
"aria-label": translate("Previous date period"),
|
|
707
|
-
children: (0, jsx_runtime_1.jsx)(
|
|
710
|
+
children: (0, jsx_runtime_1.jsx)(PrevStepperIcon, {
|
|
708
711
|
size: isDrive || isMobile ? "huge" : "large"
|
|
709
712
|
})
|
|
710
713
|
}), popupTriggerComponent, (0, jsx_runtime_1.jsx)("button", {
|
|
@@ -714,7 +717,7 @@ const DateRangeRaw = props => {
|
|
|
714
717
|
className: (0, classNames_1.classNames)(["zen-date-range__stepper", "zen-date-range__stepper--right"]),
|
|
715
718
|
title: translate("Next"),
|
|
716
719
|
"aria-label": translate("Next date period"),
|
|
717
|
-
children: (0, jsx_runtime_1.jsx)(
|
|
720
|
+
children: (0, jsx_runtime_1.jsx)(NextStepperIcon, {
|
|
718
721
|
size: isDrive || isMobile ? "huge" : "large"
|
|
719
722
|
})
|
|
720
723
|
})]
|
|
@@ -10,6 +10,6 @@ const parseLabel = (option, dateFormat, translate, toLocalFn) => {
|
|
|
10
10
|
localeFrom.getFullYear() === localeTo.getFullYear()) {
|
|
11
11
|
return (0, formatDate_1.formatDate)(localeFrom, dateFormat, translate);
|
|
12
12
|
}
|
|
13
|
-
return `${(0, formatDate_1.formatDate)(localeFrom, dateFormat, translate)}
|
|
13
|
+
return `${(0, formatDate_1.formatDate)(localeFrom, dateFormat, translate)} – ${(0, formatDate_1.formatDate)(localeTo, dateFormat, translate)}`;
|
|
14
14
|
};
|
|
15
15
|
exports.parseLabel = parseLabel;
|
|
@@ -551,12 +551,18 @@ const DropdownRaw = props => {
|
|
|
551
551
|
}, [setChecked, setSearch]);
|
|
552
552
|
const debouncedGetData = (0, useDebounce_1.useDebounce)((signal, searchValue, isChecked) => getData ? (isCheckboxMode ? getData(signal, searchValue, isChecked) : getData(signal, searchValue)).then(dta => handleData(dta, searchValue)).catch(handleError) : customGetData(searchValue).then(dta => handleData(dta, searchValue)).catch(handleError), 200);
|
|
553
553
|
const controlData = (0, react_1.useCallback)((signal, searchValue, isChecked) => {
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
554
|
+
if (isQueryMode) {
|
|
555
|
+
handleQueryMode(searchValue, isChecked);
|
|
556
|
+
} else if (!getData && dataItems && !searchValue) {
|
|
557
|
+
handleData(dataItems, "");
|
|
558
|
+
} else {
|
|
559
|
+
dispatchState({
|
|
560
|
+
type: stateActionType_1.StateActionType.ShowWaiting,
|
|
561
|
+
payload: undefined
|
|
562
|
+
});
|
|
563
|
+
debouncedGetData(signal, searchValue, isChecked);
|
|
564
|
+
}
|
|
565
|
+
}, [debouncedGetData, handleData, handleQueryMode, isQueryMode, getData, dataItems]);
|
|
560
566
|
(0, react_1.useEffect)(() => {
|
|
561
567
|
var _a;
|
|
562
568
|
const timeoutId = (_a = zen_1.zen.setTimeout) === null || _a === void 0 ? void 0 : _a.call(zen_1.zen, () => {
|
|
@@ -12,113 +12,113 @@ const button_1 = require("../../button/button");
|
|
|
12
12
|
const buttonType_1 = require("../../button/buttonType");
|
|
13
13
|
const imageCloudUpload_1 = require("../../images/imageCloudUpload");
|
|
14
14
|
const imageTapToUpload_1 = require("../../images/imageTapToUpload");
|
|
15
|
-
injectString("cs", "Tap to add files", "
|
|
16
|
-
injectString("da-DK", "Tap to add files", "
|
|
17
|
-
injectString("de", "Tap to add files", "
|
|
15
|
+
injectString("cs", "Tap to add files", "Klepnut\xEDm p\u0159idejte soubory");
|
|
16
|
+
injectString("da-DK", "Tap to add files", "Tryk for at tilf\xF8je filer");
|
|
17
|
+
injectString("de", "Tap to add files", "Tippen, um Dateien hinzuzuf\xFCgen");
|
|
18
18
|
injectString("en", "Tap to add files", "Tap to add files");
|
|
19
|
-
injectString("es", "Tap to add files", "
|
|
20
|
-
injectString("fi-FI", "Tap to add files", "
|
|
21
|
-
injectString("fr", "Tap to add files", "
|
|
22
|
-
injectString("fr-FR", "Tap to add files", "
|
|
23
|
-
injectString("hu-HU", "Tap to add files", "
|
|
24
|
-
injectString("id", "Tap to add files", "
|
|
25
|
-
injectString("it", "Tap to add files", "
|
|
26
|
-
injectString("ja", "Tap to add files", "
|
|
27
|
-
injectString("ko-KR", "Tap to add files", "
|
|
28
|
-
injectString("ms", "Tap to add files", "
|
|
29
|
-
injectString("nb-NO", "Tap to add files", "
|
|
30
|
-
injectString("nl", "Tap to add files", "
|
|
31
|
-
injectString("pl", "Tap to add files", "
|
|
32
|
-
injectString("pt-BR", "Tap to add files", "
|
|
33
|
-
injectString("pt-PT", "Tap to add files", "
|
|
34
|
-
injectString("sk-SK", "Tap to add files", "
|
|
35
|
-
injectString("sv", "Tap to add files", "
|
|
36
|
-
injectString("th", "Tap to add files", "
|
|
37
|
-
injectString("tr", "Tap to add files", "
|
|
38
|
-
injectString("zh-Hans", "Tap to add files", "
|
|
39
|
-
injectString("zh-TW", "Tap to add files", "
|
|
40
|
-
injectString("ro-RO", "Tap to add files", "
|
|
19
|
+
injectString("es", "Tap to add files", "Toca para agregar archivos");
|
|
20
|
+
injectString("fi-FI", "Tap to add files", "Lis\xE4\xE4 tiedostoja napauttamalla");
|
|
21
|
+
injectString("fr", "Tap to add files", "Appuyez pour ajouter des fichiers");
|
|
22
|
+
injectString("fr-FR", "Tap to add files", "Appuyez pour ajouter des fichiers");
|
|
23
|
+
injectString("hu-HU", "Tap to add files", "F\xE1jlok hozz\xE1ad\xE1s\xE1hoz koppintson");
|
|
24
|
+
injectString("id", "Tap to add files", "Ketuk untuk menambahkan file");
|
|
25
|
+
injectString("it", "Tap to add files", "Tocca per aggiungere file");
|
|
26
|
+
injectString("ja", "Tap to add files", "\u30BF\u30C3\u30D7\u3057\u3066\u30D5\u30A1\u30A4\u30EB\u3092\u8FFD\u52A0");
|
|
27
|
+
injectString("ko-KR", "Tap to add files", "\uD0ED\uD558\uC5EC \uD30C\uC77C \uCD94\uAC00");
|
|
28
|
+
injectString("ms", "Tap to add files", "Ketik untuk menambah fail");
|
|
29
|
+
injectString("nb-NO", "Tap to add files", "Trykk for \xE5 legge til filer");
|
|
30
|
+
injectString("nl", "Tap to add files", "Tik om bestanden toe te voegen");
|
|
31
|
+
injectString("pl", "Tap to add files", "Dotknij, aby doda\u0107 pliki");
|
|
32
|
+
injectString("pt-BR", "Tap to add files", "Toque para adicionar arquivos");
|
|
33
|
+
injectString("pt-PT", "Tap to add files", "Toque para adicionar ficheiros");
|
|
34
|
+
injectString("sk-SK", "Tap to add files", "Klepnut\xEDm pridajte s\xFAbory");
|
|
35
|
+
injectString("sv", "Tap to add files", "Tryck f\xF6r att l\xE4gga till filer");
|
|
36
|
+
injectString("th", "Tap to add files", "\u0E41\u0E15\u0E30\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E44\u0E1F\u0E25\u0E4C");
|
|
37
|
+
injectString("tr", "Tap to add files", "Dosya eklemek i\xE7in dokunun");
|
|
38
|
+
injectString("zh-Hans", "Tap to add files", "\u70B9\u51FB\u6DFB\u52A0\u6587\u4EF6");
|
|
39
|
+
injectString("zh-TW", "Tap to add files", "\u9EDE\u9078\u4EE5\u65B0\u589E\u6A94\u6848");
|
|
40
|
+
injectString("ro-RO", "Tap to add files", "Atinge\u021Bi pentru a ad\u0103uga fi\u0219iere");
|
|
41
41
|
injectString("ar-SA", "Tap to add files", "\u0627\u0646\u0642\u0631 \u0644\u0625\u0636\u0627\u0641\u0629 \u0645\u0644\u0641\u0627\u062A");
|
|
42
|
-
injectString("cs", "Drag & drop files or", "
|
|
43
|
-
injectString("da-DK", "Drag & drop files or", "
|
|
44
|
-
injectString("de", "Drag & drop files or", "
|
|
42
|
+
injectString("cs", "Drag & drop files or", "P\u0159et\xE1hn\u011Bte soubory nebo");
|
|
43
|
+
injectString("da-DK", "Drag & drop files or", "Tr\xE6k og slip filer eller");
|
|
44
|
+
injectString("de", "Drag & drop files or", "Dateien hierher ziehen oder");
|
|
45
45
|
injectString("en", "Drag & drop files or", "Drag & drop files or");
|
|
46
|
-
injectString("es", "Drag & drop files or", "
|
|
47
|
-
injectString("fi-FI", "Drag & drop files or", "
|
|
48
|
-
injectString("fr", "Drag & drop files or", "
|
|
49
|
-
injectString("fr-FR", "Drag & drop files or", "
|
|
50
|
-
injectString("hu-HU", "Drag & drop files or", "
|
|
51
|
-
injectString("id", "Drag & drop files or", "
|
|
52
|
-
injectString("it", "Drag & drop files or", "
|
|
53
|
-
injectString("ja", "Drag & drop files or", "
|
|
54
|
-
injectString("ko-KR", "Drag & drop files or", "
|
|
55
|
-
injectString("ms", "Drag & drop files or", "
|
|
56
|
-
injectString("nb-NO", "Drag & drop files or", "
|
|
57
|
-
injectString("nl", "Drag & drop files or", "
|
|
58
|
-
injectString("pl", "Drag & drop files or", "
|
|
59
|
-
injectString("pt-BR", "Drag & drop files or", "
|
|
60
|
-
injectString("pt-PT", "Drag & drop files or", "
|
|
61
|
-
injectString("sk-SK", "Drag & drop files or", "
|
|
62
|
-
injectString("sv", "Drag & drop files or", "
|
|
63
|
-
injectString("th", "Drag & drop files or", "
|
|
64
|
-
injectString("tr", "Drag & drop files or", "
|
|
65
|
-
injectString("zh-Hans", "Drag & drop files or", "
|
|
66
|
-
injectString("zh-TW", "Drag & drop files or", "
|
|
67
|
-
injectString("ro-RO", "Drag & drop files or", "
|
|
46
|
+
injectString("es", "Drag & drop files or", "Arrastrar y soltar archivos o");
|
|
47
|
+
injectString("fi-FI", "Drag & drop files or", "Ved\xE4 ja pudota tiedostoja tai");
|
|
48
|
+
injectString("fr", "Drag & drop files or", "Glisser-d\xE9poser des fichiers ou");
|
|
49
|
+
injectString("fr-FR", "Drag & drop files or", "Glisser-d\xE9poser des fichiers ou");
|
|
50
|
+
injectString("hu-HU", "Drag & drop files or", "H\xFAzza ide a f\xE1jlokat, vagy");
|
|
51
|
+
injectString("id", "Drag & drop files or", "Seret & lepas file atau");
|
|
52
|
+
injectString("it", "Drag & drop files or", "Trascina e rilascia i file o");
|
|
53
|
+
injectString("ja", "Drag & drop files or", "\u30D5\u30A1\u30A4\u30EB\u3092\u30C9\u30E9\u30C3\u30B0\uFF06\u30C9\u30ED\u30C3\u30D7\u3059\u308B\u304B\u3001");
|
|
54
|
+
injectString("ko-KR", "Drag & drop files or", "\uD30C\uC77C\uC744 \uB4DC\uB798\uADF8 \uC564 \uB4DC\uB86D\uD558\uAC70\uB098");
|
|
55
|
+
injectString("ms", "Drag & drop files or", "Seret & lepas fail atau");
|
|
56
|
+
injectString("nb-NO", "Drag & drop files or", "Dra og slipp filer eller");
|
|
57
|
+
injectString("nl", "Drag & drop files or", "Bestanden slepen en neerzetten of");
|
|
58
|
+
injectString("pl", "Drag & drop files or", "Przeci\u0105gnij i upu\u015B\u0107 pliki lub");
|
|
59
|
+
injectString("pt-BR", "Drag & drop files or", "Arraste e solte arquivos ou");
|
|
60
|
+
injectString("pt-PT", "Drag & drop files or", "Arraste e largue ficheiros ou");
|
|
61
|
+
injectString("sk-SK", "Drag & drop files or", "Presu\u0148te s\xFAbory alebo");
|
|
62
|
+
injectString("sv", "Drag & drop files or", "Dra och sl\xE4pp filer eller");
|
|
63
|
+
injectString("th", "Drag & drop files or", "\u0E25\u0E32\u0E01\u0E41\u0E25\u0E30\u0E27\u0E32\u0E07\u0E44\u0E1F\u0E25\u0E4C\u0E2B\u0E23\u0E37\u0E2D");
|
|
64
|
+
injectString("tr", "Drag & drop files or", "Dosyalar\u0131 s\xFCr\xFCkleyip b\u0131rak\u0131n veya");
|
|
65
|
+
injectString("zh-Hans", "Drag & drop files or", "\u62D6\u653E\u6587\u4EF6\u6216");
|
|
66
|
+
injectString("zh-TW", "Drag & drop files or", "\u62D6\u653E\u6A94\u6848\u6216");
|
|
67
|
+
injectString("ro-RO", "Drag & drop files or", "Glisa\u021Bi \u0219i fixa\u021Bi fi\u0219iere sau");
|
|
68
68
|
injectString("ar-SA", "Drag & drop files or", "\u0627\u0633\u062D\u0628 \u0648\u0623\u0641\u0644\u062A \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0623\u0648");
|
|
69
|
-
injectString("cs", "Browse", "
|
|
70
|
-
injectString("da-DK", "Browse", "
|
|
71
|
-
injectString("de", "Browse", "
|
|
69
|
+
injectString("cs", "Browse", "Proch\xE1zet");
|
|
70
|
+
injectString("da-DK", "Browse", "Gennemse");
|
|
71
|
+
injectString("de", "Browse", "Durchsuchen");
|
|
72
72
|
injectString("en", "Browse", "Browse");
|
|
73
|
-
injectString("es", "Browse", "
|
|
74
|
-
injectString("fi-FI", "Browse", "
|
|
75
|
-
injectString("fr", "Browse", "
|
|
76
|
-
injectString("fr-FR", "Browse", "
|
|
77
|
-
injectString("hu-HU", "Browse", "
|
|
78
|
-
injectString("id", "Browse", "
|
|
79
|
-
injectString("it", "Browse", "
|
|
80
|
-
injectString("ja", "Browse", "
|
|
81
|
-
injectString("ko-KR", "Browse", "
|
|
82
|
-
injectString("ms", "Browse", "
|
|
83
|
-
injectString("nb-NO", "Browse", "
|
|
84
|
-
injectString("nl", "Browse", "
|
|
85
|
-
injectString("pl", "Browse", "
|
|
86
|
-
injectString("pt-BR", "Browse", "
|
|
87
|
-
injectString("pt-PT", "Browse", "
|
|
88
|
-
injectString("sk-SK", "Browse", "
|
|
89
|
-
injectString("sv", "Browse", "
|
|
90
|
-
injectString("th", "Browse", "
|
|
91
|
-
injectString("tr", "Browse", "
|
|
92
|
-
injectString("zh-Hans", "Browse", "
|
|
93
|
-
injectString("zh-TW", "Browse", "
|
|
94
|
-
injectString("ro-RO", "Browse", "
|
|
73
|
+
injectString("es", "Browse", "Explorar");
|
|
74
|
+
injectString("fi-FI", "Browse", "Selaa");
|
|
75
|
+
injectString("fr", "Browse", "Parcourir");
|
|
76
|
+
injectString("fr-FR", "Browse", "Parcourir");
|
|
77
|
+
injectString("hu-HU", "Browse", "Tall\xF3z\xE1s");
|
|
78
|
+
injectString("id", "Browse", "Jelajahi");
|
|
79
|
+
injectString("it", "Browse", "Sfoglia");
|
|
80
|
+
injectString("ja", "Browse", "\u53C2\u7167");
|
|
81
|
+
injectString("ko-KR", "Browse", "\uCC3E\uC544\uBCF4\uAE30");
|
|
82
|
+
injectString("ms", "Browse", "Semak Imbas");
|
|
83
|
+
injectString("nb-NO", "Browse", "Bla gjennom");
|
|
84
|
+
injectString("nl", "Browse", "Bladeren");
|
|
85
|
+
injectString("pl", "Browse", "Przegl\u0105daj");
|
|
86
|
+
injectString("pt-BR", "Browse", "Procurar");
|
|
87
|
+
injectString("pt-PT", "Browse", "Procurar");
|
|
88
|
+
injectString("sk-SK", "Browse", "Preh\u013Ead\xE1va\u0165");
|
|
89
|
+
injectString("sv", "Browse", "Bl\xE4ddra");
|
|
90
|
+
injectString("th", "Browse", "\u0E40\u0E23\u0E35\u0E22\u0E01\u0E14\u0E39");
|
|
91
|
+
injectString("tr", "Browse", "G\xF6zat");
|
|
92
|
+
injectString("zh-Hans", "Browse", "\u6D4F\u89C8");
|
|
93
|
+
injectString("zh-TW", "Browse", "\u700F\u89BD");
|
|
94
|
+
injectString("ro-RO", "Browse", "R\u0103sfoire");
|
|
95
95
|
injectString("ar-SA", "Browse", "\u062A\u0635\u0641\u062D");
|
|
96
|
-
injectString("cs", "Supported Formats:", "
|
|
97
|
-
injectString("da-DK", "Supported Formats:", "
|
|
98
|
-
injectString("de", "Supported Formats:", "
|
|
96
|
+
injectString("cs", "Supported Formats:", "Podporovan\xE9 form\xE1ty:");
|
|
97
|
+
injectString("da-DK", "Supported Formats:", "Underst\xF8ttede formater:");
|
|
98
|
+
injectString("de", "Supported Formats:", "Unterst\xFCtzte Formate:");
|
|
99
99
|
injectString("en", "Supported Formats:", "Supported Formats:");
|
|
100
|
-
injectString("es", "Supported Formats:", "
|
|
101
|
-
injectString("fi-FI", "Supported Formats:", "
|
|
102
|
-
injectString("fr", "Supported Formats:", "
|
|
103
|
-
injectString("fr-FR", "Supported Formats:", "
|
|
104
|
-
injectString("hu-HU", "Supported Formats:", "
|
|
105
|
-
injectString("id", "Supported Formats:", "
|
|
106
|
-
injectString("it", "Supported Formats:", "
|
|
107
|
-
injectString("ja", "Supported Formats:", "
|
|
108
|
-
injectString("ko-KR", "Supported Formats:", "
|
|
109
|
-
injectString("ms", "Supported Formats:", "
|
|
110
|
-
injectString("nb-NO", "Supported Formats:", "
|
|
111
|
-
injectString("nl", "Supported Formats:", "
|
|
112
|
-
injectString("pl", "Supported Formats:", "
|
|
113
|
-
injectString("pt-BR", "Supported Formats:", "
|
|
114
|
-
injectString("pt-PT", "Supported Formats:", "
|
|
115
|
-
injectString("sk-SK", "Supported Formats:", "
|
|
116
|
-
injectString("sv", "Supported Formats:", "
|
|
117
|
-
injectString("th", "Supported Formats:", "
|
|
118
|
-
injectString("tr", "Supported Formats:", "
|
|
119
|
-
injectString("zh-Hans", "Supported Formats:", "
|
|
120
|
-
injectString("zh-TW", "Supported Formats:", "
|
|
121
|
-
injectString("ro-RO", "Supported Formats:", "
|
|
100
|
+
injectString("es", "Supported Formats:", "Formatos compatibles:");
|
|
101
|
+
injectString("fi-FI", "Supported Formats:", "Tuetut muodot:");
|
|
102
|
+
injectString("fr", "Supported Formats:", "Formats pris en charge :");
|
|
103
|
+
injectString("fr-FR", "Supported Formats:", "Formats pris en charge :");
|
|
104
|
+
injectString("hu-HU", "Supported Formats:", "T\xE1mogatott form\xE1tumok:");
|
|
105
|
+
injectString("id", "Supported Formats:", "Format yang Didukung:");
|
|
106
|
+
injectString("it", "Supported Formats:", "Formati supportati:");
|
|
107
|
+
injectString("ja", "Supported Formats:", "\u5BFE\u5FDC\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\uFF1A");
|
|
108
|
+
injectString("ko-KR", "Supported Formats:", "\uC9C0\uC6D0\uB418\uB294 \uD615\uC2DD:");
|
|
109
|
+
injectString("ms", "Supported Formats:", "Format yang Disokong:");
|
|
110
|
+
injectString("nb-NO", "Supported Formats:", "St\xF8ttede formater:");
|
|
111
|
+
injectString("nl", "Supported Formats:", "Ondersteunde indelingen:");
|
|
112
|
+
injectString("pl", "Supported Formats:", "Obs\u0142ugiwane formaty:");
|
|
113
|
+
injectString("pt-BR", "Supported Formats:", "Formatos suportados:");
|
|
114
|
+
injectString("pt-PT", "Supported Formats:", "Formatos suportados:");
|
|
115
|
+
injectString("sk-SK", "Supported Formats:", "Podporovan\xE9 form\xE1ty:");
|
|
116
|
+
injectString("sv", "Supported Formats:", "Format som st\xF6ds:");
|
|
117
|
+
injectString("th", "Supported Formats:", "\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E23\u0E2D\u0E07\u0E23\u0E31\u0E1A:");
|
|
118
|
+
injectString("tr", "Supported Formats:", "Desteklenen Bi\xE7imler:");
|
|
119
|
+
injectString("zh-Hans", "Supported Formats:", "\u652F\u6301\u7684\u683C\u5F0F\uFF1A");
|
|
120
|
+
injectString("zh-TW", "Supported Formats:", "\u652F\u63F4\u7684\u683C\u5F0F\uFF1A");
|
|
121
|
+
injectString("ro-RO", "Supported Formats:", "Formate acceptate:");
|
|
122
122
|
injectString("ar-SA", "Supported Formats:", "\u0627\u0644\u0635\u064A\u063A \u0627\u0644\u0645\u062F\u0639\u0648\u0645\u0629:");
|
|
123
123
|
const DropZoneContent = ({
|
|
124
124
|
size,
|