@geotab/zenith 3.9.2 → 3.10.0-beta.1
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 +15 -3
- package/dist/absolute/absolute.d.ts +7 -1
- package/dist/absolute/absolute.js +8 -4
- package/dist/alertRaw/alertRaw.js +4 -4
- package/dist/alertRaw/components/alertAnimation.js +2 -2
- package/dist/banner/bannerMultipLine.js +4 -4
- package/dist/banner/bannerSingleLine.js +4 -4
- package/dist/betaPill/betaPill.d.ts +4 -9
- package/dist/betaPill/betaPill.js +7 -8
- package/dist/bookmark/bookmark.d.ts +2 -1
- package/dist/bookmark/bookmark.js +4 -2
- package/dist/card/components/cardButton/cardButton.d.ts +2 -1
- package/dist/card/components/cardButton/cardButton.js +3 -3
- package/dist/checkbox/checkbox.js +2 -2
- package/dist/commonStyles/rangeFieldMixin.less +9 -9
- package/dist/controlledPopup/controlledPopup.d.ts +2 -1
- package/dist/controlledPopup/controlledPopup.js +2 -2
- package/dist/dataFeed/hooks/useVisibleColumns.js +1 -1
- package/dist/dataGrid/extensions/toBasicColumn.js +2 -1
- package/dist/dataGrid/listColumn.d.ts +1 -0
- package/dist/dataGrid/withFlexibleColumns/components/columnSettingsList.d.ts +2 -2
- package/dist/dataGrid/withFlexibleColumns/components/columnSettingsList.js +5 -5
- package/dist/dataGrid/withFlexibleColumns/withFlexibleColumns.js +15 -6
- package/dist/dialog/dialogContent.js +4 -4
- package/dist/dropdownRaw/dropdownHelper.d.ts +4 -1
- package/dist/dropdownRaw/dropdownHelper.js +2 -1
- package/dist/dropdownRaw/dropdownRaw.js +2 -2
- package/dist/dropdownRaw/dropdownTrigger.d.ts +1 -1
- package/dist/dropdownRaw/dropdownTrigger.js +1 -1
- package/dist/fileUpload/components/uploadedFilesSection.js +3 -3
- package/dist/filters/components/filtersSavedChipComponent.js +3 -3
- package/dist/filters/components/filtersSearchItemData.js +3 -3
- package/dist/filters/components/filtersSidePanel.js +4 -4
- package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +4 -4
- package/dist/formGroup/components/reviewListToggle/reviewListToggle.js +13 -13
- package/dist/groupsFilterRaw/groupsFilterInitialState.js +1 -1
- package/dist/headerTitle/headerTitle.d.ts +3 -9
- package/dist/headerTitle/headerTitle.js +2 -3
- package/dist/icons/iconAlignLeft.js +3 -1
- package/dist/icons/iconAlignmentLeft.js +3 -1
- package/dist/icons/iconAlignmentRight.js +3 -1
- package/dist/icons/iconArrowBottomLeft.js +3 -1
- package/dist/icons/iconArrowBottomRight.js +3 -1
- package/dist/icons/iconArrowLeftPath.js +3 -1
- package/dist/icons/iconArrowRight.js +3 -1
- package/dist/icons/iconArrowRightCircle.js +3 -1
- package/dist/icons/iconArrowRightPath.js +3 -1
- package/dist/icons/iconArrowTopLeft.js +3 -1
- package/dist/icons/iconArrowTopRight.js +3 -1
- package/dist/icons/iconChevronDoubleRight.js +3 -1
- package/dist/icons/iconChevronRight.js +3 -1
- package/dist/icons/iconChevronRightSmall.js +3 -1
- package/dist/icons/iconCornerDownLeft.js +3 -1
- package/dist/icons/iconCornerDownRight.js +3 -1
- package/dist/icons/iconCornerLeftDown.js +3 -1
- package/dist/icons/iconCornerLeftUp.js +3 -1
- package/dist/icons/iconCornerRightDown.js +3 -1
- package/dist/icons/iconCornerRightUp.js +3 -1
- package/dist/icons/iconCornerUpLeft.js +3 -1
- package/dist/icons/iconCornerUpRight.js +3 -1
- package/dist/icons/iconLayoutSidebar.js +3 -1
- package/dist/icons/iconPinFilled.d.ts +3 -0
- package/dist/icons/iconPinFilled.js +12 -0
- package/dist/icons/iconSidebar.js +3 -1
- package/dist/icons/iconUndock.js +3 -1
- package/dist/index.css +556 -504
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -6
- package/dist/list/listItem/listItem.d.ts +3 -1
- package/dist/list/listItem/listItem.js +4 -2
- package/dist/menu/controlledMenu.d.ts +1 -0
- package/dist/menu/controlledMenu.js +2 -2
- package/dist/mobileSheet/mobileSheet.js +4 -4
- package/dist/modal/modal.js +4 -4
- package/dist/nav/nav.d.ts +7 -1
- package/dist/nav/nav.js +11 -6
- package/dist/nav/navEmpty/navEmpty.d.ts +10 -0
- package/dist/nav/navEmpty/navEmpty.js +7 -0
- package/dist/notification/notification.js +4 -4
- package/dist/notification/pushNotification/pushNotification.js +1 -1
- package/dist/pill/components/pillNonActionable/pillNonActionable.js +4 -4
- package/dist/pillExpandable/pillExpandable.js +4 -4
- package/dist/table/detailPanel/detailPanelHeader.js +4 -4
- package/dist/table/flexible/columnsList.d.ts +1 -2
- package/dist/table/flexible/columnsList.js +6 -5
- package/dist/table/flexible/columnsPopup.js +0 -3
- package/dist/table/flexible/useFlexibleColumns.d.ts +1 -0
- package/dist/table/flexible/useFlexibleColumns.js +4 -3
- package/dist/table/loading/useLoading.d.ts +1 -0
- package/dist/table/loading/useLoading.js +1 -1
- package/dist/table/nested/useNestedRows.d.ts +1 -0
- package/dist/table/selectable/useSelectableRows.js +23 -5
- package/dist/table/table.d.ts +1 -0
- package/dist/table/table.js +7 -2
- package/dist/tabs/tabItem/tabItem.d.ts +2 -1
- package/dist/tabs/tabItem/tabItem.js +4 -2
- package/dist/tabs/tabs.d.ts +1 -0
- package/dist/tabs/tabs.js +2 -1
- package/dist/toastRaw/components/toastAnimation.js +2 -2
- package/dist/toastRaw/toastRaw.js +4 -4
- package/dist/toggleButtonRaw/toggleButtonRaw.js +13 -13
- package/dist/tooltip/tooltip.js +4 -4
- package/dist/utils/localization/flipAlignment.d.ts +2 -0
- package/dist/utils/localization/flipAlignment.js +19 -0
- package/dist/utils/localization/makeLanguageWrapper.d.ts +8 -0
- package/dist/utils/localization/makeLanguageWrapper.js +11 -0
- package/dist/utils/localization/translations/cs.json +2 -2
- package/dist/utils/localization/translations/da-DK.json +2 -2
- package/dist/utils/localization/translations/es.json +2 -2
- package/dist/utils/localization/translations/fi-FI.json +1 -1
- package/dist/utils/localization/translations/hu-HU.json +2 -2
- package/dist/utils/localization/translations/ko-KR.json +2 -2
- package/dist/utils/localization/translations/ms.json +1 -1
- package/dist/utils/localization/translations/nb-NO.json +1 -1
- package/dist/utils/localization/translations/pt-BR.json +2 -2
- package/dist/utils/localization/translations/pt-PT.json +3 -3
- package/dist/utils/localization/translations/ro-RO.json +5 -5
- package/dist/utils/localization/translations/sk-SK.json +1 -1
- package/dist/utils/localization/translations/zh-Hans.json +1 -1
- package/dist/utils/localization/useIsRTL.d.ts +1 -0
- package/dist/utils/localization/useIsRTL.js +6 -0
- package/dist/utils/localization/useRTLAlignment.d.ts +2 -0
- package/dist/utils/localization/useRTLAlignment.js +10 -0
- package/esm/absolute/absolute.d.ts +7 -1
- package/esm/absolute/absolute.js +8 -4
- package/esm/alertRaw/alertRaw.js +4 -4
- package/esm/alertRaw/components/alertAnimation.js +2 -2
- package/esm/banner/bannerMultipLine.js +4 -4
- package/esm/banner/bannerSingleLine.js +4 -4
- package/esm/betaPill/betaPill.d.ts +4 -9
- package/esm/betaPill/betaPill.js +7 -8
- package/esm/bookmark/bookmark.d.ts +2 -1
- package/esm/bookmark/bookmark.js +4 -2
- package/esm/card/components/cardButton/cardButton.d.ts +2 -1
- package/esm/card/components/cardButton/cardButton.js +3 -3
- package/esm/checkbox/checkbox.js +2 -2
- package/esm/controlledPopup/controlledPopup.d.ts +2 -1
- package/esm/controlledPopup/controlledPopup.js +2 -2
- package/esm/dataFeed/hooks/useVisibleColumns.js +1 -1
- package/esm/dataGrid/extensions/toBasicColumn.js +2 -1
- package/esm/dataGrid/listColumn.d.ts +1 -0
- package/esm/dataGrid/withFlexibleColumns/components/columnSettingsList.d.ts +2 -2
- package/esm/dataGrid/withFlexibleColumns/components/columnSettingsList.js +5 -5
- package/esm/dataGrid/withFlexibleColumns/withFlexibleColumns.js +15 -6
- package/esm/dialog/dialogContent.js +4 -4
- package/esm/dropdownRaw/dropdownHelper.d.ts +4 -1
- package/esm/dropdownRaw/dropdownHelper.js +2 -1
- package/esm/dropdownRaw/dropdownRaw.js +2 -2
- package/esm/dropdownRaw/dropdownTrigger.d.ts +1 -1
- package/esm/dropdownRaw/dropdownTrigger.js +1 -1
- package/esm/fileUpload/components/uploadedFilesSection.js +3 -3
- package/esm/filters/components/filtersSavedChipComponent.js +3 -3
- package/esm/filters/components/filtersSearchItemData.js +3 -3
- package/esm/filters/components/filtersSidePanel.js +4 -4
- package/esm/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +4 -4
- package/esm/formGroup/components/reviewListToggle/reviewListToggle.js +13 -13
- package/esm/groupsFilterRaw/groupsFilterInitialState.js +1 -1
- package/esm/headerTitle/headerTitle.d.ts +3 -9
- package/esm/headerTitle/headerTitle.js +2 -3
- package/esm/icons/iconAlignLeft.js +3 -1
- package/esm/icons/iconAlignmentLeft.js +3 -1
- package/esm/icons/iconAlignmentRight.js +3 -1
- package/esm/icons/iconArrowBottomLeft.js +3 -1
- package/esm/icons/iconArrowBottomRight.js +3 -1
- package/esm/icons/iconArrowLeftPath.js +3 -1
- package/esm/icons/iconArrowRight.js +3 -1
- package/esm/icons/iconArrowRightCircle.js +3 -1
- package/esm/icons/iconArrowRightPath.js +3 -1
- package/esm/icons/iconArrowTopLeft.js +3 -1
- package/esm/icons/iconArrowTopRight.js +3 -1
- package/esm/icons/iconChevronDoubleRight.js +3 -1
- package/esm/icons/iconChevronRight.js +3 -1
- package/esm/icons/iconChevronRightSmall.js +3 -1
- package/esm/icons/iconCornerDownLeft.js +3 -1
- package/esm/icons/iconCornerDownRight.js +3 -1
- package/esm/icons/iconCornerLeftDown.js +3 -1
- package/esm/icons/iconCornerLeftUp.js +3 -1
- package/esm/icons/iconCornerRightDown.js +3 -1
- package/esm/icons/iconCornerRightUp.js +3 -1
- package/esm/icons/iconCornerUpLeft.js +3 -1
- package/esm/icons/iconCornerUpRight.js +3 -1
- package/esm/icons/iconLayoutSidebar.js +3 -1
- package/esm/icons/iconPinFilled.d.ts +3 -0
- package/esm/icons/iconPinFilled.js +8 -0
- package/esm/icons/iconSidebar.js +3 -1
- package/esm/icons/iconUndock.js +3 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/list/listItem/listItem.d.ts +3 -1
- package/esm/list/listItem/listItem.js +4 -2
- package/esm/menu/controlledMenu.d.ts +1 -0
- package/esm/menu/controlledMenu.js +2 -2
- package/esm/mobileSheet/mobileSheet.js +4 -4
- package/esm/modal/modal.js +4 -4
- package/esm/nav/nav.d.ts +7 -1
- package/esm/nav/nav.js +11 -6
- package/esm/nav/navEmpty/navEmpty.d.ts +10 -0
- package/esm/nav/navEmpty/navEmpty.js +3 -0
- package/esm/notification/notification.js +4 -4
- package/esm/notification/pushNotification/pushNotification.js +1 -1
- package/esm/pill/components/pillNonActionable/pillNonActionable.js +4 -4
- package/esm/pillExpandable/pillExpandable.js +4 -4
- package/esm/table/detailPanel/detailPanelHeader.js +4 -4
- package/esm/table/flexible/columnsList.d.ts +1 -2
- package/esm/table/flexible/columnsList.js +6 -5
- package/esm/table/flexible/columnsPopup.js +0 -3
- package/esm/table/flexible/useFlexibleColumns.d.ts +1 -0
- package/esm/table/flexible/useFlexibleColumns.js +4 -3
- package/esm/table/loading/useLoading.d.ts +1 -0
- package/esm/table/loading/useLoading.js +1 -1
- package/esm/table/nested/useNestedRows.d.ts +1 -0
- package/esm/table/selectable/useSelectableRows.js +23 -5
- package/esm/table/table.d.ts +1 -0
- package/esm/table/table.js +7 -2
- package/esm/tabs/tabItem/tabItem.d.ts +2 -1
- package/esm/tabs/tabItem/tabItem.js +4 -2
- package/esm/tabs/tabs.d.ts +1 -0
- package/esm/tabs/tabs.js +2 -1
- package/esm/toastRaw/components/toastAnimation.js +2 -2
- package/esm/toastRaw/toastRaw.js +4 -4
- package/esm/toggleButtonRaw/toggleButtonRaw.js +13 -13
- package/esm/tooltip/tooltip.js +4 -4
- package/esm/utils/localization/flipAlignment.d.ts +2 -0
- package/esm/utils/localization/flipAlignment.js +15 -0
- package/esm/utils/localization/makeLanguageWrapper.d.ts +8 -0
- package/esm/utils/localization/makeLanguageWrapper.js +7 -0
- package/esm/utils/localization/translations/cs.json +2 -2
- package/esm/utils/localization/translations/da-DK.json +2 -2
- package/esm/utils/localization/translations/es.json +2 -2
- package/esm/utils/localization/translations/fi-FI.json +1 -1
- package/esm/utils/localization/translations/hu-HU.json +2 -2
- package/esm/utils/localization/translations/ko-KR.json +2 -2
- package/esm/utils/localization/translations/ms.json +1 -1
- package/esm/utils/localization/translations/nb-NO.json +1 -1
- package/esm/utils/localization/translations/pt-BR.json +2 -2
- package/esm/utils/localization/translations/pt-PT.json +3 -3
- package/esm/utils/localization/translations/ro-RO.json +5 -5
- package/esm/utils/localization/translations/sk-SK.json +1 -1
- package/esm/utils/localization/translations/zh-Hans.json +1 -1
- package/esm/utils/localization/useIsRTL.d.ts +1 -0
- package/esm/utils/localization/useIsRTL.js +2 -0
- package/esm/utils/localization/useRTLAlignment.d.ts +2 -0
- package/esm/utils/localization/useRTLAlignment.js +6 -0
- package/package.json +1 -1
|
@@ -15,10 +15,10 @@ injectString("da-DK", "Close", "Luk");
|
|
|
15
15
|
injectString("de", "Close", "Schlie\xDFen");
|
|
16
16
|
injectString("en", "Close", "Close");
|
|
17
17
|
injectString("es", "Close", "Cerrar");
|
|
18
|
-
injectString("fi-FI", "Close", "
|
|
18
|
+
injectString("fi-FI", "Close", "Sulkea");
|
|
19
19
|
injectString("fr", "Close", "Fermer");
|
|
20
20
|
injectString("fr-FR", "Close", "Fermer");
|
|
21
|
-
injectString("hu-HU", "Close", "
|
|
21
|
+
injectString("hu-HU", "Close", "Bez\xE1r\xE1s");
|
|
22
22
|
injectString("id", "Close", "Tutup");
|
|
23
23
|
injectString("it", "Close", "Chiudere");
|
|
24
24
|
injectString("ja", "Close", "\u9589\u3058\u308B");
|
|
@@ -29,13 +29,13 @@ injectString("nl", "Close", "Sluiten");
|
|
|
29
29
|
injectString("pl", "Close", "Zamknij");
|
|
30
30
|
injectString("pt-BR", "Close", "Fechar");
|
|
31
31
|
injectString("pt-PT", "Close", "Fechar");
|
|
32
|
-
injectString("sk-SK", "Close", "
|
|
32
|
+
injectString("sk-SK", "Close", "Zatvori\u0165");
|
|
33
33
|
injectString("sv", "Close", "St\xE4ng");
|
|
34
34
|
injectString("th", "Close", "\u0E1B\u0E34\u0E14");
|
|
35
35
|
injectString("tr", "Close", "Kapat");
|
|
36
36
|
injectString("zh-Hans", "Close", "\u5173\u95ED");
|
|
37
37
|
injectString("zh-TW", "Close", "\u95DC\u9589");
|
|
38
|
-
injectString("ro-RO", "Close", "\xCEnchide
|
|
38
|
+
injectString("ro-RO", "Close", "\xCEnchide");
|
|
39
39
|
injectString("ar-SA", "Close", "\u0625\u063A\u0644\u0627\u0642");
|
|
40
40
|
export const BannerMultiline = ({
|
|
41
41
|
children,
|
|
@@ -16,10 +16,10 @@ injectString("da-DK", "Close", "Luk");
|
|
|
16
16
|
injectString("de", "Close", "Schlie\xDFen");
|
|
17
17
|
injectString("en", "Close", "Close");
|
|
18
18
|
injectString("es", "Close", "Cerrar");
|
|
19
|
-
injectString("fi-FI", "Close", "
|
|
19
|
+
injectString("fi-FI", "Close", "Sulkea");
|
|
20
20
|
injectString("fr", "Close", "Fermer");
|
|
21
21
|
injectString("fr-FR", "Close", "Fermer");
|
|
22
|
-
injectString("hu-HU", "Close", "
|
|
22
|
+
injectString("hu-HU", "Close", "Bez\xE1r\xE1s");
|
|
23
23
|
injectString("id", "Close", "Tutup");
|
|
24
24
|
injectString("it", "Close", "Chiudere");
|
|
25
25
|
injectString("ja", "Close", "\u9589\u3058\u308B");
|
|
@@ -30,13 +30,13 @@ injectString("nl", "Close", "Sluiten");
|
|
|
30
30
|
injectString("pl", "Close", "Zamknij");
|
|
31
31
|
injectString("pt-BR", "Close", "Fechar");
|
|
32
32
|
injectString("pt-PT", "Close", "Fechar");
|
|
33
|
-
injectString("sk-SK", "Close", "
|
|
33
|
+
injectString("sk-SK", "Close", "Zatvori\u0165");
|
|
34
34
|
injectString("sv", "Close", "St\xE4ng");
|
|
35
35
|
injectString("th", "Close", "\u0E1B\u0E34\u0E14");
|
|
36
36
|
injectString("tr", "Close", "Kapat");
|
|
37
37
|
injectString("zh-Hans", "Close", "\u5173\u95ED");
|
|
38
38
|
injectString("zh-TW", "Close", "\u95DC\u9589");
|
|
39
|
-
injectString("ro-RO", "Close", "\xCEnchide
|
|
39
|
+
injectString("ro-RO", "Close", "\xCEnchide");
|
|
40
40
|
injectString("ar-SA", "Close", "\u0625\u063A\u0644\u0627\u0642");
|
|
41
41
|
export const BannerSingleLine = ({
|
|
42
42
|
children,
|
|
@@ -6,26 +6,21 @@ export interface IBetaPillActions {
|
|
|
6
6
|
link?: string;
|
|
7
7
|
linkOptions?: ILinkOptions;
|
|
8
8
|
}
|
|
9
|
-
/**
|
|
10
|
-
* @internal - temporary escape hatch
|
|
11
|
-
* @deprecated
|
|
12
|
-
*/
|
|
13
|
-
export interface IBetaPillBaseInternal {
|
|
14
|
-
name?: string;
|
|
15
|
-
description?: string;
|
|
16
|
-
}
|
|
17
9
|
interface IBetaPillBase {
|
|
18
10
|
className?: string;
|
|
11
|
+
name?: string;
|
|
19
12
|
}
|
|
20
13
|
interface IBetaPillWithActions extends IBetaPillBase {
|
|
21
14
|
feedbackAction?: IBetaPillActions;
|
|
22
15
|
betaOptionAction?: IBetaPillActions;
|
|
16
|
+
description?: string;
|
|
23
17
|
}
|
|
24
18
|
interface IBetaPillWithoutActions extends IBetaPillBase {
|
|
25
19
|
feedbackAction?: never;
|
|
26
20
|
betaOptionAction?: never;
|
|
21
|
+
description?: never;
|
|
27
22
|
}
|
|
28
23
|
export type IBetaPill = IBetaPillWithActions | IBetaPillWithoutActions;
|
|
29
|
-
export declare const BetaPill: (
|
|
24
|
+
export declare const BetaPill: ({ className, feedbackAction, betaOptionAction, name, description }: IBetaPill) => import("react/jsx-runtime").JSX.Element;
|
|
30
25
|
export declare const TRANSLATIONS: string[];
|
|
31
26
|
export {};
|
package/esm/betaPill/betaPill.js
CHANGED
|
@@ -116,14 +116,13 @@ injectString("zh-Hans", "Beta", "\u6D4B\u8BD5\u7248");
|
|
|
116
116
|
injectString("zh-TW", "Beta", "\u6E2C\u8A66\u7248");
|
|
117
117
|
injectString("ro-RO", "Beta", "Beta");
|
|
118
118
|
injectString("ar-SA", "Beta", "\u062A\u062C\u0631\u064A\u0628\u064A");
|
|
119
|
-
export const BetaPill =
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
} = props;
|
|
119
|
+
export const BetaPill = ({
|
|
120
|
+
className,
|
|
121
|
+
feedbackAction,
|
|
122
|
+
betaOptionAction,
|
|
123
|
+
name,
|
|
124
|
+
description
|
|
125
|
+
}) => {
|
|
127
126
|
const {
|
|
128
127
|
translate
|
|
129
128
|
} = useLanguage();
|
|
@@ -3,6 +3,7 @@ import { IZenComponentProps } from "../commonHelpers/zenComponent";
|
|
|
3
3
|
export interface IBookmark extends IZenComponentProps {
|
|
4
4
|
bookmarked: boolean;
|
|
5
5
|
onChange: (bookmarkState: boolean) => void;
|
|
6
|
+
dataAnalyticsId?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare const Bookmark: ({ className, bookmarked, onChange }: IBookmark) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const Bookmark: ({ className, bookmarked, onChange, dataAnalyticsId }: IBookmark) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export declare const TRANSLATIONS: string[];
|
package/esm/bookmark/bookmark.js
CHANGED
|
@@ -67,7 +67,8 @@ injectString("ar-SA", "Add page to bookmarks", "\u0625\u0636\u0627\u0641\u0629 \
|
|
|
67
67
|
export const Bookmark = ({
|
|
68
68
|
className,
|
|
69
69
|
bookmarked,
|
|
70
|
-
onChange
|
|
70
|
+
onChange,
|
|
71
|
+
dataAnalyticsId
|
|
71
72
|
}) => {
|
|
72
73
|
const [isHovered, setIsHovered] = useState(false);
|
|
73
74
|
const {
|
|
@@ -100,7 +101,8 @@ export const Bookmark = ({
|
|
|
100
101
|
iconSize: isDrive ? driveIconSize("large") : "large",
|
|
101
102
|
iconClasses: `zen-page-bookmark__icon zen-page-bookmark__icon${bookmarked ? "--active" : "--inactive"}`,
|
|
102
103
|
"aria-label": title,
|
|
103
|
-
title: title
|
|
104
|
+
title: title,
|
|
105
|
+
dataAnalyticsId: dataAnalyticsId
|
|
104
106
|
})
|
|
105
107
|
});
|
|
106
108
|
};
|
|
@@ -11,5 +11,6 @@ export interface ICardButton extends IZenIdComponentProps {
|
|
|
11
11
|
link?: string;
|
|
12
12
|
target?: HTMLAttributeAnchorTarget;
|
|
13
13
|
dataAnalyticsId?: string;
|
|
14
|
+
ariaLabel?: string;
|
|
14
15
|
}
|
|
15
|
-
export declare const CardButton: ({ children, disabled, icon, name, onClick, link, className, target: linkTarget, dataAnalyticsId }: ICardButton) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const CardButton: ({ children, disabled, icon, name, onClick, link, className, target: linkTarget, dataAnalyticsId, ariaLabel }: ICardButton) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,7 +9,7 @@ import { Menu } from "../../../menu/menu";
|
|
|
9
9
|
import { useDriveClassName } from "../../../utils/theme/useDriveClassName";
|
|
10
10
|
import { useDrive } from "../../../utils/theme/useDrive";
|
|
11
11
|
import { toKebabCase } from "../../../utils/toKebabCase";
|
|
12
|
-
export const CardButton = ({ children, disabled = false, icon, name, onClick, link, className, target: linkTarget, dataAnalyticsId }) => {
|
|
12
|
+
export const CardButton = ({ children, disabled = false, icon, name, onClick, link, className, target: linkTarget, dataAnalyticsId, ariaLabel }) => {
|
|
13
13
|
const [isOpen, setIsOpen] = useState(false);
|
|
14
14
|
const triggerRef = useRef(null);
|
|
15
15
|
const content = [];
|
|
@@ -29,9 +29,9 @@ export const CardButton = ({ children, disabled = false, icon, name, onClick, li
|
|
|
29
29
|
}
|
|
30
30
|
onClick === null || onClick === void 0 ? void 0 : onClick(...args);
|
|
31
31
|
};
|
|
32
|
-
const renderLink = () => (_jsxs(Button, { disabled: disabled, type: "tertiary", link: link, target: linkTarget, title: name, dataAnalyticsId: analyticsId, className: classNames([className || "", "zen-card-button", "zen-caption", cardButtonDriveClasses || ""]), children: [icon && createElement(icon, { size: isDrive ? "huge" : "large", className: "zen-caption__pre-content" }), _jsx("span", { className: "zen-caption__content", children: name })] }));
|
|
32
|
+
const renderLink = () => (_jsxs(Button, { disabled: disabled, type: "tertiary", link: link, target: linkTarget, title: name, ariaLabel: ariaLabel, dataAnalyticsId: analyticsId, className: classNames([className || "", "zen-card-button", "zen-caption", cardButtonDriveClasses || ""]), children: [icon && createElement(icon, { size: isDrive ? "huge" : "large", className: "zen-caption__pre-content" }), _jsx("span", { className: "zen-caption__content", children: name })] }));
|
|
33
33
|
const renderButton = () => {
|
|
34
|
-
const trigger = (_jsxs(Button, { htmlType: "button", ref: triggerRef, disabled: disabled, type: "tertiary", onClick: onButtonClickHandler, title: name, dataAnalyticsId: analyticsId, className: classNames([className || "", "zen-card-button", "zen-caption", cardButtonDriveClasses || ""]), children: [icon && createElement(icon, { size: isDrive ? "huge" : "large", className: "zen-caption__pre-content" }), _jsx("span", { className: "zen-caption__content", children: name }), !!content.length &&
|
|
34
|
+
const trigger = (_jsxs(Button, { htmlType: "button", ref: triggerRef, disabled: disabled, type: "tertiary", onClick: onButtonClickHandler, title: name, ariaLabel: ariaLabel, dataAnalyticsId: analyticsId, className: classNames([className || "", "zen-card-button", "zen-caption", cardButtonDriveClasses || ""]), children: [icon && createElement(icon, { size: isDrive ? "huge" : "large", className: "zen-caption__pre-content" }), _jsx("span", { className: "zen-caption__content", children: name }), !!content.length &&
|
|
35
35
|
(isOpen ? (_jsx(IconChevronTopSmall, { size: isDrive ? "huge" : "large", className: "zen-caption__post-content" })) : (_jsx(IconChevronDownSmall, { size: isDrive ? "huge" : "large", className: "zen-caption__post-content" })))] }));
|
|
36
36
|
return content.length ? (_jsxs(_Fragment, { children: [trigger, _jsx(ControlledMenu, { title: name, isOpen: isOpen, setIsOpen: setIsOpen, triggerRef: triggerRef, children: content })] })) : (trigger);
|
|
37
37
|
};
|
package/esm/checkbox/checkbox.js
CHANGED
|
@@ -28,9 +28,9 @@ export const Checkbox = (_a) => {
|
|
|
28
28
|
const isMobile = useMobile();
|
|
29
29
|
const checkboxIconClasses = useMemo(() => classNames(["zen-checkbox__icon", disabled ? "zen-checkbox__icon--disabled" : ""]), [disabled]);
|
|
30
30
|
const checkbox = (_jsx(TriStateCheckbox, Object.assign({ className: "zen-checkbox__input", id: intId, checked: checked, indeterminate: indeterminate, disabled: disabled, "aria-label": title, "aria-describedby": describedBy }, rest)));
|
|
31
|
-
const iconAndLabel = (_jsxs(_Fragment, { children: [_jsx("div", { className: "zen-checkbox__box", children: state === CheckboxState.Indeterminate ? (_jsx(CheckboxIconMinus, { className: checkboxIconClasses, size: driveClasses ? "bigger" : "medium" })) : state === CheckboxState.On ? (_jsx(CheckboxIconCheckmark, { className: checkboxIconClasses, size: driveClasses ? "bigger" : "medium" })) : null }), children ? (_jsx("div", { className: classNames(["zen-checkbox__label-text", fullWidth ? "zen-checkbox__label-text--full-width" : ""]), children: children })) : null] }));
|
|
31
|
+
const iconAndLabel = (_jsxs(_Fragment, { children: [_jsx("div", { className: "zen-checkbox__box", "aria-hidden": true, children: state === CheckboxState.Indeterminate ? (_jsx(CheckboxIconMinus, { className: checkboxIconClasses, size: driveClasses ? "bigger" : "medium" })) : state === CheckboxState.On ? (_jsx(CheckboxIconCheckmark, { className: checkboxIconClasses, size: driveClasses ? "bigger" : "medium" })) : null }), children ? (_jsx("div", { className: classNames(["zen-checkbox__label-text", fullWidth ? "zen-checkbox__label-text--full-width" : ""]), children: children })) : null] }));
|
|
32
32
|
if (wrapped) {
|
|
33
33
|
return (_jsxs("label", { className: classNames(["zen-checkbox", driveClasses || "", className]), title: title, children: [checkbox, _jsx("div", { className: classNames(["zen-checkbox__label", reverse ? "zen-checkbox__label--reverse" : ""]), children: iconAndLabel })] }));
|
|
34
34
|
}
|
|
35
|
-
return (
|
|
35
|
+
return (_jsx("div", { className: classNames(["zen-checkbox", isMobile && !driveClasses ? "zen-checkbox--mobile" : "", driveClasses || "", className]), children: _jsxs("label", { className: classNames(["zen-checkbox__label", reverse ? "zen-checkbox__label--reverse" : ""]), title: title, children: [checkbox, iconAndLabel] }) }));
|
|
36
36
|
};
|
|
@@ -23,8 +23,9 @@ export interface IControlledPopup extends IZenComponentProps {
|
|
|
23
23
|
ariaLabel?: string;
|
|
24
24
|
ariaLabelledby?: string;
|
|
25
25
|
recalculateOnScroll?: boolean;
|
|
26
|
+
closeOnScroll?: boolean;
|
|
26
27
|
preventAttributesAutoSet?: boolean;
|
|
27
28
|
/** Whether to focus the first focusable element when popup opens. Default: true */
|
|
28
29
|
focusOnOpen?: boolean;
|
|
29
30
|
}
|
|
30
|
-
export declare const ControlledPopup: ({ isOpen, id, paddingX, paddingY, triggerRef, className, children, alignment, inline, onOpenChange, useTrapFocusWithTrigger, shouldHoldScroll, ariaLabel, ariaLabelledby, recalculateOnScroll, preventAttributesAutoSet, focusOnOpen, role }: IControlledPopup) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare const ControlledPopup: ({ isOpen, id, paddingX, paddingY, triggerRef, className, children, alignment, inline, onOpenChange, useTrapFocusWithTrigger, shouldHoldScroll, ariaLabel, ariaLabelledby, recalculateOnScroll, closeOnScroll, preventAttributesAutoSet, focusOnOpen, role }: IControlledPopup) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { useEffect, useId } from "react";
|
|
|
3
3
|
import { Absolute } from "../absolute/absolute";
|
|
4
4
|
import { classNames } from "../commonHelpers/classNames/classNames";
|
|
5
5
|
import { useClientReady } from "../commonHelpers/hooks/useClientReady";
|
|
6
|
-
export const ControlledPopup = ({ isOpen, id, paddingX, paddingY, triggerRef, className, children, alignment, inline, onOpenChange, useTrapFocusWithTrigger, shouldHoldScroll, ariaLabel, ariaLabelledby, recalculateOnScroll, preventAttributesAutoSet, focusOnOpen, role = "dialog" }) => {
|
|
6
|
+
export const ControlledPopup = ({ isOpen, id, paddingX, paddingY, triggerRef, className, children, alignment, inline, onOpenChange, useTrapFocusWithTrigger, shouldHoldScroll, ariaLabel, ariaLabelledby, recalculateOnScroll, closeOnScroll, preventAttributesAutoSet, focusOnOpen, role = "dialog" }) => {
|
|
7
7
|
const autoId = useId();
|
|
8
8
|
const popupId = id || autoId;
|
|
9
9
|
const isClientReady = useClientReady();
|
|
@@ -21,5 +21,5 @@ export const ControlledPopup = ({ isOpen, id, paddingX, paddingY, triggerRef, cl
|
|
|
21
21
|
triggerRef.current.setAttribute("aria-expanded", isOpen ? "true" : "false");
|
|
22
22
|
triggerRef.current.setAttribute("aria-controls", popupId);
|
|
23
23
|
}, [triggerRef, isOpen, popupId, preventAttributesAutoSet, isClientReady]);
|
|
24
|
-
return (_jsx(Absolute, Object.assign({ triggerRef: triggerRef, alignment: alignment, id: popupId, isOpen: isOpen, className: 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, focusOnOpen: focusOnOpen, children: children })));
|
|
24
|
+
return (_jsx(Absolute, Object.assign({ triggerRef: triggerRef, alignment: alignment, id: popupId, isOpen: isOpen, className: 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 })));
|
|
25
25
|
};
|
|
@@ -7,7 +7,7 @@ export const useVisibleColumns = (columnsList, expanded, options) => {
|
|
|
7
7
|
secondaryColumns = expanded ? columnsList.slice(visibleColumns) : [];
|
|
8
8
|
return { mainColumns, secondaryColumns };
|
|
9
9
|
}
|
|
10
|
-
mainColumns = columnsList.slice(0, columnsList.length - collapsedColumnsQty);
|
|
10
|
+
mainColumns = columnsList.slice(0, Math.max(1, columnsList.length - collapsedColumnsQty));
|
|
11
11
|
secondaryColumns = expanded ? columnsList.slice(mainColumns.length) : [];
|
|
12
12
|
return { mainColumns, secondaryColumns };
|
|
13
13
|
};
|
|
@@ -6,7 +6,8 @@ const DEFAULT_META = {
|
|
|
6
6
|
visibleOnHover: false
|
|
7
7
|
};
|
|
8
8
|
export const toBasicColumn = (column) => {
|
|
9
|
+
var _a;
|
|
9
10
|
const defaultColumn = defaultColumnComponent(column.id);
|
|
10
11
|
const columnComponent = column.columnComponent || defaultColumn;
|
|
11
|
-
return Object.assign(Object.assign({}, column), { name: column.name || column.id || "", meta: Object.assign(Object.assign({}, DEFAULT_META), (column.meta || {})), columnComponent: columnComponent, wrappers: column.wrappers || [], colspan: column.colspan || 1 });
|
|
12
|
+
return Object.assign(Object.assign({}, column), { name: column.name || column.id || "", meta: Object.assign(Object.assign({}, DEFAULT_META), (column.meta || {})), columnComponent: columnComponent, wrappers: column.wrappers || [], alwaysVisible: (_a = column.alwaysVisible) !== null && _a !== void 0 ? _a : false, colspan: column.colspan || 1 });
|
|
12
13
|
};
|
|
@@ -17,6 +17,7 @@ export interface IListColumn<T, N = T> {
|
|
|
17
17
|
meta?: IListColumnMeta<T, N>;
|
|
18
18
|
columnComponent?: IColumnComponent<T, N>;
|
|
19
19
|
wrappers?: IListColumnWrapper<T, N>[];
|
|
20
|
+
alwaysVisible?: boolean;
|
|
20
21
|
colspan?: undefined | number | ((entity: T | N) => number | undefined);
|
|
21
22
|
}
|
|
22
23
|
export type TRenderResult = ReactNode | PromiseLike<ReactNode | undefined> | undefined;
|
|
@@ -6,10 +6,10 @@ import { IRowEntity } from "../../row/row";
|
|
|
6
6
|
interface IColumnSettingsList<T extends IRowEntity<T>> extends IZenComponentProps {
|
|
7
7
|
columns: IListFlexibleColumnStrict<T, T>[];
|
|
8
8
|
settings: Map<string, boolean>;
|
|
9
|
-
|
|
9
|
+
disabledColumns?: string[];
|
|
10
10
|
onChange?: (newState: Map<string, boolean>) => void;
|
|
11
11
|
sortGroups?: (a: string, b: string) => number;
|
|
12
12
|
sortColumns?: (a: string, b: string) => number;
|
|
13
13
|
}
|
|
14
|
-
export declare function ColumnSettingsList<T extends IRowEntity<T> & IColumnsGroup>({ columns, settings,
|
|
14
|
+
export declare function ColumnSettingsList<T extends IRowEntity<T> & IColumnsGroup>({ columns, settings, disabledColumns, onChange, sortGroups, sortColumns }: IColumnSettingsList<T>): import("react/jsx-runtime").JSX.Element[];
|
|
15
15
|
export {};
|
|
@@ -3,7 +3,7 @@ import { useCallback, useId, useMemo } from "react";
|
|
|
3
3
|
import { groupColumns } from "../../extensions/groupColumns";
|
|
4
4
|
import { SelectList } from "../../../selectList/selectList";
|
|
5
5
|
import { CheckboxState } from "../../../checkbox/checkboxState";
|
|
6
|
-
const SubColumnsList = ({ title, columns, settings,
|
|
6
|
+
const SubColumnsList = ({ title, columns, settings, disabledColumns, onChange, sortColumns }) => {
|
|
7
7
|
const id = useId();
|
|
8
8
|
const sortColumnsInt = useCallback((a, b) => {
|
|
9
9
|
if (sortColumns) {
|
|
@@ -14,10 +14,10 @@ const SubColumnsList = ({ title, columns, settings, firstColumn, onChange, sortC
|
|
|
14
14
|
const items = useMemo(() => columns.sort(sortColumnsInt).map(c => ({
|
|
15
15
|
id: c.id,
|
|
16
16
|
title: c.title,
|
|
17
|
-
disabled: c.name
|
|
17
|
+
disabled: (disabledColumns === null || disabledColumns === void 0 ? void 0 : disabledColumns.includes(c.name)) || false,
|
|
18
18
|
showCheckbox: true,
|
|
19
19
|
children: c.title
|
|
20
|
-
})), [columns,
|
|
20
|
+
})), [columns, disabledColumns, sortColumnsInt]);
|
|
21
21
|
const state = columns.reduce((res, c) => {
|
|
22
22
|
res.set(c.id, settings.get(c.name) !== false ? CheckboxState.On : CheckboxState.Off);
|
|
23
23
|
return res;
|
|
@@ -36,7 +36,7 @@ const SubColumnsList = ({ title, columns, settings, firstColumn, onChange, sortC
|
|
|
36
36
|
}
|
|
37
37
|
return (_jsxs("div", { className: "zen-columns-list__sub-section", children: [_jsx("div", { className: "zen-columns-list__title zen-ellipsis", children: title }), list] }));
|
|
38
38
|
};
|
|
39
|
-
export function ColumnSettingsList({ columns, settings,
|
|
39
|
+
export function ColumnSettingsList({ columns, settings, disabledColumns, onChange, sortGroups, sortColumns }) {
|
|
40
40
|
const groupped = groupColumns(columns);
|
|
41
41
|
const sortGroupsInt = useCallback((a, b) => {
|
|
42
42
|
if (sortGroups) {
|
|
@@ -46,5 +46,5 @@ export function ColumnSettingsList({ columns, settings, firstColumn, onChange, s
|
|
|
46
46
|
}, [sortGroups]);
|
|
47
47
|
return Array.from(groupped.entries())
|
|
48
48
|
.sort(sortGroupsInt)
|
|
49
|
-
.map(([title, cs]) => (_jsx(SubColumnsList, { title: title, columns: cs, settings: settings,
|
|
49
|
+
.map(([title, cs]) => (_jsx(SubColumnsList, { title: title, columns: cs, settings: settings, disabledColumns: disabledColumns, onChange: onChange, sortColumns: sortColumns }, cs.map(c => c.id).join("-"))));
|
|
50
50
|
}
|
|
@@ -10,6 +10,7 @@ import { FlexibleColumnWrapper } from "./columns/flexibleColumnWrapper";
|
|
|
10
10
|
import { ColumnSettings } from "./components/columnSettings";
|
|
11
11
|
import { ColumnSettingsList } from "./components/columnSettingsList";
|
|
12
12
|
import { ColumnSettingsSidePanel } from "./components/columnSettingsSidePanel";
|
|
13
|
+
import { EmptySearchList } from "../emptySearchList/emptySearchList";
|
|
13
14
|
import { zen } from "../../utils/zen";
|
|
14
15
|
// T - type of entity
|
|
15
16
|
// P - props of wrapped component
|
|
@@ -22,6 +23,7 @@ export const withFlexibleColumns = (DataGridComponent) => {
|
|
|
22
23
|
const [isPanelOpen, setIsPanelOpen] = useState(false);
|
|
23
24
|
const allColumns = useMemo(() => columns.map(column => (Object.assign(Object.assign({}, toBasicColumn(Object.assign({}, column))), { visible: column.visible !== false, group: column.group || "" }))), [columns]);
|
|
24
25
|
const columnsSettings = useMemo(() => mergeColumnsSettings(allColumns, options.columnsSettings || settingsStore.getItem()), [allColumns, options.columnsSettings, settingsStore]);
|
|
26
|
+
const hasConfigurableColumns = useMemo(() => allColumns.filter(c => c.title).some(c => !c.alwaysVisible), [allColumns]);
|
|
25
27
|
const visibleColumns = useMemo(() => {
|
|
26
28
|
const visibleColumnsMap = new Map(allColumns.map(c => [c.name, c]));
|
|
27
29
|
return columnsSettings
|
|
@@ -63,10 +65,12 @@ export const withFlexibleColumns = (DataGridComponent) => {
|
|
|
63
65
|
}, 0);
|
|
64
66
|
}), [settingsStore]);
|
|
65
67
|
const listOfColumns = useMemo(() => {
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
+
const configurableColumnNames = new Set(allColumns.filter(c => c.title).map(c => c.name));
|
|
69
|
+
const visibleConfigurableSettings = columnsSettings.filter(s => s.visible && configurableColumnNames.has(s.name));
|
|
70
|
+
const lastVisibleColumn = visibleConfigurableSettings.length === 1 ? [visibleConfigurableSettings[0].name] : [];
|
|
71
|
+
const disabledColumns = [...allColumns.filter(c => c.alwaysVisible).map(c => c.name), ...lastVisibleColumn];
|
|
68
72
|
const columnSettingsMap = new Map(columnsSettings.map(s => [s.name, s.visible]));
|
|
69
|
-
return (_jsx(ColumnSettingsList, { columns: allColumns.filter(c => c.title), settings: columnSettingsMap,
|
|
73
|
+
return (_jsx(ColumnSettingsList, { columns: allColumns.filter(c => c.title), settings: columnSettingsMap, disabledColumns: disabledColumns, onChange: async (newSettings) => {
|
|
70
74
|
const settings = columnsSettings.map(s => {
|
|
71
75
|
const visible = newSettings.get(s.name) !== false;
|
|
72
76
|
return Object.assign(Object.assign({}, s), { visible });
|
|
@@ -74,7 +78,7 @@ export const withFlexibleColumns = (DataGridComponent) => {
|
|
|
74
78
|
await saveSettingsToTheStore(settings);
|
|
75
79
|
onChangeSettings(settings);
|
|
76
80
|
}, sortGroups: sortGroups, sortColumns: sortColumns }));
|
|
77
|
-
}, [columnsSettings, allColumns, saveSettingsToTheStore, onChangeSettings,
|
|
81
|
+
}, [columnsSettings, allColumns, saveSettingsToTheStore, onChangeSettings, sortGroups, sortColumns]);
|
|
78
82
|
const onReorderListener = useCallback(async ([from, to]) => {
|
|
79
83
|
if (from === to) {
|
|
80
84
|
return;
|
|
@@ -134,9 +138,14 @@ export const withFlexibleColumns = (DataGridComponent) => {
|
|
|
134
138
|
onResetSettings();
|
|
135
139
|
setIsPanelOpen(false);
|
|
136
140
|
}, [onResetSettings, saveSettingsToTheStore]);
|
|
137
|
-
|
|
141
|
+
useEffect(() => {
|
|
142
|
+
if (popupTriggerRef === null || popupTriggerRef === void 0 ? void 0 : popupTriggerRef.current) {
|
|
143
|
+
popupTriggerRef.current.style.display = hasConfigurableColumns ? "" : "none";
|
|
144
|
+
}
|
|
145
|
+
}, [popupTriggerRef, hasConfigurableColumns]);
|
|
146
|
+
return (_jsxs(_Fragment, { children: [popupTriggerRef && hasConfigurableColumns ? (options.isFeed ? (_jsx(ColumnSettingsSidePanel, { triggerRef: popupTriggerRef, isOpen: isPanelOpen, onOpen: () => setIsPanelOpen(true), onClose: () => setIsPanelOpen(false), onReset: onResetListener, children: _jsx(ColumnSettings, { onReset: onResetListener, showFooter: false, children: listOfColumns }) })) : (_jsx(Popup, { triggerRef: popupTriggerRef, alignment: "bottom-right", children: _jsx(ColumnSettings, { onReset: onResetListener, children: listOfColumns }) }, "flexible-popup"))) : null, visibleColumns.length === 0 && hasConfigurableColumns ? (_jsx("div", { className: "zen-data-grid__empty", children: _jsx(EmptySearchList, {}) })) : (_jsx(DataGridComponent, Object.assign({}, props, { columns: [...visibleColumns], ref: gridRef }), "grid"))] }));
|
|
138
147
|
};
|
|
139
148
|
FlexibleColumnsComponent.displayName = `withFlexibleColumns(${DataGridComponent.displayName || DataGridComponent.name || "Component"})`;
|
|
140
149
|
return FlexibleColumnsComponent;
|
|
141
150
|
};
|
|
142
|
-
withFlexibleColumns.translations = [...ColumnSettings.translations, ...ColumnSettingsSidePanel.translations];
|
|
151
|
+
withFlexibleColumns.translations = [...ColumnSettings.translations, ...ColumnSettingsSidePanel.translations, ...EmptySearchList.translations];
|
|
@@ -19,10 +19,10 @@ injectString("da-DK", "Close", "Luk");
|
|
|
19
19
|
injectString("de", "Close", "Schlie\xDFen");
|
|
20
20
|
injectString("en", "Close", "Close");
|
|
21
21
|
injectString("es", "Close", "Cerrar");
|
|
22
|
-
injectString("fi-FI", "Close", "
|
|
22
|
+
injectString("fi-FI", "Close", "Sulkea");
|
|
23
23
|
injectString("fr", "Close", "Fermer");
|
|
24
24
|
injectString("fr-FR", "Close", "Fermer");
|
|
25
|
-
injectString("hu-HU", "Close", "
|
|
25
|
+
injectString("hu-HU", "Close", "Bez\xE1r\xE1s");
|
|
26
26
|
injectString("id", "Close", "Tutup");
|
|
27
27
|
injectString("it", "Close", "Chiudere");
|
|
28
28
|
injectString("ja", "Close", "\u9589\u3058\u308B");
|
|
@@ -33,13 +33,13 @@ injectString("nl", "Close", "Sluiten");
|
|
|
33
33
|
injectString("pl", "Close", "Zamknij");
|
|
34
34
|
injectString("pt-BR", "Close", "Fechar");
|
|
35
35
|
injectString("pt-PT", "Close", "Fechar");
|
|
36
|
-
injectString("sk-SK", "Close", "
|
|
36
|
+
injectString("sk-SK", "Close", "Zatvori\u0165");
|
|
37
37
|
injectString("sv", "Close", "St\xE4ng");
|
|
38
38
|
injectString("th", "Close", "\u0E1B\u0E34\u0E14");
|
|
39
39
|
injectString("tr", "Close", "Kapat");
|
|
40
40
|
injectString("zh-Hans", "Close", "\u5173\u95ED");
|
|
41
41
|
injectString("zh-TW", "Close", "\u95DC\u9589");
|
|
42
|
-
injectString("ro-RO", "Close", "\xCEnchide
|
|
42
|
+
injectString("ro-RO", "Close", "\xCEnchide");
|
|
43
43
|
injectString("ar-SA", "Close", "\u0625\u063A\u0644\u0627\u0642");
|
|
44
44
|
export const DialogContent = ({
|
|
45
45
|
onClose,
|
|
@@ -31,7 +31,7 @@ export declare const checkIsDataProblem: (selectedIds: string[], groupsMap: IDro
|
|
|
31
31
|
export declare const getStringFromSelected: (selectedIds: string[], groupsMapSelected: IDropdownState["groupsMapSelected"], translate: (s: string) => string, rootId: string) => string;
|
|
32
32
|
export declare const getStringFromAllSelected: (groupsMap: IDropdownState["groupsMap"], translate: (s: string) => string, rootId: string) => string;
|
|
33
33
|
export declare const getSelectedCount: (selectedIds: string[]) => number;
|
|
34
|
-
export declare const getAllyTriggerProps: (allyPattern: "selectOnlyCombobox" | "comboboxWithDialog" | "buttonWithDialog") => {
|
|
34
|
+
export declare const getAllyTriggerProps: (allyPattern: "selectOnlyCombobox" | "comboboxWithDialog" | "buttonWithDialog" | "buttonWithMenu") => {
|
|
35
35
|
readonly role: "combobox";
|
|
36
36
|
readonly "aria-haspopup": "listbox";
|
|
37
37
|
} | {
|
|
@@ -40,4 +40,7 @@ export declare const getAllyTriggerProps: (allyPattern: "selectOnlyCombobox" | "
|
|
|
40
40
|
} | {
|
|
41
41
|
readonly role: "button";
|
|
42
42
|
readonly "aria-haspopup": "dialog";
|
|
43
|
+
} | {
|
|
44
|
+
readonly role: "button";
|
|
45
|
+
readonly "aria-haspopup": "menu";
|
|
43
46
|
};
|
|
@@ -146,6 +146,7 @@ export const getSelectedCount = (selectedIds) => selectedIds.length;
|
|
|
146
146
|
const ALLY_TRIGGER_PROPS = {
|
|
147
147
|
selectOnlyCombobox: { role: "combobox", "aria-haspopup": "listbox" },
|
|
148
148
|
comboboxWithDialog: { role: "combobox", "aria-haspopup": "dialog" },
|
|
149
|
-
buttonWithDialog: { role: "button", "aria-haspopup": "dialog" }
|
|
149
|
+
buttonWithDialog: { role: "button", "aria-haspopup": "dialog" },
|
|
150
|
+
buttonWithMenu: { role: "button", "aria-haspopup": "menu" }
|
|
150
151
|
};
|
|
151
152
|
export const getAllyTriggerProps = (allyPattern) => ALLY_TRIGGER_PROPS[allyPattern];
|
|
@@ -902,7 +902,7 @@ export const DropdownRaw = props => {
|
|
|
902
902
|
if (searchField) {
|
|
903
903
|
return "comboboxWithDialog";
|
|
904
904
|
}
|
|
905
|
-
return "
|
|
905
|
+
return "buttonWithMenu";
|
|
906
906
|
}, [searchField, multiselect]);
|
|
907
907
|
if (isReadOnly) {
|
|
908
908
|
// TODO: how many items should we show?
|
|
@@ -982,7 +982,7 @@ export const DropdownRaw = props => {
|
|
|
982
982
|
isSearchInPopup: chip,
|
|
983
983
|
mobileSheetStackingClassName: mobileSheetStackingClassName,
|
|
984
984
|
handleFocusOnSentinelItem: handleFocusOnSentinelItem,
|
|
985
|
-
role: memoizedAllyPattern === "selectOnlyCombobox" ? false : "dialog",
|
|
985
|
+
role: memoizedAllyPattern === "selectOnlyCombobox" || memoizedAllyPattern === "buttonWithMenu" ? false : "dialog",
|
|
986
986
|
children: getPopupContent
|
|
987
987
|
})]
|
|
988
988
|
});
|
|
@@ -24,7 +24,7 @@ export interface IDropdownTrigger extends IZenComponentProps {
|
|
|
24
24
|
onBlur?: () => void;
|
|
25
25
|
popupId?: string;
|
|
26
26
|
handleFocusOnPopup?: () => void;
|
|
27
|
-
allyPattern?: "selectOnlyCombobox" | "comboboxWithDialog" | "buttonWithDialog";
|
|
27
|
+
allyPattern?: "selectOnlyCombobox" | "comboboxWithDialog" | "buttonWithDialog" | "buttonWithMenu";
|
|
28
28
|
}
|
|
29
29
|
export declare const DropdownTrigger: ({ name, onBlur, isActive, id, triggerRef, searchField, placeholder, disabled, fullWidth, currentSelection, handleClick, inputValue, className, onSearchChange, width, title, triggerAriaLabel, count, inputRef, buttonType, isError, popupId, handleFocusOnPopup, allyPattern, ...otherProps }: IDropdownTrigger) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
export declare const TRANSLATIONS: string[];
|
|
@@ -22,7 +22,7 @@ export const DropdownTrigger = (_a) => {
|
|
|
22
22
|
handleClick(!isActive);
|
|
23
23
|
};
|
|
24
24
|
const allyTriggerProps = useMemo(() => getAllyTriggerProps(allyPattern), [allyPattern]);
|
|
25
|
-
return (_jsx(_Fragment, { children: searchField ? (_jsx(DropdownSearchableTrigger, Object.assign({ value: inputValue || "", name: name, onChange: onSearchChange, isOpenPopup: isActive, inputRef: inputRef || elInpRef, handleClick: handleClick, handleFocusOnPopup: handleFocusOnPopup, ref: triggerRef, width: width, placeholder: placeholder, disabled: disabled, id: id, title: title, count: count, currentSelection: currentSelection, className: className, isError: isError, fullWidth: fullWidth, popupId: popupId }, otherProps))) : (_jsx(FilterButton, Object.assign({ ref: triggerRef, id: id, name: name, onBlur: onBlur, className: classNames(["zen-dropdown__trigger-button", isError ? "zen-dropdown__trigger-button--error" : "", className || ""]), onClick: handleButtonClick, disabled: disabled, isActive: isActive, fullWidth: width ? true : fullWidth, maxWidth: width, minWidth: width, quantity: count || undefined, type: buttonType, title: title, ariaLabel: triggerAriaLabel || placeholder, "aria-expanded": isActive, "aria-controls": popupId }, allyTriggerProps, otherProps, { children: currentSelection ? (_jsx("span", { className: classNames([
|
|
25
|
+
return (_jsx(_Fragment, { children: searchField ? (_jsx(DropdownSearchableTrigger, Object.assign({ value: inputValue || "", name: name, onChange: onSearchChange, isOpenPopup: isActive, inputRef: inputRef || elInpRef, handleClick: handleClick, handleFocusOnPopup: handleFocusOnPopup, ref: triggerRef, width: width, placeholder: placeholder, disabled: disabled, id: id, title: title, count: count, currentSelection: currentSelection, className: className, isError: isError, fullWidth: fullWidth, popupId: popupId }, otherProps))) : (_jsx(FilterButton, Object.assign({ ref: triggerRef, id: id, name: name, onBlur: onBlur, className: classNames(["zen-dropdown__trigger-button", isError ? "zen-dropdown__trigger-button--error" : "", className || ""]), onClick: handleButtonClick, disabled: disabled, isActive: isActive, fullWidth: width ? true : fullWidth, maxWidth: width, minWidth: width, quantity: count || undefined, type: buttonType, title: title, ariaLabel: triggerAriaLabel || currentSelection || placeholder, "aria-expanded": isActive, "aria-controls": popupId }, allyTriggerProps, otherProps, { children: currentSelection ? (_jsx("span", { className: classNames([
|
|
26
26
|
"zen-dropdown__trigger-button-text",
|
|
27
27
|
buttonType ? `zen-dropdown__trigger-button-text--${buttonType.toString()}` : ""
|
|
28
28
|
]), children: currentSelection })) : (placeholder) }))) }));
|
|
@@ -38,7 +38,7 @@ injectString("zh-TW", "Uploaded", "Uploaded");
|
|
|
38
38
|
injectString("ro-RO", "Uploaded", "Uploaded");
|
|
39
39
|
injectString("ar-SA", "Uploaded", "\u062A\u0645 \u0627\u0644\u0631\u0641\u0639");
|
|
40
40
|
injectString("cs", "Remove", "Odebrat");
|
|
41
|
-
injectString("da-DK", "Remove", "
|
|
41
|
+
injectString("da-DK", "Remove", "Fjern");
|
|
42
42
|
injectString("de", "Remove", "Entfernen");
|
|
43
43
|
injectString("en", "Remove", "Remove");
|
|
44
44
|
injectString("es", "Remove", "Eliminar");
|
|
@@ -60,9 +60,9 @@ injectString("sk-SK", "Remove", "Odstr\xE1ni\u0165");
|
|
|
60
60
|
injectString("sv", "Remove", "Ta bort");
|
|
61
61
|
injectString("th", "Remove", "\u0E25\u0E1A");
|
|
62
62
|
injectString("tr", "Remove", "Kald\u0131r");
|
|
63
|
-
injectString("zh-Hans", "Remove", "\
|
|
63
|
+
injectString("zh-Hans", "Remove", "\u79FB\u9664");
|
|
64
64
|
injectString("zh-TW", "Remove", "\u79FB\u9664");
|
|
65
|
-
injectString("ro-RO", "Remove", "
|
|
65
|
+
injectString("ro-RO", "Remove", "Elimin\u0103");
|
|
66
66
|
injectString("ar-SA", "Remove", "\u0625\u0632\u0627\u0644\u0629");
|
|
67
67
|
const getFileIcon = file => {
|
|
68
68
|
var _a;
|
|
@@ -152,7 +152,7 @@ injectString("zh-TW", "This filter is currently applied.", "This filter is curre
|
|
|
152
152
|
injectString("ro-RO", "This filter is currently applied.", "This filter is currently applied.");
|
|
153
153
|
injectString("ar-SA", "This filter is currently applied.", "\u0647\u0630\u0647 \u0627\u0644\u062A\u0635\u0641\u064A\u0629 \u0645\u0637\u0628\u0642\u0629 \u062D\u0627\u0644\u064A\u0627\u064B.");
|
|
154
154
|
injectString("cs", "Remove", "Odebrat");
|
|
155
|
-
injectString("da-DK", "Remove", "
|
|
155
|
+
injectString("da-DK", "Remove", "Fjern");
|
|
156
156
|
injectString("de", "Remove", "Entfernen");
|
|
157
157
|
injectString("en", "Remove", "Remove");
|
|
158
158
|
injectString("es", "Remove", "Eliminar");
|
|
@@ -174,9 +174,9 @@ injectString("sk-SK", "Remove", "Odstr\xE1ni\u0165");
|
|
|
174
174
|
injectString("sv", "Remove", "Ta bort");
|
|
175
175
|
injectString("th", "Remove", "\u0E25\u0E1A");
|
|
176
176
|
injectString("tr", "Remove", "Kald\u0131r");
|
|
177
|
-
injectString("zh-Hans", "Remove", "\
|
|
177
|
+
injectString("zh-Hans", "Remove", "\u79FB\u9664");
|
|
178
178
|
injectString("zh-TW", "Remove", "\u79FB\u9664");
|
|
179
|
-
injectString("ro-RO", "Remove", "
|
|
179
|
+
injectString("ro-RO", "Remove", "Elimin\u0103");
|
|
180
180
|
injectString("ar-SA", "Remove", "\u0625\u0632\u0627\u0644\u0629");
|
|
181
181
|
injectString("cs", "Remove filter", "Odebrat filtr");
|
|
182
182
|
injectString("da-DK", "Remove filter", "Fjern filter");
|
|
@@ -6,7 +6,7 @@ import { Button } from "../../button/button";
|
|
|
6
6
|
import { classNames } from "../../commonHelpers/classNames/classNames";
|
|
7
7
|
import { IconClose } from "../../icons/iconClose";
|
|
8
8
|
injectString("cs", "Remove", "Odebrat");
|
|
9
|
-
injectString("da-DK", "Remove", "
|
|
9
|
+
injectString("da-DK", "Remove", "Fjern");
|
|
10
10
|
injectString("de", "Remove", "Entfernen");
|
|
11
11
|
injectString("en", "Remove", "Remove");
|
|
12
12
|
injectString("es", "Remove", "Eliminar");
|
|
@@ -28,9 +28,9 @@ injectString("sk-SK", "Remove", "Odstr\xE1ni\u0165");
|
|
|
28
28
|
injectString("sv", "Remove", "Ta bort");
|
|
29
29
|
injectString("th", "Remove", "\u0E25\u0E1A");
|
|
30
30
|
injectString("tr", "Remove", "Kald\u0131r");
|
|
31
|
-
injectString("zh-Hans", "Remove", "\
|
|
31
|
+
injectString("zh-Hans", "Remove", "\u79FB\u9664");
|
|
32
32
|
injectString("zh-TW", "Remove", "\u79FB\u9664");
|
|
33
|
-
injectString("ro-RO", "Remove", "
|
|
33
|
+
injectString("ro-RO", "Remove", "Elimin\u0103");
|
|
34
34
|
injectString("ar-SA", "Remove", "\u0625\u0632\u0627\u0644\u0629");
|
|
35
35
|
const SearchItemContent = ({
|
|
36
36
|
icon,
|
|
@@ -222,10 +222,10 @@ injectString("da-DK", "Close", "Luk");
|
|
|
222
222
|
injectString("de", "Close", "Schlie\xDFen");
|
|
223
223
|
injectString("en", "Close", "Close");
|
|
224
224
|
injectString("es", "Close", "Cerrar");
|
|
225
|
-
injectString("fi-FI", "Close", "
|
|
225
|
+
injectString("fi-FI", "Close", "Sulkea");
|
|
226
226
|
injectString("fr", "Close", "Fermer");
|
|
227
227
|
injectString("fr-FR", "Close", "Fermer");
|
|
228
|
-
injectString("hu-HU", "Close", "
|
|
228
|
+
injectString("hu-HU", "Close", "Bez\xE1r\xE1s");
|
|
229
229
|
injectString("id", "Close", "Tutup");
|
|
230
230
|
injectString("it", "Close", "Chiudere");
|
|
231
231
|
injectString("ja", "Close", "\u9589\u3058\u308B");
|
|
@@ -236,13 +236,13 @@ injectString("nl", "Close", "Sluiten");
|
|
|
236
236
|
injectString("pl", "Close", "Zamknij");
|
|
237
237
|
injectString("pt-BR", "Close", "Fechar");
|
|
238
238
|
injectString("pt-PT", "Close", "Fechar");
|
|
239
|
-
injectString("sk-SK", "Close", "
|
|
239
|
+
injectString("sk-SK", "Close", "Zatvori\u0165");
|
|
240
240
|
injectString("sv", "Close", "St\xE4ng");
|
|
241
241
|
injectString("th", "Close", "\u0E1B\u0E34\u0E14");
|
|
242
242
|
injectString("tr", "Close", "Kapat");
|
|
243
243
|
injectString("zh-Hans", "Close", "\u5173\u95ED");
|
|
244
244
|
injectString("zh-TW", "Close", "\u95DC\u9589");
|
|
245
|
-
injectString("ro-RO", "Close", "\xCEnchide
|
|
245
|
+
injectString("ro-RO", "Close", "\xCEnchide");
|
|
246
246
|
injectString("ar-SA", "Close", "\u0625\u063A\u0644\u0627\u0642");
|
|
247
247
|
const SELECTED_TAB_ID = "Selected";
|
|
248
248
|
const getSelectedOption = translate => ({
|
|
@@ -136,10 +136,10 @@ injectString("da-DK", "Close", "Luk");
|
|
|
136
136
|
injectString("de", "Close", "Schlie\xDFen");
|
|
137
137
|
injectString("en", "Close", "Close");
|
|
138
138
|
injectString("es", "Close", "Cerrar");
|
|
139
|
-
injectString("fi-FI", "Close", "
|
|
139
|
+
injectString("fi-FI", "Close", "Sulkea");
|
|
140
140
|
injectString("fr", "Close", "Fermer");
|
|
141
141
|
injectString("fr-FR", "Close", "Fermer");
|
|
142
|
-
injectString("hu-HU", "Close", "
|
|
142
|
+
injectString("hu-HU", "Close", "Bez\xE1r\xE1s");
|
|
143
143
|
injectString("id", "Close", "Tutup");
|
|
144
144
|
injectString("it", "Close", "Chiudere");
|
|
145
145
|
injectString("ja", "Close", "\u9589\u3058\u308B");
|
|
@@ -150,13 +150,13 @@ injectString("nl", "Close", "Sluiten");
|
|
|
150
150
|
injectString("pl", "Close", "Zamknij");
|
|
151
151
|
injectString("pt-BR", "Close", "Fechar");
|
|
152
152
|
injectString("pt-PT", "Close", "Fechar");
|
|
153
|
-
injectString("sk-SK", "Close", "
|
|
153
|
+
injectString("sk-SK", "Close", "Zatvori\u0165");
|
|
154
154
|
injectString("sv", "Close", "St\xE4ng");
|
|
155
155
|
injectString("th", "Close", "\u0E1B\u0E34\u0E14");
|
|
156
156
|
injectString("tr", "Close", "Kapat");
|
|
157
157
|
injectString("zh-Hans", "Close", "\u5173\u95ED");
|
|
158
158
|
injectString("zh-TW", "Close", "\u95DC\u9589");
|
|
159
|
-
injectString("ro-RO", "Close", "\xCEnchide
|
|
159
|
+
injectString("ro-RO", "Close", "\xCEnchide");
|
|
160
160
|
injectString("ar-SA", "Close", "\u0625\u063A\u0644\u0627\u0642");
|
|
161
161
|
const getChangeHandlers = children => {
|
|
162
162
|
const handlers = {};
|