@geotab/zenith 3.6.3 → 3.7.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.
Files changed (149) hide show
  1. package/README.md +15 -0
  2. package/dist/absolute/absolute.d.ts +3 -1
  3. package/dist/absolute/absolute.js +4 -4
  4. package/dist/checkbox/checkbox.d.ts +3 -1
  5. package/dist/checkbox/checkbox.js +5 -8
  6. package/dist/checkboxListWithAction/checkboxListWithAction.d.ts +3 -1
  7. package/dist/checkboxListWithAction/checkboxListWithAction.js +185 -3
  8. package/dist/controlledPopup/controlledPopup.d.ts +3 -1
  9. package/dist/controlledPopup/controlledPopup.js +2 -2
  10. package/dist/dropdown/dropdownPopup.d.ts +1 -1
  11. package/dist/dropdown/dropdownTrigger.d.ts +1 -1
  12. package/dist/dropdownRaw/dropdownList.d.ts +2 -1
  13. package/dist/dropdownRaw/dropdownList.js +15 -4
  14. package/dist/dropdownRaw/dropdownPopup.d.ts +3 -1
  15. package/dist/dropdownRaw/dropdownPopup.js +35 -5
  16. package/dist/dropdownRaw/dropdownRaw.js +82 -7
  17. package/dist/dropdownRaw/dropdownSearchableTrigger.d.ts +2 -1
  18. package/dist/dropdownRaw/dropdownSearchableTrigger.js +7 -2
  19. package/dist/dropdownRaw/dropdownTrigger.d.ts +2 -1
  20. package/dist/dropdownRaw/dropdownTrigger.js +3 -5
  21. package/dist/footerButtons/footerButtons.d.ts +6 -4
  22. package/dist/footerButtons/footerButtons.js +3 -8
  23. package/dist/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +8 -2
  24. package/dist/groupsFilterRaw/groupsFilterInitialState.js +16 -0
  25. package/dist/groupsFilterRaw/groupsFilterRaw.js +43 -9
  26. package/dist/groupsFilterRaw/groupsFilterTrigger.d.ts +2 -1
  27. package/dist/groupsFilterRaw/groupsFilterTrigger.js +13 -2
  28. package/dist/index.css +222 -18
  29. package/dist/index.d.ts +1 -1
  30. package/dist/list/hooks/useDragAndDrop.d.ts +3 -1
  31. package/dist/list/hooks/useDragAndDrop.js +11 -4
  32. package/dist/menu/components/menuItem.js +12 -2
  33. package/dist/menu/contexts/pathContext.d.ts +3 -1
  34. package/dist/menu/contexts/pathProvider.d.ts +1 -1
  35. package/dist/menu/contexts/pathProvider.js +1 -1
  36. package/dist/menu/controlledMenu.js +97 -29
  37. package/dist/nav/nav.d.ts +2 -1
  38. package/dist/nav/nav.js +3 -2
  39. package/dist/nav/navEditList/navEditList.js +2 -1
  40. package/dist/nav/navItem/navItem.d.ts +1 -0
  41. package/dist/nav/navItem/navItem.js +4 -1
  42. package/dist/pillExpandable/pillContent.d.ts +2 -1
  43. package/dist/pillExpandable/pillContent.js +8 -3
  44. package/dist/pillExpandable/pillExpandable.d.ts +27 -4
  45. package/dist/pillExpandable/pillExpandable.js +426 -196
  46. package/dist/pillExpandable/pillExpandablePopoverContent.d.ts +19 -0
  47. package/dist/pillExpandable/pillExpandablePopoverContent.js +7 -0
  48. package/dist/pillExpandable/pillExpandableSimple.d.ts +5 -3
  49. package/dist/pillExpandable/pillExpandableSimple.js +12 -5
  50. package/dist/summary/summary.js +29 -1
  51. package/dist/summaryTile/summaryTile.d.ts +2 -1
  52. package/dist/summaryTile/summaryTile.js +175 -65
  53. package/dist/summaryTile/summaryTileTrigger.d.ts +1 -1
  54. package/dist/summaryTile/summaryTileTrigger.js +1 -1
  55. package/dist/toggleButtonRaw/toggleButtonRaw.js +2 -1
  56. package/dist/utils/localization/getSupportedLanguage.d.ts +2 -2
  57. package/dist/utils/localization/getSupportedLanguage.js +28 -8
  58. package/dist/utils/localization/languageContext.d.ts +1 -1
  59. package/dist/utils/localization/translations/cs.json +2 -1
  60. package/dist/utils/localization/translations/de.json +2 -1
  61. package/dist/utils/localization/translations/en.json +2 -1
  62. package/dist/utils/localization/translations/es.json +2 -1
  63. package/dist/utils/localization/translations/fr-FR.json +2 -1
  64. package/dist/utils/localization/translations/fr.json +2 -1
  65. package/dist/utils/localization/translations/id.json +2 -1
  66. package/dist/utils/localization/translations/it.json +2 -1
  67. package/dist/utils/localization/translations/ja.json +2 -1
  68. package/dist/utils/localization/translations/ms.json +2 -1
  69. package/dist/utils/localization/translations/nl.json +2 -1
  70. package/dist/utils/localization/translations/pl.json +2 -1
  71. package/dist/utils/localization/translations/pt-BR.json +2 -1
  72. package/dist/utils/localization/translations/sv.json +2 -1
  73. package/dist/utils/localization/translations/th.json +2 -1
  74. package/dist/utils/localization/translations/tr.json +2 -1
  75. package/dist/utils/localization/translations/zh-Hans.json +2 -1
  76. package/esm/absolute/absolute.d.ts +3 -1
  77. package/esm/absolute/absolute.js +4 -4
  78. package/esm/checkbox/checkbox.d.ts +3 -1
  79. package/esm/checkbox/checkbox.js +5 -8
  80. package/esm/checkboxListWithAction/checkboxListWithAction.d.ts +3 -1
  81. package/esm/checkboxListWithAction/checkboxListWithAction.js +186 -4
  82. package/esm/controlledPopup/controlledPopup.d.ts +3 -1
  83. package/esm/controlledPopup/controlledPopup.js +2 -2
  84. package/esm/dropdown/dropdownPopup.d.ts +1 -1
  85. package/esm/dropdown/dropdownTrigger.d.ts +1 -1
  86. package/esm/dropdownRaw/dropdownList.d.ts +2 -1
  87. package/esm/dropdownRaw/dropdownList.js +16 -5
  88. package/esm/dropdownRaw/dropdownPopup.d.ts +3 -1
  89. package/esm/dropdownRaw/dropdownPopup.js +37 -7
  90. package/esm/dropdownRaw/dropdownRaw.js +82 -7
  91. package/esm/dropdownRaw/dropdownSearchableTrigger.d.ts +2 -1
  92. package/esm/dropdownRaw/dropdownSearchableTrigger.js +7 -2
  93. package/esm/dropdownRaw/dropdownTrigger.d.ts +2 -1
  94. package/esm/dropdownRaw/dropdownTrigger.js +3 -5
  95. package/esm/footerButtons/footerButtons.d.ts +6 -4
  96. package/esm/footerButtons/footerButtons.js +3 -8
  97. package/esm/groupsFilterRaw/groupsFilterCurrentlySelectedState.js +9 -3
  98. package/esm/groupsFilterRaw/groupsFilterInitialState.js +16 -0
  99. package/esm/groupsFilterRaw/groupsFilterRaw.js +43 -9
  100. package/esm/groupsFilterRaw/groupsFilterTrigger.d.ts +2 -1
  101. package/esm/groupsFilterRaw/groupsFilterTrigger.js +13 -2
  102. package/esm/index.d.ts +1 -1
  103. package/esm/list/hooks/useDragAndDrop.d.ts +3 -1
  104. package/esm/list/hooks/useDragAndDrop.js +11 -4
  105. package/esm/menu/components/menuItem.js +12 -2
  106. package/esm/menu/contexts/pathContext.d.ts +3 -1
  107. package/esm/menu/contexts/pathProvider.d.ts +1 -1
  108. package/esm/menu/contexts/pathProvider.js +1 -1
  109. package/esm/menu/controlledMenu.js +98 -30
  110. package/esm/nav/nav.d.ts +2 -1
  111. package/esm/nav/nav.js +3 -2
  112. package/esm/nav/navEditList/navEditList.js +2 -1
  113. package/esm/nav/navItem/navItem.d.ts +1 -0
  114. package/esm/nav/navItem/navItem.js +5 -2
  115. package/esm/pillExpandable/pillContent.d.ts +2 -1
  116. package/esm/pillExpandable/pillContent.js +8 -3
  117. package/esm/pillExpandable/pillExpandable.d.ts +27 -4
  118. package/esm/pillExpandable/pillExpandable.js +427 -197
  119. package/esm/pillExpandable/pillExpandablePopoverContent.d.ts +19 -0
  120. package/esm/pillExpandable/pillExpandablePopoverContent.js +3 -0
  121. package/esm/pillExpandable/pillExpandableSimple.d.ts +5 -3
  122. package/esm/pillExpandable/pillExpandableSimple.js +12 -5
  123. package/esm/summary/summary.js +29 -1
  124. package/esm/summaryTile/summaryTile.d.ts +2 -1
  125. package/esm/summaryTile/summaryTile.js +140 -43
  126. package/esm/summaryTile/summaryTileTrigger.d.ts +1 -1
  127. package/esm/summaryTile/summaryTileTrigger.js +1 -1
  128. package/esm/toggleButtonRaw/toggleButtonRaw.js +2 -1
  129. package/esm/utils/localization/getSupportedLanguage.d.ts +2 -2
  130. package/esm/utils/localization/getSupportedLanguage.js +28 -8
  131. package/esm/utils/localization/languageContext.d.ts +1 -1
  132. package/esm/utils/localization/translations/cs.json +2 -1
  133. package/esm/utils/localization/translations/de.json +2 -1
  134. package/esm/utils/localization/translations/en.json +2 -1
  135. package/esm/utils/localization/translations/es.json +2 -1
  136. package/esm/utils/localization/translations/fr-FR.json +2 -1
  137. package/esm/utils/localization/translations/fr.json +2 -1
  138. package/esm/utils/localization/translations/id.json +2 -1
  139. package/esm/utils/localization/translations/it.json +2 -1
  140. package/esm/utils/localization/translations/ja.json +2 -1
  141. package/esm/utils/localization/translations/ms.json +2 -1
  142. package/esm/utils/localization/translations/nl.json +2 -1
  143. package/esm/utils/localization/translations/pl.json +2 -1
  144. package/esm/utils/localization/translations/pt-BR.json +2 -1
  145. package/esm/utils/localization/translations/sv.json +2 -1
  146. package/esm/utils/localization/translations/th.json +2 -1
  147. package/esm/utils/localization/translations/tr.json +2 -1
  148. package/esm/utils/localization/translations/zh-Hans.json +2 -1
  149. package/package.json +4 -7
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from "react";
2
+ import { TLazyContent } from "../skeleton/lazyContent";
3
+ import { IPillExpandableAction, TPopoverVariant } from "./pillExpandable";
4
+ interface IPillExpandablePopoverContent {
5
+ variant: TPopoverVariant;
6
+ customContent?: ReactNode;
7
+ onActionClick: () => void;
8
+ descriptionText?: TLazyContent<ReactNode>;
9
+ date?: TLazyContent<string>;
10
+ count?: TLazyContent<number>;
11
+ mainAction?: TLazyContent<IPillExpandableAction>;
12
+ secondaryAction?: TLazyContent<IPillExpandableAction>;
13
+ tertiaryAction?: TLazyContent<IPillExpandableAction>;
14
+ errorHandler: (e: unknown) => ReactNode | undefined;
15
+ descriptionId?: string;
16
+ childToDisplay: ReactNode[];
17
+ }
18
+ export declare const PillExpandablePopoverContent: ({ variant, customContent, onActionClick, descriptionText, date, count, mainAction, secondaryAction, tertiaryAction, errorHandler, descriptionId, childToDisplay }: IPillExpandablePopoverContent) => import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PillExpandablePopoverContent = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const pillContent_1 = require("./pillContent");
6
+ const PillExpandablePopoverContent = ({ variant, customContent, onActionClick, descriptionText, date, count, mainAction, secondaryAction, tertiaryAction, errorHandler, descriptionId, childToDisplay }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [variant === "placeholder" && customContent, variant === "default" && ((0, jsx_runtime_1.jsx)(pillContent_1.PillContent, { onActionClick: onActionClick, descriptionText: descriptionText, date: date, count: count, mainAction: mainAction, secondaryAction: secondaryAction, tertiaryAction: tertiaryAction, errorHandler: errorHandler, descriptionId: descriptionId })), childToDisplay.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "zen-status-pill-popup__children", children: childToDisplay }))] }));
7
+ exports.PillExpandablePopoverContent = PillExpandablePopoverContent;
@@ -1,18 +1,20 @@
1
1
  import { FC, RefObject } from "react";
