@pega/cosmos-react-core 3.0.0-dev.16.0 → 3.0.0-dev.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
  2. package/lib/components/AppShell/AppHeader.js +4 -6
  3. package/lib/components/AppShell/AppHeader.js.map +1 -1
  4. package/lib/components/AppShell/AppHeader.styles.d.ts +16 -0
  5. package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -0
  6. package/lib/components/AppShell/AppHeader.styles.js +155 -0
  7. package/lib/components/AppShell/AppHeader.styles.js.map +1 -0
  8. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  9. package/lib/components/AppShell/AppShell.js +44 -157
  10. package/lib/components/AppShell/AppShell.js.map +1 -1
  11. package/lib/components/AppShell/AppShell.styles.d.ts +7 -51
  12. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  13. package/lib/components/AppShell/AppShell.styles.js +44 -535
  14. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  15. package/lib/components/AppShell/AppShell.types.d.ts +16 -5
  16. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  17. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  18. package/lib/components/AppShell/AppShellContext.d.ts +2 -0
  19. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  20. package/lib/components/AppShell/AppShellContext.js +2 -0
  21. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  22. package/lib/components/AppShell/AppShellList.js +3 -1
  23. package/lib/components/AppShell/AppShellList.js.map +1 -1
  24. package/lib/components/AppShell/AppShellList.styles.d.ts +19 -0
  25. package/lib/components/AppShell/AppShellList.styles.d.ts.map +1 -0
  26. package/lib/components/AppShell/AppShellList.styles.js +141 -0
  27. package/lib/components/AppShell/AppShellList.styles.js.map +1 -0
  28. package/lib/components/AppShell/AppShellSearch.d.ts +10 -0
  29. package/lib/components/AppShell/AppShellSearch.d.ts.map +1 -0
  30. package/lib/components/AppShell/AppShellSearch.js +32 -0
  31. package/lib/components/AppShell/AppShellSearch.js.map +1 -0
  32. package/lib/components/AppShell/AppShellSearch.styles.d.ts +8 -0
  33. package/lib/components/AppShell/AppShellSearch.styles.d.ts.map +1 -0
  34. package/lib/components/AppShell/AppShellSearch.styles.js +190 -0
  35. package/lib/components/AppShell/AppShellSearch.styles.js.map +1 -0
  36. package/lib/components/AppShell/Drawer.js +2 -2
  37. package/lib/components/AppShell/Drawer.js.map +1 -1
  38. package/lib/components/AppShell/Drawer.styles.d.ts +15 -0
  39. package/lib/components/AppShell/Drawer.styles.d.ts.map +1 -0
  40. package/lib/components/AppShell/Drawer.styles.js +153 -0
  41. package/lib/components/AppShell/Drawer.styles.js.map +1 -0
  42. package/lib/components/AppShell/NavigationList.d.ts +5 -0
  43. package/lib/components/AppShell/NavigationList.d.ts.map +1 -0
  44. package/lib/components/AppShell/NavigationList.js +123 -0
  45. package/lib/components/AppShell/NavigationList.js.map +1 -0
  46. package/lib/components/AppShell/NavigationListItemWrapper.d.ts +5 -0
  47. package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -0
  48. package/lib/components/AppShell/NavigationListItemWrapper.js +109 -0
  49. package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -0
  50. package/lib/components/AppShell/Operator.js +4 -4
  51. package/lib/components/AppShell/Operator.js.map +1 -1
  52. package/lib/components/Badges/Keyboard.d.ts.map +1 -1
  53. package/lib/components/Badges/Keyboard.js +2 -0
  54. package/lib/components/Badges/Keyboard.js.map +1 -1
  55. package/lib/components/Badges/Selection.d.ts +1 -1
  56. package/lib/components/Badges/Selection.d.ts.map +1 -1
  57. package/lib/components/Badges/Selection.js +4 -2
  58. package/lib/components/Badges/Selection.js.map +1 -1
  59. package/lib/components/Banner/Banner.d.ts.map +1 -1
  60. package/lib/components/Banner/Banner.js +2 -0
  61. package/lib/components/Banner/Banner.js.map +1 -1
  62. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +2 -1
  63. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  64. package/lib/components/Breadcrumbs/Breadcrumbs.js +37 -10
  65. package/lib/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  66. package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
  67. package/lib/components/ComboBox/ComboBox.js +56 -15
  68. package/lib/components/ComboBox/ComboBox.js.map +1 -1
  69. package/lib/components/ComboBox/ComboBox.styles.d.ts +3 -1
  70. package/lib/components/ComboBox/ComboBox.styles.d.ts.map +1 -1
  71. package/lib/components/ComboBox/ComboBox.types.d.ts +5 -1
  72. package/lib/components/ComboBox/ComboBox.types.d.ts.map +1 -1
  73. package/lib/components/ComboBox/ComboBox.types.js.map +1 -1
  74. package/lib/components/ComboBox/ComboBoxInput.d.ts +7 -0
  75. package/lib/components/ComboBox/ComboBoxInput.d.ts.map +1 -1
  76. package/lib/components/ComboBox/ComboBoxInput.js +5 -2
  77. package/lib/components/ComboBox/ComboBoxInput.js.map +1 -1
  78. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
  79. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +113 -37
  80. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
  81. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts +10 -0
  82. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts.map +1 -1
  83. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.js.map +1 -1
  84. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.d.ts.map +1 -1
  85. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js +2 -2
  86. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js.map +1 -1
  87. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts +2 -0
  88. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts.map +1 -1
  89. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.js.map +1 -1
  90. package/lib/components/CompositeInput/CompositeInput.d.ts.map +1 -1
  91. package/lib/components/CompositeInput/CompositeInput.js +2 -2
  92. package/lib/components/CompositeInput/CompositeInput.js.map +1 -1
  93. package/lib/components/CompositeInput/CompositeInput.styles.d.ts.map +1 -1
  94. package/lib/components/CompositeInput/CompositeInput.styles.js +19 -17
  95. package/lib/components/CompositeInput/CompositeInput.styles.js.map +1 -1
  96. package/lib/components/Currency/CurrencyInput.d.ts.map +1 -1
  97. package/lib/components/Currency/CurrencyInput.js +17 -4
  98. package/lib/components/Currency/CurrencyInput.js.map +1 -1
  99. package/lib/components/Currency/utils.d.ts.map +1 -1
  100. package/lib/components/Currency/utils.js +3 -2
  101. package/lib/components/Currency/utils.js.map +1 -1
  102. package/lib/components/DateTime/DateTime.types.d.ts +2 -0
  103. package/lib/components/DateTime/DateTime.types.d.ts.map +1 -1
  104. package/lib/components/DateTime/DateTime.types.js.map +1 -1
  105. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  106. package/lib/components/DateTime/Input/DateInput.js +12 -3
  107. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  108. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  109. package/lib/components/DateTime/Input/DateTimeInput.js +12 -3
  110. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  111. package/lib/components/DateTime/Picker/Calendar.d.ts.map +1 -1
  112. package/lib/components/DateTime/Picker/Calendar.js +6 -12
  113. package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
  114. package/lib/components/DateTime/Picker/Calendar.styles.d.ts +2 -4
  115. package/lib/components/DateTime/Picker/Calendar.styles.d.ts.map +1 -1
  116. package/lib/components/DateTime/Picker/Calendar.styles.js +13 -55
  117. package/lib/components/DateTime/Picker/Calendar.styles.js.map +1 -1
  118. package/lib/components/DateTime/Picker/DatePicker.d.ts.map +1 -1
  119. package/lib/components/DateTime/Picker/DatePicker.js +2 -1
  120. package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
  121. package/lib/components/DateTime/Picker/DatePicker.styles.d.ts +3 -0
  122. package/lib/components/DateTime/Picker/DatePicker.styles.d.ts.map +1 -0
  123. package/lib/components/DateTime/Picker/DatePicker.styles.js +39 -0
  124. package/lib/components/DateTime/Picker/DatePicker.styles.js.map +1 -0
  125. package/lib/components/DateTime/Picker/DateRangePicker.js +1 -1
  126. package/lib/components/DateTime/Picker/DateRangePicker.js.map +1 -1
  127. package/lib/components/DateTime/Picker/TimePicker.d.ts.map +1 -1
  128. package/lib/components/DateTime/Picker/TimePicker.js +10 -5
  129. package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
  130. package/lib/components/DateTime/index.d.ts +2 -0
  131. package/lib/components/DateTime/index.d.ts.map +1 -1
  132. package/lib/components/DateTime/index.js +2 -0
  133. package/lib/components/DateTime/index.js.map +1 -1
  134. package/lib/components/Dialog/Dialog.d.ts.map +1 -1
  135. package/lib/components/Dialog/Dialog.js +3 -2
  136. package/lib/components/Dialog/Dialog.js.map +1 -1
  137. package/lib/components/ExpandCollapse/ExpandCollapse.d.ts.map +1 -1
  138. package/lib/components/ExpandCollapse/ExpandCollapse.js +1 -1
  139. package/lib/components/ExpandCollapse/ExpandCollapse.js.map +1 -1
  140. package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
  141. package/lib/components/FieldGroup/FieldGroup.js +28 -26
  142. package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
  143. package/lib/components/FormControl/FormControl.d.ts +6 -2
  144. package/lib/components/FormControl/FormControl.d.ts.map +1 -1
  145. package/lib/components/FormControl/FormControl.js +60 -35
  146. package/lib/components/FormControl/FormControl.js.map +1 -1
  147. package/lib/components/FormField/FormField.d.ts.map +1 -1
  148. package/lib/components/FormField/FormField.js +65 -5
  149. package/lib/components/FormField/FormField.js.map +1 -1
  150. package/lib/components/Input/Input.d.ts.map +1 -1
  151. package/lib/components/Input/Input.js +13 -2
  152. package/lib/components/Input/Input.js.map +1 -1
  153. package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
  154. package/lib/components/ListToolbar/ListToolbar.js +64 -9
  155. package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
  156. package/lib/components/ListToolbar/ListToolbar.types.d.ts +2 -0
  157. package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
  158. package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
  159. package/lib/components/ListToolbar/PresetMenuPopover.d.ts +12 -0
  160. package/lib/components/ListToolbar/PresetMenuPopover.d.ts.map +1 -0
  161. package/lib/components/ListToolbar/PresetMenuPopover.js +36 -0
  162. package/lib/components/ListToolbar/PresetMenuPopover.js.map +1 -0
  163. package/lib/components/ListToolbar/QueryOptionPopover.d.ts.map +1 -1
  164. package/lib/components/ListToolbar/QueryOptionPopover.js +14 -44
  165. package/lib/components/ListToolbar/QueryOptionPopover.js.map +1 -1
  166. package/lib/components/Menu/Menu.d.ts.map +1 -1
  167. package/lib/components/Menu/Menu.js +8 -5
  168. package/lib/components/Menu/Menu.js.map +1 -1
  169. package/lib/components/Menu/Menu.styles.js +1 -1
  170. package/lib/components/Menu/Menu.styles.js.map +1 -1
  171. package/lib/components/Menu/Menu.types.d.ts +13 -0
  172. package/lib/components/Menu/Menu.types.d.ts.map +1 -1
  173. package/lib/components/Menu/Menu.types.js.map +1 -1
  174. package/lib/components/Menu/MenuGroup.d.ts.map +1 -1
  175. package/lib/components/Menu/MenuGroup.js +3 -3
  176. package/lib/components/Menu/MenuGroup.js.map +1 -1
  177. package/lib/components/Menu/MenuItem.d.ts.map +1 -1
  178. package/lib/components/Menu/MenuItem.js +3 -5
  179. package/lib/components/Menu/MenuItem.js.map +1 -1
  180. package/lib/components/Menu/MenuList.d.ts.map +1 -1
  181. package/lib/components/Menu/MenuList.js +14 -14
  182. package/lib/components/Menu/MenuList.js.map +1 -1
  183. package/lib/components/MetaList/MetaList.d.ts.map +1 -1
  184. package/lib/components/MetaList/MetaList.js +13 -10
  185. package/lib/components/MetaList/MetaList.js.map +1 -1
  186. package/lib/components/Number/NumberInput.d.ts.map +1 -1
  187. package/lib/components/Number/NumberInput.js +18 -5
  188. package/lib/components/Number/NumberInput.js.map +1 -1
  189. package/lib/components/Number/NumberInput.styles.d.ts +6 -2
  190. package/lib/components/Number/NumberInput.styles.d.ts.map +1 -1
  191. package/lib/components/Number/NumberInput.styles.js +4 -2
  192. package/lib/components/Number/NumberInput.styles.js.map +1 -1
  193. package/lib/components/Number/NumberInput.types.d.ts +2 -0
  194. package/lib/components/Number/NumberInput.types.d.ts.map +1 -1
  195. package/lib/components/Number/NumberInput.types.js.map +1 -1
  196. package/lib/components/PageTemplates/DashboardPage.d.ts.map +1 -1
  197. package/lib/components/PageTemplates/DashboardPage.js +1 -4
  198. package/lib/components/PageTemplates/DashboardPage.js.map +1 -1
  199. package/lib/components/Phone/PhoneInput.d.ts.map +1 -1
  200. package/lib/components/Phone/PhoneInput.js +12 -3
  201. package/lib/components/Phone/PhoneInput.js.map +1 -1
  202. package/lib/components/SearchInput/SearchInput.d.ts +5 -0
  203. package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
  204. package/lib/components/SearchInput/SearchInput.js +14 -4
  205. package/lib/components/SearchInput/SearchInput.js.map +1 -1
  206. package/lib/components/SearchInput/SearchInput.styles.d.ts +3 -0
  207. package/lib/components/SearchInput/SearchInput.styles.d.ts.map +1 -1
  208. package/lib/components/SearchInput/SearchInput.styles.js +6 -0
  209. package/lib/components/SearchInput/SearchInput.styles.js.map +1 -1
  210. package/lib/components/Select/Select.d.ts +2 -0
  211. package/lib/components/Select/Select.d.ts.map +1 -1
  212. package/lib/components/Select/Select.js +4 -3
  213. package/lib/components/Select/Select.js.map +1 -1
  214. package/lib/components/Skeleton/ParagraphSkeleton.d.ts.map +1 -1
  215. package/lib/components/Skeleton/ParagraphSkeleton.js +2 -2
  216. package/lib/components/Skeleton/ParagraphSkeleton.js.map +1 -1
  217. package/lib/components/Tabs/TabPanel.d.ts.map +1 -1
  218. package/lib/components/Tabs/TabPanel.js +1 -7
  219. package/lib/components/Tabs/TabPanel.js.map +1 -1
  220. package/lib/components/Text/Text.js +2 -2
  221. package/lib/components/Text/Text.js.map +1 -1
  222. package/lib/components/TextArea/TextArea.d.ts.map +1 -1
  223. package/lib/components/TextArea/TextArea.js +4 -2
  224. package/lib/components/TextArea/TextArea.js.map +1 -1
  225. package/lib/components/Tooltip/Tooltip.d.ts +5 -0
  226. package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
  227. package/lib/components/Tooltip/Tooltip.js +22 -5
  228. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  229. package/lib/hooks/useActiveDescendant.d.ts +5 -1
  230. package/lib/hooks/useActiveDescendant.d.ts.map +1 -1
  231. package/lib/hooks/useActiveDescendant.js +166 -95
  232. package/lib/hooks/useActiveDescendant.js.map +1 -1
  233. package/lib/hooks/useI18n.d.ts +36 -1
  234. package/lib/hooks/useI18n.d.ts.map +1 -1
  235. package/lib/hooks/useI18n.js +2 -1
  236. package/lib/hooks/useI18n.js.map +1 -1
  237. package/lib/i18n/default.d.ts +36 -1
  238. package/lib/i18n/default.d.ts.map +1 -1
  239. package/lib/i18n/default.js +50 -14
  240. package/lib/i18n/default.js.map +1 -1
  241. package/lib/i18n/i18n.d.ts +72 -2
  242. package/lib/i18n/i18n.d.ts.map +1 -1
  243. package/lib/i18n/translate.d.ts +3 -0
  244. package/lib/i18n/translate.d.ts.map +1 -1
  245. package/lib/i18n/translate.js.map +1 -1
  246. package/lib/theme/theme.d.ts +12 -0
  247. package/lib/theme/theme.d.ts.map +1 -1
  248. package/lib/theme/themeDefinition.json +7 -1
  249. package/lib/theme/themeOverrides.schema.json +9 -0
  250. package/lib/theme/themes/darkTheme.json +3 -1
  251. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"useActiveDescendant.js","sourceRoot":"","sources":["../../src/hoo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,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE;oBACZ,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC;iBACpE;gBAED,IAAI,aAAa,EAAE,EAAE,KAAK,gBAAgB,CAAC,EAAE,EAAE;oBAC7C,uEAAuE;oBACvE,UAAU,CAAC,GAAG,EAAE;wBACd,gBAAgB,CAAC,QAAQ,CAAC,CAAC;oBAC7B,CAAC,EAAE,CAAC,CAAC,CAAC;iBACP;aACF;YACD,mBAAmB;iBACd,IAAI,aAAa,EAAE,EAAE,KAAK,gBAAgB,CAAC,EAAE,EAAE;gBAClD,sEAAsE;gBACtE,2EAA2E;gBAC3E,UAAU,CAAC,GAAG,EAAE;oBACd,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;gBACrC,CAAC,EAAE,CAAC,CAAC,CAAC;aACP;SACF;IACH,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;AAClG,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import { useEffect, useState, DependencyList, useCallback, useRef } from 'react';\n\nimport { createUID } from '../utils';\n\nexport interface UseActiveDescendantConfig {\n /** DOM element which controls and has active descendants */\n focusEl: HTMLElement | null;\n /** Root scope for descendant options */\n scope: HTMLElement | null;\n /** Custom selector for specific descendant scope in root descendant scope */\n scopeSelector?: string;\n /** Custom selector for descendant options */\n selector?: string;\n /** One-time override for the focused descendant, triggers re-evaluation.\n * Include `clearFocusDescendantEl` for cleanup.\n */\n focusDescendantEl?: HTMLElement | null;\n /** Callback to clear focusDescendantEl after use. */\n clearFocusDescendant?: () => void;\n /** One-time override for focused element on NEXT re-evaluation of active descendants.\n * Include `clearFocusReturn` for cleanup.\n */\n focusReturnEl?: HTMLElement | null;\n /** Callback to clear focusReturnEl after use. */\n clearFocusReturn?: () => void;\n /**\n * Descendant ID used for continuous override of current active descendant,\n * used for external focus control / keyDown bindings (see RTE).\n * NOTE: setting currentDescendantId once effectively disables the keybindings of this hook.\n * If you only need to set the current element once, use focusReturnEl & clearFocusReturn.\n * @deprecated\n */\n currentDescendantId?: string;\n /** Explicit onClick handler called on keydown 'enter' event */\n onClick?: (currentDescendantEl: HTMLElement) => void;\n /** Prevent scrolling to the active descendant on the initial render.\n * Include `preventInitialScroll` for cleanup.\n */\n preventInitialScroll?: boolean;\n /** Callback to clear preventInitialScroll after use. */\n clearPreventScroll?: () => void;\n /** Boolean to prevent descendant evaluation.\n * @default false\n */\n pauseDescendantEvaluation?: boolean;\n}\n\ntype CurrentDescendant = HTMLElement | undefined;\ntype Descendants = HTMLElement[] | null;\n\nconst useActiveDescendant = (\n {\n focusEl,\n scope,\n scopeSelector,\n selector,\n focusDescendantEl,\n clearFocusDescendant,\n focusReturnEl,\n clearFocusReturn,\n currentDescendantId,\n onClick,\n preventInitialScroll,\n pauseDescendantEvaluation = false,\n clearPreventScroll\n }: UseActiveDescendantConfig,\n dependencyArray: DependencyList = []\n): {\n activeDescendant: CurrentDescendant;\n descendants: Descendants;\n} => {\n const [resetId, setResetId] = useState(0);\n const previousActiveId = useRef('');\n const [focusDescendantElIndex, setFocusDescendantElIndex] = useState<number | null>(null);\n const [currentIndex, setCurrentIndex] = useState<number | null>(null);\n const [descendants, setDescendants] = useState<Descendants>();\n\n const clearThenSetDescendants = useCallback(\n (setVal: NodeListOf<Element> | null) => {\n descendants?.forEach(node => {\n node.setAttribute('data-current', 'false');\n });\n\n setDescendants(\n setVal\n ? Array.from(setVal).filter((item): item is HTMLElement => item instanceof HTMLElement)\n : null\n );\n },\n [descendants]\n );\n\n // ## Toggle active scope data attr.\n useEffect(() => {\n if (!scope || !focusEl) return;\n const rootNode = focusEl.getRootNode() as Document;\n let activeElement: Element | null | undefined = rootNode.activeElement;\n if (activeElement?.tagName === 'IFRAME') {\n activeElement = (activeElement as HTMLIFrameElement).contentDocument?.activeElement;\n }\n scope.setAttribute('data-active-scope', activeElement === focusEl ? 'true' : 'false');\n\n const onFocus = () => {\n scope.setAttribute('data-active-scope', 'true');\n };\n const onBlur = () => {\n scope.setAttribute('data-active-scope', 'false');\n };\n\n focusEl.addEventListener('focus', onFocus);\n focusEl.addEventListener('blur', onBlur);\n\n return () => {\n focusEl.removeEventListener('focus', onFocus);\n focusEl.removeEventListener('blur', onBlur);\n };\n }, [scope, focusEl]);\n\n // ## Update descendants\n useEffect(() => {\n if (!pauseDescendantEvaluation) {\n // 0 second timeout added because descendantScope needs to be up to date before running query after dependencyArray change\n setTimeout(() => {\n let hasScope = scope;\n\n if (hasScope && hasScope instanceof HTMLElement) {\n if (scopeSelector) {\n hasScope = hasScope.querySelector(scopeSelector);\n }\n\n if (!hasScope) {\n clearThenSetDescendants(null);\n return;\n }\n\n if (selector) {\n clearThenSetDescendants(hasScope.querySelectorAll(selector));\n } else {\n clearThenSetDescendants(\n hasScope.querySelectorAll(\n 'a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])'\n )\n );\n }\n } else {\n clearThenSetDescendants(null);\n }\n }, 0);\n }\n }, [pauseDescendantEvaluation, scope, scopeSelector, selector, focusEl, ...dependencyArray]);\n\n // ## Set IDs and aria-owns\n useEffect(() => {\n const ownedIds: string[] = [];\n setCurrentIndex(0);\n\n if (descendants && descendants.length) {\n descendants.forEach(node => {\n node.id = node.id || createUID();\n ownedIds.push(node.id);\n });\n }\n\n focusEl?.setAttribute('aria-owns', ownedIds.join(' '));\n\n return () => {\n focusEl?.removeAttribute('aria-owns');\n };\n }, [focusEl, descendants]);\n\n // ## Bind focus el keyDown\n useEffect(() => {\n const onKeyDown = (e: KeyboardEvent) => {\n if (descendants && descendants.length) {\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n // Focus next or first\n clearFocusReturn?.();\n clearPreventScroll?.();\n if (currentIndex !== null && currentIndex + 1 < descendants.length) {\n setCurrentIndex(currentIndex + 1);\n } else {\n setCurrentIndex(0);\n }\n break;\n case 'ArrowUp':\n e.preventDefault();\n // Focus previous or last\n clearFocusReturn?.();\n clearPreventScroll?.();\n if (currentIndex !== null && currentIndex - 1 > -1) {\n setCurrentIndex(currentIndex - 1);\n } else {\n setCurrentIndex(descendants.length - 1);\n }\n break;\n case 'Enter':\n e.preventDefault();\n // Click focused item\n if (descendants && descendants.length && currentIndex !== null) {\n if (onClick) {\n onClick(descendants[currentIndex]);\n break;\n }\n\n const nodeName = descendants[currentIndex].nodeName.toLowerCase();\n if (nodeName === 'input' || nodeName === 'button' || nodeName === 'a') {\n descendants[currentIndex].click();\n } else {\n descendants[currentIndex].querySelector<HTMLElement>('button, a, input')?.click();\n }\n }\n break;\n default:\n break;\n }\n }\n };\n\n // Do not rebind once / if `currentDescendantId` control is defined\n if (focusEl && descendants?.length && !currentDescendantId) {\n focusEl.addEventListener('keydown', onKeyDown);\n }\n\n return () => {\n focusEl?.removeEventListener('keydown', onKeyDown);\n };\n }, [focusEl, currentIndex, descendants]);\n\n // ## Handle independent control update\n useEffect(() => {\n if (descendants && currentDescendantId) {\n descendants.forEach((node, index) => {\n if (node.id === currentDescendantId) {\n setCurrentIndex(index);\n }\n });\n }\n }, [currentDescendantId, descendants]);\n\n // ## Set and scroll to current descendant\n useEffect(() => {\n const nextIndex = focusDescendantElIndex || currentIndex;\n const focusReturnId = focusReturnEl?.id;\n let focusReturnIndex;\n const focusDescendantElId = focusDescendantEl?.id;\n let focusDescendantIndex;\n let foundFocusDescendantEl = false;\n\n if (descendants && descendants.length) {\n // clear previous & catch focusReturn / focusDescendantEl index\n descendants.forEach((node, index) => {\n if (focusDescendantElIndex === null && node.id === focusDescendantElId) {\n focusDescendantIndex = index;\n foundFocusDescendantEl = true;\n setFocusDescendantElIndex(index);\n }\n if (node.id === focusReturnId) {\n focusReturnIndex = index;\n }\n node.setAttribute('data-current', 'false');\n });\n\n // early return for focusReturn / focusDescendantEl\n if (focusReturnIndex && focusReturnIndex !== currentIndex) {\n setCurrentIndex(focusReturnIndex);\n clearFocusReturn?.();\n return;\n }\n if (foundFocusDescendantEl && focusDescendantIndex !== undefined) {\n // hard reset to continue focusDescendantEl process even if it is the active descendant\n setResetId(Math.random());\n setCurrentIndex(focusDescendantIndex);\n return;\n }\n\n // set new\n if (nextIndex !== null && descendants[nextIndex]) {\n const itemEl = descendants[nextIndex!];\n itemEl.setAttribute('data-current', 'true');\n focusEl?.setAttribute('aria-activedescendant', itemEl.id);\n\n // scroll to element\n if (itemEl.id !== previousActiveId.current && !preventInitialScroll) {\n const scrollTo: (this: Element, arg: boolean) => void =\n Element.prototype.scrollIntoViewIfNeeded ?? Element.prototype.scrollIntoView;\n\n scrollTo?.call(itemEl, false);\n }\n\n // focusDescendantEl cleanup\n if (focusDescendantElIndex !== null) {\n setFocusDescendantElIndex(null);\n clearFocusDescendant?.();\n }\n\n previousActiveId.current = itemEl.id;\n }\n }\n\n return () => {\n focusEl?.removeAttribute('aria-activedescendant');\n };\n }, [descendants, currentIndex, focusDescendantEl, focusEl, resetId]);\n\n return {\n activeDescendant: currentIndex !== null && descendants ? descendants[currentIndex] : undefined,\n descendants: descendants || null\n };\n};\n\nexport const useLazyDescendant = ({\n loading,\n descendants,\n previousActiveDescendant,\n activeDescendant,\n focusReturnEl,\n setFocusReturnEl,\n scrollEl\n}: {\n loading: boolean;\n descendants: Descendants;\n previousActiveDescendant: CurrentDescendant;\n activeDescendant: CurrentDescendant;\n focusReturnEl: UseActiveDescendantConfig['focusReturnEl'];\n setFocusReturnEl: (el: HTMLElement | null | undefined) => void;\n scrollEl?: HTMLElement | null;\n}) => {\n // Bump scroll & set return element when descendant focused in loading state.\n useEffect(() => {\n if (loading && descendants && descendants.length && activeDescendant) {\n const descendantList = [...descendants];\n const lastItem = descendantList.pop();\n const lastId = lastItem?.id || undefined;\n\n if (lastId === activeDescendant.id) {\n if (scrollEl) {\n scrollEl.scrollTop = scrollEl.scrollHeight - scrollEl.offsetHeight;\n }\n\n if (focusReturnEl?.id !== activeDescendant.id) {\n // Set focus return to AD on 'nextTick', to avoid reset of AD on update\n setTimeout(() => {\n setFocusReturnEl(lastItem);\n }, 0);\n }\n }\n // If not last item\n else if (focusReturnEl?.id !== activeDescendant.id) {\n // Set focus return to AD on 'nextTick' to avoid reset of AD on update\n // Do not D.R.Y to avoid conflicting calls with immediately prior elements.\n setTimeout(() => {\n setFocusReturnEl(activeDescendant);\n }, 0);\n }\n }\n }, [loading, descendants, previousActiveDescendant, activeDescendant, scrollEl, focusReturnEl]);\n};\n\nexport default useActiveDescendant;\n"]}
