@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.
Files changed (97) hide show
  1. package/README.md +8 -7
  2. package/dist/checkboxListWithAction/checkboxListWithAction.d.ts +7 -0
  3. package/dist/checkboxListWithAction/checkboxListWithAction.js +57 -44
  4. package/dist/datePickerCommon/hooks/useDateRangeRaw/useDateRangeRawCore.d.ts +7 -1
  5. package/dist/datePickerCommon/hooks/useDateRangeRaw/useDateRangeRawCore.js +5 -5
  6. package/dist/dateRangeRawNew/hooks/useDateRangeNewParts.d.ts +7 -1
  7. package/dist/dateRangeRawNew/hooks/useDateRangeNewParts.js +24 -15
  8. package/dist/dateRangeRawNew/hooks/useDateRangeRawNew.js +2 -2
  9. package/dist/dateRangeRawNew/hooks/useRangeEntry.js +31 -4
  10. package/dist/dropdownRaw/dropdownHelper.d.ts +4 -0
  11. package/dist/dropdownRaw/dropdownHelper.js +11 -3
  12. package/dist/dropdownRaw/types.d.ts +6 -0
  13. package/dist/index.css +104 -2
  14. package/dist/mobileSheet/mobileSheet.js +1 -0
  15. package/dist/selectList/selectListItem.d.ts +7 -1
  16. package/dist/selectList/selectListItem.js +24 -7
  17. package/dist/utils/localization/translations/ar-001.json +2 -1
  18. package/dist/utils/localization/translations/bg-BG.json +2 -1
  19. package/dist/utils/localization/translations/cs.json +2 -1
  20. package/dist/utils/localization/translations/da-DK.json +2 -1
  21. package/dist/utils/localization/translations/de.json +2 -1
  22. package/dist/utils/localization/translations/el-GR.json +2 -1
  23. package/dist/utils/localization/translations/en.json +2 -1
  24. package/dist/utils/localization/translations/es.json +2 -1
  25. package/dist/utils/localization/translations/et-EE.json +2 -1
  26. package/dist/utils/localization/translations/fi-FI.json +2 -1
  27. package/dist/utils/localization/translations/fr-FR.json +2 -1
  28. package/dist/utils/localization/translations/fr.json +2 -1
  29. package/dist/utils/localization/translations/hu-HU.json +2 -1
  30. package/dist/utils/localization/translations/id.json +2 -1
  31. package/dist/utils/localization/translations/it.json +2 -1
  32. package/dist/utils/localization/translations/ja.json +2 -1
  33. package/dist/utils/localization/translations/ka-GE.json +2 -1
  34. package/dist/utils/localization/translations/ko-KR.json +2 -1
  35. package/dist/utils/localization/translations/lt-LT.json +2 -1
  36. package/dist/utils/localization/translations/lv-LV.json +2 -1
  37. package/dist/utils/localization/translations/ms.json +2 -1
  38. package/dist/utils/localization/translations/nb-NO.json +2 -1
  39. package/dist/utils/localization/translations/nl.json +2 -1
  40. package/dist/utils/localization/translations/pl.json +2 -1
  41. package/dist/utils/localization/translations/pt-BR.json +2 -1
  42. package/dist/utils/localization/translations/pt-PT.json +2 -1
  43. package/dist/utils/localization/translations/ro-RO.json +2 -1
  44. package/dist/utils/localization/translations/sk-SK.json +2 -1
  45. package/dist/utils/localization/translations/sv.json +2 -1
  46. package/dist/utils/localization/translations/th.json +2 -1
  47. package/dist/utils/localization/translations/tr.json +2 -1
  48. package/dist/utils/localization/translations/zh-Hans.json +2 -1
  49. package/dist/utils/localization/translations/zh-TW.json +2 -1
  50. package/esm/checkboxListWithAction/checkboxListWithAction.d.ts +7 -0
  51. package/esm/checkboxListWithAction/checkboxListWithAction.js +52 -44
  52. package/esm/datePickerCommon/hooks/useDateRangeRaw/useDateRangeRawCore.d.ts +7 -1
  53. package/esm/datePickerCommon/hooks/useDateRangeRaw/useDateRangeRawCore.js +5 -5
  54. package/esm/dateRangeRawNew/hooks/useDateRangeNewParts.d.ts +7 -1
  55. package/esm/dateRangeRawNew/hooks/useDateRangeNewParts.js +24 -15
  56. package/esm/dateRangeRawNew/hooks/useDateRangeRawNew.js +2 -2
  57. package/esm/dateRangeRawNew/hooks/useRangeEntry.js +31 -4
  58. package/esm/dropdownRaw/dropdownHelper.d.ts +4 -0
  59. package/esm/dropdownRaw/dropdownHelper.js +11 -3
  60. package/esm/dropdownRaw/types.d.ts +6 -0
  61. package/esm/mobileSheet/mobileSheet.js +1 -0
  62. package/esm/selectList/selectListItem.d.ts +7 -1
  63. package/esm/selectList/selectListItem.js +22 -8
  64. package/esm/utils/localization/translations/ar-001.json +2 -1
  65. package/esm/utils/localization/translations/bg-BG.json +2 -1
  66. package/esm/utils/localization/translations/cs.json +2 -1
  67. package/esm/utils/localization/translations/da-DK.json +2 -1
  68. package/esm/utils/localization/translations/de.json +2 -1
  69. package/esm/utils/localization/translations/el-GR.json +2 -1
  70. package/esm/utils/localization/translations/en.json +2 -1
  71. package/esm/utils/localization/translations/es.json +2 -1
  72. package/esm/utils/localization/translations/et-EE.json +2 -1
  73. package/esm/utils/localization/translations/fi-FI.json +2 -1
  74. package/esm/utils/localization/translations/fr-FR.json +2 -1
  75. package/esm/utils/localization/translations/fr.json +2 -1
  76. package/esm/utils/localization/translations/hu-HU.json +2 -1
  77. package/esm/utils/localization/translations/id.json +2 -1
  78. package/esm/utils/localization/translations/it.json +2 -1
  79. package/esm/utils/localization/translations/ja.json +2 -1
  80. package/esm/utils/localization/translations/ka-GE.json +2 -1
  81. package/esm/utils/localization/translations/ko-KR.json +2 -1
  82. package/esm/utils/localization/translations/lt-LT.json +2 -1
  83. package/esm/utils/localization/translations/lv-LV.json +2 -1
  84. package/esm/utils/localization/translations/ms.json +2 -1
  85. package/esm/utils/localization/translations/nb-NO.json +2 -1
  86. package/esm/utils/localization/translations/nl.json +2 -1
  87. package/esm/utils/localization/translations/pl.json +2 -1
  88. package/esm/utils/localization/translations/pt-BR.json +2 -1
  89. package/esm/utils/localization/translations/pt-PT.json +2 -1
  90. package/esm/utils/localization/translations/ro-RO.json +2 -1
  91. package/esm/utils/localization/translations/sk-SK.json +2 -1
  92. package/esm/utils/localization/translations/sv.json +2 -1
  93. package/esm/utils/localization/translations/th.json +2 -1
  94. package/esm/utils/localization/translations/tr.json +2 -1
  95. package/esm/utils/localization/translations/zh-Hans.json +2 -1
  96. package/esm/utils/localization/translations/zh-TW.json +2 -1
  97. 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