2
- import { IPillExpandable } from "./pillExpandable";
2
+ import { IPillExpandableBase, TPillType } from "./pillExpandable";
3
3
  import { IIcon } from "../icons/icon";
4
- interface IPillExpandableSimple extends IPillExpandable {
4
+ interface IPillExpandableSimple extends IPillExpandableBase {
5
5
  includeExpandIcon?: boolean;
6
6
  expanded?: boolean;
7
7
  expandAriaText?: string;
8
8
  onExpand?: () => void;
9
9
  icon?: FC<IIcon> | false;
10
10
  isBeta?: boolean;
11
+ isMobile?: boolean;
11
12
  ref?: RefObject<HTMLButtonElement | null>;
12
13
  descriptionId?: string;
14
+ type?: TPillType;
13
15
  }
14
16
  export declare const PillExpandableSimple: {
15
- ({ onExpand, expandAriaText, text, expanded, includeExpandIcon, type, icon, isBeta, ref, className, descriptionId }: IPillExpandableSimple): import("react/jsx-runtime").JSX.Element;
17
+ ({ onExpand, expandAriaText, text, expanded, includeExpandIcon, type, icon, isBeta, isMobile, ref, className, descriptionId }: IPillExpandableSimple): import("react/jsx-runtime").JSX.Element;
16
18
  displayName: string;
17
19
  };
18
20
  export {};
@@ -8,26 +8,33 @@ const iconChevronTop_1 = require("../icons/iconChevronTop");
8
8
  const iconChevronBottom_1 = require("../icons/iconChevronBottom");
9
9
  const iconException_1 = require("../icons/iconException");
10
10
  const classNames_1 = require("../commonHelpers/classNames/classNames");
11
- const PillExpandableSimple = ({ onExpand, expandAriaText, text, expanded, includeExpandIcon = true, type = "warning", icon = iconException_1.IconException, isBeta, ref, className, descriptionId }) => {
11
+ const PillExpandableSimple = ({ onExpand, expandAriaText, text, expanded, includeExpandIcon = true, type = "warning", icon = iconException_1.IconException, isBeta, isMobile, ref, className, descriptionId }) => {
12
12
  const iconDriveClassName = (0, useDriveClassName_1.useDriveClassName)("icon");
13
13
  const containerDriveClassName = (0, useDriveClassName_1.useDriveClassName)("zen-status-pill__container");
14
14
  const onExpandHandler = (0, react_1.useCallback)(() => {
15
15
  onExpand && onExpand();
16
16
  }, [onExpand]);
17
17
  const ChevronIcon = expanded ? iconChevronTop_1.IconChevronTop : iconChevronBottom_1.IconChevronBottom;
18
- const defaultIconSize = iconDriveClassName ? "huge" : "large";
19
- const iconSize = isBeta ? "big" : defaultIconSize;
18
+ const isLargeIcon = Boolean(iconDriveClassName || isMobile);
19
+ const iconSize = isBeta ? "big" : isLargeIcon ? "large" : "big";
20
20
  const hasText = (text || "").trim().length > 0;
21
+ const isTextCentered = icon === false && !includeExpandIcon;
21
22
  return (0, jsx_runtime_1.jsxs)("button", { type: "button", className: (0, classNames_1.classNames)([
22
23
  "zen-status-pill__container", `zen-status-pill__container--${type}`, containerDriveClassName || "", className || "", "zen-ellipsis"
23
24
  ]), ref: ref, onClick: onExpandHandler, tabIndex: !includeExpandIcon ? -1 : undefined, "aria-describedby": descriptionId, children: [icon !== false && (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)([
24
25
  "zen-status-pill__icon",
25
26
  `zen-status-pill__icon--${type}`,
27
+ isLargeIcon ? "zen-status-pill__icon--large" : "",
26
28
  hasText ? "" : "zen-status-pill__icon--standalone"
27
29
  ]), children: (0, react_1.createElement)(icon, {
28
30
  size: iconSize
29
- }) }), hasText && (0, jsx_runtime_1.jsx)("div", { className: `zen-status-pill__text zen-status-pill__text--${type} zen-ellipsis`, children: text }), includeExpandIcon && (0, jsx_runtime_1.jsx)("div", { className: `zen-status-pill__expand-button zen-status-pill__expand-button--${type}`, "aria-label": expandAriaText, children: (0, jsx_runtime_1.jsx)("div", { className: "zen-status-pill__icon", children: (0, react_1.createElement)(ChevronIcon, {
30
- size: iconDriveClassName ? "huge" : "large"
31
+ }) }), hasText && (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)([
32
+ "zen-status-pill__text",
33
+ `zen-status-pill__text--${type}`,
34
+ "zen-ellipsis",
35
+ isTextCentered ? "zen-status-pill__text--centered" : ""
36
+ ]), children: text }), includeExpandIcon && (0, jsx_runtime_1.jsx)("div", { className: `zen-status-pill__expand-button zen-status-pill__expand-button--${type}`, "aria-label": expandAriaText, children: (0, jsx_runtime_1.jsx)("div", { className: "zen-status-pill__icon", children: (0, react_1.createElement)(ChevronIcon, {
37
+ size: iconSize
31
38
  }) }) })] });
32
39
  };
