@pega/cosmos-react-core 5.0.0-dev.9.3 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SECURITY.md +11 -0
- package/lib/components/AppShell/AppShell.js +1 -1
- package/lib/components/AppShell/AppShell.js.map +1 -1
- package/lib/components/AppShell/Drawer.d.ts.map +1 -1
- package/lib/components/AppShell/Drawer.js +3 -3
- package/lib/components/AppShell/Drawer.js.map +1 -1
- package/lib/components/AppShell/Operator.d.ts.map +1 -1
- package/lib/components/AppShell/Operator.js +5 -2
- package/lib/components/AppShell/Operator.js.map +1 -1
- package/lib/components/Badges/Keyboard.d.ts.map +1 -1
- package/lib/components/Badges/Keyboard.js +10 -10
- package/lib/components/Badges/Keyboard.js.map +1 -1
- package/lib/components/Badges/Status.d.ts.map +1 -1
- package/lib/components/Badges/Status.js +2 -0
- package/lib/components/Badges/Status.js.map +1 -1
- package/lib/components/Banner/Banner.d.ts +5 -3
- package/lib/components/Banner/Banner.d.ts.map +1 -1
- package/lib/components/Banner/Banner.js +22 -15
- package/lib/components/Banner/Banner.js.map +1 -1
- package/lib/components/Banner/Banner.test-ids.d.ts +2 -0
- package/lib/components/Banner/Banner.test-ids.d.ts.map +1 -0
- package/lib/components/Banner/Banner.test-ids.js +10 -0
- package/lib/components/Banner/Banner.test-ids.js.map +1 -0
- package/lib/components/Button/Button.js +1 -1
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
- package/lib/components/Configuration/Configuration.d.ts +3 -0
- package/lib/components/Configuration/Configuration.d.ts.map +1 -1
- package/lib/components/Configuration/Configuration.js +20 -12
- package/lib/components/Configuration/Configuration.js.map +1 -1
- package/lib/components/Configuration/index.d.ts +1 -0
- package/lib/components/Configuration/index.d.ts.map +1 -1
- package/lib/components/Configuration/index.js +1 -0
- package/lib/components/Configuration/index.js.map +1 -1
- package/lib/components/Configuration/withConfiguration.d.ts +8 -0
- package/lib/components/Configuration/withConfiguration.d.ts.map +1 -0
- package/lib/components/Configuration/withConfiguration.js +9 -0
- package/lib/components/Configuration/withConfiguration.js.map +1 -0
- package/lib/components/DateTime/DateTime.types.d.ts +1 -4
- package/lib/components/DateTime/DateTime.types.d.ts.map +1 -1
- package/lib/components/DateTime/DateTime.types.js.map +1 -1
- package/lib/components/DateTime/DurationDisplay.d.ts +7 -3
- package/lib/components/DateTime/DurationDisplay.d.ts.map +1 -1
- package/lib/components/DateTime/DurationDisplay.js +2 -2
- package/lib/components/DateTime/DurationDisplay.js.map +1 -1
- package/lib/components/DateTime/Input/DateInput.d.ts +3 -5
- package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateInput.js +2 -17
- package/lib/components/DateTime/Input/DateInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateRangeInput.d.ts +2 -4
- package/lib/components/DateTime/Input/DateRangeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateRangeInput.js +33 -84
- package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateTime.styles.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateTime.styles.js +2 -1
- package/lib/components/DateTime/Input/DateTime.styles.js.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.d.ts +3 -0
- package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.js +17 -36
- package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/Duration/NumberUnit.d.ts.map +1 -1
- package/lib/components/DateTime/Input/Duration/NumberUnit.js +2 -1
- package/lib/components/DateTime/Input/Duration/NumberUnit.js.map +1 -1
- package/lib/components/DateTime/Input/MonthInput.d.ts +5 -0
- package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/MonthInput.js +14 -6
- package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
- package/lib/components/DateTime/Input/PartInput.js +1 -1
- package/lib/components/DateTime/Input/PartInput.js.map +1 -1
- package/lib/components/DateTime/Input/QuarterInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/QuarterInput.js +5 -0
- package/lib/components/DateTime/Input/QuarterInput.js.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.js +13 -24
- package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/TimeRangeInput.d.ts +2 -4
- package/lib/components/DateTime/Input/TimeRangeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/TimeRangeInput.js +25 -64
- package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
- package/lib/components/DateTime/Input/utils.d.ts +3 -2
- package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
- package/lib/components/DateTime/Input/utils.js +19 -16
- package/lib/components/DateTime/Input/utils.js.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.js +3 -3
- package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.styles.d.ts +2 -0
- package/lib/components/DateTime/Picker/DatePicker.styles.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.styles.js +37 -1
- package/lib/components/DateTime/Picker/DatePicker.styles.js.map +1 -1
- package/lib/components/DateTime/Picker/DateRangePicker.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/DateRangePicker.js +3 -3
- package/lib/components/DateTime/Picker/DateRangePicker.js.map +1 -1
- package/lib/components/DateTime/Picker/TimePicker.js +1 -1
- package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
- package/lib/components/DateTime/utils.d.ts +13 -2
- package/lib/components/DateTime/utils.d.ts.map +1 -1
- package/lib/components/DateTime/utils.js +7 -13
- package/lib/components/DateTime/utils.js.map +1 -1
- package/lib/components/Dialog/FormDialog.js +1 -1
- package/lib/components/Dialog/FormDialog.js.map +1 -1
- package/lib/components/Dialog/InfoDialog.js +1 -1
- package/lib/components/Dialog/InfoDialog.js.map +1 -1
- package/lib/components/FieldGroup/FieldGroupList.d.ts.map +1 -1
- package/lib/components/FieldGroup/FieldGroupList.js +5 -2
- package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
- package/lib/components/FormField/FormField.d.ts +1 -0
- package/lib/components/FormField/FormField.d.ts.map +1 -1
- package/lib/components/FormField/FormField.js +1 -1
- package/lib/components/FormField/FormField.js.map +1 -1
- package/lib/components/HTML/HTML.js +1 -1
- package/lib/components/HTML/HTML.js.map +1 -1
- package/lib/components/Lightbox/Lightbox.d.ts +1 -1
- package/lib/components/Lightbox/Lightbox.d.ts.map +1 -1
- package/lib/components/Lightbox/Lightbox.js +66 -19
- package/lib/components/Lightbox/Lightbox.js.map +1 -1
- package/lib/components/Lightbox/Lightbox.styles.d.ts +3 -3
- package/lib/components/Lightbox/Lightbox.styles.d.ts.map +1 -1
- package/lib/components/Lightbox/Lightbox.styles.js +29 -16
- package/lib/components/Lightbox/Lightbox.styles.js.map +1 -1
- package/lib/components/Lightbox/Lightbox.test-ids.d.ts +1 -1
- package/lib/components/Lightbox/Lightbox.test-ids.d.ts.map +1 -1
- package/lib/components/Lightbox/Lightbox.test-ids.js +3 -1
- package/lib/components/Lightbox/Lightbox.test-ids.js.map +1 -1
- package/lib/components/Lightbox/Lightbox.types.d.ts +19 -8
- package/lib/components/Lightbox/Lightbox.types.d.ts.map +1 -1
- package/lib/components/Lightbox/Lightbox.types.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.d.ts +1 -1
- package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.js +61 -51
- package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.styles.d.ts +4 -0
- package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.styles.js +41 -8
- package/lib/components/ListToolbar/ListToolbar.styles.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts +1 -1
- package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.test-ids.js +2 -1
- package/lib/components/ListToolbar/ListToolbar.test-ids.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.types.d.ts +1 -1
- package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
- package/lib/components/Menu/MenuItem.js +1 -1
- package/lib/components/Menu/MenuItem.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
- package/lib/components/MenuButton/MenuButton.js +8 -4
- package/lib/components/MenuButton/MenuButton.js.map +1 -1
- package/lib/components/Modal/MinimizedModal.d.ts.map +1 -1
- package/lib/components/Modal/MinimizedModal.js +3 -3
- package/lib/components/Modal/MinimizedModal.js.map +1 -1
- package/lib/components/Modal/Modal.d.ts.map +1 -1
- package/lib/components/Modal/Modal.js +4 -4
- package/lib/components/Modal/Modal.js.map +1 -1
- package/lib/components/MultiStepForm/FormProgress.styles.d.ts +2 -0
- package/lib/components/MultiStepForm/FormProgress.styles.d.ts.map +1 -1
- package/lib/components/MultiStepForm/FormProgress.styles.js +26 -2
- package/lib/components/MultiStepForm/FormProgress.styles.js.map +1 -1
- package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts +0 -1
- package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts.map +1 -1
- package/lib/components/MultiStepForm/HorizontalFormProgress.js +26 -29
- package/lib/components/MultiStepForm/HorizontalFormProgress.js.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.d.ts.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.js +27 -11
- package/lib/components/MultiStepForm/MultiStepForm.js.map +1 -1
- package/lib/components/NoValue/NoValue.d.ts.map +1 -1
- package/lib/components/NoValue/NoValue.js +6 -1
- package/lib/components/NoValue/NoValue.js.map +1 -1
- package/lib/components/Popover/Popover.d.ts.map +1 -1
- package/lib/components/Popover/Popover.js +9 -0
- package/lib/components/Popover/Popover.js.map +1 -1
- package/lib/components/RadioCheck/RadioCheck.d.ts.map +1 -1
- package/lib/components/RadioCheck/RadioCheck.js +3 -1
- package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
- package/lib/components/SearchInput/SearchInput.styles.d.ts.map +1 -1
- package/lib/components/SearchInput/SearchInput.styles.js +15 -0
- package/lib/components/SearchInput/SearchInput.styles.js.map +1 -1
- package/lib/components/ShortcutManager/ShortcutManager.js +1 -1
- package/lib/components/ShortcutManager/ShortcutManager.js.map +1 -1
- package/lib/components/TextArea/TextArea.d.ts +1 -1
- package/lib/components/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.js +16 -8
- package/lib/components/TextArea/TextArea.js.map +1 -1
- package/lib/components/TextArea/TextArea.styles.d.ts +1 -0
- package/lib/components/TextArea/TextArea.styles.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.styles.js +32 -4
- package/lib/components/TextArea/TextArea.styles.js.map +1 -1
- package/lib/components/Tooltip/Tooltip.js +1 -1
- package/lib/components/Tooltip/Tooltip.js.map +1 -1
- package/lib/hooks/useArrows.d.ts +2 -1
- package/lib/hooks/useArrows.d.ts.map +1 -1
- package/lib/hooks/useArrows.js +47 -22
- package/lib/hooks/useArrows.js.map +1 -1
- package/lib/hooks/useFocusTrap.d.ts.map +1 -1
- package/lib/hooks/useFocusTrap.js +30 -3
- package/lib/hooks/useFocusTrap.js.map +1 -1
- package/lib/hooks/useFocusWithin.d.ts.map +1 -1
- package/lib/hooks/useFocusWithin.js +13 -3
- package/lib/hooks/useFocusWithin.js.map +1 -1
- package/lib/hooks/useI18n.d.ts +17 -0
- package/lib/hooks/useI18n.d.ts.map +1 -1
- package/lib/i18n/default.d.ts +17 -0
- package/lib/i18n/default.d.ts.map +1 -1
- package/lib/i18n/default.js +21 -2
- package/lib/i18n/default.js.map +1 -1
- package/lib/i18n/i18n.d.ts +17 -0
- package/lib/i18n/i18n.d.ts.map +1 -1
- package/lib/styles/GlobalStyle.d.ts.map +1 -1
- package/lib/styles/GlobalStyle.js +11 -1
- package/lib/styles/GlobalStyle.js.map +1 -1
- package/lib/utils/focusHeadingOrContainer.d.ts +1 -1
- package/lib/utils/focusHeadingOrContainer.d.ts.map +1 -1
- package/lib/utils/focusHeadingOrContainer.js +1 -1
- package/lib/utils/focusHeadingOrContainer.js.map +1 -1
- package/lib/utils/getFocusables.d.ts +7 -3
- package/lib/utils/getFocusables.d.ts.map +1 -1
- package/lib/utils/getFocusables.js +31 -9
- package/lib/utils/getFocusables.js.map +1 -1
- package/package.json +5 -4
|
@@ -16,13 +16,40 @@ const useFocusTrap = (elementRef, attachToDocument = true, dependencies = []) =>
|
|
|
16
16
|
const requiresFocus = activeEl === elementRef.current ||
|
|
17
17
|
!elementRef.current?.contains(activeEl) ||
|
|
18
18
|
(elementRef.current?.contains(activeEl) && !focusables.includes(activeEl));
|
|
19
|
-
if (
|
|
20
|
-
firstFocusable?.focus();
|
|
19
|
+
if (requiresFocus) {
|
|
21
20
|
e.preventDefault();
|
|
21
|
+
if (activeEl) {
|
|
22
|
+
const focusablesWithActiveEl = getFocusables(elementRef, { includeActiveEl: true });
|
|
23
|
+
const activeElIndex = focusablesWithActiveEl.findIndex(el => el === activeEl);
|
|
24
|
+
if (activeElIndex !== -1) {
|
|
25
|
+
if (e.shiftKey) {
|
|
26
|
+
focusablesWithActiveEl[(activeElIndex - 1) % focusablesWithActiveEl.length].focus();
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
focusablesWithActiveEl[(activeElIndex + 1) % focusablesWithActiveEl.length].focus();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else if (e.shiftKey) {
|
|
33
|
+
lastFocusable?.focus();
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
firstFocusable?.focus();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
else if (e.shiftKey) {
|
|
40
|
+
lastFocusable?.focus();
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
firstFocusable?.focus();
|
|
44
|
+
}
|
|
22
45
|
}
|
|
23
|
-
else if (e.shiftKey &&
|
|
46
|
+
else if (e.shiftKey && activeEl === firstFocusable) {
|
|
47
|
+
e.preventDefault();
|
|
24
48
|
lastFocusable?.focus();
|
|
49
|
+
}
|
|
50
|
+
else if (!e.shiftKey && activeEl === lastFocusable) {
|
|
25
51
|
e.preventDefault();
|
|
52
|
+
firstFocusable?.focus();
|
|
26
53
|
}
|
|
27
54
|
}
|
|
28
55
|
}, dependencies);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusTrap.js","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE3D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC;;;;;GAKG;AACH,MAAM,YAAY,GAAG,CACnB,UAAkC,EAClC,mBAA4B,IAAI,EAChC,eAA+B,EAAE,EACjC,EAAE;IACF,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,CAAgB,EAAE,EAAE;QACjD,IAAI,CAAC,CAAC,GAAG,KAAK,KAAK,EAAE;YACnB,MAAM,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;YAC7C,MAAM,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC;YACjF,MAAM,QAAQ,GAAG,gBAAgB,EAAE,CAAC;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CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC;AACxF,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { useCallback } from 'react';\nimport type { RefObject, DependencyList } from 'react';\n\nimport { getFocusables, getActiveElement } from '../utils';\n\nimport useEvent from './useEvent';\n\n/**\n * @example useFocusTrap(elementRef)\n * @param elementRef ref of the element in which focus needs to be retained\n * @param addToDocument boolean value to specify if event to be attached to document or to be taken from elementRef, defaults to true\n * @param dependencies list of variables or functions that will initiate this hook when they are updated.\n */\nconst useFocusTrap = (\n elementRef: RefObject<HTMLElement>,\n attachToDocument: boolean = true,\n dependencies: DependencyList = []\n) => {\n const onKeydown = useCallback((e: KeyboardEvent) => {\n if (e.key === 'Tab') {\n const focusables = getFocusables(elementRef);\n const { 0: firstFocusable, [focusables.length - 1]: lastFocusable } = focusables;\n const activeEl = getActiveElement();\n\n const requiresFocus =\n activeEl === elementRef.current ||\n !elementRef.current?.contains(activeEl) ||\n (elementRef.current?.contains(activeEl) && !focusables.includes(activeEl as HTMLElement));\n\n if (requiresFocus) {\n e.preventDefault();\n\n if (activeEl) {\n const focusablesWithActiveEl = getFocusables(elementRef, { includeActiveEl: true });\n const activeElIndex = focusablesWithActiveEl.findIndex(el => el === activeEl);\n\n if (activeElIndex !== -1) {\n if (e.shiftKey) {\n focusablesWithActiveEl[(activeElIndex - 1) % focusablesWithActiveEl.length].focus();\n } else {\n focusablesWithActiveEl[(activeElIndex + 1) % focusablesWithActiveEl.length].focus();\n }\n } else if (e.shiftKey) {\n lastFocusable?.focus();\n } else {\n firstFocusable?.focus();\n }\n } else if (e.shiftKey) {\n lastFocusable?.focus();\n } else {\n firstFocusable?.focus();\n }\n } else if (e.shiftKey && activeEl === firstFocusable) {\n e.preventDefault();\n lastFocusable?.focus();\n } else if (!e.shiftKey && activeEl === lastFocusable) {\n e.preventDefault();\n firstFocusable?.focus();\n }\n }\n }, dependencies);\n\n useEvent('keydown', onKeydown, { target: attachToDocument ? undefined : elementRef });\n};\n\nexport default useFocusTrap;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusWithin.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusWithin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useFocusWithin.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusWithin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWvC;;;;GAIG;AACH,QAAA,MAAM,cAAc,8GAEU,OAAO,kCAAkC,IAAI,kBACxE,OAuGF,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { useState, useEffect, useCallback, useRef } from 'react';
|
|
2
2
|
import { getAllPopovers, normalizeTargets } from '../utils';
|
|
3
|
+
const getElements = (els) => normalizeTargets(els)
|
|
4
|
+
.flatMap(el => [el, ...getAllPopovers(el)])
|
|
5
|
+
.filter((el) => el instanceof HTMLElement);
|
|
3
6
|
/** Hook for properly handling focus state of children components.
|
|
4
7
|
* @example const hasFocus = useFocusWithin([containerRef, ...], (isFocused, element) => { doSomething; });
|
|
5
8
|
* @param onFocusChange Callback function that is invoked with the current focus state and the current element when any child elements takes focus or all of them lose focus.
|
|
@@ -65,9 +68,16 @@ const useFocusWithin = (els, onFocusChange) => {
|
|
|
65
68
|
}
|
|
66
69
|
}, [hasFocus, onFocusChange]);
|
|
67
70
|
useEffect(() => {
|
|
68
|
-
const elements =
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
const elements = getElements(els);
|
|
72
|
+
elements.forEach(el => {
|
|
73
|
+
if (el?.contains(document.activeElement)) {
|
|
74
|
+
onFocus(new FocusEvent('focusin', { relatedTarget: document.activeElement }));
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
// Fixes autoFocus issue, should be run once on initial render
|
|
78
|
+
}, []);
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
const elements = getElements(els);
|
|
71
81
|
elements.forEach(el => {
|
|
72
82
|
el?.addEventListener('focusin', onFocus);
|
|
73
83
|
el?.addEventListener('focusout', onBlur);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusWithin.js","sourceRoot":"","sources":["../../src/hooks/useFocusWithin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGjE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5D;;;;GAIG;AACH,MAAM,cAAc,GAAG,CACrB,GAAuC,EACvC,aAAyE,EAChE,EAAE;IACX,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC7C,MAAM,YAAY,GAAG,MAAM,CAAqB,IAAI,CAAC,CAAC;IAEtD,MAAM,yBAAyB,GAAG,MAAM,EAAmB,CAAC;IAC5D,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,GAAG,EAAE;YACV,yBAAyB,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;QAC7C,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,MAAM,GAAG,WAAW,CACxB,CAAC,EAAE,aAAa,EAAc,EAAE,EAAE;QAChC,IAAI,CAAC,QAAQ;YAAE,OAAO;QAEtB,MAAM,QAAQ,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,GAAG,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAElF,IAAI,aAAa,YAAY,IAAI,EAAE;YACjC,y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C,EAAE;YACpB,EAAE,EAAE,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YACzC,EAAE,EAAE,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;gBACpB,EAAE,EAAE,mBAAmB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;gBAC5C,EAAE,EAAE,mBAAmB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;YAC9C,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IAE3B,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { useState, useEffect, useCallback, useRef } from 'react';\nimport type { RefObject } from 'react';\n\nimport { getAllPopovers, normalizeTargets } from '../utils';\n\nconst getElements = <T extends HTMLElement = HTMLElement>(\n els: (T | null | RefObject<T | null>)[]\n) =>\n normalizeTargets(els)\n .flatMap(el => [el, ...getAllPopovers(el)])\n .filter((el): el is HTMLElement => el instanceof HTMLElement);\n\n/** Hook for properly handling focus state of children components.\n * @example const hasFocus = useFocusWithin([containerRef, ...], (isFocused, element) => { doSomething; });\n * @param onFocusChange Callback function that is invoked with the current focus state and the current element when any child elements takes focus or all of them lose focus.\n * @returns * hasFocus:: A boolean indicating if the ref element has focus or not.\n */\nconst useFocusWithin = <T extends HTMLElement = HTMLElement>(\n els: (T | null | RefObject<T | null>)[],\n onFocusChange?: (isFocused: boolean, element: T | Element | null) => void\n): boolean => {\n const [hasFocus, setFocus] = useState(false);\n const focusedElRef = useRef<T | Element | null>(null);\n\n const handlerAbortControllerRef = useRef<AbortController>();\n useEffect(() => {\n return () => {\n handlerAbortControllerRef.current?.abort();\n };\n }, []);\n\n const onBlur = useCallback(\n ({ relatedTarget }: FocusEvent) => {\n if (!hasFocus) return;\n\n const elements = normalizeTargets(els).flatMap(el => [el, ...getAllPopovers(el)]);\n\n if (relatedTarget instanceof Node) {\n // changing focus to another relevant child doesn't count\n const focusedEl = elements.find(el => el?.contains(relatedTarget));\n if (focusedEl) {\n // ... just update the currently focused item\n focusedElRef.current = focusedEl;\n return;\n }\n }\n\n // Code below is similar to the useOuterEvent hook, but single-shot only and need to be attached\n // after blur event only. Due to various order of events between browsers and OSes, we need to\n // postpone calling 'onBlur' callback until next element gets focus or on outer click to check\n // if the relevant element contains the target element, which means the focus is retained.\n const handlerAbortController = new AbortController();\n const handler = (e: FocusEvent | MouseEvent) => {\n if (\n !elements.some(el => {\n return el?.contains(e.target as Node);\n })\n ) {\n setFocus(false);\n onFocusChange?.(false, focusedElRef.current);\n focusedElRef.current = null;\n }\n handlerAbortController.abort();\n };\n\n // For keyboard and SR navigation - wait for 'focusin'.\n document.addEventListener('focusin', handler, {\n once: true,\n signal: handlerAbortController.signal\n });\n\n // For mouse and touch navigation - wait for 'mouseup'.\n // The chosen event need to occur before 'click' to allow the given callback code finish before\n // 'click' handlers.\n document.addEventListener('mouseup', handler, {\n once: true,\n signal: handlerAbortController.signal\n });\n\n handlerAbortControllerRef.current = handlerAbortController;\n },\n [hasFocus, onFocusChange, els]\n );\n\n const onFocus = useCallback(\n ({ currentTarget }: FocusEvent) => {\n if (!hasFocus) {\n setFocus(true);\n const targetEl = currentTarget as T;\n onFocusChange?.(true, targetEl);\n focusedElRef.current = targetEl;\n }\n },\n [hasFocus, onFocusChange]\n );\n\n useEffect(() => {\n const elements = getElements(els);\n\n elements.forEach(el => {\n if (el?.contains(document.activeElement)) {\n onFocus(new FocusEvent('focusin', { relatedTarget: document.activeElement }));\n }\n });\n // Fixes autoFocus issue, should be run once on initial render\n }, []);\n\n useEffect(() => {\n const elements = getElements(els);\n\n elements.forEach(el => {\n el?.addEventListener('focusin', onFocus);\n el?.addEventListener('focusout', onBlur);\n });\n return () => {\n elements.forEach(el => {\n el?.removeEventListener('focusin', onFocus);\n el?.removeEventListener('focusout', onBlur);\n });\n };\n }, [els, onFocus, onBlur]);\n\n return hasFocus;\n};\n\nexport default useFocusWithin;\n"]}
|
package/lib/hooks/useI18n.d.ts
CHANGED
|
@@ -187,6 +187,7 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
187
187
|
app_shell_main_navigation_label: string;
|
|
188
188
|
shortcut_NextRegion: string;
|
|
189
189
|
shortcut_PrevRegion: string;
|
|
190
|
+
app_shell_user_account: string;
|
|
190
191
|
combobox_open_close: string;
|
|
191
192
|
combobox_search_instructions: string;
|
|
192
193
|
combobox_open_list_button_a11y: string;
|
|
@@ -206,6 +207,9 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
206
207
|
modal_maximize: string;
|
|
207
208
|
modal_dock: string;
|
|
208
209
|
modal_close: string;
|
|
210
|
+
minimize: string;
|
|
211
|
+
maximize: string;
|
|
212
|
+
dock: string;
|
|
209
213
|
selected_date_a11y: string;
|
|
210
214
|
open_calendar_button_a11y: string;
|
|
211
215
|
close_calendar_button_a11y: string;
|
|
@@ -260,6 +264,8 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
260
264
|
enter_a_number: string;
|
|
261
265
|
skip_navigation_menu_label: string;
|
|
262
266
|
tab_error_tooltip: string;
|
|
267
|
+
non_previewable: string;
|
|
268
|
+
content_load_error: string;
|
|
263
269
|
assignments: string;
|
|
264
270
|
article_list_label_a11y: string;
|
|
265
271
|
article_list_filter_label_a11y: string;
|
|
@@ -272,6 +278,9 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
272
278
|
disclaimer: string;
|
|
273
279
|
references: string;
|
|
274
280
|
result_available: string;
|
|
281
|
+
ask: string;
|
|
282
|
+
error_message: string;
|
|
283
|
+
add_a_comment: string;
|
|
275
284
|
article_label_a11y: string;
|
|
276
285
|
article_related_links: string;
|
|
277
286
|
article_more_like_this: string;
|
|
@@ -349,6 +358,11 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
349
358
|
shortcut_GoToIncomingInteraction: string;
|
|
350
359
|
shortcut_DismissIncomingInteraction: string;
|
|
351
360
|
rte_heading_style: string;
|
|
361
|
+
rte_heading_style_normal: string;
|
|
362
|
+
rte_heading_style_heading_1: string;
|
|
363
|
+
rte_heading_style_heading_2: string;
|
|
364
|
+
rte_heading_style_heading_3: string;
|
|
365
|
+
rte_heading_style_heading_4: string;
|
|
352
366
|
rte_bold: string;
|
|
353
367
|
rte_italic: string;
|
|
354
368
|
rte_strike_through: string;
|
|
@@ -641,10 +655,13 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
641
655
|
follow_up_tasks: string;
|
|
642
656
|
add_follow_up_task: string;
|
|
643
657
|
agents_utterance: string;
|
|
658
|
+
due_on: string;
|
|
644
659
|
sentiment_positive: string;
|
|
645
660
|
sentiment_negative: string;
|
|
646
661
|
sentiment_neutral: string;
|
|
647
662
|
no_recommendations: string;
|
|
663
|
+
items_added_to_previous_list: string;
|
|
664
|
+
items_added_to_current_list: string;
|
|
648
665
|
condition_builder_advanced_condition_label: string;
|
|
649
666
|
condition_builder_advanced_condition_placeholder: string;
|
|
650
667
|
condition_builder_advanced_mode_button_label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../src/hooks/useI18n.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,QAAA,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../src/hooks/useI18n.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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|
|
184
184
|
shortcut_NextRegion: string;
|
|
185
185
|
shortcut_PrevRegion: string;
|
|
186
|
+
app_shell_user_account: string;
|
|
186
187
|
combobox_open_close: string;
|
|
187
188
|
combobox_search_instructions: string;
|
|
188
189
|
combobox_open_list_button_a11y: string;
|
|
@@ -202,6 +203,9 @@ declare const _default: {
|
|
|
202
203
|
modal_maximize: string;
|
|
203
204
|
modal_dock: string;
|
|
204
205
|
modal_close: string;
|
|
206
|
+
minimize: string;
|
|
207
|
+
maximize: string;
|
|
208
|
+
dock: string;
|
|
205
209
|
selected_date_a11y: string;
|
|
206
210
|
open_calendar_button_a11y: string;
|
|
207
211
|
close_calendar_button_a11y: string;
|
|
@@ -256,6 +260,8 @@ declare const _default: {
|
|
|
256
260
|
enter_a_number: string;
|
|
257
261
|
skip_navigation_menu_label: string;
|
|
258
262
|
tab_error_tooltip: string;
|
|
263
|
+
non_previewable: string;
|
|
264
|
+
content_load_error: string;
|
|
259
265
|
assignments: string;
|
|
260
266
|
article_list_label_a11y: string;
|
|
261
267
|
article_list_filter_label_a11y: string;
|
|
@@ -268,6 +274,9 @@ declare const _default: {
|
|
|
268
274
|
disclaimer: string;
|
|
269
275
|
references: string;
|
|
270
276
|
result_available: string;
|
|
277
|
+
ask: string;
|
|
278
|
+
error_message: string;
|
|
279
|
+
add_a_comment: string;
|
|
271
280
|
article_label_a11y: string;
|
|
272
281
|
article_related_links: string;
|
|
273
282
|
article_more_like_this: string;
|
|
@@ -345,6 +354,11 @@ declare const _default: {
|
|
|
345
354
|
shortcut_GoToIncomingInteraction: string;
|
|
346
355
|
shortcut_DismissIncomingInteraction: string;
|
|
347
356
|
rte_heading_style: string;
|
|
357
|
+
rte_heading_style_normal: string;
|
|
358
|
+
rte_heading_style_heading_1: string;
|
|
359
|
+
rte_heading_style_heading_2: string;
|
|
360
|
+
rte_heading_style_heading_3: string;
|
|
361
|
+
rte_heading_style_heading_4: string;
|
|
348
362
|
rte_bold: string;
|
|
349
363
|
rte_italic: string;
|
|
350
364
|
rte_strike_through: string;
|
|
@@ -637,10 +651,13 @@ declare const _default: {
|
|
|
637
651
|
follow_up_tasks: string;
|
|
638
652
|
add_follow_up_task: string;
|
|
639
653
|
agents_utterance: string;
|
|
654
|
+
due_on: string;
|
|
640
655
|
sentiment_positive: string;
|
|
641
656
|
sentiment_negative: string;
|
|
642
657
|
sentiment_neutral: string;
|
|
643
658
|
no_recommendations: string;
|
|
659
|
+
items_added_to_previous_list: string;
|
|
660
|
+
items_added_to_current_list: string;
|
|
644
661
|
condition_builder_advanced_condition_label: string;
|
|
645
662
|
condition_builder_advanced_condition_placeholder: string;
|
|
646
663
|
condition_builder_advanced_mode_button_label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/i18n/default.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/i18n/default.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBA8pCE"}
|
package/lib/i18n/default.js
CHANGED
|
@@ -203,6 +203,7 @@ export default {
|
|
|
203
203
|
app_shell_main_navigation_label: 'Main',
|
|
204
204
|
shortcut_NextRegion: 'Next region',
|
|
205
205
|
shortcut_PrevRegion: 'Previous region',
|
|
206
|
+
app_shell_user_account: 'Account',
|
|
206
207
|
/* core:ComboBox */
|
|
207
208
|
combobox_open_close: 'Arrow down to open, press escape to close.',
|
|
208
209
|
combobox_search_instructions: 'Start typing to search',
|
|
@@ -223,8 +224,11 @@ export default {
|
|
|
223
224
|
/* core:Modal */
|
|
224
225
|
modal_minimize: 'Minimize modal',
|
|
225
226
|
modal_maximize: 'Maximize modal',
|
|
226
|
-
modal_dock: 'Dock
|
|
227
|
+
modal_dock: 'Dock modal',
|
|
227
228
|
modal_close: 'Close modal',
|
|
229
|
+
minimize: 'Minimize',
|
|
230
|
+
maximize: 'Maximize',
|
|
231
|
+
dock: 'Dock',
|
|
228
232
|
/* core:Datetime */
|
|
229
233
|
selected_date_a11y: 'Selected date:',
|
|
230
234
|
open_calendar_button_a11y: 'Open calendar',
|
|
@@ -293,6 +297,9 @@ export default {
|
|
|
293
297
|
skip_navigation_menu_label: 'Skip navigation menu',
|
|
294
298
|
/* core:Tabs */
|
|
295
299
|
tab_error_tooltip: '{0} has errors',
|
|
300
|
+
/* core:LightBox */
|
|
301
|
+
non_previewable: "{0} file can't be previewed in your browser",
|
|
302
|
+
content_load_error: 'Error loading content',
|
|
296
303
|
/* work:Assignments */
|
|
297
304
|
assignments: 'Assignments',
|
|
298
305
|
/* work:ArticleList */
|
|
@@ -307,6 +314,9 @@ export default {
|
|
|
307
314
|
disclaimer: 'Disclaimer',
|
|
308
315
|
references: 'References',
|
|
309
316
|
result_available: 'Result available',
|
|
317
|
+
ask: 'Ask',
|
|
318
|
+
error_message: 'Unable to retrieve data at the moment. Please try again.',
|
|
319
|
+
add_a_comment: 'Add a comment',
|
|
310
320
|
/* work:Article */
|
|
311
321
|
article_label_a11y: 'Article',
|
|
312
322
|
article_related_links: 'Related links',
|
|
@@ -397,6 +407,11 @@ export default {
|
|
|
397
407
|
shortcut_DismissIncomingInteraction: 'Dismiss incoming interaction popup.',
|
|
398
408
|
/* rte:RichTextEditor */
|
|
399
409
|
rte_heading_style: 'Heading style',
|
|
410
|
+
rte_heading_style_normal: 'Normal',
|
|
411
|
+
rte_heading_style_heading_1: 'Heading 1',
|
|
412
|
+
rte_heading_style_heading_2: 'Heading 2',
|
|
413
|
+
rte_heading_style_heading_3: 'Heading 3',
|
|
414
|
+
rte_heading_style_heading_4: 'Heading 4',
|
|
400
415
|
rte_bold: 'Bold',
|
|
401
416
|
rte_italic: 'Italic',
|
|
402
417
|
rte_strike_through: 'Strike-through',
|
|
@@ -695,13 +710,17 @@ export default {
|
|
|
695
710
|
download_transcript: 'Download transcript',
|
|
696
711
|
follow_up_tasks: 'Follow-up tasks',
|
|
697
712
|
add_follow_up_task: 'Add follow-up task',
|
|
698
|
-
agents_utterance: "Agent's
|
|
713
|
+
agents_utterance: "Agent's commitment in context",
|
|
714
|
+
/* cs:FollowUpTask */
|
|
715
|
+
due_on: 'Due on {0}',
|
|
699
716
|
/* cs:Sentiment */
|
|
700
717
|
sentiment_positive: 'Positive',
|
|
701
718
|
sentiment_negative: 'Negative',
|
|
702
719
|
sentiment_neutral: 'Neutral',
|
|
703
720
|
/* cs:IntelligentGuidance */
|
|
704
721
|
no_recommendations: 'No recommendations',
|
|
722
|
+
items_added_to_previous_list: 'Items added to previous list',
|
|
723
|
+
items_added_to_current_list: 'Items added to current list',
|
|
705
724
|
/* condition-builder:ConditionBuilder */
|
|
706
725
|
condition_builder_advanced_condition_label: 'Advanced condition',
|
|
707
726
|
condition_builder_advanced_condition_placeholder: 'Advanced condition',
|