- - MYG-151521: preserve filter names and show applied selection counts.
53
- - MYG-151520: add grouped filter-chip presentation and navigation over the existing flat child-filter state.
54
- - MYG-150676: add BT sensor icons and use the mixer icon for the Filters All Filters chip.
55
- - MYG-151577: allow an inline loading spinner in place of the Banner icon.
56
- - MYG-121322: revise the date picker to match the new visual styling and interaction design.
57
- - MYG-145390: prevent `FiltersBarPeriodPicker` from firing `onChange` before a Custom date range is applied.
58
- - MYG-155693: 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.
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", "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.");
112
- injectString("da-DK", "Has additional actions. Use right arrow to access button, left arrow to return.", "Har yderligere handlinger. Brug h\xF8jre pil for at \xE5bne knappen, venstre pil for at vende tilbage.");
113
- injectString("de", "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.");
114
- injectString("en", "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.");
115
- injectString("es", "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.");
116
- injectString("fi-FI", "Has additional actions. Use right arrow to access button, left arrow to return.", "Sis\xE4lt\xE4\xE4 lis\xE4toimintoja. Siirry painikkeeseen oikealla nuolella, palaa vasemmalla nuolella.");
117
- injectString("fr", "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.");
118
- injectString("fr-FR", "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.");
119
- injectString("hu-HU", "Has additional actions. Use right arrow to access button, left arrow to return.", "Tov\xE1bbi m\u0171veletek \xE9rhet\u0151k el. A gomb el\xE9r\xE9s\xE9hez haszn\xE1lja a jobb nyilat, a visszat\xE9r\xE9shez a bal nyilat.");
120
- injectString("id", "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.");
121
- injectString("it", "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.");
122
- injectString("ja", "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.");
123
- injectString("ko-KR", "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.");
124
- injectString("ms", "Has additional actions. Use right arrow to access button, left arrow to return.", "Mempunyai tindakan tambahan. Gunakan anak panah kanan untuk mengakses butang, anak panah kiri untuk kembali.");
125
- injectString("nb-NO", "Has additional actions. Use right arrow to access button, left arrow to return.", "Har flere handlinger. Bruk h\xF8yre pil for \xE5 \xE5pne knappen, venstre pil for \xE5 g\xE5 tilbake.");
126
- injectString("nl", "Has additional actions. Use right arrow to access button, left arrow to return.", "Heeft aanvullende acties. Gebruik de rechter pijltoets om de knop te openen, de linker pijltoets om terug te keren.");
127
- injectString("pl", "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.");
128
- injectString("pt-BR", "Has additional actions. Use right arrow to access button, left arrow to return.", "Tem a\xE7\xF5es adicionais. Use a seta direita para acessar o bot\xE3o, a seta esquerda para retornar.");
129
- injectString("pt-PT", "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.");
130
- injectString("sk-SK", "Has additional actions. Use right arrow to access button, left arrow to return.", "M\xE1 \u010Fal\u0161ie akcie. Na pr\xEDstup k tla\u010Didlu pou\u017Eite \u0161\xEDpku vpravo, na n\xE1vrat \u0161\xEDpku v\u013Eavo.");
131
- injectString("sv", "Has additional actions. Use right arrow to access button, left arrow to return.", "Har ytterligare \xE5tg\xE4rder. Anv\xE4nd h\xF6ger piltangent f\xF6r att \xF6ppna knappen, v\xE4nster piltangent f\xF6r att \xE5terg\xE5.");
132
- injectString("th", "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.");
133
- injectString("tr", "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.");
134
- injectString("zh-Hans", "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.");
135
- injectString("zh-TW", "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.");
136
- injectString("ro-RO", "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.");
137
- injectString("ar-001", "Has additional actions. Use right arrow to access button, left arrow to return.", "\u064A\u062D\u062A\u0648\u064A \u0639\u0644\u0649 \u0625\u062C\u0631\u0627\u0621\u0627\u062A \u0625\u0636\u0627\u0641\u064A\u0629. \u0627\u0633\u062A\u062E\u062F\u0645 \u0627\u0644\u0633\u0647\u0645 \u0627\u0644\u0623\u064A\u0645\u0646 \u0644\u0644\u0648\u0635\u0648\u0644 \u0625\u0644\u0649 \u0627\u0644\u0632\u0631\u060C \u0648\u0627\u0644\u0633\u0647\u0645 \u0627\u0644\u0623\u064A\u0633\u0631 \u0644\u0644\u0639\u0648\u062F\u0629.");
138
- injectString("lt-LT", "Has additional actions. Use right arrow to access button, left arrow to return.", "Yra papildom\u0173 veiksm\u0173. De\u0161iniojo rodykl\u0117s klavi\u0161o paspauskite mygtuk\u0105, kairiojo - gr\u012F\u017Ekite.");
139
- injectString("lv-LV", "Has additional actions. Use right arrow to access button, left arrow to return.", "Ir papildu darb\u012Bbas. Lab\u0101 bulti\u0146a - piek\u013C\u016Bt pogai, kreis\u0101 bulti\u0146a - atgriezties.");
140
- injectString("ka-GE", "Has additional actions. Use right arrow to access button, left arrow to return.", "\u10D3\u10D0\u10DB\u10D0\u10E2\u10D4\u10D1\u10D8\u10D7\u10D8 \u10DB\u10DD\u10E5\u10DB\u10D4\u10D3\u10D4\u10D1\u10D4\u10D1\u10D8 \u10D0\u10E0\u10E1\u10D4\u10D1\u10DD\u10D1\u10E1. \u10DB\u10D0\u10E0\u10EF\u10D5\u10D4\u10DC\u10D0 \u10D8\u10E1\u10E0\u10D8\u10D7 \u10EC\u10D5\u10D3\u10DD\u10DB\u10D8\u10E1\u10D7\u10D5\u10D8\u10E1, \u10DB\u10D0\u10E0\u10EA\u10EE\u10D4\u10DC\u10D8\u10D7 \u10D3\u10D0\u10E1\u10D0\u10D1\u10E0\u10E3\u10DC\u10D4\u10D1\u10DA\u10D0\u10D3.");
141
- injectString("el-GR", "Has additional actions. Use right arrow to access button, left arrow to return.", "\u03A5\u03C0\u03AC\u03C1\u03C7\u03BF\u03C5\u03BD \u03C0\u03C1\u03CC\u03C3\u03B8\u03B5\u03C4\u03B5\u03C2 \u03B5\u03BD\u03AD\u03C1\u03B3\u03B5\u03B9\u03B5\u03C2. \u0394\u03B5\u03BE\u03AF \u03B2\u03AD\u03BB\u03BF\u03C2 \u03B3\u03B9\u03B1 \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7, \u03B1\u03C1\u03B9\u03C3\u03C4\u03B5\u03C1\u03CC \u03B2\u03AD\u03BB\u03BF\u03C2 \u03B3\u03B9\u03B1 \u03B5\u03C0\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE.");
142
- injectString("et-EE", "Has additional actions. Use right arrow to access button, left arrow to return.", "Sisaldab lisatoiminguid. Nupu avamiseks kasutage paremnoolt, tagasi p\xF6\xF6rdumiseks vasaknoolt.");
143
- injectString("bg-BG", "Has additional actions. Use right arrow to access button, left arrow to return.", "\u0418\u043C\u0430 \u0434\u043E\u043F\u044A\u043B\u043D\u0438\u0442\u0435\u043B\u043D\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F. \u0414\u0435\u0441\u0435\u043D \u0441\u0442\u0440\u0435\u043B\u0435\u0446 \u0437\u0430 \u0434\u043E\u0441\u0442\u044A\u043F, \u043B\u044F\u0432 \u0441\u0442\u0440\u0435\u043B\u0435\u0446 \u0437\u0430 \u0432\u0440\u044A\u0449\u0430\u043D\u0435.");
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
- var _a;
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: [(0, jsx_runtime_1.jsxs)("div", Object.assign({
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.jsx)("span", Object.assign({
390
- className: "zen-ellipsis"
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: lbl
393
- })), getLabelCountSelectedChild(option.countSelectedChild, otherArgs)]
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("Has additional actions. Use right arrow to access button, left arrow to return.")
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) => void;
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 = ((_a = selection === null || selection === void 0 ? void 0 : selection.getRange) === null || _a === void 0 ? void 0 : _a.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 = ((_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().to : value === null || value === void 0 ? void 0 : value.to;
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) => void;
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
- selectOption(optionId);
72
- if (!timeSelect || optionId === customCalendarId_1.CUSTOM_CALENDAR_ID || !before.from || !before.to)
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: range.from ? rebaseToDay(range.from, timeFrom, false) : range.from,
77
- to: range.to ? rebaseToDay(range.to, timeTo, true) : range.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) || (!!range.from && range.from === range.to);
82
- setCustomDate(current => {
83
- const kept = keepTime(current);
84
- return isEmpty(kept) ? current : 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
- setSelectedRange(current => {
87
- if (!current)
88
- return current;
89
- const kept = keepTime({ from: current.from.toISOString(), to: current.to.toISOString() });
90
- return isEmpty(kept) ? current : Object.assign(Object.assign({}, current), { from: new Date(kept.from), to: new Date(kept.to) });
91
- });
92
- }, [customDate, rebaseToDay, selectOption, setCustomDate, setSelectedRange, timeSelect]);
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 || value) return;
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, value]);
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
- setCustomDate(locked);
68
- markCustom(locked);
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(locked === customDate ? undefined : adjusted, locked);
71
- }, [customDate, lockEndDate, lockStartDate, markCustom, raiseAdjustment, rebaseToDay, setCustomDate]);
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.divider ? {
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
  /**