@geotab/zenith 3.17.1-beta.2 → 3.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -7
- package/dist/checkboxListWithAction/checkboxListWithAction.d.ts +7 -0
- package/dist/checkboxListWithAction/checkboxListWithAction.js +57 -44
- package/dist/datePickerCommon/hooks/useDateRangeRaw/useDateRangeRawCore.d.ts +7 -1
- package/dist/datePickerCommon/hooks/useDateRangeRaw/useDateRangeRawCore.js +5 -5
- package/dist/dateRangeRawNew/hooks/useDateRangeNewParts.d.ts +7 -1
- package/dist/dateRangeRawNew/hooks/useDateRangeNewParts.js +24 -15
- package/dist/dateRangeRawNew/hooks/useDateRangeRawNew.js +2 -2
- package/dist/dateRangeRawNew/hooks/useRangeEntry.js +31 -4
- package/dist/dropdownRaw/dropdownHelper.d.ts +4 -0
- package/dist/dropdownRaw/dropdownHelper.js +11 -3
- package/dist/dropdownRaw/types.d.ts +6 -0
- package/dist/index.css +104 -2
- package/dist/mobileSheet/mobileSheet.js +1 -0
- package/dist/selectList/selectListItem.d.ts +7 -1
- package/dist/selectList/selectListItem.js +24 -7
- package/dist/utils/localization/translations/ar-001.json +2 -1
- package/dist/utils/localization/translations/bg-BG.json +2 -1
- package/dist/utils/localization/translations/cs.json +2 -1
- package/dist/utils/localization/translations/da-DK.json +2 -1
- package/dist/utils/localization/translations/de.json +2 -1
- package/dist/utils/localization/translations/el-GR.json +2 -1
- package/dist/utils/localization/translations/en.json +2 -1
- package/dist/utils/localization/translations/es.json +2 -1
- package/dist/utils/localization/translations/et-EE.json +2 -1
- package/dist/utils/localization/translations/fi-FI.json +2 -1
- package/dist/utils/localization/translations/fr-FR.json +2 -1
- package/dist/utils/localization/translations/fr.json +2 -1
- package/dist/utils/localization/translations/hu-HU.json +2 -1
- package/dist/utils/localization/translations/id.json +2 -1
- package/dist/utils/localization/translations/it.json +2 -1
- package/dist/utils/localization/translations/ja.json +2 -1
- package/dist/utils/localization/translations/ka-GE.json +2 -1
- package/dist/utils/localization/translations/ko-KR.json +2 -1
- package/dist/utils/localization/translations/lt-LT.json +2 -1
- package/dist/utils/localization/translations/lv-LV.json +2 -1
- package/dist/utils/localization/translations/ms.json +2 -1
- package/dist/utils/localization/translations/nb-NO.json +2 -1
- package/dist/utils/localization/translations/nl.json +2 -1
- package/dist/utils/localization/translations/pl.json +2 -1
- package/dist/utils/localization/translations/pt-BR.json +2 -1
- package/dist/utils/localization/translations/pt-PT.json +2 -1
- package/dist/utils/localization/translations/ro-RO.json +2 -1
- package/dist/utils/localization/translations/sk-SK.json +2 -1
- package/dist/utils/localization/translations/sv.json +2 -1
- package/dist/utils/localization/translations/th.json +2 -1
- package/dist/utils/localization/translations/tr.json +2 -1
- package/dist/utils/localization/translations/zh-Hans.json +2 -1
- package/dist/utils/localization/translations/zh-TW.json +2 -1
- package/esm/checkboxListWithAction/checkboxListWithAction.d.ts +7 -0
- package/esm/checkboxListWithAction/checkboxListWithAction.js +52 -44
- package/esm/datePickerCommon/hooks/useDateRangeRaw/useDateRangeRawCore.d.ts +7 -1
- package/esm/datePickerCommon/hooks/useDateRangeRaw/useDateRangeRawCore.js +5 -5
- package/esm/dateRangeRawNew/hooks/useDateRangeNewParts.d.ts +7 -1
- package/esm/dateRangeRawNew/hooks/useDateRangeNewParts.js +24 -15
- package/esm/dateRangeRawNew/hooks/useDateRangeRawNew.js +2 -2
- package/esm/dateRangeRawNew/hooks/useRangeEntry.js +31 -4
- package/esm/dropdownRaw/dropdownHelper.d.ts +4 -0
- package/esm/dropdownRaw/dropdownHelper.js +11 -3
- package/esm/dropdownRaw/types.d.ts +6 -0
- package/esm/mobileSheet/mobileSheet.js +1 -0
- package/esm/selectList/selectListItem.d.ts +7 -1
- package/esm/selectList/selectListItem.js +22 -8
- package/esm/utils/localization/translations/ar-001.json +2 -1
- package/esm/utils/localization/translations/bg-BG.json +2 -1
- package/esm/utils/localization/translations/cs.json +2 -1
- package/esm/utils/localization/translations/da-DK.json +2 -1
- package/esm/utils/localization/translations/de.json +2 -1
- package/esm/utils/localization/translations/el-GR.json +2 -1
- package/esm/utils/localization/translations/en.json +2 -1
- package/esm/utils/localization/translations/es.json +2 -1
- package/esm/utils/localization/translations/et-EE.json +2 -1
- package/esm/utils/localization/translations/fi-FI.json +2 -1
- package/esm/utils/localization/translations/fr-FR.json +2 -1
- package/esm/utils/localization/translations/fr.json +2 -1
- package/esm/utils/localization/translations/hu-HU.json +2 -1
- package/esm/utils/localization/translations/id.json +2 -1
- package/esm/utils/localization/translations/it.json +2 -1
- package/esm/utils/localization/translations/ja.json +2 -1
- package/esm/utils/localization/translations/ka-GE.json +2 -1
- package/esm/utils/localization/translations/ko-KR.json +2 -1
- package/esm/utils/localization/translations/lt-LT.json +2 -1
- package/esm/utils/localization/translations/lv-LV.json +2 -1
- package/esm/utils/localization/translations/ms.json +2 -1
- package/esm/utils/localization/translations/nb-NO.json +2 -1
- package/esm/utils/localization/translations/nl.json +2 -1
- package/esm/utils/localization/translations/pl.json +2 -1
- package/esm/utils/localization/translations/pt-BR.json +2 -1
- package/esm/utils/localization/translations/pt-PT.json +2 -1
- package/esm/utils/localization/translations/ro-RO.json +2 -1
- package/esm/utils/localization/translations/sk-SK.json +2 -1
- package/esm/utils/localization/translations/sv.json +2 -1
- package/esm/utils/localization/translations/th.json +2 -1
- package/esm/utils/localization/translations/tr.json +2 -1
- package/esm/utils/localization/translations/zh-Hans.json +2 -1
- package/esm/utils/localization/translations/zh-TW.json +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,13 +49,14 @@ Zenith library provides components defined in Zenith Design System. It includes
|
|
|
49
49
|
|
|
50
50
|
### 3.17.1
|
|
51
51
|
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
52
|
+
- Preserve filter names and show applied selection counts.
|
|
53
|
+
- Add grouped filter-chip presentation and navigation over the existing flat child-filter state.
|
|
54
|
+
- Add icons and secondary metadata to Dropdown list items.
|
|
55
|
+
- Add BT sensor icons and use the mixer icon for the Filters All Filters chip.
|
|
56
|
+
- Allow an inline loading spinner in place of the Banner icon.
|
|
57
|
+
- Revise the date picker to match the new visual styling and interaction design.
|
|
58
|
+
- Prevent `FiltersBarPeriodPicker` from firing `onChange` before a Custom date range is applied.
|
|
59
|
+
- Enforce typed-date limits and locked range endpoints, keep mobile time edits in order, prevent touch-scroll selection, respect user time zones, and preserve the calendar-only mobile layout.
|
|
59
60
|
|
|
60
61
|
### 3.17.0
|
|
61
62
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import React from "react";
|
|
1
3
|
import "./checkboxListWithAction.less";
|
|
2
4
|
import { IZenComponentProps } from "../commonHelpers/zenComponent";
|
|
3
5
|
import { IColor } from "../groupsFilterRaw/groupsFilterInterfaces";
|
|
6
|
+
import { IIcon } from "../icons/icon";
|
|
4
7
|
export interface ICheckboxListWithActionOption {
|
|
5
8
|
label: string;
|
|
6
9
|
title?: string;
|
|
@@ -11,6 +14,10 @@ export interface ICheckboxListWithActionOption {
|
|
|
11
14
|
isWithAction: boolean;
|
|
12
15
|
countSelectedChild?: number;
|
|
13
16
|
color?: IColor;
|
|
17
|
+
/** Leading 16×16 icon rendered before the label text. */
|
|
18
|
+
icon?: FC<IIcon>;
|
|
19
|
+
/** Secondary text rendered on a second line below the primary label. */
|
|
20
|
+
metaData?: string;
|
|
14
21
|
/** When true, renders a 1px separator line below this item. */
|
|
15
22
|
divider?: boolean;
|
|
16
23
|
}
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
const {
|
|
4
4
|
injectString
|
|
5
5
|
} = require("../utils/localization/translationsDictionary");
|
|
6
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
7
|
+
return mod && mod.__esModule ? mod : {
|
|
8
|
+
"default": mod
|
|
9
|
+
};
|
|
10
|
+
};
|
|
6
11
|
Object.defineProperty(exports, "__esModule", {
|
|
7
12
|
value: true
|
|
8
13
|
});
|
|
@@ -108,39 +113,40 @@ injectString("ka-GE", "Toggle {groupName} filter", "{groupName} \u10E4\u10D8\u10
|
|
|
108
113
|
injectString("el-GR", "Toggle {groupName} filter", "\u0395\u03BD\u03B1\u03BB\u03BB\u03B1\u03B3\u03AE \u03C6\u03AF\u03BB\u03C4\u03C1\u03BF\u03C5 {groupName}");
|
|
109
114
|
injectString("et-EE", "Toggle {groupName} filter", "L\xFClita {groupName} filter");
|
|
110
115
|
injectString("bg-BG", "Toggle {groupName} filter", "\u041F\u0440\u0435\u0432\u043A\u043B\u044E\u0447\u0432\u0430\u043D\u0435 \u043D\u0430 \u0444\u0438\u043B\u0442\u044A\u0440\u0430 \u0437\u0430 {groupName}");
|
|
111
|
-
injectString("cs", "
|
|
112
|
-
injectString("da-DK", "
|
|
113
|
-
injectString("de", "
|
|
114
|
-
injectString("en", "
|
|
115
|
-
injectString("es", "
|
|
116
|
-
injectString("fi-FI", "
|
|
117
|
-
injectString("fr", "
|
|
118
|
-
injectString("fr-FR", "
|
|
119
|
-
injectString("hu-HU", "
|
|
120
|
-
injectString("id", "
|
|
121
|
-
injectString("it", "
|
|
122
|
-
injectString("ja", "
|
|
123
|
-
injectString("ko-KR", "
|
|
124
|
-
injectString("ms", "
|
|
125
|
-
injectString("nb-NO", "
|
|
126
|
-
injectString("nl", "
|
|
127
|
-
injectString("pl", "
|
|
128
|
-
injectString("pt-BR", "
|
|
129
|
-
injectString("pt-PT", "
|
|
130
|
-
injectString("sk-SK", "
|
|
131
|
-
injectString("sv", "
|
|
132
|
-
injectString("th", "
|
|
133
|
-
injectString("tr", "
|
|
134
|
-
injectString("zh-Hans", "
|
|
135
|
-
injectString("zh-TW", "
|
|
136
|
-
injectString("ro-RO", "
|
|
137
|
-
injectString("ar-001", "
|
|
138
|
-
injectString("lt-LT", "
|
|
139
|
-
injectString("lv-LV", "
|
|
140
|
-
injectString("ka-GE", "
|
|
141
|
-
injectString("el-GR", "
|
|
142
|
-
injectString("et-EE", "
|
|
143
|
-
injectString("bg-BG", "
|
|
116
|
+
injectString("cs", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Tento polo\u017Eka m\xE1 dal\u0161\xED akce. Stiskn\u011Bte prav\xFD \u0161ipku, abyste roz\u0161\xED\u0159ili. Stiskn\u011Bte \u0161ipku doleva, abyste se vr\xE1tili zp\u011Bt.");
|
|
117
|
+
injectString("da-DK", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Dette element har yderligere handlinger. Tryk p\xE5 h\xF8jre piletast for at udvide. Tryk p\xE5 venstre piletast for at g\xE5 tilbage.");
|
|
118
|
+
injectString("de", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Dieses Element enth\xE4lt zus\xE4tzliche Aktionen. Dr\xFCcken Sie die rechte Pfeiltaste, um zu erweitern. Dr\xFCcken Sie die linke Pfeiltaste, um zur\xFCckzugehen.");
|
|
119
|
+
injectString("en", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.");
|
|
120
|
+
injectString("es", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Este elemento tiene acciones adicionales. Presione la tecla de flecha derecha para expandir. Presione la tecla de flecha izquierda para regresar.");
|
|
121
|
+
injectString("fi-FI", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "T\xE4ll\xE4 kohteella on lis\xE4toimintoja. Paina oikeaa nuolin\xE4pp\xE4int\xE4 laajentaaksesi. Paina vasenta nuolin\xE4pp\xE4int\xE4 palataksesi takaisin.");
|
|
122
|
+
injectString("fr", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Cet \xE9l\xE9ment comporte des actions suppl\xE9mentaires. Appuyez sur la touche fl\xE9ch\xE9e de droite pour d\xE9velopper. Appuyez sur la touche fl\xE9ch\xE9e de gauche pour revenir en arri\xE8re.");
|
|
123
|
+
injectString("fr-FR", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Cet \xE9l\xE9ment dispose d\u2019actions suppl\xE9mentaires. Appuyez sur la fl\xE8che vers la droite pour agrandir. Appuyez sur la fl\xE8che gauche pour revenir en arri\xE8re.");
|
|
124
|
+
injectString("hu-HU", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Ez a t\xE9tel tov\xE1bbi m\u0171veleteket tartalmaz. Nyomja meg a jobb ny\xEDl kulcsot a kib\u0151v\xEDt\xE9shez. Nyomja le a balos ny\xEDl kulcsot, hogy visszal\xE9pjen.");
|
|
125
|
+
injectString("id", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Item ini memiliki tindakan tambahan. Tekan tombol panah kanan untuk meluaskan. Tekan tombol panah kiri untuk kembali.");
|
|
126
|
+
injectString("it", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Questo elemento presenta azioni ulteriori. Premere il tasto freccia destra per espandere. Premere il tasto freccia sinistra per tornare indietro.");
|
|
127
|
+
injectString("ja", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "\u3053\u306E\u9805\u76EE\u306B\u306F\u8FFD\u52A0\u306E\u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u3059\u3002\u53F3\u77E2\u5370\u30AD\u30FC\u3092\u62BC\u3059\u3068\u5C55\u958B\u3055\u308C\u307E\u3059\u3002\u5DE6\u77E2\u5370\u30AD\u30FC\u3092\u62BC\u3059\u3068\u3001\u623B\u308A\u307E\u3059\u3002");
|
|
128
|
+
injectString("ko-KR", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "\uC774 \uD56D\uBAA9\uC5D0\uB294 \uCD94\uAC00 \uC791\uC5C5\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC624\uB978\uCABD \uD654\uC0B4\uD45C \uD0A4\uB97C \uB20C\uB7EC \uD655\uC7A5\uD558\uC2ED\uC2DC\uC624. \uC67C\uCABD \uD654\uC0B4\uD45C \uD0A4\uB97C \uB20C\uB7EC \uB4A4\uB85C \uC774\uB3D9\uD558\uC2ED\uC2DC\uC624.");
|
|
129
|
+
injectString("ms", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Item ini mempunyai tindakan tambahan. Tekan kekunci anak panah kanan untuk mengembangkan. Tekan kekunci anak panah kiri untuk kembali.");
|
|
130
|
+
injectString("nb-NO", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Dette elementet har flere handlinger. Trykk p\xE5 h\xF8yre piltast for \xE5 utvide. Trykk p\xE5 venstre piltast for \xE5 g\xE5 tilbake.");
|
|
131
|
+
injectString("nl", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Dit item heeft extra acties. Druk op de pijltoets naar rechts om uit te vouwen. Druk op de pijltoets naar links om terug te gaan.");
|
|
132
|
+
injectString("pl", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Ten element ma dodatkowe dzia\u0142ania. Naci\u015Bnij strza\u0142k\u0119 w prawo, aby rozwin\u0105\u0107. Naci\u015Bnij strza\u0142k\u0119 w lewo, aby wr\xF3ci\u0107.");
|
|
133
|
+
injectString("pt-BR", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Este item possui a\xE7\xF5es adicionais. Pressione a tecla de seta para a direita para expandir. Pressione a tecla de seta para a esquerda para voltar.");
|
|
134
|
+
injectString("pt-PT", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Este item tem a\xE7\xF5es adicionais. Prima a tecla de seta para a direita para expandir. Prima a tecla de seta para a esquerda para voltar atr\xE1s.");
|
|
135
|
+
injectString("sk-SK", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "T\xE1to polo\u017Eka m\xE1 \u010Fal\u0161ie akcie. Stla\u010Den\xEDm kl\xE1vesu so \u0161\xEDpkou doprava rozbal\xEDte. Stla\u010Den\xEDm kl\xE1vesu so \u0161\xEDpkou do\u013Eava sa vr\xE1tite sp\xE4\u0165.");
|
|
136
|
+
injectString("sv", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Denna artikel har ytterligare \xE5tg\xE4rder. Tryck p\xE5 h\xF6gerpiltangenten f\xF6r att expandera. Tryck p\xE5 v\xE4nsterpiltangent f\xF6r att g\xE5 tillbaka.");
|
|
137
|
+
injectString("th", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E19\u0E35\u0E49\u0E21\u0E35\u0E01\u0E32\u0E23\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21 \u0E01\u0E14\u0E1B\u0E38\u0E48\u0E21\u0E25\u0E39\u0E01\u0E28\u0E23\u0E02\u0E27\u0E32\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E02\u0E22\u0E32\u0E22 \u0E01\u0E14\u0E1B\u0E38\u0E48\u0E21\u0E25\u0E39\u0E01\u0E28\u0E23\u0E0B\u0E49\u0E32\u0E22\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E22\u0E49\u0E2D\u0E19\u0E01\u0E25\u0E31\u0E1A");
|
|
138
|
+
injectString("tr", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Bu \xF6\u011Fenin ek eylemleri var. Geni\u015Fletmek i\xE7in sa\u011F ok tu\u015Funa bas\u0131n. Geri d\xF6nmek i\xE7in sol ok tu\u015Funa bas\u0131n.");
|
|
139
|
+
injectString("zh-Hans", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "\u6B64\u9879\u76EE\u6709\u9644\u52A0\u64CD\u4F5C\u3002\u6309\u53F3\u7BAD\u5934\u952E\u5C55\u5F00\u3002\u6309\u5DE6\u7BAD\u5934\u952E\u8FD4\u56DE\u3002");
|
|
140
|
+
injectString("zh-TW", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "\u6B64\u9805\u76EE\u6709\u5176\u4ED6\u52D5\u4F5C\u3002\u6309\u4E0B\u5411\u53F3\u7BAD\u982D\u9375\u4EE5\u5C55\u958B\u3002\u6309\u4E0B\u5411\u5DE6\u7BAD\u982D\u9375\u4EE5\u8FD4\u56DE\u3002");
|
|
141
|
+
injectString("ro-RO", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Acest element are ac\u021Biuni suplimentare. Ap\u0103sa\u021Bi tasta s\u0103geat\u0103 dreapta pentru a extinde. Ap\u0103sa\u021Bi tasta s\u0103geat\u0103 st\xE2nga pentru a reveni.");
|
|
142
|
+
injectString("ar-001", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "\u064A\u062D\u062A\u0648\u064A \u0647\u0630\u0627 \u0627\u0644\u0639\u0646\u0635\u0631 \u0639\u0644\u0649 \u0625\u062C\u0631\u0627\u0621\u0627\u062A \u0625\u0636\u0627\u0641\u064A\u0629. \u0627\u0636\u063A\u0637 \u0639\u0644\u0649 \u0645\u0641\u062A\u0627\u062D \u0627\u0644\u0633\u0647\u0645 \u0627\u0644\u0623\u064A\u0645\u0646 \u0644\u0644\u062A\u0648\u0633\u064A\u0639. \u0627\u0636\u063A\u0637 \u0639\u0644\u0649 \u0645\u0641\u062A\u0627\u062D \u0627\u0644\u0633\u0647\u0645 \u0627\u0644\u0623\u064A\u0633\u0631 \u0644\u0644\u0631\u062C\u0648\u0639.");
|
|
143
|
+
injectString("lt-LT", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "\u0160is elementas turi papildom\u0173 veiksm\u0173. Paspauskite de\u0161iniosios rodykl\u0117s klavi\u0161\u0105, kad i\u0161skleistum\u0117te. Paspauskite kairiosios rodykl\u0117s klavi\u0161\u0105, kad gr\u012F\u017Etum\u0117te.");
|
|
144
|
+
injectString("lv-LV", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "\u0160im vienumam ir papildu darb\u012Bbas. Nospiediet labo bulttausti\u0146u, lai izv\u0113rstu. Nospiediet kreiso bulttausti\u0146u, lai atgrieztos.");
|
|
145
|
+
injectString("ka-GE", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "\u10D0\u10DB \u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10E1 \u10D0\u10E5\u10D5\u10E1 \u10D3\u10D0\u10DB\u10D0\u10E2\u10D4\u10D1\u10D8\u10D7\u10D8 \u10DB\u10DD\u10E5\u10DB\u10D4\u10D3\u10D4\u10D1\u10D4\u10D1\u10D8. \u10D2\u10D0\u10E1\u10D0\u10E8\u10DA\u10D4\u10DA\u10D0\u10D3 \u10D3\u10D0\u10D0\u10ED\u10D8\u10E0\u10D4\u10D7 \u10DB\u10D0\u10E0\u10EF\u10D5\u10D4\u10DC\u10D0 \u10D8\u10E1\u10E0\u10D8\u10E1 \u10E6\u10D8\u10DA\u10D0\u10D9\u10E1. \u10E3\u10D9\u10D0\u10DC \u10D3\u10D0\u10E1\u10D0\u10D1\u10E0\u10E3\u10DC\u10D4\u10D1\u10DA\u10D0\u10D3 \u10D3\u10D0\u10D0\u10ED\u10D8\u10E0\u10D4\u10D7 \u10DB\u10D0\u10E0\u10EA\u10EE\u10D4\u10DC\u10D0 \u10D8\u10E1\u10E0\u10D8\u10E1 \u10E6\u10D8\u10DA\u10D0\u10D9\u10E1.");
|
|
146
|
+
injectString("el-GR", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "\u0391\u03C5\u03C4\u03CC \u03C4\u03BF \u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03BF \u03AD\u03C7\u03B5\u03B9 \u03C0\u03C1\u03CC\u03C3\u03B8\u03B5\u03C4\u03B5\u03C2 \u03B5\u03BD\u03AD\u03C1\u03B3\u03B5\u03B9\u03B5\u03C2. \u03A0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 \u03C4\u03BF \u03C0\u03BB\u03AE\u03BA\u03C4\u03C1\u03BF \u03B4\u03B5\u03BE\u03B9\u03BF\u03CD \u03B2\u03AD\u03BB\u03BF\u03C5\u03C2 \u03B3\u03B9\u03B1 \u03B1\u03BD\u03AC\u03C0\u03C4\u03C5\u03BE\u03B7. \u03A0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 \u03C4\u03BF \u03C0\u03BB\u03AE\u03BA\u03C4\u03C1\u03BF \u03B1\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03BF\u03CD \u03B2\u03AD\u03BB\u03BF\u03C5\u03C2 \u03B3\u03B9\u03B1 \u03B5\u03C0\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE.");
|
|
147
|
+
injectString("et-EE", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "Sellel \xFCksusel on lisatoimingud. Vajutage laiendamiseks paremat nooleklahvi. Vajutage tagasi liikumiseks vasakut nooleklahvi.");
|
|
148
|
+
injectString("bg-BG", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.", "\u0422\u043E\u0437\u0438 \u0435\u043B\u0435\u043C\u0435\u043D\u0442 \u0438\u043C\u0430 \u0434\u043E\u043F\u044A\u043B\u043D\u0438\u0442\u0435\u043B\u043D\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F. \u041D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 \u043A\u043B\u0430\u0432\u0438\u0448\u0430 \u0441\u044A\u0441 \u0441\u0442\u0440\u0435\u043B\u043A\u0430 \u043D\u0430\u0434\u044F\u0441\u043D\u043E, \u0437\u0430 \u0434\u0430 \u0440\u0430\u0437\u0433\u044A\u043D\u0435\u0442\u0435. \u041D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 \u043A\u043B\u0430\u0432\u0438\u0448\u0430 \u0441\u044A\u0441 \u0441\u0442\u0440\u0435\u043B\u043A\u0430 \u043D\u0430\u043B\u044F\u0432\u043E, \u0437\u0430 \u0434\u0430 \u0441\u0435 \u0432\u044A\u0440\u043D\u0435\u0442\u0435 \u043D\u0430\u0437\u0430\u0434.");
|
|
149
|
+
const react_2 = __importDefault(require("react"));
|
|
144
150
|
const checkbox_1 = require("../checkbox/checkbox");
|
|
145
151
|
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
146
152
|
const iconChevronRight_1 = require("../icons/iconChevronRight");
|
|
@@ -179,10 +185,7 @@ const CheckboxListWithAction = ({
|
|
|
179
185
|
});
|
|
180
186
|
};
|
|
181
187
|
const handleClick = e => {
|
|
182
|
-
|
|
183
|
-
const evtTarget = e.target;
|
|
184
|
-
const elId = evtTarget.getAttribute("data-btn") || ((_a = evtTarget.parentElement) === null || _a === void 0 ? void 0 : _a.getAttribute("data-btn")) || "";
|
|
185
|
-
onClick(elId);
|
|
188
|
+
onClick(e.currentTarget.dataset.btn || "");
|
|
186
189
|
setFocusedElementType("checkbox");
|
|
187
190
|
};
|
|
188
191
|
const getFocusableElements = (0, react_1.useCallback)(() => {
|
|
@@ -383,14 +386,24 @@ const CheckboxListWithAction = ({
|
|
|
383
386
|
"data-btn": option.property
|
|
384
387
|
} : {};
|
|
385
388
|
const childEl = (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, {
|
|
386
|
-
children: [
|
|
389
|
+
children: [option.icon && react_2.default.createElement(option.icon, {
|
|
390
|
+
className: "zen-checkbox-list-with-action__item-icon",
|
|
391
|
+
size: "large"
|
|
392
|
+
}), (0, jsx_runtime_1.jsxs)("div", Object.assign({
|
|
387
393
|
className: "zen-checkbox-list-with-action__label-text zen-ellipsis"
|
|
388
394
|
}, otherArgs, {
|
|
389
|
-
children: [(0, jsx_runtime_1.
|
|
390
|
-
className: "zen-
|
|
395
|
+
children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({
|
|
396
|
+
className: "zen-checkbox-list-with-action__label-primary-row"
|
|
391
397
|
}, otherArgs, {
|
|
392
|
-
children:
|
|
393
|
-
|
|
398
|
+
children: [(0, jsx_runtime_1.jsx)("span", Object.assign({
|
|
399
|
+
className: "zen-ellipsis"
|
|
400
|
+
}, otherArgs, {
|
|
401
|
+
children: lbl
|
|
402
|
+
})), getLabelCountSelectedChild(option.countSelectedChild, otherArgs)]
|
|
403
|
+
})), option.metaData && (0, jsx_runtime_1.jsx)("span", {
|
|
404
|
+
className: "zen-checkbox-list-with-action__item-meta",
|
|
405
|
+
children: option.metaData
|
|
406
|
+
})]
|
|
394
407
|
})), (0, jsx_runtime_1.jsxs)("div", Object.assign({
|
|
395
408
|
className: "zen-checkbox-list-with-action__label-info"
|
|
396
409
|
}, otherArgs, {
|
|
@@ -472,9 +485,9 @@ const CheckboxListWithAction = ({
|
|
|
472
485
|
id: navigationInstructionsId,
|
|
473
486
|
className: "zen-checkbox-list-with-action__sr-only",
|
|
474
487
|
"aria-hidden": "true",
|
|
475
|
-
children: translate("
|
|
488
|
+
children: translate("This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back.")
|
|
476
489
|
})]
|
|
477
490
|
});
|
|
478
491
|
};
|
|
479
492
|
exports.CheckboxListWithAction = CheckboxListWithAction;
|
|
480
|
-
exports.TRANSLATIONS = ["View {groupName} children", "Toggle {groupName} filter", "Number of selected child groups - {count}"];
|
|
493
|
+
exports.TRANSLATIONS = ["View {groupName} children", "Toggle {groupName} filter", "Number of selected child groups - {count}", "This item has additional actions. Press the right arrow key to expand. Press the left arrow key to go back."];
|
|
@@ -60,7 +60,13 @@ export declare const useDateRangeRawCore: (props: TWithDefaultOptions<TDateRange
|
|
|
60
60
|
datesValidation: (val: any) => boolean;
|
|
61
61
|
isDatesValid: import("react").RefObject<boolean>;
|
|
62
62
|
previousStepOption: import("react").RefObject<string>;
|
|
63
|
-
handleDateRangeSelection: (newVal: string
|
|
63
|
+
handleDateRangeSelection: (newVal: string, transformRange?: (range: {
|
|
64
|
+
from: Date;
|
|
65
|
+
to: Date;
|
|
66
|
+
}) => {
|
|
67
|
+
from: Date;
|
|
68
|
+
to: Date;
|
|
69
|
+
}) => void;
|
|
64
70
|
handleApplyClick: () => void;
|
|
65
71
|
handleCancelClick: () => void;
|
|
66
72
|
handleClearClick: () => void;
|
|
@@ -219,12 +219,12 @@ const useDateRangeRawCore = (props, behavior) => {
|
|
|
219
219
|
}, [isOpen, isStaleCustomDraft, prevSelection]);
|
|
220
220
|
const handleDateRangeSelection = (0, react_1.useCallback)(
|
|
221
221
|
// eslint-disable-next-line complexity
|
|
222
|
-
newVal => {
|
|
223
|
-
var _a, _b;
|
|
222
|
+
(newVal, transformRange) => {
|
|
223
|
+
var _a, _b, _c;
|
|
224
224
|
const selection = options.find(option => option.id === newVal);
|
|
225
225
|
newVal === customCalendarId_1.CUSTOM_CALENDAR_ID && setShowMobileCalendar(true);
|
|
226
226
|
if (selection && newVal !== customCalendarId_1.CUSTOM_CALENDAR_ID && selection.getRange) {
|
|
227
|
-
const range = selection.getRange();
|
|
227
|
+
const range = (_a = transformRange === null || transformRange === void 0 ? void 0 : transformRange(selection.getRange())) !== null && _a !== void 0 ? _a : selection.getRange();
|
|
228
228
|
const normalizedDates = (0, normalizeDates_1.normalizeDates)(range.from.toISOString(), range.to.toISOString(), disableFutureDates, disablePastDates, disableDatesBefore, disableDatesAfter);
|
|
229
229
|
const newRange = newVal === customCalendarId_1.CUSTOM_CALENDAR_ID ? {
|
|
230
230
|
from: new Date(normalizedDates.from),
|
|
@@ -242,8 +242,8 @@ const useDateRangeRawCore = (props, behavior) => {
|
|
|
242
242
|
}, newRange)));
|
|
243
243
|
previousStepOption.current = "";
|
|
244
244
|
} else {
|
|
245
|
-
const startDateForNormalize = ((
|
|
246
|
-
const endDateForNormalize = ((
|
|
245
|
+
const startDateForNormalize = ((_b = selection === null || selection === void 0 ? void 0 : selection.getRange) === null || _b === void 0 ? void 0 : _b.call(selection)) && (selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.label) !== newVal ? selection.getRange().from : value === null || value === void 0 ? void 0 : value.from;
|
|
246
|
+
const endDateForNormalize = ((_c = selection === null || selection === void 0 ? void 0 : selection.getRange) === null || _c === void 0 ? void 0 : _c.call(selection)) && (selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.label) !== newVal ? selection.getRange().to : value === null || value === void 0 ? void 0 : value.to;
|
|
247
247
|
if (!datesValidation(startDateForNormalize === undefined && endDateForNormalize === undefined ? undefined : {
|
|
248
248
|
from: startDateForNormalize,
|
|
249
249
|
to: endDateForNormalize
|
|
@@ -12,7 +12,13 @@ interface IUseDateRangeNewParts {
|
|
|
12
12
|
setShowMobileCalendar: (isVisible: boolean) => void;
|
|
13
13
|
/** What was last applied; closing without Apply goes back to it. */
|
|
14
14
|
prevSelection: IDateRangeValue | undefined;
|
|
15
|
-
selectOption: (optionId: string
|
|
15
|
+
selectOption: (optionId: string, transformRange?: (range: {
|
|
16
|
+
from: Date;
|
|
17
|
+
to: Date;
|
|
18
|
+
}) => {
|
|
19
|
+
from: Date;
|
|
20
|
+
to: Date;
|
|
21
|
+
}) => void;
|
|
16
22
|
segmentedTriggerRef: RefObject<HTMLElement | null>;
|
|
17
23
|
hasApplyButton: boolean;
|
|
18
24
|
defaultValue?: IDateRangeValue;
|
|
@@ -68,28 +68,37 @@ const useDateRangeNewParts = ({ isOpen, setIsOpen, isMobile, customDate, setCust
|
|
|
68
68
|
const { rebaseToDay } = rangeEntry;
|
|
69
69
|
const handleOptionSelect = (0, react_1.useCallback)((optionId) => {
|
|
70
70
|
const before = customDate;
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
if (!timeSelect || optionId === customCalendarId_1.CUSTOM_CALENDAR_ID || !before.from || !before.to) {
|
|
72
|
+
selectOption(optionId);
|
|
73
73
|
return;
|
|
74
|
+
}
|
|
74
75
|
const { from: timeFrom, to: timeTo } = before;
|
|
75
76
|
const keepTime = (range) => ({
|
|
76
|
-
from:
|
|
77
|
-
to:
|
|
77
|
+
from: new Date(rebaseToDay(range.from.toISOString(), timeFrom, false)),
|
|
78
|
+
to: new Date(rebaseToDay(range.to.toISOString(), timeTo, true))
|
|
78
79
|
});
|
|
79
80
|
// Kept times that leave no range (13:00 to 13:00 on a single-day preset, or an end before the start) would make a
|
|
80
81
|
// range a form cannot take, so the preset keeps its own whole day then.
|
|
81
|
-
const isEmpty = (range) => (0, rangeOrder_1.isEndBeforeStart)(range.from, range.to) ||
|
|
82
|
-
|
|
83
|
-
const kept = keepTime(
|
|
84
|
-
return isEmpty(kept) ?
|
|
82
|
+
const isEmpty = (range) => (0, rangeOrder_1.isEndBeforeStart)(range.from.toISOString(), range.to.toISOString()) || range.from.getTime() === range.to.getTime();
|
|
83
|
+
selectOption(optionId, range => {
|
|
84
|
+
const kept = keepTime(range);
|
|
85
|
+
return isEmpty(kept) ? range : kept;
|
|
85
86
|
});
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
if (hasApplyButton) {
|
|
88
|
+
setCustomDate(current => {
|
|
89
|
+
if (!current.from || !current.to)
|
|
90
|
+
return current;
|
|
91
|
+
const kept = keepTime({ from: new Date(current.from), to: new Date(current.to) });
|
|
92
|
+
return isEmpty(kept) ? current : { from: kept.from.toISOString(), to: kept.to.toISOString() };
|
|
93
|
+
});
|
|
94
|
+
setSelectedRange(current => {
|
|
95
|
+
if (!current)
|
|
96
|
+
return current;
|
|
97
|
+
const kept = keepTime(current);
|
|
98
|
+
return isEmpty(kept) ? current : Object.assign(Object.assign({}, current), { from: kept.from, to: kept.to });
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}, [customDate, hasApplyButton, rebaseToDay, selectOption, setCustomDate, setSelectedRange, timeSelect]);
|
|
93
102
|
// The new picker only compares the dates: the pills are not a selection of their own, any draft is a custom range.
|
|
94
103
|
const isDraftUnchanged = (0, react_1.useMemo)(() => customDate.from === ((0, getRangeOption_1.isDateValid)(value === null || value === void 0 ? void 0 : value.from) ? value.from.toISOString() : undefined) &&
|
|
95
104
|
customDate.to === ((0, getRangeOption_1.isDateValid)(value === null || value === void 0 ? void 0 : value.to) ? value.to.toISOString() : undefined), [customDate.from, customDate.to, value === null || value === void 0 ? void 0 : value.from, value === null || value === void 0 ? void 0 : value.to]);
|
|
@@ -305,12 +305,12 @@ const useDateRangeRawNew = props => {
|
|
|
305
305
|
// Opened with no value, the draft starts on the default, or on today; Clear puts it back there rather than to nothing.
|
|
306
306
|
const handleClear = (0, react_1.useCallback)(() => {
|
|
307
307
|
handleClearClick();
|
|
308
|
-
if (!hasApplyButton || defaultValue
|
|
308
|
+
if (!hasApplyButton || defaultValue) return;
|
|
309
309
|
const fallback = getFallbackRange();
|
|
310
310
|
if (!fallback) return;
|
|
311
311
|
setSelectedRange(fallback.labeled);
|
|
312
312
|
setCustomDate(fallback.draft);
|
|
313
|
-
}, [defaultValue, getFallbackRange, handleClearClick, hasApplyButton, setCustomDate, setSelectedRange
|
|
313
|
+
}, [defaultValue, getFallbackRange, handleClearClick, hasApplyButton, setCustomDate, setSelectedRange]);
|
|
314
314
|
// The chip's X has no popup to press Apply in. With an Apply button the core only resets the draft, so the X reports the reset itself:
|
|
315
315
|
// the default, or nothing when the value may be unset. Without one the core already does. The footer's Clear stays staged.
|
|
316
316
|
const {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useRangeEntry = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
+
const dateUtils_1 = require("../../calendar/dateUtils");
|
|
5
6
|
const customCalendarId_1 = require("../../datePickerCommon/utils/customCalendarId");
|
|
6
7
|
const toEditableFormat_1 = require("../../datePickerNew/components/dateSegmentInput/utils/toEditableFormat");
|
|
7
8
|
const toEditableTimeFormat_1 = require("../../datePickerNew/components/dateSegmentInput/utils/toEditableTimeFormat");
|
|
@@ -62,13 +63,39 @@ const useRangeEntry = ({ customDate, setCustomDate, setSelectedRange, isOpen, lo
|
|
|
62
63
|
}, [customDate, lockEndDate, lockStartDate, markCustom, raiseAdjustment, rebaseToDay, setCustomDate, toLocalDateTime, toReverseOffsetDateTime]);
|
|
63
64
|
// A range edited by hand, dates typed or a time picked, is put in order and a locked end is kept; the banner says when an end moved.
|
|
64
65
|
const commitEdited = (0, react_1.useCallback)((next) => {
|
|
66
|
+
var _a, _b;
|
|
65
67
|
const { range: ordered, adjusted } = (0, rangeOrder_1.resolveRangeOrder)(customDate, (0, pinLockedEnds_1.pinLockedEnds)(next, lockStartDate, lockEndDate), rebaseToDay);
|
|
66
68
|
const locked = (0, applyRangeLocks_1.applyRangeLocks)(customDate, ordered, lockStartDate, lockEndDate);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
const start = locked.from ? new Date(locked.from) : undefined;
|
|
70
|
+
const end = locked.to ? new Date(locked.to) : undefined;
|
|
71
|
+
const crossesDisabledPeriod = start &&
|
|
72
|
+
end &&
|
|
73
|
+
(0, dateUtils_1.isDifferentPeriod)(toReverseOffsetDateTime(start), toReverseOffsetDateTime(end), disableFutureDates, disablePastDates, disableDatesBefore, disableDatesAfter);
|
|
74
|
+
const startChanged = locked.from !== customDate.from;
|
|
75
|
+
const validRange = crossesDisabledPeriod
|
|
76
|
+
? startChanged && !lockStartDate
|
|
77
|
+
? (0, dateUtils_1.getValidDatesForEnd)(toReverseOffsetDateTime, end, start, disableFutureDates, disablePastDates, disableDatesBefore, disableDatesAfter)
|
|
78
|
+
: (0, dateUtils_1.getValidDatesForStart)(toReverseOffsetDateTime, start, end, disableFutureDates, disablePastDates, disableDatesBefore, disableDatesAfter)
|
|
79
|
+
: undefined;
|
|
80
|
+
const committed = validRange ? { from: (_a = validRange.start) === null || _a === void 0 ? void 0 : _a.toISOString(), to: (_b = validRange.end) === null || _b === void 0 ? void 0 : _b.toISOString() } : locked;
|
|
81
|
+
setCustomDate(committed);
|
|
82
|
+
markCustom(committed);
|
|
69
83
|
// The banner says an end moved, so it is raised only for an edit that was kept.
|
|
70
|
-
raiseAdjustment(
|
|
71
|
-
}, [
|
|
84
|
+
raiseAdjustment(committed === customDate ? undefined : adjusted, committed);
|
|
85
|
+
}, [
|
|
86
|
+
customDate,
|
|
87
|
+
disableDatesAfter,
|
|
88
|
+
disableDatesBefore,
|
|
89
|
+
disableFutureDates,
|
|
90
|
+
disablePastDates,
|
|
91
|
+
lockEndDate,
|
|
92
|
+
lockStartDate,
|
|
93
|
+
markCustom,
|
|
94
|
+
raiseAdjustment,
|
|
95
|
+
rebaseToDay,
|
|
96
|
+
setCustomDate,
|
|
97
|
+
toReverseOffsetDateTime
|
|
98
|
+
]);
|
|
72
99
|
// A time picked for one end (mobile). Unlike picking a day, the typed time replaces the end's own.
|
|
73
100
|
const handleTimeSelect = (0, react_1.useCallback)((field, timeText) => {
|
|
74
101
|
const current = customDate[field];
|
|
@@ -38,6 +38,8 @@ export declare const applySortSelectedToTop: (items: IDropdownRawItem[], selecte
|
|
|
38
38
|
export declare const createSingleListOptions: (stateObj: IDropdownState, translate: (s: string) => string, listItem: IDropdownRawItem[]) => {
|
|
39
39
|
destructive: boolean | undefined;
|
|
40
40
|
divider?: boolean | undefined;
|
|
41
|
+
metaData?: string | undefined;
|
|
42
|
+
icon?: import("react").FC<import("..").IIcon> | undefined;
|
|
41
43
|
id: string;
|
|
42
44
|
children: string;
|
|
43
45
|
title: string;
|
|
@@ -47,6 +49,8 @@ export declare const createSingleListOptions: (stateObj: IDropdownState, transla
|
|
|
47
49
|
export declare const createListDataOptions: (stateObj: IDropdownState, translate: (s: string) => string, listItem: IDropdownRawItem[], isMultiselect: boolean, isAllSelected?: boolean) => ICheckboxListWithActionOption[] | {
|
|
48
50
|
destructive: boolean | undefined;
|
|
49
51
|
divider?: boolean | undefined;
|
|
52
|
+
metaData?: string | undefined;
|
|
53
|
+
icon?: import("react").FC<import("..").IIcon> | undefined;
|
|
50
54
|
id: string;
|
|
51
55
|
children: string;
|
|
52
56
|
title: string;
|
|
@@ -91,7 +91,7 @@ function prepareComboOptionsForList(actionListData, translate, options, getSelec
|
|
|
91
91
|
const selectedIds = new Set(getSelectedFn());
|
|
92
92
|
const preparedOptions = options && options.length ? options.map(option => {
|
|
93
93
|
const selectedChild = getSelectedChildFn(option.id);
|
|
94
|
-
return Object.assign(Object.assign({
|
|
94
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({
|
|
95
95
|
label: (0, groupsHelper_1.getGroupDescription)(option, translate),
|
|
96
96
|
property: option.id,
|
|
97
97
|
checked: isAllSelected ? true : selectedIds.has(option.id),
|
|
@@ -101,6 +101,10 @@ function prepareComboOptionsForList(actionListData, translate, options, getSelec
|
|
|
101
101
|
blocked: isFlatList ? option.disabled || false : false
|
|
102
102
|
}, getTitle ? {
|
|
103
103
|
title: getTitle(option.id)
|
|
104
|
+
} : {}), option.icon ? {
|
|
105
|
+
icon: option.icon
|
|
106
|
+
} : {}), option.metaData ? {
|
|
107
|
+
metaData: option.metaData
|
|
104
108
|
} : {}), option.divider ? {
|
|
105
109
|
divider: true
|
|
106
110
|
} : {});
|
|
@@ -185,14 +189,18 @@ exports.applySortSelectedToTop = applySortSelectedToTop;
|
|
|
185
189
|
const createSingleListOptions = (stateObj, translate, listItem) => {
|
|
186
190
|
const preparedOptions = listItem && listItem.length ? listItem.map(option => {
|
|
187
191
|
const description = (0, groupsHelper_1.getGroupDescription)(stateObj.groupsMap[option.id] || option, translate);
|
|
188
|
-
return Object.assign(Object.assign({
|
|
192
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({
|
|
189
193
|
id: option.id,
|
|
190
194
|
children: description,
|
|
191
195
|
// Long names are truncated by `zen-ellipsis`, so expose the full text on hover
|
|
192
196
|
title: description,
|
|
193
197
|
disabled: option.disabled,
|
|
194
198
|
multiLevel: Object.keys(stateObj.groupsMap).length === 0 ? false : option.children && option.children.length > 0 && stateObj.groupsMap[option.id] !== undefined
|
|
195
|
-
}, option.
|
|
199
|
+
}, option.icon ? {
|
|
200
|
+
icon: option.icon
|
|
201
|
+
} : {}), option.metaData ? {
|
|
202
|
+
metaData: option.metaData
|
|
203
|
+
} : {}), option.divider ? {
|
|
196
204
|
divider: true
|
|
197
205
|
} : {}), {
|
|
198
206
|
destructive: option.destructive
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
1
2
|
import { TAlignment } from "../absolute/absolute";
|
|
2
3
|
import { IChipsParent } from "../chip/chip";
|
|
3
4
|
import { IEntityWithId } from "../commonHelpers/entity";
|
|
@@ -5,6 +6,7 @@ import { Exclusive } from "../commonHelpers/types/exclusive";
|
|
|
5
6
|
import { IReactFormItemController } from "../commonHelpers/zenComponent";
|
|
6
7
|
import { TFilterButton } from "../filterButton/filterButton";
|
|
7
8
|
import { IColor } from "../groupsFilterRaw/groupsFilterInterfaces";
|
|
9
|
+
import { IIcon } from "../icons/icon";
|
|
8
10
|
export interface ISelectionItemRaw {
|
|
9
11
|
id: string;
|
|
10
12
|
name?: string;
|
|
@@ -15,6 +17,10 @@ export interface IDropdownRawItem extends IEntityWithId {
|
|
|
15
17
|
children?: IEntityWithId[];
|
|
16
18
|
color?: IColor;
|
|
17
19
|
disabled?: boolean;
|
|
20
|
+
/** Leading 16×16 icon component rendered before the label. */
|
|
21
|
+
icon?: FC<IIcon>;
|
|
22
|
+
/** Secondary text rendered on a second line below the primary label. */
|
|
23
|
+
metaData?: string;
|
|
18
24
|
/** When true, renders a 1px separator line below this item. Purely visual — does not affect selection or keyboard navigation. */
|
|
19
25
|
divider?: boolean;
|
|
20
26
|
/**
|