1
+ {"version":3,"file":"useActiveDescendant.js","sourceRoot":"","sources":["../../src/hooks/useActiveDescendant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAkB,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAoD1C,MAAM,mBAAmB,GAAG,CAC1B,EACE,OAAO,EACP,KAAK,EACL,aAAa,EACb,QAAQ,EACR,WAAW,GAAG,UAAU,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,OAAO,EACP,oBAAoB,EACpB,yBAAyB,GAAG,KAAK,EACjC,kBAAkB,EACQ,EAC5B,kBAAkC,EAAE,EAIpC,EAAE;IACF,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC1C,MAAM,gBAAgB,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC;IACjD,MAAM,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAC1F,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAgB,IAAI,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;YAE7C,IAAI,MAAM,KAAK,gBAAgB,CAAC,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE;oBACZ,QAAQ,CAAC,SAAS,GAAG,QAAQ,CAAC,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC;iBACpE;gBAED,IAAI,aAAa,EAAE,EAAE,KAAK,gBAAgB,CAAC,EAAE,EAAE;oBAC7C,uEAAuE;oBACvE,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;wBAC1B,gBAAgB,CAAC,QAAQ,CAAC,CAAC;oBAC7B,CAAC,EAAE,CAAC,CAAC,CAAC;iBACP;aACF;YACD,mBAAmB;iBACd,IAAI,aAAa,EAAE,EAAE,KAAK,gBAAgB,CAAC,EAAE,EAAE;gBAClD,sEAAsE;gBACtE,2EAA2E;gBAC3E,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;oBAC1B,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;gBACrC,CAAC,EAAE,CAAC,CAAC,CAAC;aACP;YAED,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;SACtC;IACH,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;AAClG,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import { useEffect, useState, DependencyList, useCallback, useRef } from 'react';\n\nimport { createUID } from '../utils';\n\nimport useDirection from './useDirection';\n\nexport interface UseActiveDescendantConfig {\n /** DOM element which controls and has active descendants */\n focusEl: HTMLElement | null;\n /** Root scope for descendant options */\n scope: HTMLElement | null;\n /** Custom selector for specific descendant scope in root descendant scope */\n scopeSelector?: string;\n /** Custom selector for descendant options */\n selector?: string;\n /** Orientation of descendant navigation\n * @default 'vertical'\n */\n orientation?: 'horizontal' | 'vertical';\n /** One-time override for the focused descendant, triggers re-evaluation.\n * Include `clearFocusDescendantEl` for cleanup.\n */\n focusDescendantEl?: HTMLElement | null;\n /** Callback to clear focusDescendantEl after use. */\n clearFocusDescendant?: () => void;\n /** One-time override for focused element on NEXT re-evaluation of active descendants.\n * Include `clearFocusReturn` for cleanup.\n */\n focusReturnEl?: HTMLElement | null;\n /** Callback to clear focusReturnEl after use. */\n clearFocusReturn?: () => void;\n /**\n * Descendant ID used for continuous override of current active descendant,\n * used for external focus control / keyDown bindings (see RTE).\n * NOTE: setting currentDescendantId once effectively disables the keybindings of this hook.\n * If you only need to set the current element once, use focusReturnEl & clearFocusReturn.\n * @deprecated\n */\n currentDescendantId?: string;\n /** Explicit onClick handler called on keydown 'enter' event */\n onClick?: (currentDescendantEl: HTMLElement) => void;\n /** Prevent scrolling to the active descendant on the initial render.\n * Include `preventInitialScroll` for cleanup.\n */\n preventInitialScroll?: boolean;\n /** Callback to clear preventInitialScroll after use. */\n clearPreventScroll?: () => void;\n /** Boolean to prevent descendant evaluation.\n * @default false\n */\n pauseDescendantEvaluation?: boolean;\n}\n\ntype CurrentDescendant = HTMLElement | undefined;\ntype Descendants = HTMLElement[] | null;\n\nconst useActiveDescendant = (\n {\n focusEl,\n scope,\n scopeSelector,\n selector,\n orientation = 'vertical',\n focusDescendantEl,\n clearFocusDescendant,\n focusReturnEl,\n clearFocusReturn,\n currentDescendantId,\n onClick,\n preventInitialScroll,\n pauseDescendantEvaluation = false,\n clearPreventScroll\n }: UseActiveDescendantConfig,\n dependencyArray: DependencyList = []\n): {\n activeDescendant: CurrentDescendant;\n descendants: Descendants;\n} => {\n const [resetId, setResetId] = useState(0);\n const previousActiveId = useRef('');\n const paused = useRef(pauseDescendantEvaluation);\n const [focusDescendantElIndex, setFocusDescendantElIndex] = useState<number | null>(null);\n const [currentIndex, setCurrentIndex] = useState<number | null>(null);\n const [descendants, setDescendants] = useState<Descendants>();\n const { rtl } = useDirection();\n\n const clearDescendants = useCallback(() => {\n descendants?.forEach(node => {\n node.setAttribute('data-current', 'false');\n });\n }, [descendants]);\n\n const clearThenSetDescendants = useCallback(\n (setVal: NodeListOf<Element> | null) => {\n clearDescendants();\n setDescendants(\n setVal\n ? Array.from(setVal).filter((item): item is HTMLElement => item instanceof HTMLElement)\n : null\n );\n },\n [descendants]\n );\n\n const setIdsAndOwns = useCallback(\n ({ clear }: { clear: boolean } = { clear: false }) => {\n const ownedIds: string[] = [];\n\n if (descendants && descendants.length) {\n descendants.forEach(node => {\n node.id = node.id || createUID();\n ownedIds.push(node.id);\n });\n }\n\n if (clear) {\n const currentOwnedIds = focusEl?.getAttribute('aria-owns')?.split(' ');\n const clearedIds = currentOwnedIds?.filter(id => !ownedIds.includes(id));\n focusEl?.setAttribute('aria-owns', clearedIds?.join(' ') || '');\n } else {\n focusEl?.setAttribute('aria-owns', ownedIds.join(' '));\n }\n },\n [focusEl, descendants]\n );\n\n const updateDescendants = useCallback(() => {\n if (pauseDescendantEvaluation) return;\n\n let hasScope = scope;\n\n if (hasScope && hasScope instanceof HTMLElement) {\n if (scopeSelector) {\n hasScope = hasScope.querySelector(scopeSelector);\n }\n\n if (!hasScope) {\n clearThenSetDescendants(null);\n return;\n }\n\n if (selector) {\n const setVal = hasScope.querySelectorAll(selector);\n clearThenSetDescendants(setVal);\n } else {\n const setVal = hasScope.querySelectorAll(\n 'a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])'\n );\n clearThenSetDescendants(setVal);\n }\n } else {\n clearThenSetDescendants(null);\n }\n }, [scope, scopeSelector, selector, pauseDescendantEvaluation]);\n\n // ## Update paused ref\n useEffect(() => {\n paused.current = pauseDescendantEvaluation;\n }, [pauseDescendantEvaluation]);\n\n // ## Toggle active scope data attr.\n useEffect(() => {\n if (!scope || !focusEl) return;\n\n scope.setAttribute('data-active-scope', document.activeElement === focusEl ? 'true' : 'false');\n\n const onFocus = () => {\n scope.setAttribute('data-active-scope', 'true');\n };\n const onBlur = () => {\n scope.setAttribute('data-active-scope', 'false');\n };\n\n focusEl.addEventListener('focus', onFocus);\n focusEl.addEventListener('blur', onBlur);\n\n return () => {\n focusEl.removeEventListener('focus', onFocus);\n focusEl.removeEventListener('blur', onBlur);\n };\n }, [scope, focusEl]);\n\n // ## Update descendants\n useEffect(() => {\n /**\n * 0 second timeout added because descendantScope needs to be\n * up to date before running query after dependencyArray change\n */\n const timeoutId = setTimeout(updateDescendants, 0);\n\n return () => clearTimeout(timeoutId);\n }, [...dependencyArray]);\n\n // ## Reset base current index when dependencies change\n useEffect(() => {\n if (!paused.current) {\n setCurrentIndex(0);\n }\n }, [...dependencyArray]);\n\n // ## Set IDs and aria-owns\n useEffect(() => {\n if (!pauseDescendantEvaluation) {\n setIdsAndOwns();\n setResetId(Math.random());\n } else {\n clearDescendants();\n setIdsAndOwns({ clear: true });\n }\n }, [pauseDescendantEvaluation, focusEl, descendants]);\n\n // ## Bind focus el keyDown\n useEffect(() => {\n const nextIndex = () => {\n // Focus next or first\n clearFocusReturn?.();\n clearPreventScroll?.();\n if (currentIndex !== null && currentIndex + 1 < descendants!.length) {\n setCurrentIndex(currentIndex + 1);\n } else {\n setCurrentIndex(0);\n }\n };\n const prevIndex = () => {\n // Focus previous or last\n clearFocusReturn?.();\n clearPreventScroll?.();\n if (currentIndex !== null && currentIndex - 1 > -1) {\n setCurrentIndex(currentIndex - 1);\n } else {\n setCurrentIndex(descendants!.length - 1);\n }\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n // 0 second timeout to execute after explicitly defined onKeyDown event handlers.\n setTimeout(() => {\n if (descendants && descendants.length) {\n switch (e.key) {\n case 'ArrowDown':\n if (orientation === 'vertical') {\n e.preventDefault();\n nextIndex();\n }\n break;\n case 'ArrowUp':\n if (orientation === 'vertical') {\n e.preventDefault();\n prevIndex();\n }\n break;\n case 'ArrowRight':\n if (orientation === 'horizontal') {\n e.preventDefault();\n if (rtl) {\n prevIndex();\n } else {\n nextIndex();\n }\n }\n break;\n case 'ArrowLeft':\n if (orientation === 'horizontal') {\n e.preventDefault();\n if (rtl) {\n nextIndex();\n } else {\n prevIndex();\n }\n }\n break;\n case 'Enter':\n e.preventDefault();\n // Click focused item\n if (descendants && descendants.length && currentIndex !== null) {\n if (onClick) {\n onClick(descendants[currentIndex]);\n break;\n }\n\n const nodeName = descendants[currentIndex].nodeName.toLowerCase();\n if (nodeName === 'input' || nodeName === 'button' || nodeName === 'a') {\n descendants[currentIndex].click();\n } else {\n descendants[currentIndex].querySelector<HTMLElement>('button, a, input')?.click();\n }\n }\n break;\n default:\n break;\n }\n }\n }, 0);\n };\n\n // Do not rebind once / if `currentDescendantId` (deprecated) control is defined\n if (!pauseDescendantEvaluation && focusEl && descendants?.length && !currentDescendantId) {\n focusEl.addEventListener('keydown', onKeyDown);\n }\n\n return () => {\n focusEl?.removeEventListener('keydown', onKeyDown);\n };\n }, [focusEl, currentIndex, descendants, pauseDescendantEvaluation]);\n\n // ## Handle independent control update (deprecated)\n useEffect(() => {\n if (!pauseDescendantEvaluation && descendants && currentDescendantId) {\n descendants.forEach((node, index) => {\n if (node.id === currentDescendantId) {\n setCurrentIndex(index);\n }\n });\n }\n }, [currentDescendantId, descendants, pauseDescendantEvaluation]);\n\n // ## Set and scroll to current descendant\n useEffect(() => {\n if (paused.current) {\n return;\n }\n const nextIndex = focusDescendantElIndex || currentIndex;\n const focusReturnId = focusReturnEl?.id;\n let focusReturnIndex;\n const focusDescendantElId = focusDescendantEl?.id;\n let focusDescendantIndex;\n let foundFocusDescendantEl = false;\n\n if (descendants && descendants.length) {\n // clear previous & catch focusReturn / focusDescendantEl index\n descendants.forEach((node, index) => {\n if (focusDescendantElIndex === null && node.id === focusDescendantElId) {\n focusDescendantIndex = index;\n foundFocusDescendantEl = true;\n setFocusDescendantElIndex(index);\n }\n if (node.id === focusReturnId) {\n focusReturnIndex = index;\n }\n node.setAttribute('data-current', 'false');\n });\n\n // early return for focusReturn / focusDescendantEl\n if (focusReturnIndex && focusReturnIndex !== currentIndex) {\n setCurrentIndex(focusReturnIndex);\n clearFocusReturn?.();\n return;\n }\n if (foundFocusDescendantEl && focusDescendantIndex !== undefined) {\n // hard reset to continue focusDescendantEl process even if it is the active descendant\n setResetId(Math.random());\n setCurrentIndex(focusDescendantIndex);\n return;\n }\n\n // set new\n if (nextIndex !== null && descendants[nextIndex]) {\n const itemEl = descendants[nextIndex!];\n itemEl.setAttribute('data-current', 'true');\n focusEl?.setAttribute('aria-activedescendant', itemEl.id);\n\n // scroll to element\n if (itemEl.id !== previousActiveId.current && !preventInitialScroll) {\n const scrollTo: (this: Element, arg: boolean) => void =\n Element.prototype.scrollIntoViewIfNeeded ?? Element.prototype.scrollIntoView;\n\n scrollTo?.call(itemEl, false);\n }\n\n // focusDescendantEl cleanup\n if (focusDescendantElIndex !== null) {\n setFocusDescendantElIndex(null);\n clearFocusDescendant?.();\n }\n\n previousActiveId.current = itemEl.id;\n }\n }\n\n return () => {\n focusEl?.removeAttribute('aria-activedescendant');\n };\n }, [descendants, currentIndex, focusDescendantEl, focusEl, resetId]);\n\n return {\n activeDescendant: currentIndex !== null && descendants ? descendants[currentIndex] : undefined,\n descendants: descendants || null\n };\n};\n\nexport const useLazyDescendant = ({\n loading,\n descendants,\n previousActiveDescendant,\n activeDescendant,\n focusReturnEl,\n setFocusReturnEl,\n scrollEl\n}: {\n loading: boolean;\n descendants: Descendants;\n previousActiveDescendant: CurrentDescendant;\n activeDescendant: CurrentDescendant;\n focusReturnEl: UseActiveDescendantConfig['focusReturnEl'];\n setFocusReturnEl: (el: HTMLElement | null | undefined) => void;\n scrollEl?: HTMLElement | null;\n}) => {\n // Bump scroll & set return element when descendant focused in loading state.\n useEffect(() => {\n if (loading && descendants && descendants.length && activeDescendant) {\n const descendantList = [...descendants];\n const lastItem = descendantList.pop();\n const lastId = lastItem?.id || undefined;\n let timeoutId: ReturnType<typeof setTimeout>;\n\n if (lastId === activeDescendant.id) {\n if (scrollEl) {\n scrollEl.scrollTop = scrollEl.scrollHeight - scrollEl.offsetHeight;\n }\n\n if (focusReturnEl?.id !== activeDescendant.id) {\n // Set focus return to AD on 'nextTick', to avoid reset of AD on update\n timeoutId = setTimeout(() => {\n setFocusReturnEl(lastItem);\n }, 0);\n }\n }\n // If not last item\n else if (focusReturnEl?.id !== activeDescendant.id) {\n // Set focus return to AD on 'nextTick' to avoid reset of AD on update\n // Do not D.R.Y to avoid conflicting calls with immediately prior elements.\n timeoutId = setTimeout(() => {\n setFocusReturnEl(activeDescendant);\n }, 0);\n }\n\n return () => clearTimeout(timeoutId);\n }\n }, [loading, descendants, previousActiveDescendant, activeDescendant, scrollEl, focusReturnEl]);\n};\n\nexport default useActiveDescendant;\n"]}
@@ -3,11 +3,14 @@
3
3
  * @returns translator:: The translator function that provides translations for a given key in the translation JSON provided to the Configuration component.