33
40
  exports.PillExpandableSimple = PillExpandableSimple;
@@ -39,6 +39,32 @@ injectString("tr", "Summary color", "\xD6zet rengi");
39
39
  injectString("zh-Hans", "Summary color", "\u6458\u8981\u989C\u8272");
40
40
  injectString("zh-TW", "Summary color", "\u6458\u8981\u8272\u5F69");
41
41
  injectString("ro-RO", "Summary color", "Culoare sumar");
42
+ injectString("cs", "Information", "Informace");
43
+ injectString("da-DK", "Information", "Information");
44
+ injectString("de", "Information", "Information");
45
+ injectString("en", "Information", "Information");
46
+ injectString("es", "Information", "Informaci\xF3n");
47
+ injectString("fi-FI", "Information", "Tiedot");
48
+ injectString("fr", "Information", "Renseignements");
49
+ injectString("fr-FR", "Information", "Informations");
50
+ injectString("hu-HU", "Information", "Inform\xE1ci\xF3");
51
+ injectString("id", "Information", "Informasi");
52
+ injectString("it", "Information", "Informazioni");
53
+ injectString("ja", "Information", "\u60C5\u5831");
54
+ injectString("ko-KR", "Information", "\uC815\uBCF4");
55
+ injectString("ms", "Information", "Maklumat");
56
+ injectString("nb-NO", "Information", "Informasjon");
57
+ injectString("nl", "Information", "Informatie");
58
+ injectString("pl", "Information", "Informacje");
59
+ injectString("pt-BR", "Information", "Informa\xE7\xF5es");
60
+ injectString("pt-PT", "Information", "Informa\xE7\xE3o");
61
+ injectString("sk-SK", "Information", "Inform\xE1cie");
62
+ injectString("sv", "Information", "Information");
63
+ injectString("th", "Information", "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25");
64
+ injectString("tr", "Information", "Bilgi");
65
+ injectString("zh-Hans", "Information", "\u4FE1\u606F");
66
+ injectString("zh-TW", "Information", "\u8CC7\u8A0A");
67
+ injectString("ro-RO", "Information", "Informa\u021Bii");
42
68
  const Summary = ({
43
69
  color,
44
70
  title,
@@ -74,8 +100,10 @@ const Summary = ({
74
100
  children: title
75
101
  }), tooltip && (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, {
76
102
  alignment: "top",
77
- trigger: (0, jsx_runtime_1.jsx)("div", {
103
+ trigger: (0, jsx_runtime_1.jsx)("button", {
104
+ type: "button",
78
105
  className: "zen-summary__trigger",
106
+ "aria-label": translate("Information"),
79
107
  children: (0, jsx_runtime_1.jsx)(iconInfoCircle_1.IconInfoCircle, {
80
108
  size: "large",
81
109
  className: "zen-summary__title-icon"
@@ -28,9 +28,10 @@ export interface ISummaryTile extends IZenComponentProps, IZenGridItem {
28
28
  tooltipText?: React.ReactNode;
29
29
  tooltipAlignment?: TAlignment;
30
30
  tooltipSize?: TooltipSize;
31
+ isLoading?: boolean;
31
32
  }
32
33
  export declare const SummaryTileDisplayName = "SummaryTile";
33
34
  export declare const SummaryTile: {
34
- ({ className, children, size, title, tileType, id, onClick, tooltipText, tooltipAlignment }: ISummaryTile): import("react/jsx-runtime").JSX.Element;
35
+ ({ className, children, size, title, tileType, id, onClick, tooltipText, tooltipAlignment, isLoading }: ISummaryTile): import("react/jsx-runtime").JSX.Element;
35
36
  displayName: string;
36
37
  };
@@ -1,89 +1,199 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
2
+
3
+ const {
4
+ injectString
5
+ } = require("../utils/localization/translationsDictionary");
6
+ var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = {
11
+ enumerable: true,
12
+ get: function () {
13
+ return m[k];
14
+ }
15
+ };
16
+ }
17
+ Object.defineProperty(o, k2, desc);
18
+ } : function (o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ o[k2] = m[k];
21
+ });
22
+ var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
23
+ Object.defineProperty(o, "default", {
24
+ enumerable: true,
25
+ value: v
26
+ });
27
+ } : function (o, v) {
28
+ o["default"] = v;
17
29
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
30
+ var __importStar = this && this.__importStar || function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
34
+ __setModuleDefault(result, mod);
35
+ return result;
24
36
  };
25
- Object.defineProperty(exports, "__esModule", { value: true });
37
+ Object.defineProperty(exports, "__esModule", {
38
+ value: true
39
+ });
26
40
  exports.SummaryTile = exports.SummaryTileDisplayName = exports.SummaryTileSize = exports.SummaryTileType = void 0;
27
41
  const jsx_runtime_1 = require("react/jsx-runtime");
42
+ injectString("cs", "Information", "Informace");
43
+ injectString("da-DK", "Information", "Information");
44
+ injectString("de", "Information", "Information");
45
+ injectString("en", "Information", "Information");
46
+ injectString("es", "Information", "Informaci\xF3n");
47
+ injectString("fi-FI", "Information", "Tiedot");
48
+ injectString("fr", "Information", "Renseignements");
49
+ injectString("fr-FR", "Information", "Informations");
50
+ injectString("hu-HU", "Information", "Inform\xE1ci\xF3");
51
+ injectString("id", "Information", "Informasi");
52
+ injectString("it", "Information", "Informazioni");
53
+ injectString("ja", "Information", "\u60C5\u5831");
54
+ injectString("ko-KR", "Information", "\uC815\uBCF4");
55
+ injectString("ms", "Information", "Maklumat");
56
+ injectString("nb-NO", "Information", "Informasjon");
57
+ injectString("nl", "Information", "Informatie");
58
+ injectString("pl", "Information", "Informacje");
59
+ injectString("pt-BR", "Information", "Informa\xE7\xF5es");
60
+ injectString("pt-PT", "Information", "Informa\xE7\xE3o");
61
+ injectString("sk-SK", "Information", "Inform\xE1cie");
62
+ injectString("sv", "Information", "Information");
63
+ injectString("th", "Information", "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25");
64
+ injectString("tr", "Information", "Bilgi");
65
+ injectString("zh-Hans", "Information", "\u4FE1\u606F");
66
+ injectString("zh-TW", "Information", "\u8CC7\u8A0A");
67
+ injectString("ro-RO", "Information", "Informa\u021Bii");
28
68
  const React = __importStar(require("react"));
29
69
  const classNames_1 = require("../commonHelpers/classNames/classNames");
30
70
  const tooltip_1 = require("../tooltip/tooltip");
31
71
  const summaryTileTrigger_1 = require("./summaryTileTrigger");
32
72
  const getTypeClassName_1 = require("./utils/getTypeClassName");
33
73
  const iconInfoCircle_1 = require("../icons/iconInfoCircle");
74
+ const useLanguage_1 = require("../utils/localization/useLanguage");
34
75
  const iconWarning_1 = require("../icons/iconWarning");
35
76
  const iconCheckRadio_1 = require("../icons/iconCheckRadio");
36
77
  const iconException_1 = require("../icons/iconException");
78
+ const skeleton_1 = require("../skeleton/skeleton");
37
79
  var SummaryTileType;
38
80
  (function (SummaryTileType) {
39
- SummaryTileType["Error"] = "error";
40
- SummaryTileType["Success"] = "success";
41
- SummaryTileType["Warning"] = "warning";
42
- SummaryTileType["Active"] = "active";
43
- SummaryTileType["Default"] = "default";
44
- /**
45
- * @deprecated - will be removed in the next releases.
46
- * Please use {@link SummaryTileType.Active} instead.
47
- */
48
- SummaryTileType["Info"] = "info";
81
+ SummaryTileType["Error"] = "error";
82
+ SummaryTileType["Success"] = "success";
83
+ SummaryTileType["Warning"] = "warning";
84
+ SummaryTileType["Active"] = "active";
85
+ SummaryTileType["Default"] = "default";
86
+ /**
87
+ * @deprecated - will be removed in the next releases.
88
+ * Please use {@link SummaryTileType.Active} instead.
89
+ */
90
+ SummaryTileType["Info"] = "info";
49
91
  })(SummaryTileType || (exports.SummaryTileType = SummaryTileType = {}));
50
92
  var SummaryTileSize;
51
93
  (function (SummaryTileSize) {
52
- SummaryTileSize["Small"] = "small";
53
- SummaryTileSize["Medium"] = "medium";
94
+ SummaryTileSize["Small"] = "small";
95
+ SummaryTileSize["Medium"] = "medium";
54
96
  })(SummaryTileSize || (exports.SummaryTileSize = SummaryTileSize = {}));
55
97
  exports.SummaryTileDisplayName = "SummaryTile";
56
- const SummaryTile = ({ className, children, size = SummaryTileSize.Small, title, tileType = SummaryTileType.Default, id, onClick, tooltipText, tooltipAlignment = "top" }) => {
57
- const generatedId = React.useId();
58
- const eltId = id || generatedId;
59
- const memoizedGetIconId = React.useMemo(() => {
60
- const iconIds = {
61
- [SummaryTileType.Warning]: iconException_1.IconException,
62
- [SummaryTileType.Success]: iconCheckRadio_1.IconCheckRadio,
63
- [SummaryTileType.Error]: iconWarning_1.IconWarning,
64
- [SummaryTileType.Active]: iconInfoCircle_1.IconInfoCircle,
65
- [SummaryTileType.Default]: iconInfoCircle_1.IconInfoCircle,
66
- [SummaryTileType.Info]: iconInfoCircle_1.IconInfoCircle
67
- };
68
- return iconIds[tileType];
69
- }, [tileType]);
70
- const componentProps = {
71
- className: (0, classNames_1.classNames)([
72
- "zen-summary-tile",
73
- (0, getTypeClassName_1.getTypeClassName)(tileType),
74
- `zen-summary-tile--${size}`,
75
- onClick ? "zen-summary-tile--action" : "",
76
- className || ""
77
- ]),
78
- "data-summary-tile-id": eltId
98
+ const SummaryTile = ({
99
+ className,
100
+ children,
101
+ size = SummaryTileSize.Small,
102
+ title,
103
+ tileType = SummaryTileType.Default,
104
+ id,
105
+ onClick,
106
+ tooltipText,
107
+ tooltipAlignment = "top",
108
+ isLoading = false
109
+ }) => {
110
+ const {
111
+ translate
112
+ } = (0, useLanguage_1.useLanguage)();
113
+ const generatedId = React.useId();
114
+ const eltId = id || generatedId;
115
+ const memoizedGetIconId = React.useMemo(() => {
116
+ const iconIds = {
117
+ [SummaryTileType.Warning]: iconException_1.IconException,
118
+ [SummaryTileType.Success]: iconCheckRadio_1.IconCheckRadio,
119
+ [SummaryTileType.Error]: iconWarning_1.IconWarning,
120
+ [SummaryTileType.Active]: iconInfoCircle_1.IconInfoCircle,
121
+ [SummaryTileType.Default]: iconInfoCircle_1.IconInfoCircle,
122
+ [SummaryTileType.Info]: iconInfoCircle_1.IconInfoCircle
123
+ };
124
+ return iconIds[tileType];
125
+ }, [tileType]);
126
+ const isInteractive = onClick && !isLoading;
127
+ const componentProps = {
128
+ className: (0, classNames_1.classNames)(["zen-summary-tile", (0, getTypeClassName_1.getTypeClassName)(tileType), `zen-summary-tile--${size}`, isInteractive ? "zen-summary-tile--action" : "", className || ""]),
129
+ "data-summary-tile-id": eltId
130
+ };
131
+ if (isInteractive) {
132
+ componentProps.onClick = () => {
133
+ onClick(eltId);
79
134
  };
80
- if (onClick) {
81
- componentProps.onClick = () => {
82
- onClick(eltId);
83
- };
84
- }
85
- const Tag = onClick ? "button" : "div";
86
- return (0, jsx_runtime_1.jsxs)(Tag, Object.assign({}, componentProps, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "zen-summary-tile__title-block", children: [(0, jsx_runtime_1.jsx)("div", { className: "zen-summary-tile__title-text zen-ellipsis heading-05", children: title }), tooltipText ? (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { alignment: tooltipAlignment, trigger: (0, jsx_runtime_1.jsx)(summaryTileTrigger_1.SummaryTileTrigger, { icon: memoizedGetIconId }), children: tooltipText }) : null] }), (0, jsx_runtime_1.jsx)("div", { className: "zen-summary-tile__content", children: children })] }));
135
+ }
136
+ if (isLoading) {
137
+ return (0, jsx_runtime_1.jsxs)("div", Object.assign({}, componentProps, {
138
+ children: [(0, jsx_runtime_1.jsx)("div", {
139
+ className: "zen-summary-tile__title-block",
140
+ children: (0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, {
141
+ type: "text",
142
+ height: 16
143
+ })
144
+ }), (0, jsx_runtime_1.jsx)("div", {
145
+ className: "zen-summary-tile__content",
146
+ children: (0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, {
147
+ type: "text",
148
+ height: 32
149
+ })
150
+ })]
151
+ }));
152
+ }
153
+ const tooltipTrigger = tooltipText ? (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, {
154
+ alignment: tooltipAlignment,
155
+ trigger: (0, jsx_runtime_1.jsx)(summaryTileTrigger_1.SummaryTileTrigger, {
156
+ icon: memoizedGetIconId,
157
+ "aria-label": translate("Information")
158
+ }),
159
+ children: tooltipText
160
+ }) : null;
161
+ const Tag = isInteractive ? "button" : "div";
162
+ // When both onClick and tooltipText are present, the tooltip trigger
163
+ // (a <button>) cannot be nested inside the tile <button>. Render the
164
+ // tooltip trigger as a sibling outside the clickable tile.
165
+ if (onClick && tooltipText) {
166
+ return (0, jsx_runtime_1.jsxs)("div", {
167
+ className: componentProps.className,
168
+ "data-summary-tile-id": componentProps["data-summary-tile-id"],
169
+ children: [(0, jsx_runtime_1.jsxs)(Tag, {
170
+ className: "zen-summary-tile__clickable-area",
171
+ onClick: componentProps.onClick,
172
+ children: [(0, jsx_runtime_1.jsx)("div", {
173
+ className: "zen-summary-tile__title-block",
174
+ children: (0, jsx_runtime_1.jsx)("div", {
175
+ className: "zen-summary-tile__title-text zen-ellipsis heading-05",
176
+ children: title
177
+ })
178
+ }), (0, jsx_runtime_1.jsx)("div", {
179
+ className: "zen-summary-tile__content",
180
+ children: children
181
+ })]
182
+ }), tooltipTrigger]
183
+ });
184
+ }
185
+ return (0, jsx_runtime_1.jsxs)(Tag, Object.assign({}, componentProps, {
186
+ children: [(0, jsx_runtime_1.jsxs)("div", {
187
+ className: "zen-summary-tile__title-block",
188
+ children: [(0, jsx_runtime_1.jsx)("div", {
189
+ className: "zen-summary-tile__title-text zen-ellipsis heading-05",
190
+ children: title
191
+ }), tooltipTrigger]
192
+ }), (0, jsx_runtime_1.jsx)("div", {
193
+ className: "zen-summary-tile__content",
194
+ children: children
195
+ })]
196
+ }));
87
197
  };
88
198
  exports.SummaryTile = SummaryTile;
89
- exports.SummaryTile.displayName = exports.SummaryTileDisplayName;
199
+ exports.SummaryTile.displayName = exports.SummaryTileDisplayName;
@@ -3,6 +3,6 @@ import { IIcon } from "../icons/icon";
3
3
  import { RefObject } from "react";
4
4
  export interface ISummaryTileTrigger {
5
5
  icon: React.FC<IIcon>;
6
- ref?: RefObject<HTMLDivElement | null>;
6
+ ref?: RefObject<HTMLButtonElement | null>;
7
7
  }
8
8
  export declare const SummaryTileTrigger: ({ icon, ref, ...restProps }: ISummaryTileTrigger) => import("react/jsx-runtime").JSX.Element;
@@ -39,7 +39,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
39
39
  const React = __importStar(require("react"));
40
40
  const SummaryTileTrigger = (_a) => {
41
41
  var { icon, ref } = _a, restProps = __rest(_a, ["icon", "ref"]);
42
- return (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "zen-summary-tile__trigger", ref: ref }, restProps, { children: React.createElement(icon, {
42
+ return (0, jsx_runtime_1.jsx)("button", Object.assign({ type: "button", className: "zen-summary-tile__trigger", ref: ref }, restProps, { children: React.createElement(icon, {
43
43
  className: "zen-summary-tile__title-icon",
44
44
  size: "large"
45
45
  }) }));
@@ -144,7 +144,8 @@ const ToggleButtonRaw = props => {
144
144
  id: checkBoxId,
145
145
  onChange: onChangeHandler,
146
146
  checked: value,
147
- disabled: disabled
147
+ disabled: disabled,
148
+ role: "switch"
148
149
  }), (0, jsx_runtime_1.jsxs)("label", {
149
150
  className: (0, classNames_1.classNames)(["zen-toggler__label", isReverted ? "zen-toggler__label--reverted" : ""]),
150
151
  htmlFor: checkBoxId,
@@ -1,4 +1,4 @@
1
- declare const supportedLanguages: readonly ["en", "es", "de", "cs", "fr-FR", "fr", "id", "it", "ja", "ms", "nl", "pl", "pt-BR", "sv", "th", "tr", "zh-Hans", "ko-KR", "zh-TW", "da-DK", "fi-FI", "hu-HU", "nb-NO", "sk-SK", "pt-PT", "ro-RO"];
2
- export type TSupportedLanguage = typeof supportedLanguages[number];
1
+ declare const supportedLanguages: readonly ["en", "es", "de", "cs", "fr-FR", "fr", "id", "it", "ja", "ms", "nl", "pl", "pt-BR", "sv", "th", "tr", "zh-Hans", "ko-KR", "zh-TW", "da-DK", "fi-FI", "hu-HU", "nb-NO", "sk-SK", "pt-PT", "ro-RO", "ar"];
2
+ export type TSupportedLanguage = (typeof supportedLanguages)[number];
3
3
  export declare const getSupportedLanguage: (language: string) => TSupportedLanguage;
4
4
  export {};
@@ -2,13 +2,33 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getSupportedLanguage = void 0;
4
4
  const supportedLanguages = [
5
- "en", "es", "de", "cs", "fr-FR", "fr",
6
- "id", "it", "ja", "ms", "nl", "pl", "pt-BR",
7
- "sv", "th", "tr", "zh-Hans", "ko-KR", "zh-TW",
8
- "da-DK", "fi-FI", "hu-HU", "nb-NO", "sk-SK",
9
- "pt-PT", "ro-RO"
5
+ "en",
6
+ "es",
7
+ "de",
8
+ "cs",
9
+ "fr-FR",
10
+ "fr",
11
+ "id",
12
+ "it",
13
+ "ja",
14
+ "ms",
15
+ "nl",
16
+ "pl",
17
+ "pt-BR",
18
+ "sv",
19
+ "th",
20
+ "tr",
21
+ "zh-Hans",
22
+ "ko-KR",
23
+ "zh-TW",
24
+ "da-DK",
25
+ "fi-FI",
26
+ "hu-HU",
27
+ "nb-NO",
28
+ "sk-SK",
29
+ "pt-PT",
30
+ "ro-RO",
31
+ "ar"
10
32
  ];
11
- const getSupportedLanguage = (language) => supportedLanguages.includes(language)
12
- ? language
13
- : "en";
33
+ const getSupportedLanguage = (language) => supportedLanguages.includes(language) ? language : "en";
14
34
  exports.getSupportedLanguage = getSupportedLanguage;
@@ -1,2 +1,2 @@
1
1
  /// <reference types="react" />
2
- export declare const languageContext: import("react").Context<"it" | "th" | "tr" | "ms" | "id" | "en" | "es" | "de" | "cs" | "fr-FR" | "fr" | "ja" | "nl" | "pl" | "pt-BR" | "sv" | "zh-Hans" | "ko-KR" | "zh-TW" | "da-DK" | "fi-FI" | "hu-HU" | "nb-NO" | "sk-SK" | "pt-PT" | "ro-RO">;
2
+ export declare const languageContext: import("react").Context<"it" | "th" | "tr" | "ms" | "id" | "en" | "es" | "de" | "cs" | "fr-FR" | "fr" | "ja" | "nl" | "pl" | "pt-BR" | "sv" | "zh-Hans" | "ko-KR" | "zh-TW" | "da-DK" | "fi-FI" | "hu-HU" | "nb-NO" | "sk-SK" | "pt-PT" | "ro-RO" | "ar">;
@@ -252,5 +252,6 @@
252
252
  "Year to date": "Od začátku roku",
253
253
  "Time": "Čas",
254
254
  "Apply filter": "Použít filtr",
255
- "Remove filter": "Odebrat filtr"
255
+ "Remove filter": "Odebrat filtr",
256
+ "Results": "Výsledky"
256
257
  }
@@ -252,5 +252,6 @@
252
252
  "Year to date": "Seit Jahresbeginn",
253
253
  "Time": "Zeit",
254
254
  "Apply filter": "Filter anwenden",
255
- "Remove filter": "Filter entfernen"
255
+ "Remove filter": "Filter entfernen",
256
+ "Results": "Ergebnisse"
256
257
  }
@@ -316,5 +316,6 @@
316
316
  "This filter is currently applied.": "This filter is currently applied.",
317
317
  "Remove filter": "Remove filter",
318
318
  "Exit full screen table view": "Exit full screen table view",
319
- "Close search": "Close search"
319
+ "Close search": "Close search",
320
+ "Has additional actions. Use right arrow to access button, left arrow to return.": "Has additional actions. Use right arrow to access button, left arrow to return."
320
321
  }
@@ -252,5 +252,6 @@
252
252
  "Year to date": "Año a la fecha",
253
253
  "Time": "Hora",
254
254
  "Apply filter": "Aplicar filtro",
255
- "Remove filter": "Eliminar filtro"
255
+ "Remove filter": "Eliminar filtro",
256
+ "Results": "Resultados"
256
257
  }
@@ -252,5 +252,6 @@
252
252
  "Year to date": "L’année passée",
253
253
  "Time": "Heure",
254
254
  "Apply filter": "Appliquer filtre",
255
- "Remove filter": "Supprimer filtre"
255
+ "Remove filter": "Supprimer filtre",
256
+ "Results": "Résultats"
256
257
  }
@@ -252,5 +252,6 @@
252
252
  "Year to date": "Cumul jusqu’à ce jour",
253
253
  "Time": "Heure",
254
254
  "Apply filter": "Appliquer les filtres",
255
- "Remove filter": "Supprimer le filtre"
255
+ "Remove filter": "Supprimer le filtre",
256
+ "Results": "Résultats"
256
257
  }
@@ -252,5 +252,6 @@
252
252
  "Year to date": "Tahun hingga saat ini",
253
253
  "Time": "Waktu",
254
254
  "Apply filter": "Terapkan filter",
255
- "Remove filter": "Hapus filter"
255
+ "Remove filter": "Hapus filter",
256
+ "Results": "Hasil"
256
257
  }
@@ -252,5 +252,6 @@
252
252
  "Year to date": "Dall'inizio dell'anno",
253
253
  "Time": "Tempo",
254
254
  "Apply filter": "Applicare filtro",
255
- "Remove filter": "Rimuovere filtro"
255
+ "Remove filter": "Rimuovere filtro",
256
+ "Results": "Risultati"
256
257
  }
@@ -252,5 +252,6 @@
252
252
  "Year to date": "累計",
253
253
  "Time": "時間",
254
254
  "Apply filter": "フィルターを適用",
255
- "Remove filter": "フィルターを削除"
255
+ "Remove filter": "フィルターを削除",
256
+ "Results": "結果"
256
257
  }
