@geotab/zenith 3.9.1 → 3.10.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- 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/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/commonStyles/rangeFieldMixin.less +9 -9
- 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/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 +539 -493
- 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/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/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/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/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/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/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 +3 -1
package/README.md
CHANGED
|
@@ -47,6 +47,17 @@ Zenith library provides components defined in Zenith Design System. It includes
|
|
|
47
47
|
|
|
48
48
|
## Change log
|
|
49
49
|
|
|
50
|
+
### 3.10.0
|
|
51
|
+
|
|
52
|
+
- Add `wrap` and `vertical` props to `ListItem`
|
|
53
|
+
- Add `data-analytics-id` prop to `Tab`, `TabItem`, and `Bookmark`
|
|
54
|
+
- `Nav` component: support show/hide separator between Core and Apps sections
|
|
55
|
+
- `Nav` empty state support
|
|
56
|
+
- Allow multiple columns to be disabled in `ColumnsList`
|
|
57
|
+
- Flip icons for Arabic (RTL) language
|
|
58
|
+
- `Dropdown` search and select-all improvements
|
|
59
|
+
- Fix system font fallback in Storybook pages
|
|
60
|
+
|
|
50
61
|
### 3.9.1
|
|
51
62
|
|
|
52
63
|
- Fix `GroupsButton` styles
|
|
@@ -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
|
const alertAnimation_1 = __importDefault(require("./components/alertAnimation"));
|
|
45
45
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
@@ -35,7 +35,7 @@ const AlertAnimation = ({ id, children, isOpen, animation }) => {
|
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
if (animation === "left-right") {
|
|
38
|
-
ref.current.animate([{
|
|
38
|
+
ref.current.animate([{ insetInlineStart: "0%" }, { insetInlineStart: "120%" }], {
|
|
39
39
|
duration: 300,
|
|
40
40
|
iterations: 1,
|
|
41
41
|
delay: 0,
|
|
@@ -46,7 +46,7 @@ const AlertAnimation = ({ id, children, isOpen, animation }) => {
|
|
|
46
46
|
};
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
|
-
ref.current.animate([{
|
|
49
|
+
ref.current.animate([{ insetInlineStart: "120%" }, { insetInlineStart: "0%" }], {
|
|
50
50
|
duration: 300,
|
|
51
51
|
iterations: 1,
|
|
52
52
|
delay: 0,
|
|
@@ -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
|
const bannerUtils_1 = require("./bannerUtils");
|
|
45
45
|
const useLanguage_1 = require("../utils/localization/useLanguage");
|
|
@@ -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
|
const button_1 = require("../button/button");
|
|
45
45
|
const buttonType_1 = require("../button/buttonType");
|
|
@@ -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[];
|
|
@@ -75,7 +75,8 @@ const iconBookmarkSelectedHover_1 = require("../icons/iconBookmarkSelectedHover"
|
|
|
75
75
|
const Bookmark = ({
|
|
76
76
|
className,
|
|
77
77
|
bookmarked,
|
|
78
|
-
onChange
|
|
78
|
+
onChange,
|
|
79
|
+
dataAnalyticsId
|
|
79
80
|
}) => {
|
|
80
81
|
const [isHovered, setIsHovered] = (0, react_1.useState)(false);
|
|
81
82
|
const {
|
|
@@ -108,7 +109,8 @@ const Bookmark = ({
|
|
|
108
109
|
iconSize: isDrive ? (0, svgIconSize_1.driveIconSize)("large") : "large",
|
|
109
110
|
iconClasses: `zen-page-bookmark__icon zen-page-bookmark__icon${bookmarked ? "--active" : "--inactive"}`,
|
|
110
111
|
"aria-label": title,
|
|
111
|
-
title: title
|
|
112
|
+
title: title,
|
|
113
|
+
dataAnalyticsId: dataAnalyticsId
|
|
112
114
|
})
|
|
113
115
|
});
|
|
114
116
|
};
|
|
@@ -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;
|
|
@@ -12,7 +12,7 @@ const menu_1 = require("../../../menu/menu");
|
|
|
12
12
|
const useDriveClassName_1 = require("../../../utils/theme/useDriveClassName");
|
|
13
13
|
const useDrive_1 = require("../../../utils/theme/useDrive");
|
|
14
14
|
const toKebabCase_1 = require("../../../utils/toKebabCase");
|
|
15
|
-
const CardButton = ({ children, disabled = false, icon, name, onClick, link, className, target: linkTarget, dataAnalyticsId }) => {
|
|
15
|
+
const CardButton = ({ children, disabled = false, icon, name, onClick, link, className, target: linkTarget, dataAnalyticsId, ariaLabel }) => {
|
|
16
16
|
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
17
17
|
const triggerRef = (0, react_1.useRef)(null);
|
|
18
18
|
const content = [];
|
|
@@ -32,9 +32,9 @@ const CardButton = ({ children, disabled = false, icon, name, onClick, link, cla
|
|
|
32
32
|
}
|
|
33
33
|
onClick === null || onClick === void 0 ? void 0 : onClick(...args);
|
|
34
34
|
};
|
|
35
|
-
const renderLink = () => ((0, jsx_runtime_1.jsxs)(button_1.Button, { disabled: disabled, type: "tertiary", link: link, target: linkTarget, title: name, dataAnalyticsId: analyticsId, className: (0, classNames_1.classNames)([className || "", "zen-card-button", "zen-caption", cardButtonDriveClasses || ""]), children: [icon && (0, react_1.createElement)(icon, { size: isDrive ? "huge" : "large", className: "zen-caption__pre-content" }), (0, jsx_runtime_1.jsx)("span", { className: "zen-caption__content", children: name })] }));
|
|
35
|
+
const renderLink = () => ((0, jsx_runtime_1.jsxs)(button_1.Button, { disabled: disabled, type: "tertiary", link: link, target: linkTarget, title: name, ariaLabel: ariaLabel, dataAnalyticsId: analyticsId, className: (0, classNames_1.classNames)([className || "", "zen-card-button", "zen-caption", cardButtonDriveClasses || ""]), children: [icon && (0, react_1.createElement)(icon, { size: isDrive ? "huge" : "large", className: "zen-caption__pre-content" }), (0, jsx_runtime_1.jsx)("span", { className: "zen-caption__content", children: name })] }));
|
|
36
36
|
const renderButton = () => {
|
|
37
|
-
const trigger = ((0, jsx_runtime_1.jsxs)(button_1.Button, { htmlType: "button", ref: triggerRef, disabled: disabled, type: "tertiary", onClick: onButtonClickHandler, title: name, dataAnalyticsId: analyticsId, className: (0, classNames_1.classNames)([className || "", "zen-card-button", "zen-caption", cardButtonDriveClasses || ""]), children: [icon && (0, react_1.createElement)(icon, { size: isDrive ? "huge" : "large", className: "zen-caption__pre-content" }), (0, jsx_runtime_1.jsx)("span", { className: "zen-caption__content", children: name }), !!content.length &&
|
|
37
|
+
const trigger = ((0, jsx_runtime_1.jsxs)(button_1.Button, { htmlType: "button", ref: triggerRef, disabled: disabled, type: "tertiary", onClick: onButtonClickHandler, title: name, ariaLabel: ariaLabel, dataAnalyticsId: analyticsId, className: (0, classNames_1.classNames)([className || "", "zen-card-button", "zen-caption", cardButtonDriveClasses || ""]), children: [icon && (0, react_1.createElement)(icon, { size: isDrive ? "huge" : "large", className: "zen-caption__pre-content" }), (0, jsx_runtime_1.jsx)("span", { className: "zen-caption__content", children: name }), !!content.length &&
|
|
38
38
|
(isOpen ? ((0, jsx_runtime_1.jsx)(iconChevronTopSmall_1.IconChevronTopSmall, { size: isDrive ? "huge" : "large", className: "zen-caption__post-content" })) : ((0, jsx_runtime_1.jsx)(iconChevronDownSmall_1.IconChevronDownSmall, { size: isDrive ? "huge" : "large", className: "zen-caption__post-content" })))] }));
|
|
39
39
|
return content.length ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [trigger, (0, jsx_runtime_1.jsx)(controlledMenu_1.ControlledMenu, { title: name, isOpen: isOpen, setIsOpen: setIsOpen, triggerRef: triggerRef, children: content })] })) : (trigger);
|
|
40
40
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: minmax(min-content, auto) minmax(auto, 168px) minmax(0, auto);
|
|
4
4
|
grid-template-rows: auto auto;
|
|
5
|
-
gap:
|
|
5
|
+
gap: (4 / @rem) (8 / @rem);
|
|
6
6
|
align-items: center;
|
|
7
7
|
justify-items: start;
|
|
8
8
|
}
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
align-items: center;
|
|
13
13
|
justify-items: start;
|
|
14
14
|
grid-template-columns:
|
|
15
|
-
minmax(
|
|
16
|
-
minmax(
|
|
17
|
-
minmax(
|
|
18
|
-
minmax(
|
|
19
|
-
minmax(
|
|
20
|
-
minmax(
|
|
21
|
-
row-gap:
|
|
22
|
-
column-gap:
|
|
15
|
+
minmax((24 / @rem), (32 / @rem))
|
|
16
|
+
minmax((64 / @rem), (64 / @rem))
|
|
17
|
+
minmax((24 / @rem), (32 / @rem))
|
|
18
|
+
minmax((24 / @rem), (32 / @rem))
|
|
19
|
+
minmax((64 / @rem), (64 / @rem))
|
|
20
|
+
minmax((24 / @rem), (32 / @rem));
|
|
21
|
+
row-gap: (4 / @rem);
|
|
22
|
+
column-gap: (8 / @rem);
|
|
23
23
|
}
|
|
@@ -10,7 +10,7 @@ const useVisibleColumns = (columnsList, expanded, options) => {
|
|
|
10
10
|
secondaryColumns = expanded ? columnsList.slice(visibleColumns) : [];
|
|
11
11
|
return { mainColumns, secondaryColumns };
|
|
12
12
|
}
|
|
13
|
-
mainColumns = columnsList.slice(0, columnsList.length - collapsedColumnsQty);
|
|
13
|
+
mainColumns = columnsList.slice(0, Math.max(1, columnsList.length - collapsedColumnsQty));
|
|
14
14
|
secondaryColumns = expanded ? columnsList.slice(mainColumns.length) : [];
|
|
15
15
|
return { mainColumns, secondaryColumns };
|
|
16
16
|
};
|
|
@@ -9,8 +9,9 @@ const DEFAULT_META = {
|
|
|
9
9
|
visibleOnHover: false
|
|
10
10
|
};
|
|
11
11
|
const toBasicColumn = (column) => {
|
|
12
|
+
var _a;
|
|
12
13
|
const defaultColumn = (0, defaultColumnComponent_1.defaultColumnComponent)(column.id);
|
|
13
14
|
const columnComponent = column.columnComponent || defaultColumn;
|
|
14
|
-
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 });
|
|
15
|
+
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 });
|
|
15
16
|
};
|
|
16
17
|
exports.toBasicColumn = toBasicColumn;
|
|
@@ -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 {};
|
|
@@ -6,7 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const groupColumns_1 = require("../../extensions/groupColumns");
|
|
7
7
|
const selectList_1 = require("../../../selectList/selectList");
|
|
8
8
|
const checkboxState_1 = require("../../../checkbox/checkboxState");
|
|
9
|
-
const SubColumnsList = ({ title, columns, settings,
|
|
9
|
+
const SubColumnsList = ({ title, columns, settings, disabledColumns, onChange, sortColumns }) => {
|
|
10
10
|
const id = (0, react_1.useId)();
|
|
11
11
|
const sortColumnsInt = (0, react_1.useCallback)((a, b) => {
|
|
12
12
|
if (sortColumns) {
|
|
@@ -17,10 +17,10 @@ const SubColumnsList = ({ title, columns, settings, firstColumn, onChange, sortC
|
|
|
17
17
|
const items = (0, react_1.useMemo)(() => columns.sort(sortColumnsInt).map(c => ({
|
|
18
18
|
id: c.id,
|
|
19
19
|
title: c.title,
|
|
20
|
-
disabled: c.name
|
|
20
|
+
disabled: (disabledColumns === null || disabledColumns === void 0 ? void 0 : disabledColumns.includes(c.name)) || false,
|
|
21
21
|
showCheckbox: true,
|
|
22
22
|
children: c.title
|
|
23
|
-
})), [columns,
|
|
23
|
+
})), [columns, disabledColumns, sortColumnsInt]);
|
|
24
24
|
const state = columns.reduce((res, c) => {
|
|
25
25
|
res.set(c.id, settings.get(c.name) !== false ? checkboxState_1.CheckboxState.On : checkboxState_1.CheckboxState.Off);
|
|
26
26
|
return res;
|
|
@@ -39,7 +39,7 @@ const SubColumnsList = ({ title, columns, settings, firstColumn, onChange, sortC
|
|
|
39
39
|
}
|
|
40
40
|
return ((0, jsx_runtime_1.jsxs)("div", { className: "zen-columns-list__sub-section", children: [(0, jsx_runtime_1.jsx)("div", { className: "zen-columns-list__title zen-ellipsis", children: title }), list] }));
|
|
41
41
|
};
|
|
42
|
-
function ColumnSettingsList({ columns, settings,
|
|
42
|
+
function ColumnSettingsList({ columns, settings, disabledColumns, onChange, sortGroups, sortColumns }) {
|
|
43
43
|
const groupped = (0, groupColumns_1.groupColumns)(columns);
|
|
44
44
|
const sortGroupsInt = (0, react_1.useCallback)((a, b) => {
|
|
45
45
|
if (sortGroups) {
|
|
@@ -49,6 +49,6 @@ function ColumnSettingsList({ columns, settings, firstColumn, onChange, sortGrou
|
|
|
49
49
|
}, [sortGroups]);
|
|
50
50
|
return Array.from(groupped.entries())
|
|
51
51
|
.sort(sortGroupsInt)
|
|
52
|
-
.map(([title, cs]) => ((0, jsx_runtime_1.jsx)(SubColumnsList, { title: title, columns: cs, settings: settings,
|
|
52
|
+
.map(([title, cs]) => ((0, jsx_runtime_1.jsx)(SubColumnsList, { title: title, columns: cs, settings: settings, disabledColumns: disabledColumns, onChange: onChange, sortColumns: sortColumns }, cs.map(c => c.id).join("-"))));
|
|
53
53
|
}
|
|
54
54
|
exports.ColumnSettingsList = ColumnSettingsList;
|
|
@@ -13,6 +13,7 @@ const flexibleColumnWrapper_1 = require("./columns/flexibleColumnWrapper");
|
|
|
13
13
|
const columnSettings_1 = require("./components/columnSettings");
|
|
14
14
|
const columnSettingsList_1 = require("./components/columnSettingsList");
|
|
15
15
|
const columnSettingsSidePanel_1 = require("./components/columnSettingsSidePanel");
|
|
16
|
+
const emptySearchList_1 = require("../emptySearchList/emptySearchList");
|
|
16
17
|
const zen_1 = require("../../utils/zen");
|
|
17
18
|
// T - type of entity
|
|
18
19
|
// P - props of wrapped component
|
|
@@ -25,6 +26,7 @@ const withFlexibleColumns = (DataGridComponent) => {
|
|
|
25
26
|
const [isPanelOpen, setIsPanelOpen] = (0, react_1.useState)(false);
|
|
26
27
|
const allColumns = (0, react_1.useMemo)(() => columns.map(column => (Object.assign(Object.assign({}, (0, toBasicColumn_1.toBasicColumn)(Object.assign({}, column))), { visible: column.visible !== false, group: column.group || "" }))), [columns]);
|
|
27
28
|
const columnsSettings = (0, react_1.useMemo)(() => (0, flexibleColumnsStorage_1.mergeColumnsSettings)(allColumns, options.columnsSettings || settingsStore.getItem()), [allColumns, options.columnsSettings, settingsStore]);
|
|
29
|
+
const hasConfigurableColumns = (0, react_1.useMemo)(() => allColumns.filter(c => c.title).some(c => !c.alwaysVisible), [allColumns]);
|
|
28
30
|
const visibleColumns = (0, react_1.useMemo)(() => {
|
|
29
31
|
const visibleColumnsMap = new Map(allColumns.map(c => [c.name, c]));
|
|
30
32
|
return columnsSettings
|
|
@@ -66,10 +68,12 @@ const withFlexibleColumns = (DataGridComponent) => {
|
|
|
66
68
|
}, 0);
|
|
67
69
|
}), [settingsStore]);
|
|
68
70
|
const listOfColumns = (0, react_1.useMemo)(() => {
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
+
const configurableColumnNames = new Set(allColumns.filter(c => c.title).map(c => c.name));
|
|
72
|
+
const visibleConfigurableSettings = columnsSettings.filter(s => s.visible && configurableColumnNames.has(s.name));
|
|
73
|
+
const lastVisibleColumn = visibleConfigurableSettings.length === 1 ? [visibleConfigurableSettings[0].name] : [];
|
|
74
|
+
const disabledColumns = [...allColumns.filter(c => c.alwaysVisible).map(c => c.name), ...lastVisibleColumn];
|
|
71
75
|
const columnSettingsMap = new Map(columnsSettings.map(s => [s.name, s.visible]));
|
|
72
|
-
return ((0, jsx_runtime_1.jsx)(columnSettingsList_1.ColumnSettingsList, { columns: allColumns.filter(c => c.title), settings: columnSettingsMap,
|
|
76
|
+
return ((0, jsx_runtime_1.jsx)(columnSettingsList_1.ColumnSettingsList, { columns: allColumns.filter(c => c.title), settings: columnSettingsMap, disabledColumns: disabledColumns, onChange: async (newSettings) => {
|
|
73
77
|
const settings = columnsSettings.map(s => {
|
|
74
78
|
const visible = newSettings.get(s.name) !== false;
|
|
75
79
|
return Object.assign(Object.assign({}, s), { visible });
|
|
@@ -77,7 +81,7 @@ const withFlexibleColumns = (DataGridComponent) => {
|
|
|
77
81
|
await saveSettingsToTheStore(settings);
|
|
78
82
|
onChangeSettings(settings);
|
|
79
83
|
}, sortGroups: sortGroups, sortColumns: sortColumns }));
|
|
80
|
-
}, [columnsSettings, allColumns, saveSettingsToTheStore, onChangeSettings,
|
|
84
|
+
}, [columnsSettings, allColumns, saveSettingsToTheStore, onChangeSettings, sortGroups, sortColumns]);
|
|
81
85
|
const onReorderListener = (0, react_1.useCallback)(async ([from, to]) => {
|
|
82
86
|
if (from === to) {
|
|
83
87
|
return;
|
|
@@ -137,10 +141,15 @@ const withFlexibleColumns = (DataGridComponent) => {
|
|
|
137
141
|
onResetSettings();
|
|
138
142
|
setIsPanelOpen(false);
|
|
139
143
|
}, [onResetSettings, saveSettingsToTheStore]);
|
|
140
|
-
|
|
144
|
+
(0, react_1.useEffect)(() => {
|
|
145
|
+
if (popupTriggerRef === null || popupTriggerRef === void 0 ? void 0 : popupTriggerRef.current) {
|
|
146
|
+
popupTriggerRef.current.style.display = hasConfigurableColumns ? "" : "none";
|
|
147
|
+
}
|
|
148
|
+
}, [popupTriggerRef, hasConfigurableColumns]);
|
|
149
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [popupTriggerRef && hasConfigurableColumns ? (options.isFeed ? ((0, jsx_runtime_1.jsx)(columnSettingsSidePanel_1.ColumnSettingsSidePanel, { triggerRef: popupTriggerRef, isOpen: isPanelOpen, onOpen: () => setIsPanelOpen(true), onClose: () => setIsPanelOpen(false), onReset: onResetListener, children: (0, jsx_runtime_1.jsx)(columnSettings_1.ColumnSettings, { onReset: onResetListener, showFooter: false, children: listOfColumns }) })) : ((0, jsx_runtime_1.jsx)(popup_1.Popup, { triggerRef: popupTriggerRef, alignment: "bottom-right", children: (0, jsx_runtime_1.jsx)(columnSettings_1.ColumnSettings, { onReset: onResetListener, children: listOfColumns }) }, "flexible-popup"))) : null, visibleColumns.length === 0 && hasConfigurableColumns ? ((0, jsx_runtime_1.jsx)("div", { className: "zen-data-grid__empty", children: (0, jsx_runtime_1.jsx)(emptySearchList_1.EmptySearchList, {}) })) : ((0, jsx_runtime_1.jsx)(DataGridComponent, Object.assign({}, props, { columns: [...visibleColumns], ref: gridRef }), "grid"))] }));
|
|
141
150
|
};
|
|
142
151
|
FlexibleColumnsComponent.displayName = `withFlexibleColumns(${DataGridComponent.displayName || DataGridComponent.name || "Component"})`;
|
|
143
152
|
return FlexibleColumnsComponent;
|
|
144
153
|
};
|
|
145
154
|
exports.withFlexibleColumns = withFlexibleColumns;
|
|
146
|
-
exports.withFlexibleColumns.translations = [...columnSettings_1.ColumnSettings.translations, ...columnSettingsSidePanel_1.ColumnSettingsSidePanel.translations];
|
|
155
|
+
exports.withFlexibleColumns.translations = [...columnSettings_1.ColumnSettings.translations, ...columnSettingsSidePanel_1.ColumnSettingsSidePanel.translations, ...emptySearchList_1.EmptySearchList.translations];
|
|
@@ -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
|
const dialogHelpers_1 = require("./dialogHelpers");
|
|
41
41
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
@@ -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
|
};
|
|
@@ -167,7 +167,8 @@ exports.getSelectedCount = getSelectedCount;
|
|
|
167
167
|
const ALLY_TRIGGER_PROPS = {
|
|
168
168
|
selectOnlyCombobox: { role: "combobox", "aria-haspopup": "listbox" },
|
|
169
169
|
comboboxWithDialog: { role: "combobox", "aria-haspopup": "dialog" },
|
|
170
|
-
buttonWithDialog: { role: "button", "aria-haspopup": "dialog" }
|
|
170
|
+
buttonWithDialog: { role: "button", "aria-haspopup": "dialog" },
|
|
171
|
+
buttonWithMenu: { role: "button", "aria-haspopup": "menu" }
|
|
171
172
|
};
|
|
172
173
|
const getAllyTriggerProps = (allyPattern) => ALLY_TRIGGER_PROPS[allyPattern];
|
|
173
174
|
exports.getAllyTriggerProps = getAllyTriggerProps;
|
|
@@ -910,7 +910,7 @@ const DropdownRaw = props => {
|
|
|
910
910
|
if (searchField) {
|
|
911
911
|
return "comboboxWithDialog";
|
|
912
912
|
}
|
|
913
|
-
return "
|
|
913
|
+
return "buttonWithMenu";
|
|
914
914
|
}, [searchField, multiselect]);
|
|
915
915
|
if (isReadOnly) {
|
|
916
916
|
// TODO: how many items should we show?
|
|
@@ -990,7 +990,7 @@ const DropdownRaw = props => {
|
|
|
990
990
|
isSearchInPopup: chip,
|
|
991
991
|
mobileSheetStackingClassName: mobileSheetStackingClassName,
|
|
992
992
|
handleFocusOnSentinelItem: handleFocusOnSentinelItem,
|
|
993
|
-
role: memoizedAllyPattern === "selectOnlyCombobox" ? false : "dialog",
|
|
993
|
+
role: memoizedAllyPattern === "selectOnlyCombobox" || memoizedAllyPattern === "buttonWithMenu" ? false : "dialog",
|
|
994
994
|
children: getPopupContent
|
|
995
995
|
})]
|
|
996
996
|
});
|
|
@@ -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[];
|
|
@@ -25,7 +25,7 @@ const DropdownTrigger = (_a) => {
|
|
|
25
25
|
handleClick(!isActive);
|
|
26
26
|
};
|
|
27
27
|
const allyTriggerProps = (0, react_1.useMemo)(() => (0, dropdownHelper_1.getAllyTriggerProps)(allyPattern), [allyPattern]);
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: searchField ? ((0, jsx_runtime_1.jsx)(dropdownSearchableTrigger_1.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))) : ((0, jsx_runtime_1.jsx)(filterButton_1.FilterButton, Object.assign({ ref: triggerRef, id: id, name: name, onBlur: onBlur, className: (0, classNames_1.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 ? ((0, jsx_runtime_1.jsx)("span", { className: (0, classNames_1.classNames)([
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: searchField ? ((0, jsx_runtime_1.jsx)(dropdownSearchableTrigger_1.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))) : ((0, jsx_runtime_1.jsx)(filterButton_1.FilterButton, Object.assign({ ref: triggerRef, id: id, name: name, onBlur: onBlur, className: (0, classNames_1.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 ? ((0, jsx_runtime_1.jsx)("span", { className: (0, classNames_1.classNames)([
|
|
29
29
|
"zen-dropdown__trigger-button-text",
|
|
30
30
|
buttonType ? `zen-dropdown__trigger-button-text--${buttonType.toString()}` : ""
|
|
31
31
|
]), children: currentSelection })) : (placeholder) }))) }));
|
|
@@ -46,7 +46,7 @@ injectString("zh-TW", "Uploaded", "Uploaded");
|
|
|
46
46
|
injectString("ro-RO", "Uploaded", "Uploaded");
|
|
47
47
|
injectString("ar-SA", "Uploaded", "\u062A\u0645 \u0627\u0644\u0631\u0641\u0639");
|
|
48
48
|
injectString("cs", "Remove", "Odebrat");
|
|
49
|
-
injectString("da-DK", "Remove", "
|
|
49
|
+
injectString("da-DK", "Remove", "Fjern");
|
|
50
50
|
injectString("de", "Remove", "Entfernen");
|
|
51
51
|
injectString("en", "Remove", "Remove");
|
|
52
52
|
injectString("es", "Remove", "Eliminar");
|
|
@@ -68,9 +68,9 @@ injectString("sk-SK", "Remove", "Odstr\xE1ni\u0165");
|
|
|
68
68
|
injectString("sv", "Remove", "Ta bort");
|
|
69
69
|
injectString("th", "Remove", "\u0E25\u0E1A");
|
|
70
70
|
injectString("tr", "Remove", "Kald\u0131r");
|
|
71
|
-
injectString("zh-Hans", "Remove", "\
|
|
71
|
+
injectString("zh-Hans", "Remove", "\u79FB\u9664");
|
|
72
72
|
injectString("zh-TW", "Remove", "\u79FB\u9664");
|
|
73
|
-
injectString("ro-RO", "Remove", "
|
|
73
|
+
injectString("ro-RO", "Remove", "Elimin\u0103");
|
|
74
74
|
injectString("ar-SA", "Remove", "\u0625\u0632\u0627\u0644\u0629");
|
|
75
75
|
const getFileIcon = file => {
|
|
76
76
|
var _a;
|
|
@@ -154,7 +154,7 @@ injectString("zh-TW", "This filter is currently applied.", "This filter is curre
|
|
|
154
154
|
injectString("ro-RO", "This filter is currently applied.", "This filter is currently applied.");
|
|
155
155
|
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.");
|
|
156
156
|
injectString("cs", "Remove", "Odebrat");
|
|
157
|
-
injectString("da-DK", "Remove", "
|
|
157
|
+
injectString("da-DK", "Remove", "Fjern");
|
|
158
158
|
injectString("de", "Remove", "Entfernen");
|
|
159
159
|
injectString("en", "Remove", "Remove");
|
|
160
160
|
injectString("es", "Remove", "Eliminar");
|
|
@@ -176,9 +176,9 @@ injectString("sk-SK", "Remove", "Odstr\xE1ni\u0165");
|
|
|
176
176
|
injectString("sv", "Remove", "Ta bort");
|
|
177
177
|
injectString("th", "Remove", "\u0E25\u0E1A");
|
|
178
178
|
injectString("tr", "Remove", "Kald\u0131r");
|
|
179
|
-
injectString("zh-Hans", "Remove", "\
|
|
179
|
+
injectString("zh-Hans", "Remove", "\u79FB\u9664");
|
|
180
180
|
injectString("zh-TW", "Remove", "\u79FB\u9664");
|
|
181
|
-
injectString("ro-RO", "Remove", "
|
|
181
|
+
injectString("ro-RO", "Remove", "Elimin\u0103");
|
|
182
182
|
injectString("ar-SA", "Remove", "\u0625\u0632\u0627\u0644\u0629");
|
|
183
183
|
injectString("cs", "Remove filter", "Odebrat filtr");
|
|
184
184
|
injectString("da-DK", "Remove filter", "Fjern filter");
|
|
@@ -14,7 +14,7 @@ const button_1 = require("../../button/button");
|
|
|
14
14
|
const classNames_1 = require("../../commonHelpers/classNames/classNames");
|
|
15
15
|
const iconClose_1 = require("../../icons/iconClose");
|
|
16
16
|
injectString("cs", "Remove", "Odebrat");
|
|
17
|
-
injectString("da-DK", "Remove", "
|
|
17
|
+
injectString("da-DK", "Remove", "Fjern");
|
|
18
18
|
injectString("de", "Remove", "Entfernen");
|
|
19
19
|
injectString("en", "Remove", "Remove");
|
|
20
20
|
injectString("es", "Remove", "Eliminar");
|
|
@@ -36,9 +36,9 @@ injectString("sk-SK", "Remove", "Odstr\xE1ni\u0165");
|
|
|
36
36
|
injectString("sv", "Remove", "Ta bort");
|
|
37
37
|
injectString("th", "Remove", "\u0E25\u0E1A");
|
|
38
38
|
injectString("tr", "Remove", "Kald\u0131r");
|
|
39
|
-
injectString("zh-Hans", "Remove", "\
|
|
39
|
+
injectString("zh-Hans", "Remove", "\u79FB\u9664");
|
|
40
40
|
injectString("zh-TW", "Remove", "\u79FB\u9664");
|
|
41
|
-
injectString("ro-RO", "Remove", "
|
|
41
|
+
injectString("ro-RO", "Remove", "Elimin\u0103");
|
|
42
42
|
injectString("ar-SA", "Remove", "\u0625\u0632\u0627\u0644\u0629");
|
|
43
43
|
const SearchItemContent = ({
|
|
44
44
|
icon,
|
|
@@ -229,10 +229,10 @@ injectString("da-DK", "Close", "Luk");
|
|
|
229
229
|
injectString("de", "Close", "Schlie\xDFen");
|
|
230
230
|
injectString("en", "Close", "Close");
|
|
231
231
|
injectString("es", "Close", "Cerrar");
|
|
232
|
-
injectString("fi-FI", "Close", "
|
|
232
|
+
injectString("fi-FI", "Close", "Sulkea");
|
|
233
233
|
injectString("fr", "Close", "Fermer");
|
|
234
234
|
injectString("fr-FR", "Close", "Fermer");
|
|
235
|
-
injectString("hu-HU", "Close", "
|
|
235
|
+
injectString("hu-HU", "Close", "Bez\xE1r\xE1s");
|
|
236
236
|
injectString("id", "Close", "Tutup");
|
|
237
237
|
injectString("it", "Close", "Chiudere");
|
|
238
238
|
injectString("ja", "Close", "\u9589\u3058\u308B");
|
|
@@ -243,13 +243,13 @@ injectString("nl", "Close", "Sluiten");
|
|
|
243
243
|
injectString("pl", "Close", "Zamknij");
|
|
244
244
|
injectString("pt-BR", "Close", "Fechar");
|
|
245
245
|
injectString("pt-PT", "Close", "Fechar");
|
|
246
|
-
injectString("sk-SK", "Close", "
|
|
246
|
+
injectString("sk-SK", "Close", "Zatvori\u0165");
|
|
247
247
|
injectString("sv", "Close", "St\xE4ng");
|
|
248
248
|
injectString("th", "Close", "\u0E1B\u0E34\u0E14");
|
|
249
249
|
injectString("tr", "Close", "Kapat");
|
|
250
250
|
injectString("zh-Hans", "Close", "\u5173\u95ED");
|
|
251
251
|
injectString("zh-TW", "Close", "\u95DC\u9589");
|
|
252
|
-
injectString("ro-RO", "Close", "\xCEnchide
|
|
252
|
+
injectString("ro-RO", "Close", "\xCEnchide");
|
|
253
253
|
injectString("ar-SA", "Close", "\u0625\u063A\u0644\u0627\u0642");
|
|
254
254
|
const zen_1 = require("../../utils/zen");
|
|
255
255
|
const SELECTED_TAB_ID = "Selected";
|
|
@@ -137,10 +137,10 @@ injectString("da-DK", "Close", "Luk");
|
|
|
137
137
|
injectString("de", "Close", "Schlie\xDFen");
|
|
138
138
|
injectString("en", "Close", "Close");
|
|
139
139
|
injectString("es", "Close", "Cerrar");
|
|
140
|
-
injectString("fi-FI", "Close", "
|
|
140
|
+
injectString("fi-FI", "Close", "Sulkea");
|
|
141
141
|
injectString("fr", "Close", "Fermer");
|
|
142
142
|
injectString("fr-FR", "Close", "Fermer");
|
|
143
|
-
injectString("hu-HU", "Close", "
|
|
143
|
+
injectString("hu-HU", "Close", "Bez\xE1r\xE1s");
|
|
144
144
|
injectString("id", "Close", "Tutup");
|
|
145
145
|
injectString("it", "Close", "Chiudere");
|
|
146
146
|
injectString("ja", "Close", "\u9589\u3058\u308B");
|
|
@@ -151,13 +151,13 @@ injectString("nl", "Close", "Sluiten");
|
|
|
151
151
|
injectString("pl", "Close", "Zamknij");
|
|
152
152
|
injectString("pt-BR", "Close", "Fechar");
|
|
153
153
|
injectString("pt-PT", "Close", "Fechar");
|
|
154
|
-
injectString("sk-SK", "Close", "
|
|
154
|
+
injectString("sk-SK", "Close", "Zatvori\u0165");
|
|
155
155
|
injectString("sv", "Close", "St\xE4ng");
|
|
156
156
|
injectString("th", "Close", "\u0E1B\u0E34\u0E14");
|
|
157
157
|
injectString("tr", "Close", "Kapat");
|
|
158
158
|
injectString("zh-Hans", "Close", "\u5173\u95ED");
|
|
159
159
|
injectString("zh-TW", "Close", "\u95DC\u9589");
|
|
160
|
-
injectString("ro-RO", "Close", "\xCEnchide
|
|
160
|
+
injectString("ro-RO", "Close", "\xCEnchide");
|
|
161
161
|
injectString("ar-SA", "Close", "\u0625\u063A\u0644\u0627\u0642");
|
|
162
162
|
const useUniqueId_1 = require("../../commonHelpers/useUniqueId");
|
|
163
163
|
const useBodyScroll_1 = require("../../utils/useBodyScroll");
|