@geotab/zenith 3.9.0-beta.ssr.2 → 3.9.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 +29 -8
- package/dist/card/card.d.ts +1 -1
- package/dist/card/card.js +1 -1
- package/dist/{title → card/components}/title.d.ts +1 -1
- package/dist/card/components/title.js +26 -0
- package/dist/card/helpers/getIconTypeFromStatus.d.ts +1 -1
- package/dist/chart/pieChart/centerTextPlugin.js +11 -4
- package/dist/chart/pieChart.js +10 -1
- package/dist/commonHelpers/hooks/useDeviceType.js +2 -1
- package/dist/commonHelpers/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
- package/dist/commonHelpers/hooks/useIsomorphicLayoutEffect.js +6 -0
- package/dist/commonHelpers/isDomEnv.js +1 -2
- package/dist/commonHelpers/useUniqueId.js +2 -2
- package/dist/commonHelpers/utils.d.ts +0 -9
- package/dist/commonHelpers/utils.js +1 -11
- package/dist/commonStyles/common.less +13 -1
- package/dist/commonStyles/fonts/notosarabic/LICENSE.txt +93 -0
- package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Bold.woff +0 -0
- package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Bold.woff2 +0 -0
- package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Medium.woff +0 -0
- package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Medium.woff2 +0 -0
- package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Regular.woff +0 -0
- package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Regular.woff2 +0 -0
- package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-SemiBold.woff +0 -0
- package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-SemiBold.woff2 +0 -0
- package/dist/commonStyles/fonts/notosarabic.less +43 -0
- package/dist/commonStyles/typography/typography.less +6 -0
- package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +3 -5
- package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +38 -2
- package/dist/dateInputInner/dateInputInnerControlBlock.js +5 -2
- package/dist/dateRangeRaw/dateRangeRaw.js +5 -1
- package/dist/filtersBar/filtersBarActions/filtersBarActions.js +3 -1
- package/dist/header/components/collapsedItemsControl/utils/handleCustomMenuWrapper.js +1 -1
- package/dist/index.css +1981 -212
- package/dist/index.d.ts +5 -5
- package/dist/index.js +24 -26
- package/dist/menu/components/menuItem.js +4 -4
- package/dist/menu/controlledMenu.js +4 -4
- package/dist/nav/nav.js +10 -5
- package/dist/selectRaw/selectRaw.js +1 -1
- package/dist/shield/shield.js +5 -3
- package/dist/table/children/useTableChildren.d.ts +1 -1
- package/dist/table/children/useTableChildren.js +3 -3
- package/dist/table/selectable/useSelectableRows.d.ts +0 -8
- package/dist/table/selectable/useSelectableRows.js +7 -14
- package/dist/table/table.js +7 -1
- package/dist/tooltip/tooltip.d.ts +2 -1
- package/dist/tooltip/tooltip.js +51 -55
- package/dist/utils/localization/languageProvider.js +5 -2
- package/dist/utils/localization/translations/ar.json +0 -1
- package/dist/utils/localization/translations/cs.json +0 -1
- package/dist/utils/localization/translations/da-DK.json +0 -1
- package/dist/utils/localization/translations/de.json +0 -1
- package/dist/utils/localization/translations/en.json +3 -1
- package/dist/utils/localization/translations/es.json +0 -1
- package/dist/utils/localization/translations/fi-FI.json +0 -1
- package/dist/utils/localization/translations/fr-FR.json +0 -1
- package/dist/utils/localization/translations/fr.json +0 -1
- package/dist/utils/localization/translations/hu-HU.json +0 -1
- package/dist/utils/localization/translations/id.json +0 -1
- package/dist/utils/localization/translations/it.json +0 -1
- package/dist/utils/localization/translations/ja.json +0 -1
- package/dist/utils/localization/translations/ko-KR.json +0 -1
- package/dist/utils/localization/translations/ms.json +0 -1
- package/dist/utils/localization/translations/nb-NO.json +0 -1
- package/dist/utils/localization/translations/nl.json +0 -1
- package/dist/utils/localization/translations/pl.json +0 -1
- package/dist/utils/localization/translations/pt-BR.json +0 -1
- package/dist/utils/localization/translations/pt-PT.json +0 -1
- package/dist/utils/localization/translations/ro-RO.json +0 -1
- package/dist/utils/localization/translations/sk-SK.json +0 -1
- package/dist/utils/localization/translations/sv.json +0 -1
- package/dist/utils/localization/translations/th.json +0 -1
- package/dist/utils/localization/translations/tr.json +0 -1
- package/dist/utils/localization/translations/zh-Hans.json +0 -1
- package/dist/utils/localization/translations/zh-TW.json +0 -1
- package/esm/card/card.d.ts +1 -1
- package/esm/card/card.js +1 -1
- package/esm/{title → card/components}/title.d.ts +1 -1
- package/esm/card/components/title.js +22 -0
- package/esm/card/helpers/getIconTypeFromStatus.d.ts +1 -1
- package/esm/chart/pieChart/centerTextPlugin.js +11 -4
- package/esm/chart/pieChart.js +11 -2
- package/esm/commonHelpers/hooks/useDeviceType.js +3 -2
- package/esm/commonHelpers/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
- package/esm/commonHelpers/hooks/useIsomorphicLayoutEffect.js +3 -0
- package/esm/commonHelpers/isDomEnv.js +1 -2
- package/esm/commonHelpers/useUniqueId.js +1 -1
- package/esm/commonHelpers/utils.d.ts +0 -9
- package/esm/commonHelpers/utils.js +0 -9
- package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +3 -5
- package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +38 -2
- package/esm/dateInputInner/dateInputInnerControlBlock.js +5 -2
- package/esm/dateRangeRaw/dateRangeRaw.js +5 -1
- package/esm/filtersBar/filtersBarActions/filtersBarActions.js +3 -1
- package/esm/header/components/collapsedItemsControl/utils/handleCustomMenuWrapper.js +1 -1
- package/esm/index.d.ts +5 -5
- package/esm/index.js +5 -5
- package/esm/menu/components/menuItem.js +1 -1
- package/esm/menu/controlledMenu.js +1 -1
- package/esm/nav/nav.js +10 -5
- package/esm/selectRaw/selectRaw.js +1 -1
- package/esm/shield/shield.js +5 -3
- package/esm/table/children/useTableChildren.d.ts +1 -1
- package/esm/table/children/useTableChildren.js +3 -3
- package/esm/table/selectable/useSelectableRows.d.ts +0 -8
- package/esm/table/selectable/useSelectableRows.js +7 -14
- package/esm/table/table.js +7 -1
- package/esm/tooltip/tooltip.d.ts +2 -1
- package/esm/tooltip/tooltip.js +51 -55
- package/esm/utils/localization/languageProvider.js +5 -2
- package/esm/utils/localization/translations/ar.json +0 -1
- package/esm/utils/localization/translations/cs.json +0 -1
- package/esm/utils/localization/translations/da-DK.json +0 -1
- package/esm/utils/localization/translations/de.json +0 -1
- package/esm/utils/localization/translations/en.json +3 -1
- package/esm/utils/localization/translations/es.json +0 -1
- package/esm/utils/localization/translations/fi-FI.json +0 -1
- package/esm/utils/localization/translations/fr-FR.json +0 -1
- package/esm/utils/localization/translations/fr.json +0 -1
- package/esm/utils/localization/translations/hu-HU.json +0 -1
- package/esm/utils/localization/translations/id.json +0 -1
- package/esm/utils/localization/translations/it.json +0 -1
- package/esm/utils/localization/translations/ja.json +0 -1
- package/esm/utils/localization/translations/ko-KR.json +0 -1
- package/esm/utils/localization/translations/ms.json +0 -1
- package/esm/utils/localization/translations/nb-NO.json +0 -1
- package/esm/utils/localization/translations/nl.json +0 -1
- package/esm/utils/localization/translations/pl.json +0 -1
- package/esm/utils/localization/translations/pt-BR.json +0 -1
- package/esm/utils/localization/translations/pt-PT.json +0 -1
- package/esm/utils/localization/translations/ro-RO.json +0 -1
- package/esm/utils/localization/translations/sk-SK.json +0 -1
- package/esm/utils/localization/translations/sv.json +0 -1
- package/esm/utils/localization/translations/th.json +0 -1
- package/esm/utils/localization/translations/tr.json +0 -1
- package/esm/utils/localization/translations/zh-Hans.json +0 -1
- package/esm/utils/localization/translations/zh-TW.json +0 -1
- package/package.json +38 -35
- package/dist/title/title.js +0 -27
- package/esm/title/title.js +0 -23
package/README.md
CHANGED
|
@@ -45,15 +45,36 @@ Now components are ready for usage.
|
|
|
45
45
|
|
|
46
46
|
Zenith library provides components defined in Zenith Design System. It includes very basic blocks like colors, icons, font presets, atom components like buttons, checkboxes etc and high order components - header, table, filters bar etc. List of existing components can be found in [Storybook](https://developers.geotab.com/zenith-storybook/index.html).
|
|
47
47
|
|
|
48
|
-
## Documentation
|
|
49
|
-
|
|
50
|
-
- [Development Guide](docs/DEVELOPMENT.md) - Creating components, adding icons, testing, code style
|
|
51
|
-
- [Build Process](docs/BUILD.md) - How the build system works
|
|
52
|
-
- [Release Process](docs/RELEASE.md) - How to publish new versions of Zenith
|
|
53
|
-
- [Translations](docs/TRANSLATIONS.md) - How translations work and how to manage them
|
|
54
|
-
|
|
55
48
|
## Change log
|
|
56
49
|
|
|
50
|
+
### 3.9.0
|
|
51
|
+
|
|
52
|
+
- Added basic SSR (server-side rendering) support
|
|
53
|
+
- `Card` clickable title is now a `<button>` element for keyboard accessibility
|
|
54
|
+
- Add `data-analytics-id` support to `Card` interactive sub-components (button, toggle)
|
|
55
|
+
- `FiltersBar` active filters button now exposes `aria-label="Active filters: N"` for screen readers
|
|
56
|
+
- `Table` first column visual update
|
|
57
|
+
- Add nested subheader support to `Table`
|
|
58
|
+
- Fix `Select` component keyboard accessibility issue
|
|
59
|
+
- Fix `Tooltip` overlapping popup
|
|
60
|
+
- Fix `Tooltip` `onBlur` crash causing Sentry NotFoundError on removeChild
|
|
61
|
+
- `Calendar` accessibility improvements
|
|
62
|
+
- Fix year dropdown scrolling to earliest year instead of selected year in `DateRange`
|
|
63
|
+
- Add customizable legend values for `Chart`
|
|
64
|
+
- Fix month labels in `Chart`
|
|
65
|
+
- Fix last item obscured by action buttons in `Nav` edit mode
|
|
66
|
+
- RTL (right-to-left) orientation based on language
|
|
67
|
+
- Update font handling for Arabic language
|
|
68
|
+
- Fix `TextInput` error message cutoff
|
|
69
|
+
- Add `@rem` CSS variable as standard unit for rem-based spacing
|
|
70
|
+
- Convert button and interactive control styles from `px` to `rem`
|
|
71
|
+
- Edit file upload drag & drop behavior
|
|
72
|
+
- Fix field error integration in `FormField`
|
|
73
|
+
|
|
74
|
+
### 3.8.1
|
|
75
|
+
|
|
76
|
+
- Fix horizontal pie chart center text scaling and legend toggle
|
|
77
|
+
|
|
57
78
|
### 3.8.0
|
|
58
79
|
|
|
59
80
|
- Create `FileUpload` component
|
|
@@ -69,7 +90,7 @@ Zenith library provides components defined in Zenith Design System. It includes
|
|
|
69
90
|
- Updated translations
|
|
70
91
|
- Add multiline table header support (word wrap for long strings)
|
|
71
92
|
- `SidePanel` outside click improvements
|
|
72
|
-
-
|
|
93
|
+
- Implement Responsive Pie `Chart` Component with Dynamic Legend
|
|
73
94
|
|
|
74
95
|
### 3.7.0
|
|
75
96
|
|
package/dist/card/card.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { FC, FunctionComponent, ReactNode } from "react";
|
|
2
2
|
import { IAbsoluteSize, TContainerSize } from "../cardContainer/cardContainer";
|
|
3
3
|
import { TCardStatus } from "./components/status";
|
|
4
|
-
import { TIconType } from "
|
|
4
|
+
import { TIconType } from "./components/title";
|
|
5
5
|
import { IActions } from "./components/actions";
|
|
6
6
|
import { IContent } from "./components/content";
|
|
7
7
|
import "./card.less";
|
package/dist/card/card.js
CHANGED
|
@@ -71,7 +71,7 @@ const cardContainer_1 = require("../cardContainer/cardContainer");
|
|
|
71
71
|
const deviceType_1 = require("../commonHelpers/hooks/deviceType");
|
|
72
72
|
const useDeviceType_1 = require("../commonHelpers/hooks/useDeviceType");
|
|
73
73
|
const status_1 = require("./components/status");
|
|
74
|
-
const title_1 = require("
|
|
74
|
+
const title_1 = require("./components/title");
|
|
75
75
|
const actions_1 = require("./components/actions");
|
|
76
76
|
const content_1 = require("./components/content");
|
|
77
77
|
const useCardSize_1 = require("./hooks/useCardSize");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FunctionComponent } from "react";
|
|
2
2
|
import "./title.less";
|
|
3
|
-
import { IIcon } from "
|
|
3
|
+
import { IIcon } from "../../icons/icon";
|
|
4
4
|
export type TIconType = "info" | "warning" | "error" | "success" | "default";
|
|
5
5
|
interface ITitle {
|
|
6
6
|
isMobile: boolean;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Title = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const classNames_1 = require("../../commonHelpers/classNames/classNames");
|
|
7
|
+
const useDriveClassName_1 = require("../../utils/theme/useDriveClassName");
|
|
8
|
+
const useDrive_1 = require("../../utils/theme/useDrive");
|
|
9
|
+
const iconChevronRightSmall_1 = require("../../icons/iconChevronRightSmall");
|
|
10
|
+
const Title = ({ isMobile, link, target, title, id, icon, iconType, className = "", onClick }) => {
|
|
11
|
+
const driveClassNames = (0, useDriveClassName_1.useDriveClassName)("zen-card-title");
|
|
12
|
+
const isDrive = (0, useDrive_1.useDrive)();
|
|
13
|
+
const iconClassName = iconType ? `zen-card-title__icon--${iconType}` : "";
|
|
14
|
+
const iconSize = (0, react_1.useMemo)(() => (isDrive ? "huge" : "large"), [isDrive]);
|
|
15
|
+
const iconElement = (0, react_1.useMemo)(() => (icon ? (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-card-title__icon", iconClassName]), children: (0, react_1.createElement)(icon, { size: iconSize }) }) : null), [icon, iconSize, iconClassName]);
|
|
16
|
+
const chevron = (0, react_1.useMemo)(() => ((0, jsx_runtime_1.jsx)("span", { className: "zen-card-title__link-chevron", children: (0, jsx_runtime_1.jsx)(iconChevronRightSmall_1.IconChevronRightSmall, { size: iconSize, className: "zen-card-title__chevron-icon" }) })), [iconSize]);
|
|
17
|
+
const titleClasses = (0, classNames_1.classNames)(["zen-card-title", driveClassNames || "", onClick ? "zen-card-title__clickable" : ""]);
|
|
18
|
+
if (onClick) {
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("button", { type: "button", className: titleClasses, onClick: onClick, children: [iconElement, (0, jsx_runtime_1.jsxs)("span", { title: title, id: id, className: (0, classNames_1.classNames)(["zen-card-title__text", isMobile && !isDrive ? "zen-card-title__text--mobile" : "", className]), children: [title, chevron] })] }));
|
|
20
|
+
}
|
|
21
|
+
if (link) {
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)("a", { id: id, className: titleClasses, href: link, target: target, children: [iconElement, (0, jsx_runtime_1.jsxs)("span", { title: title, className: (0, classNames_1.classNames)(["zen-card-title__link-text"]), children: [title, chevron] })] }));
|
|
23
|
+
}
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: titleClasses, children: [iconElement, (0, jsx_runtime_1.jsx)("span", { title: title, id: id, className: (0, classNames_1.classNames)(["zen-card-title__text", isMobile && !isDrive ? "zen-card-title__text--mobile" : "", className]), children: title })] }));
|
|
25
|
+
};
|
|
26
|
+
exports.Title = Title;
|
|
@@ -16,16 +16,23 @@ const centerTextPlugin = (centerText) => ({
|
|
|
16
16
|
const css = (name) => getCssVar(chart.canvas, name);
|
|
17
17
|
const fontFamily = css("--main-font");
|
|
18
18
|
const hasLabel = !!centerText.label;
|
|
19
|
-
const
|
|
19
|
+
const meta = chart.getDatasetMeta(0);
|
|
20
|
+
const controllerRadius = meta.controller.innerRadius;
|
|
21
|
+
const innerRadius = typeof controllerRadius === "number" && controllerRadius > 0 ? controllerRadius : Math.min(width, height) * 0.325;
|
|
22
|
+
const maxValueFont = parseFloat(css("--pie-center-value-font-size")) || 28;
|
|
23
|
+
const maxLabelFont = parseFloat(css("--pie-center-label-font-size")) || 14;
|
|
24
|
+
const valueFontSize = Math.max(10, Math.min(maxValueFont, innerRadius * 0.45));
|
|
25
|
+
const labelFontSize = Math.max(8, Math.min(maxLabelFont, innerRadius * 0.22));
|
|
26
|
+
const valueY = hasLabel ? centerY - valueFontSize * 0.5 : centerY;
|
|
20
27
|
ctx.textAlign = "center";
|
|
21
28
|
ctx.textBaseline = "middle";
|
|
22
|
-
ctx.font = `${css("--pie-center-value-font-weight")} ${
|
|
29
|
+
ctx.font = `${css("--pie-center-value-font-weight")} ${valueFontSize}px ${fontFamily}`;
|
|
23
30
|
ctx.fillStyle = css("--text-primary");
|
|
24
31
|
ctx.fillText(String(centerText.value), centerX, valueY);
|
|
25
32
|
if (hasLabel) {
|
|
26
|
-
ctx.font = `${css("--pie-center-label-font-weight")} ${
|
|
33
|
+
ctx.font = `${css("--pie-center-label-font-weight")} ${labelFontSize}px ${fontFamily}`;
|
|
27
34
|
ctx.fillStyle = css("--text-secondary");
|
|
28
|
-
ctx.fillText(String(centerText.label), centerX, centerY +
|
|
35
|
+
ctx.fillText(String(centerText.label), centerX, centerY + labelFontSize * 1.1);
|
|
29
36
|
}
|
|
30
37
|
ctx.restore();
|
|
31
38
|
}
|
package/dist/chart/pieChart.js
CHANGED
|
@@ -59,7 +59,16 @@ const PieChart = (_a) => {
|
|
|
59
59
|
}, [fontSize, dark]);
|
|
60
60
|
const defOptions = (0, react_1.useMemo)(() => (0, getDefaultOptions_1.getDefaultOptions)(), []);
|
|
61
61
|
const chartOptions = (0, utils_1.deepMerge)(defOptions, options);
|
|
62
|
-
const { isHidden, toggleHidden } = (0, useHidden_1.useHidden)();
|
|
62
|
+
const { isHidden, toggleHidden: rawToggle } = (0, useHidden_1.useHidden)();
|
|
63
|
+
const pieData = data.datasets[0].data;
|
|
64
|
+
const toggleHidden = (0, react_1.useCallback)((index) => {
|
|
65
|
+
if (!isHidden(index)) {
|
|
66
|
+
const visibleCount = pieData.filter((_, i) => !isHidden(i)).length;
|
|
67
|
+
if (visibleCount <= 1)
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
rawToggle(index);
|
|
71
|
+
}, [isHidden, rawToggle, pieData]);
|
|
63
72
|
const chartData = (0, react_1.useMemo)(() => {
|
|
64
73
|
const chData = Object.assign({}, data);
|
|
65
74
|
chData.datasets = chData.datasets.map(ds => (0, getDefaultDatasetStyle_1.getDefaultDatasetStyle)(ds));
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useDeviceType = exports.getDeviceType = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
+
const useIsomorphicLayoutEffect_1 = require("./useIsomorphicLayoutEffect");
|
|
5
6
|
const useResize_1 = require("./useResize");
|
|
6
7
|
const deviceType_1 = require("./deviceType");
|
|
7
8
|
const topWindowContext_1 = require("../../utils/topWindow/topWindowContext");
|
|
@@ -25,7 +26,7 @@ const useDeviceType = (callback) => {
|
|
|
25
26
|
(0, useResize_1.useResize)(() => {
|
|
26
27
|
setDeviceType((0, exports.getDeviceType)(win.innerWidth));
|
|
27
28
|
}, true);
|
|
28
|
-
(0,
|
|
29
|
+
(0, useIsomorphicLayoutEffect_1.useIsomorphicLayoutEffect)(() => {
|
|
29
30
|
callback(deviceType);
|
|
30
31
|
}, [deviceType, callback]);
|
|
31
32
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useIsomorphicLayoutEffect = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const isDomEnv_1 = require("../isDomEnv");
|
|
6
|
+
exports.useIsomorphicLayoutEffect = (0, isDomEnv_1.isDomEnv)() ? react_1.useLayoutEffect : react_1.useEffect;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isDomEnv = void 0;
|
|
4
|
-
|
|
5
|
-
const isDomEnv = () => { var _a; return !!(typeof window !== "undefined" && typeof (window === null || window === void 0 ? void 0 : window.document) !== "undefined" && typeof ((_a = window === null || window === void 0 ? void 0 : window.document) === null || _a === void 0 ? void 0 : _a.createElement) !== "undefined"); };
|
|
4
|
+
const isDomEnv = () => !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
|
|
6
5
|
exports.isDomEnv = isDomEnv;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useUniqueId = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
5
|
+
const generateId_1 = require("./generateId");
|
|
6
6
|
/**
|
|
7
7
|
* `useUniqueId` is a custom React hook that generates and returns a unique identifier.
|
|
8
8
|
*
|
|
@@ -29,7 +29,7 @@ const utils_1 = require("./utils");
|
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
const useUniqueId = () => {
|
|
32
|
-
const [id] = (0, react_1.useState)(() => (0,
|
|
32
|
+
const [id] = (0, react_1.useState)(() => (0, generateId_1.generateId)());
|
|
33
33
|
return id;
|
|
34
34
|
};
|
|
35
35
|
exports.useUniqueId = useUniqueId;
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generates a random unique ID string.
|
|
3
|
-
*
|
|
4
|
-
* @remarks
|
|
5
|
-
* **Prefer `React.useId()`** inside React components. `useId` produces IDs that are
|
|
6
|
-
* stable across server and client renders, preventing SSR hydration mismatches.
|
|
7
|
-
* Use `generateId` only outside of a React component context where `useId` is not available.
|
|
8
|
-
*/
|
|
9
|
-
export declare const generateId: () => string;
|
|
10
1
|
export declare const echo: <T = unknown>(_: T) => T;
|
|
11
2
|
export declare function flattenArrays<T>(arrayOfArrays: T[][]): T[];
|
|
12
3
|
type TPlainObject = Record<string, unknown>;
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deepClone = exports.deepMerge = exports.flattenArrays = exports.echo =
|
|
3
|
+
exports.deepClone = exports.deepMerge = exports.flattenArrays = exports.echo = void 0;
|
|
4
4
|
const zen_1 = require("../utils/zen");
|
|
5
|
-
/**
|
|
6
|
-
* Generates a random unique ID string.
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* **Prefer `React.useId()`** inside React components. `useId` produces IDs that are
|
|
10
|
-
* stable across server and client renders, preventing SSR hydration mismatches.
|
|
11
|
-
* Use `generateId` only outside of a React component context where `useId` is not available.
|
|
12
|
-
*/
|
|
13
|
-
const generateId = () => "id" + Math.random().toString().substring(2);
|
|
14
|
-
exports.generateId = generateId;
|
|
15
5
|
const echo = (_) => _;
|
|
16
6
|
exports.echo = echo;
|
|
17
7
|
function flattenArrays(arrayOfArrays) {
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
// do not update the order of imports, as some of the files depend on variables defined in other files
|
|
2
|
+
// only variables that are used in multiple files should be defined here, and they should not depend on any other variables
|
|
1
3
|
@import "fonts/roboto.less";
|
|
2
4
|
@import "fonts/robotomono.less";
|
|
3
|
-
@import "
|
|
5
|
+
@import "fonts/notosarabic.less";
|
|
6
|
+
@main-font-family: Roboto, "Segoe UI", Segoe, "Helvetica Neue", Helvetica, sans-serif;
|
|
7
|
+
@arabic-font-family: "Noto Sans Arabic", Roboto, "Segoe UI", Segoe, "Helvetica Neue", Helvetica, sans-serif;
|
|
8
|
+
@driver-font-family: "Roboto Mono", "Segoe UI", Segoe, "Helvetica Neue", Helvetica, sans-serif;
|
|
9
|
+
@rem: 16rem;
|
|
10
|
+
|
|
4
11
|
@import "typography/typography.less";
|
|
12
|
+
|
|
13
|
+
@import "colors/colors.less";
|
|
5
14
|
@import "caption/caption.less";
|
|
6
15
|
@import "ellipsis.less";
|
|
7
16
|
@import "notSelectable.less";
|
|
@@ -13,6 +22,9 @@
|
|
|
13
22
|
@import "zIndex.less";
|
|
14
23
|
@import "rangeFieldMixin.less";
|
|
15
24
|
|
|
25
|
+
// do not set variables or styles here,
|
|
26
|
+
// as this file is imported in all other files and it may cause circular dependencies
|
|
27
|
+
|
|
16
28
|
@border-width-default: 1px;
|
|
17
29
|
@border-radius-default: 4px;
|
|
18
30
|
@padding-top-bottom: 8px;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2022 The Noto Project Authors (https://github.com/notofonts/arabic)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://openfontlicense.org
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Noto Sans Arabic https://fonts.google.com/noto/specimen/Noto+Sans+Arabic
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
@font-face {
|
|
6
|
+
font-family: "Noto Sans Arabic";
|
|
7
|
+
font-style: normal;
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
font-display: fallback;
|
|
10
|
+
src:
|
|
11
|
+
url("./notosarabic/NotoSansArabic-Regular.woff2") format("woff2"),
|
|
12
|
+
url("./notosarabic/NotoSansArabic-Regular.woff") format("woff");
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@font-face {
|
|
16
|
+
font-family: "Noto Sans Arabic";
|
|
17
|
+
font-style: normal;
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
font-display: fallback;
|
|
20
|
+
src:
|
|
21
|
+
url("./notosarabic/NotoSansArabic-Medium.woff2") format("woff2"),
|
|
22
|
+
url("./notosarabic/NotoSansArabic-Medium.woff") format("woff");
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@font-face {
|
|
26
|
+
font-family: "Noto Sans Arabic";
|
|
27
|
+
font-style: normal;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
font-display: fallback;
|
|
30
|
+
src:
|
|
31
|
+
url("./notosarabic/NotoSansArabic-SemiBold.woff2") format("woff2"),
|
|
32
|
+
url("./notosarabic/NotoSansArabic-SemiBold.woff") format("woff");
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@font-face {
|
|
36
|
+
font-family: "Noto Sans Arabic";
|
|
37
|
+
font-style: normal;
|
|
38
|
+
font-weight: 700;
|
|
39
|
+
font-display: fallback;
|
|
40
|
+
src:
|
|
41
|
+
url("./notosarabic/NotoSansArabic-Bold.woff2") format("woff2"),
|
|
42
|
+
url("./notosarabic/NotoSansArabic-Bold.woff") format("woff");
|
|
43
|
+
}
|
|
@@ -14,12 +14,18 @@
|
|
|
14
14
|
letter-spacing: @letter-spacing;
|
|
15
15
|
line-height: @line-height;
|
|
16
16
|
text-transform: @text-transform;
|
|
17
|
+
text-decoration: none;
|
|
18
|
+
|
|
19
|
+
html:lang(ar) & {
|
|
20
|
+
font-family: var(--arabic-font-family);
|
|
21
|
+
}
|
|
17
22
|
}
|
|
18
23
|
|
|
19
24
|
:root {
|
|
20
25
|
--main-font: Roboto, "Segoe UI", Segoe, "Helvetica Neue", Helvetica, sans-serif;
|
|
21
26
|
--main-font-data: "Roboto Mono", "Segoe UI", Segoe, "Helvetica Neue", Helvetica, sans-serif;
|
|
22
27
|
--data-font-drive: "Roboto Mono", "Segoe UI", Segoe, "Helvetica Neue", Helvetica, sans-serif;
|
|
28
|
+
--arabic-font-family: "Noto Sans Arabic", Roboto, "Segoe UI", Segoe, "Helvetica Neue", Helvetica, sans-serif;
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
// Labels
|
|
@@ -7,21 +7,19 @@ import { DeviceType } from "../../../../commonHelpers/hooks/deviceType";
|
|
|
7
7
|
type TBulkAction = IBulkActionLink | IBulkActionButton;
|
|
8
8
|
export interface IBulkActionsProps extends IZenComponentProps {
|
|
9
9
|
selected: number;
|
|
10
|
-
/**
|
|
11
|
-
* When `true`, displays "All selected" instead of a count, and enables action buttons
|
|
12
|
-
* even when `selected` is 0 (i.e., cross-page "select all" is active).
|
|
13
|
-
*/
|
|
14
10
|
allSelected?: boolean;
|
|
15
11
|
onClearSelection: () => void;
|
|
12
|
+
onSelectAll?: () => void;
|
|
16
13
|
gridType?: DeviceType;
|
|
17
14
|
children?: ReactElement<TBulkAction> | null | (ReactElement<TBulkAction> | null)[];
|
|
15
|
+
turnOffSelectAll?: boolean;
|
|
18
16
|
}
|
|
19
17
|
export interface IBulkActions extends IBulkActionsProps {
|
|
20
18
|
ActionLink: (props: IBulkActionLink) => ReactNode;
|
|
21
19
|
ActionButton: (props: IBulkActionButton) => ReactNode;
|
|
22
20
|
}
|
|
23
21
|
export declare const BulkActions: {
|
|
24
|
-
({ selected, allSelected, className, onClearSelection, gridType, children }: IBulkActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
({ selected, allSelected, className, onClearSelection, onSelectAll, gridType, children, turnOffSelectAll }: IBulkActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
25
23
|
ActionLink: ({ title, icon, link, disabled, type, ref }: IBulkActionLink) => import("react/jsx-runtime").JSX.Element;
|
|
26
24
|
ActionButton: ({ title, icon, clickHandler, onClick, disabled, type, ref }: IBulkActionButton) => import("react/jsx-runtime").JSX.Element;
|
|
27
25
|
translations: string[];
|
|
@@ -89,6 +89,33 @@ injectString("zh-Hans", "Clear selection", "\u6E05\u9664\u9009\u62E9");
|
|
|
89
89
|
injectString("zh-TW", "Clear selection", "\u6E05\u9664\u9078\u53D6\u9805\u76EE");
|
|
90
90
|
injectString("ro-RO", "Clear selection", "\u0218terge\u021Bi selec\u021Bia");
|
|
91
91
|
injectString("ar-SA", "Clear selection", "\u0645\u0633\u062D \u0627\u0644\u062A\u062D\u062F\u064A\u062F");
|
|
92
|
+
injectString("cs", "Select all", "Vybrat v\u0161e");
|
|
93
|
+
injectString("da-DK", "Select all", "V\xE6lg alle");
|
|
94
|
+
injectString("de", "Select all", "Alle ausw\xE4hlen");
|
|
95
|
+
injectString("en", "Select all", "Select all");
|
|
96
|
+
injectString("es", "Select all", "Seleccionar todo");
|
|
97
|
+
injectString("fi-FI", "Select all", "Valitse kaikki");
|
|
98
|
+
injectString("fr", "Select all", "S\xE9lectionner tout");
|
|
99
|
+
injectString("fr-FR", "Select all", "S\xE9lectionner tout");
|
|
100
|
+
injectString("hu-HU", "Select all", "V\xE1laszd ki az \xF6sszeset.");
|
|
101
|
+
injectString("id", "Select all", "Pilih semua");
|
|
102
|
+
injectString("it", "Select all", "Selezionare tutto");
|
|
103
|
+
injectString("ja", "Select all", "\u3059\u3079\u3066\u9078\u629E");
|
|
104
|
+
injectString("ko-KR", "Select all", "\uBAA8\uB450 \uC120\uD0DD");
|
|
105
|
+
injectString("ms", "Select all", "Pilih semua");
|
|
106
|
+
injectString("nb-NO", "Select all", "Velg alle");
|
|
107
|
+
injectString("nl", "Select all", "Alles selecteren");
|
|
108
|
+
injectString("pl", "Select all", "Wybierz wszystko");
|
|
109
|
+
injectString("pt-BR", "Select all", "Selecionar tudo");
|
|
110
|
+
injectString("pt-PT", "Select all", "Selecionar tudo");
|
|
111
|
+
injectString("sk-SK", "Select all", "Vyber v\u0161etko.");
|
|
112
|
+
injectString("sv", "Select all", "V\xE4lj alla");
|
|
113
|
+
injectString("th", "Select all", "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14");
|
|
114
|
+
injectString("tr", "Select all", "T\xFCm\xFCn\xFC se\xE7");
|
|
115
|
+
injectString("zh-Hans", "Select all", "\u5168\u9009");
|
|
116
|
+
injectString("zh-TW", "Select all", "\u5168\u9078");
|
|
117
|
+
injectString("ro-RO", "Select all", "Selecta\u021Bi tot");
|
|
118
|
+
injectString("ar-SA", "Select all", "\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644");
|
|
92
119
|
injectString("cs", "More", "V\xEDce");
|
|
93
120
|
injectString("da-DK", "More", "Mere");
|
|
94
121
|
injectString("de", "More", "Mehr");
|
|
@@ -128,13 +155,16 @@ const useNonFittingElements_1 = require("../../../../header/hooks/useNonFittingE
|
|
|
128
155
|
const useResizeObserver_1 = require("../../../../commonHelpers/hooks/useResizeObserver");
|
|
129
156
|
const menu_1 = require("../../../../menu/menu");
|
|
130
157
|
const iconDotVertical_1 = require("../../../../icons/iconDotVertical");
|
|
158
|
+
const button_1 = require("../../../../button/button");
|
|
131
159
|
const BulkActions = ({
|
|
132
160
|
selected,
|
|
133
161
|
allSelected,
|
|
134
162
|
className,
|
|
135
163
|
onClearSelection,
|
|
164
|
+
onSelectAll,
|
|
136
165
|
gridType = deviceType_1.DeviceType.Desktop,
|
|
137
|
-
children
|
|
166
|
+
children,
|
|
167
|
+
turnOffSelectAll
|
|
138
168
|
}) => {
|
|
139
169
|
var _a;
|
|
140
170
|
const {
|
|
@@ -178,7 +208,13 @@ const BulkActions = ({
|
|
|
178
208
|
}), (0, jsx_runtime_1.jsx)("span", {
|
|
179
209
|
className: "zen-bulk-actions__number-of-selected ellipsis",
|
|
180
210
|
children: text
|
|
181
|
-
}), (0, jsx_runtime_1.
|
|
211
|
+
}), onSelectAll && !turnOffSelectAll ? (0, jsx_runtime_1.jsx)(button_1.Button, {
|
|
212
|
+
type: "tertiary",
|
|
213
|
+
className: "zen-bulk-actions__select-all",
|
|
214
|
+
disabled: allSelected,
|
|
215
|
+
onClick: onSelectAll,
|
|
216
|
+
children: translate("Select all")
|
|
217
|
+
}) : null, (0, jsx_runtime_1.jsxs)("div", {
|
|
182
218
|
className: "zen-bulk-actions__action-button-holder",
|
|
183
219
|
ref: buttonHolder,
|
|
184
220
|
children: [react_1.Children.map(visibleElements, element => (0, react_1.cloneElement)(element, {
|
|
@@ -116,12 +116,15 @@ const DateInputInnerControlBlock = props => {
|
|
|
116
116
|
value: timePickerValue,
|
|
117
117
|
onChange: timeChangeHandler,
|
|
118
118
|
isMobileView: isMobileView,
|
|
119
|
-
fullWidth: true
|
|
119
|
+
fullWidth: true,
|
|
120
|
+
// eslint-disable-next-line
|
|
121
|
+
// @ts-ignore
|
|
122
|
+
dataTimeId: id
|
|
120
123
|
}), isHasTimeError ? (0, jsx_runtime_1.jsx)(formFieldError_1.FormFieldError, {
|
|
121
124
|
id: timeErrorId,
|
|
122
125
|
error: translate("The time must be set")
|
|
123
126
|
}) : null]
|
|
124
|
-
}) : null, [isActiveField, isHasTimeError,
|
|
127
|
+
}) : null, [selectTime, isActiveField, isHasTimeError, timePickerValue, timeChangeHandler, isMobileView, id, timeErrorId, translate]);
|
|
125
128
|
return (0, jsx_runtime_1.jsxs)("div", {
|
|
126
129
|
className: (0, classNames_1.classNames)(["zen-date-input-inner__control-block", className || ""]),
|
|
127
130
|
children: [title ? (0, jsx_runtime_1.jsx)("label", {
|
|
@@ -197,6 +197,7 @@ injectString("zh-Hans", "Previous", "\u524D\u4E00");
|
|
|
197
197
|
injectString("zh-TW", "Previous", "\u4E0A\u4E00\u500B");
|
|
198
198
|
injectString("ro-RO", "Previous", "\xCEnapoi");
|
|
199
199
|
injectString("ar-SA", "Previous", "\u0627\u0644\u0633\u0627\u0628\u0642");
|
|
200
|
+
injectString("en", "Previous date period", "Previous date period");
|
|
200
201
|
injectString("cs", "Next", "Dal\u0161\xED");
|
|
201
202
|
injectString("da-DK", "Next", "N\xE6ste");
|
|
202
203
|
injectString("de", "Next", "N\xE4chstes");
|
|
@@ -224,6 +225,7 @@ injectString("zh-Hans", "Next", "\u4E0B\u4E00\u4E2A");
|
|
|
224
225
|
injectString("zh-TW", "Next", "\u4E0B\u4E00\u6B65");
|
|
225
226
|
injectString("ro-RO", "Next", "\xCEnainte");
|
|
226
227
|
injectString("ar-SA", "Next", "\u0627\u0644\u062A\u0627\u0644\u064A");
|
|
228
|
+
injectString("en", "Next date period", "Next date period");
|
|
227
229
|
const textIconButton_1 = require("../textIconButton/textIconButton");
|
|
228
230
|
const button_1 = require("../button/button");
|
|
229
231
|
const iconCalendar_1 = require("../icons/iconCalendar");
|
|
@@ -701,6 +703,7 @@ const DateRangeRaw = props => {
|
|
|
701
703
|
onClick: decreaseRange,
|
|
702
704
|
className: (0, classNames_1.classNames)(["zen-date-range__stepper", "zen-date-range__stepper--left"]),
|
|
703
705
|
title: translate("Previous"),
|
|
706
|
+
"aria-label": translate("Previous date period"),
|
|
704
707
|
children: (0, jsx_runtime_1.jsx)(iconChevronLeftSmall_1.IconChevronLeftSmall, {
|
|
705
708
|
size: isDrive || isMobile ? "huge" : "large"
|
|
706
709
|
})
|
|
@@ -710,6 +713,7 @@ const DateRangeRaw = props => {
|
|
|
710
713
|
onClick: increaseRange,
|
|
711
714
|
className: (0, classNames_1.classNames)(["zen-date-range__stepper", "zen-date-range__stepper--right"]),
|
|
712
715
|
title: translate("Next"),
|
|
716
|
+
"aria-label": translate("Next date period"),
|
|
713
717
|
children: (0, jsx_runtime_1.jsx)(iconChevronRightSmall_1.IconChevronRightSmall, {
|
|
714
718
|
size: isDrive || isMobile ? "huge" : "large"
|
|
715
719
|
})
|
|
@@ -718,4 +722,4 @@ const DateRangeRaw = props => {
|
|
|
718
722
|
});
|
|
719
723
|
};
|
|
720
724
|
exports.DateRangeRaw = DateRangeRaw;
|
|
721
|
-
exports.TRANSLATIONS = ["Custom", "Date range", "Clear", "Cancel", "Apply", "Reset", "Today", "Next", "Previous", "Choose dates", "Date range not available", "Choose your date range", "Some of the dates you selected aren
|
|
725
|
+
exports.TRANSLATIONS = ["Custom", "Date range", "Clear", "Cancel", "Apply", "Reset", "Today", "Next", "Previous", "Choose dates", "Date range not available", "Choose your date range", "Some of the dates you selected aren’t available. Please try a different range.", "Please select the dates you want to view.", "Previous date period", "Next date period"];
|
|
@@ -14,6 +14,7 @@ const buttonType_1 = require("../../button/buttonType");
|
|
|
14
14
|
const textIconButton_1 = require("../../textIconButton/textIconButton");
|
|
15
15
|
const useLanguage_1 = require("../../utils/localization/useLanguage");
|
|
16
16
|
const iconSettings6_1 = require("../../icons/iconSettings6");
|
|
17
|
+
injectString("en", "Active filters: {}", "Active filters: {}");
|
|
17
18
|
injectString("cs", "Filters", "Filtry");
|
|
18
19
|
injectString("da-DK", "Filters", "Filtre");
|
|
19
20
|
injectString("de", "Filters", "Filter");
|
|
@@ -118,6 +119,7 @@ const FiltersBarActions = ({
|
|
|
118
119
|
onClick: onShowAllFilters,
|
|
119
120
|
icon: iconSettings6_1.IconSettings6,
|
|
120
121
|
iconPosition: textIconButton_1.ButtonIconPosition.Start,
|
|
122
|
+
"aria-label": selectedQuantityToDisplay && selectedQuantityToDisplay > 0 ? translate("Active filters: {}").replace("{}", selectedQuantityToDisplay.toString()) : translate("Filters"),
|
|
121
123
|
children: (0, jsx_runtime_1.jsxs)("span", {
|
|
122
124
|
className: "zen-filters-toolbar__action-label",
|
|
123
125
|
children: [translate("Filters"), selectedQuantityToDisplay && selectedQuantityToDisplay > 0 ? (0, jsx_runtime_1.jsx)("span", {
|
|
@@ -143,4 +145,4 @@ const FiltersBarActions = ({
|
|
|
143
145
|
});
|
|
144
146
|
};
|
|
145
147
|
exports.FiltersBarActions = FiltersBarActions;
|
|
146
|
-
exports.TRANSLATIONS = ["Filters", "Clear", "Search"];
|
|
148
|
+
exports.TRANSLATIONS = ["Filters", "Clear", "Search", "Active filters: {}"];
|