@@ -252,5 +252,6 @@
252
252
  "Year to date": "Tahun ini hingga tarikh ini",
253
253
  "Time": "Masa",
254
254
  "Apply filter": "Gunakan penyaring",
255
- "Remove filter": "Keluarkan penyaring"
255
+ "Remove filter": "Keluarkan penyaring",
256
+ "Results": "Keputusan"
256
257
  }
@@ -252,5 +252,6 @@
252
252
  "Year to date": "Jaar tot heden",
253
253
  "Time": "Tijd",
254
254
  "Apply filter": "Filter toepassen",
255
- "Remove filter": "Filter verwijderen"
255
+ "Remove filter": "Filter verwijderen",
256
+ "Results": "Resultaten"
256
257
  }
@@ -252,5 +252,6 @@
252
252
  "Year to date": "Od początku roku",
253
253
  "Time": "Czas",
254
254
  "Apply filter": "Zastosuj filtr",
255
- "Remove filter": "Usuń filtr"
255
+ "Remove filter": "Usuń filtr",
256
+ "Results": "Wyniki"
256
257
  }
@@ -252,5 +252,6 @@
252
252
  "Year to date": "Acumulado no ano",
253
253
  "Time": "Hora",
254
254
  "Apply filter": "Aplicar filtros",
255
- "Remove filter": "Remover filtro"
255
+ "Remove filter": "Remover filtro",
256
+ "Results": "Resultados"
256
257
  }