4
4
  */
5
5
  declare const useI18n: () => import("../i18n/translate").TranslationFunction<Readonly<{
6
+ yes: string;
7
+ no: string;
6
8
  filters: string;
7
9
  actions: string;
8
10
  status: string;
9
11
  additional_info: string;
10
12
  search_placeholder_default: string;
13
+ select_placeholder_default: string;
11
14
  description: string;
12
15
  all: string;
13
16
  remove: string;
@@ -39,6 +42,7 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
39
42
  sort_by: string;
40
43
  group_by: string;
41
44
  go: string;
45
+ configure: string;
42
46
  view_all: string;
43
47
  view_less: string;
44
48
  show_more: string;
@@ -49,6 +53,7 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
49
53
  edit_details: string;
50
54
  add_emoji: string;
51
55
  create_new: string;
56
+ submit_and_open: string;
52
57
  add_condition: string;
53
58
  open_noun: string;
54
59
  close_noun: string;
@@ -83,6 +88,7 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
83
88
  completed: string;
84
89
  current: string;
85
90
  not_started: string;
91
+ empty_value: string;
86
92
  day_label_a11y: string;
87
93
  day_placeholder: string;
88
94
  quarter_label_a11y: string;
@@ -155,11 +161,14 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
155
161
  combobox_search_instructions: string;
156
162
  combobox_open_list_button_a11y: string;
157
163
  combobox_close_list_button_a11y: string;
164
+ multiselect_instructions: string;
165
+ selected_items: string;
158
166
  menu_selection_instructions: string;
159
167
  menu_item_expand_arrow: string;
160
168
  menu_item_collapse_arrow: string;
161
169
  menu_item_collapse_shift_space: string;
162
170
  menu_item_shift_space_expand_collapse: string;
171
+ menu_option_list: string;
163
172
  modal_minimize: string;
164
173
  modal_maximize: string;
165
174
  modal_dock: string;
@@ -197,6 +206,10 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
197
206
  collapse_summary_panel: string;
198
207
  expand_utilities_panel: string;
199
208
  collapse_utilities_panel: string;
209
+ accept_suggestion_button_a11y: string;
210
+ reject_suggestion_button_a11y: string;
211
+ suggestion_info: string;
212
+ suggestion_assist: string;
200
213
  close_preview: string;
201
214
  confirmation_details: string;
202
215
  confirmation_whats_next: string;
@@ -261,7 +274,11 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
261
274
  rte_image_key_command: string;
262
275
  expand_forwarded_message: string;
263
276
  collapse_forwarded_message: string;
277
+ copy_to: string;
264
278
  feed_new_post: string;
279
+ feed_new_reply: string;
280
+ feed_edit_post: string;
281
+ feed_edit_reply: string;
265
282
  feed_cancel_conversation: string;
266
283
  feed_context: string;
267
284
  feed_liked_by: string;
@@ -269,7 +286,6 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
269
286
  feed_private_post: string;
270
287
  feed_public_post: string;
271
288
  feed_recipients: string;
272
- feed_edit_post: string;
273
289
  feed_post_likes: {
274
290
  zero: string;
275
291
  one: string;
@@ -449,8 +465,10 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
449
465
  condition_builder_switch_banner_text: string;
450
466
  condition_builder_confirm_button_label: string;
451
467
  condition_builder_empty_selection_error_text: string;
468
+ condition_builder_empty_value_text: string;
452
469
  condition_builder_compare_with: string;
453
470
  condition_builder_compare_with_another_field: string;
471
+ condition_builder_compare_with_parameter: string;
454
472
  condition_builder_compare_with_relative_date: string;
455
473
  condition_builder_compare_with_text_value: string;
456
474
  condition_builder_compare_with_numeric_value: string;
@@ -459,10 +477,21 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
459
477
  condition_builder_invalid_time_period: string;
460
478
  condition_builder_invalid_relative_date: string;
461
479
  condition_builder_invalid_value: string;
480
+ condition_builder_invalid_values: string;
481
+ condition_builder_invalid_time: string;
482
+ condition_builder_invalid_date: string;
462
483
  condition_builder_invalid_number: string;
463
484
  condition_builder_date_function_year: string;
464
485
  condition_builder_date_function_quarter: string;
465
486
  condition_builder_select_placeholder: string;
487
+ condition_builder_rhs_with_readOnly_input: string;
488
+ condition_builder_rhs_with_input_type: string;
489
+ condition_builder_rhs_with_time_only_input: string;
490
+ condition_builder_rhs_with_date_only_input: string;
491
+ condition_builder_rhs_with_date_time_input: string;
492
+ condition_builder_rhs_with_csv_input: string;
493
+ condition_builder_no_selection: string;
494
+ condition_builder_enter_csv_placeholder: string;
466
495
  condition_builder_day_number_of_month: {
467
496
  zero: string;
468
497
  one: string;
@@ -667,6 +696,8 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
667
696
  condition_builder_time_period_previous: string;
668
697
  condition_builder_time_period_next: string;
669
698
  condition_builder_value_label: string;
699
+ condition_builder_field_label: string;
700
+ condition_builder_comparator_label: string;
670
701
  promoted_filters_clear_all_button_label: string;
671
702
  dev_mode: string;
672
703
  expand_navigation: string;
@@ -686,6 +717,10 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
686
717
  delete_step_title: string;
687
718
  delete_step_outcome: string;
688
719
  delete_all_outcomes: string;
720
+ reference: string;
721
+ delete_step_error: string;
722
+ delete_referenced_step_error: string;
723
+ delete_connector_error: string;
689
724
  zoom_level: string;
690
725
  close_configuration_panel: string;
691
726
  clear_object_summary: string;
@@ -1 +1 @@
1
- {"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../src/hooks/useI18n.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,QAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGZ,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { useMemo } from 'react';
1
2
  import translatorFor from '../i18n/translate';
2
3
  import useConfiguration from './useConfiguration';
3
4
  /**
@@ -6,7 +7,7 @@ import useConfiguration from './useConfiguration';
6
7
  */
7
8
  const useI18n = () => {
8
9
  const { translations, locale } = useConfiguration();
9
- return translatorFor(translations, locale);
10
+ return useMemo(() => translatorFor(translations, locale), [translations, locale]);
10
11
  };
11
12
  export default useI18n;
12
13
  //# sourceMappingURL=useI18n.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useI18n.js","sourceRoot":"","sources":["../../src/hooks/useI18n.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAE9C,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD;;;GAGG;AACH,MAAM,OAAO,GAAG,GAAG,EAAE;IACnB,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,gBAAgB,EAAE,CAAC;IACpD,OAAO,aAAa,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AAC7C,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import translatorFor from '../i18n/translate';\n\nimport useConfiguration from './useConfiguration';\n\n/**\n * @example const translator = useI18n();\n * @returns translator:: The translator function that provides translations for a given key in the translation JSON provided to the Configuration component.\n */\nconst useI18n = () => {\n const { translations, locale } = useConfiguration();\n return translatorFor(translations, locale);\n};\n\nexport default useI18n;\n"]}
1
+ {"version":3,"file":"useI18n.js","sourceRoot":"","sources":["../../src/hooks/useI18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAE9C,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD;;;GAGG;AACH,MAAM,OAAO,GAAG,GAAG,EAAE;IACnB,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,gBAAgB,EAAE,CAAC;IACpD,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;AACpF,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import { useMemo } from 'react';\n\nimport translatorFor from '../i18n/translate';\n\nimport useConfiguration from './useConfiguration';\n\n/**\n * @example const translator = useI18n();\n * @returns translator:: The translator function that provides translations for a given key in the translation JSON provided to the Configuration component.\n */\nconst useI18n = () => {\n const { translations, locale } = useConfiguration();\n return useMemo(() => translatorFor(translations, locale), [translations, locale]);\n};\n\nexport default useI18n;\n"]}
@@ -1,9 +1,12 @@
1
1
  declare const _default: {
2
+ yes: string;
3
+ no: string;
2
4
  filters: string;
3
5
  actions: string;
4
6
  status: string;
5
7
  additional_info: string;
6
8
  search_placeholder_default: string;
9
+ select_placeholder_default: string;
7
10
  description: string;
8
11
  all: string;
9
12
  remove: string;
@@ -35,6 +38,7 @@ declare const _default: {
35
38
  sort_by: string;
36
39
  group_by: string;
37
40
  go: string;
41
+ configure: string;
38
42
  view_all: string;
39
43
  view_less: string;
40
44
  show_more: string;
@@ -45,6 +49,7 @@ declare const _default: {
45
49
  edit_details: string;
46
50
  add_emoji: string;
47
51
  create_new: string;
52
+ submit_and_open: string;
48
53
  add_condition: string;
49
54
  open_noun: string;
50
55
  close_noun: string;
@@ -79,6 +84,7 @@ declare const _default: {
79
84
  completed: string;
80
85
  current: string;
81
86
  not_started: string;
87
+ empty_value: string;
82
88
  day_label_a11y: string;
83
89
  day_placeholder: string;
84
90
  quarter_label_a11y: string;
@@ -151,11 +157,14 @@ declare const _default: {
151
157
  combobox_search_instructions: string;
152
158
  combobox_open_list_button_a11y: string;
153
159
  combobox_close_list_button_a11y: string;
160
+ multiselect_instructions: string;
161
+ selected_items: string;
154
162
  menu_selection_instructions: string;
155
163
  menu_item_expand_arrow: string;
156
164
  menu_item_collapse_arrow: string;
157
165
  menu_item_collapse_shift_space: string;
158
166
  menu_item_shift_space_expand_collapse: string;
167
+ menu_option_list: string;
159
168
  modal_minimize: string;
160
169
  modal_maximize: string;
161
170
  modal_dock: string;
@@ -193,6 +202,10 @@ declare const _default: {
193
202
  collapse_summary_panel: string;
194
203
  expand_utilities_panel: string;
195
204
  collapse_utilities_panel: string;
205
+ accept_suggestion_button_a11y: string;
206
+ reject_suggestion_button_a11y: string;
207
+ suggestion_info: string;
208
+ suggestion_assist: string;
196
209
  close_preview: string;
197
210
  confirmation_details: string;
198
211
  confirmation_whats_next: string;
@@ -257,7 +270,11 @@ declare const _default: {
257
270
  rte_image_key_command: string;
258
271
  expand_forwarded_message: string;
259
272
  collapse_forwarded_message: string;
273
+ copy_to: string;
260
274
  feed_new_post: string;
275
+ feed_new_reply: string;
276
+ feed_edit_post: string;
277
+ feed_edit_reply: string;
261
278
  feed_cancel_conversation: string;
262
279
  feed_context: string;
263
280
  feed_liked_by: string;
@@ -265,7 +282,6 @@ declare const _default: {
265
282
  feed_private_post: string;
266
283
  feed_public_post: string;
267
284
  feed_recipients: string;
268
- feed_edit_post: string;
269
285
  feed_post_likes: {
270
286
  zero: string;
271
287
  one: string;
@@ -445,8 +461,10 @@ declare const _default: {
445
461
  condition_builder_switch_banner_text: string;
446
462
  condition_builder_confirm_button_label: string;
447
463
  condition_builder_empty_selection_error_text: string;
464
+ condition_builder_empty_value_text: string;
448
465
  condition_builder_compare_with: string;
449
466
  condition_builder_compare_with_another_field: string;
467
+ condition_builder_compare_with_parameter: string;
450
468
  condition_builder_compare_with_relative_date: string;
451
469
  condition_builder_compare_with_text_value: string;
452
470
  condition_builder_compare_with_numeric_value: string;
@@ -455,10 +473,21 @@ declare const _default: {
455
473
  condition_builder_invalid_time_period: string;
456
474
  condition_builder_invalid_relative_date: string;
457
475
  condition_builder_invalid_value: string;
476
+ condition_builder_invalid_values: string;
477
+ condition_builder_invalid_time: string;
478
+ condition_builder_invalid_date: string;
458
479
  condition_builder_invalid_number: string;
459
480
  condition_builder_date_function_year: string;
460
481
  condition_builder_date_function_quarter: string;
461
482
  condition_builder_select_placeholder: string;
483
+ condition_builder_rhs_with_readOnly_input: string;
484
+ condition_builder_rhs_with_input_type: string;
485
+ condition_builder_rhs_with_time_only_input: string;
486
+ condition_builder_rhs_with_date_only_input: string;
487
+ condition_builder_rhs_with_date_time_input: string;
488
+ condition_builder_rhs_with_csv_input: string;
489
+ condition_builder_no_selection: string;
490
+ condition_builder_enter_csv_placeholder: string;
462
491
  condition_builder_day_number_of_month: {
463
492
  zero: string;
464
493
  one: string;
@@ -663,6 +692,8 @@ declare const _default: {
663
692
  condition_builder_time_period_previous: string;
664
693
  condition_builder_time_period_next: string;
665
694
  condition_builder_value_label: string;
695
+ condition_builder_field_label: string;
696
+ condition_builder_comparator_label: string;
666
697
  promoted_filters_clear_all_button_label: string;
667
698
  dev_mode: string;
668
699
  expand_navigation: string;
@@ -682,6 +713,10 @@ declare const _default: {
682
713
  delete_step_title: string;
683
714
  delete_step_outcome: string;
684
715
  delete_all_outcomes: string;
716
+ reference: string;
717
+ delete_step_error: string;
718
+ delete_referenced_step_error: string;
719
+ delete_connector_error: string;
685
720
  zoom_level: string;
686
721
  close_configuration_panel: string;
687
722
  clear_object_summary: string;
@@ -1 +1 @@
1
- {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/i18n/default.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAoyBE"}
1
+ {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/i18n/default.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBA40BE"}
@@ -3,11 +3,14 @@ export default {
3
3
  // Common translation entries
4
4
  // -----------------------------------------------------------------------------
5
5
  /* Nouns, Types, Terms, Phrases, etc... */
6
+ yes: 'Yes',
7
+ no: 'No',
6
8
  filters: 'Filters',
7
9
  actions: 'Actions',
8
10
  status: 'Status',
9
11
  additional_info: 'Additional info',
10
12
  search_placeholder_default: 'Search…',
13
+ select_placeholder_default: 'Select…',
11
14
  description: 'Description',
12
15
  all: 'All',
13
16
  /* Verbs */
@@ -40,6 +43,7 @@ export default {
40
43
  sort_by: 'Sort by',
41
44
  group_by: 'Group by',
42
45
  go: 'Go',
46
+ configure: 'Configure',
43
47
  /* Static verb noun */
44
48
  view_all: 'View all',
45
49
  view_less: 'View less',
@@ -51,23 +55,24 @@ export default {
51
55
  edit_details: 'Edit details',
52
56
  add_emoji: 'Add emoji',
53
57
  create_new: 'Create new',
58
+ submit_and_open: 'Submit and open',
54
59
  add_condition: 'Add condition',
55
60
  /* Dynamic verb {noun} */
56
- open_noun: 'Open: {0}',
57
- close_noun: 'Close: {0}',
58
- view_all_noun: 'View all: {0}',
59
- view_less_noun: 'View less: {0}',
60
- expand_noun: 'Expand: {0}',
61
- add_noun: 'Add: {0}',
62
- collapse_noun: 'Collapse: {0}',
63
- checked_noun: '{0}: checked',
64
- selected_noun: '{0}: selected',
65
- deselected_noun: '{0}: unselected',
61
+ open_noun: 'Open {0}',
62
+ close_noun: 'Close {0}',
63
+ view_all_noun: 'View all {0}',
64
+ view_less_noun: 'View less {0}',
65
+ expand_noun: 'Expand {0}',
66
+ add_noun: 'Add {0}',
67
+ collapse_noun: 'Collapse {0}',
68
+ checked_noun: '{0} checked',
69
+ selected_noun: '{0} selected',
70
+ deselected_noun: '{0} unselected',
66
71
  use_input_value: 'Use {0}',
67
- preview_of_noun: 'Preview of: {0}',
68
- go_to_noun: 'Go to: {0}',
72
+ preview_of_noun: 'Preview of {0}',
73
+ go_to_noun: 'Go to {0}',
69
74
  /* States */
70
- edited: 'Edited',
75
+ edited: 'Edited {0}',
71
76
  done: 'Done',
72
77
  uploading: 'Uploading',
73
78
  loading: 'Loading…',
@@ -87,6 +92,7 @@ export default {
87
92
  completed: 'Completed',
88
93
  current: 'Current',
89
94
  not_started: 'Not started',
95
+ empty_value: 'Empty value',
90
96
  /* Date and time */
91
97
  day_label_a11y: 'Day',
92
98
  day_placeholder: 'DD',
@@ -170,12 +176,15 @@ export default {
170
176
  combobox_search_instructions: 'Start typing to search',
171
177
  combobox_open_list_button_a11y: 'Open combobox list',
172
178
  combobox_close_list_button_a11y: 'Close combobox list',
179
+ multiselect_instructions: 'Arrow {0} from start to review selected items',
180
+ selected_items: 'Selected items',
173
181
  /* core:Menu */
174
182
  menu_selection_instructions: 'Press enter to select items.',
175
183
  menu_item_expand_arrow: 'Arrow right to expand.',
176
184
  menu_item_collapse_arrow: 'Arrow left to collapse.',
177
185
  menu_item_collapse_shift_space: 'Press shift space to collapse.',
178
186
  menu_item_shift_space_expand_collapse: 'Press shift space to expand and collapse.',
187
+ menu_option_list: 'Options list',
179
188
  /* core:Modal */
180
189
  modal_minimize: 'Minimize modal',
181
190
  modal_maximize: 'Maximize modal',
@@ -223,6 +232,11 @@ export default {
223
232
  collapse_summary_panel: 'Collapse summary panel',
224
233
  expand_utilities_panel: 'Expand utilities panel',
225
234
  collapse_utilities_panel: 'Collapse utilities panel',
235
+ /* core:FormField */
236
+ accept_suggestion_button_a11y: 'Accept AI suggestion',
237
+ reject_suggestion_button_a11y: 'Reject AI suggestion',
238
+ suggestion_info: 'Accept AI suggestion?',
239
+ suggestion_assist: 'Either press Enter to accept the AI suggestion or edit the value to reject it',
226
240
  /* work:CasePreview */
227
241
  close_preview: 'Close preview',
228
242
  /* work:Confirmation */
@@ -296,8 +310,12 @@ export default {
296
310
  /* social:Email */
297
311
  expand_forwarded_message: 'Expand forwarded message',
298
312
  collapse_forwarded_message: 'Collapse forwarded message',
313
+ copy_to: 'Copy to',
299
314
  /* social:Feed */
300
315
  feed_new_post: 'New post',
316
+ feed_new_reply: 'New reply',
317
+ feed_edit_post: 'Edit post',
318
+ feed_edit_reply: 'Edit reply',
301
319
  feed_cancel_conversation: 'Cancel conversation',
302
320
  feed_context: 'in {0}',
303
321
  feed_liked_by: 'Liked by {0}',
@@ -305,7 +323,6 @@ export default {
305
323
  feed_private_post: 'Private post',
306
324
  feed_public_post: 'Public post',
307
325
  feed_recipients: 'Recipients',
308
- feed_edit_post: 'Edit post',
309
326
  feed_post_likes: {
310
327
  zero: 'No likes',
311
328
  one: '{0} like',
@@ -494,8 +511,10 @@ export default {
494
511
  condition_builder_switch_banner_text: 'Switching from Advanced mode can reset all AND/OR/NOT operators. Do you want to continue?',
495
512
  condition_builder_confirm_button_label: 'OK',
496
513
  condition_builder_empty_selection_error_text: 'No selection',
514
+ condition_builder_empty_value_text: 'Empty value',
497
515
  condition_builder_compare_with: 'Compare with',
498
516
  condition_builder_compare_with_another_field: 'Another field',
517
+ condition_builder_compare_with_parameter: 'Parameter',
499
518
  condition_builder_compare_with_relative_date: 'Relative date',
500
519
  condition_builder_compare_with_text_value: 'Text value',
501
520
  condition_builder_compare_with_numeric_value: 'Numeric value',
@@ -504,10 +523,21 @@ export default {
504
523
  condition_builder_invalid_time_period: 'Invalid time period',
505
524
  condition_builder_invalid_relative_date: 'Invalid relative date',
506
525
  condition_builder_invalid_value: 'Invalid value',
526
+ condition_builder_invalid_values: 'Invalid values',
527
+ condition_builder_invalid_time: 'Invalid time',
528
+ condition_builder_invalid_date: 'Invalid date',
507
529
  condition_builder_invalid_number: 'Invalid number',
508
530
  condition_builder_date_function_year: 'Year',
509
531
  condition_builder_date_function_quarter: 'Quarter',
510
532
  condition_builder_select_placeholder: 'Select…',
533
+ condition_builder_rhs_with_readOnly_input: 'Rhs with readOnly input',
534
+ condition_builder_rhs_with_input_type: 'Rhs with input type',
535
+ condition_builder_rhs_with_time_only_input: 'Rhs with Time only input',
536
+ condition_builder_rhs_with_date_only_input: 'Rhs with Date only input',
537
+ condition_builder_rhs_with_date_time_input: 'Rhs with Date Time input',
538
+ condition_builder_rhs_with_csv_input: 'Rhs with csv input',
539
+ condition_builder_no_selection: 'No selection',
540
+ condition_builder_enter_csv_placeholder: 'Enter comma separated values',
511
541
  condition_builder_day_number_of_month: {
512
542
  zero: '{0}th day of the month',
513
543
  one: '{0}st day of the month',
@@ -712,6 +742,8 @@ export default {
712
742
  condition_builder_time_period_previous: 'Previous',
713
743
  condition_builder_time_period_next: 'Next',
714
744
  condition_builder_value_label: 'Value',
745
+ condition_builder_field_label: 'Field',
746
+ condition_builder_comparator_label: 'Comparator',
715
747
  /* condition-builder:PromotedFilters */
716
748
  promoted_filters_clear_all_button_label: 'Clear all filters',
717
749
  /* build:AppShell */
@@ -736,6 +768,10 @@ export default {
736
768
  delete_step_title: 'Delete step',
737
769
  delete_step_outcome: 'Outcome to keep',
738
770
  delete_all_outcomes: 'None (delete all outcomes)',
771
+ reference: 'Reference',
772
+ delete_step_error: 'Step cannot be deleted unless Goto step is deleted from step branches',
773
+ delete_referenced_step_error: 'You can\'t delete this step. Remove all references to this step and try again. Referenced by: "Go to"',
774
+ delete_connector_error: 'Connector cannot be deleted unless Goto step is deleted from all branches',
739
775
  /* build:Workbench */
740
776
  zoom_level: 'Zoom level',
741
777
  close_configuration_panel: 'Close configuration panel',