@pega/cosmos-react-core 3.0.0-dev.17.0 → 3.0.0-dev.18.2
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/lib/components/Badges/Keyboard.d.ts.map +1 -1
- package/lib/components/Badges/Keyboard.js +2 -0
- package/lib/components/Badges/Keyboard.js.map +1 -1
- package/lib/components/Badges/Selection.d.ts +1 -1
- package/lib/components/Badges/Selection.d.ts.map +1 -1
- package/lib/components/Badges/Selection.js +4 -2
- package/lib/components/Badges/Selection.js.map +1 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +2 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.js +27 -7
- package/lib/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.js +55 -23
- package/lib/components/ComboBox/ComboBox.js.map +1 -1
- package/lib/components/ComboBox/ComboBox.types.d.ts +3 -1
- package/lib/components/ComboBox/ComboBox.types.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.types.js.map +1 -1
- package/lib/components/ComboBox/ComboBoxInput.d.ts +7 -0
- package/lib/components/ComboBox/ComboBoxInput.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBoxInput.js +5 -2
- package/lib/components/ComboBox/ComboBoxInput.js.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +113 -36
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts +8 -0
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.js.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.d.ts.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.js +2 -2
- package/lib/components/CompositeInput/CompositeInput.js.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.styles.d.ts.map +1 -1
- package/lib/components/CompositeInput/CompositeInput.styles.js +20 -17
- package/lib/components/CompositeInput/CompositeInput.styles.js.map +1 -1
- package/lib/components/Currency/utils.d.ts.map +1 -1
- package/lib/components/Currency/utils.js +3 -2
- package/lib/components/Currency/utils.js.map +1 -1
- package/lib/components/DateTime/Picker/Calendar.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/Calendar.js +6 -12
- package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
- package/lib/components/DateTime/Picker/Calendar.styles.d.ts +2 -4
- package/lib/components/DateTime/Picker/Calendar.styles.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/Calendar.styles.js +12 -54
- package/lib/components/DateTime/Picker/Calendar.styles.js.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.d.ts.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.js +2 -1
- package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
- package/lib/components/DateTime/Picker/DatePicker.styles.d.ts +3 -0
- package/lib/components/DateTime/Picker/DatePicker.styles.d.ts.map +1 -0
- package/lib/components/DateTime/Picker/DatePicker.styles.js +39 -0
- package/lib/components/DateTime/Picker/DatePicker.styles.js.map +1 -0
- package/lib/components/DateTime/Picker/DateRangePicker.js +1 -1
- package/lib/components/DateTime/Picker/DateRangePicker.js.map +1 -1
- package/lib/components/DateTime/index.d.ts +2 -0
- package/lib/components/DateTime/index.d.ts.map +1 -1
- package/lib/components/DateTime/index.js +2 -0
- package/lib/components/DateTime/index.js.map +1 -1
- package/lib/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/components/Dialog/Dialog.js +3 -2
- package/lib/components/Dialog/Dialog.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.js +64 -9
- package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.types.d.ts +2 -0
- package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
- package/lib/components/ListToolbar/PresetMenuPopover.d.ts +12 -0
- package/lib/components/ListToolbar/PresetMenuPopover.d.ts.map +1 -0
- package/lib/components/ListToolbar/PresetMenuPopover.js +36 -0
- package/lib/components/ListToolbar/PresetMenuPopover.js.map +1 -0
- package/lib/components/ListToolbar/QueryOptionPopover.d.ts.map +1 -1
- package/lib/components/ListToolbar/QueryOptionPopover.js +14 -44
- package/lib/components/ListToolbar/QueryOptionPopover.js.map +1 -1
- package/lib/components/Menu/Menu.d.ts.map +1 -1
- package/lib/components/Menu/Menu.js +8 -5
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/Menu/Menu.styles.js +1 -1
- package/lib/components/Menu/Menu.styles.js.map +1 -1
- package/lib/components/Menu/Menu.types.d.ts +13 -0
- package/lib/components/Menu/Menu.types.d.ts.map +1 -1
- package/lib/components/Menu/Menu.types.js.map +1 -1
- package/lib/components/Menu/MenuGroup.d.ts.map +1 -1
- package/lib/components/Menu/MenuGroup.js +3 -3
- package/lib/components/Menu/MenuGroup.js.map +1 -1
- package/lib/components/Menu/MenuItem.d.ts.map +1 -1
- package/lib/components/Menu/MenuItem.js +3 -5
- package/lib/components/Menu/MenuItem.js.map +1 -1
- package/lib/components/Menu/MenuList.d.ts.map +1 -1
- package/lib/components/Menu/MenuList.js +14 -14
- package/lib/components/Menu/MenuList.js.map +1 -1
- package/lib/components/PageTemplates/DashboardPage.d.ts.map +1 -1
- package/lib/components/PageTemplates/DashboardPage.js +1 -4
- package/lib/components/PageTemplates/DashboardPage.js.map +1 -1
- package/lib/components/Skeleton/ParagraphSkeleton.d.ts.map +1 -1
- package/lib/components/Skeleton/ParagraphSkeleton.js +2 -2
- package/lib/components/Skeleton/ParagraphSkeleton.js.map +1 -1
- package/lib/hooks/useActiveDescendant.d.ts +5 -1
- package/lib/hooks/useActiveDescendant.d.ts.map +1 -1
- package/lib/hooks/useActiveDescendant.js +162 -94
- package/lib/hooks/useActiveDescendant.js.map +1 -1
- package/lib/hooks/useI18n.d.ts +26 -0
- package/lib/hooks/useI18n.d.ts.map +1 -1
- package/lib/hooks/useI18n.js +2 -1
- package/lib/hooks/useI18n.js.map +1 -1
- package/lib/i18n/default.d.ts +26 -0
- package/lib/i18n/default.d.ts.map +1 -1
- package/lib/i18n/default.js +39 -13
- package/lib/i18n/default.js.map +1 -1
- package/lib/i18n/i18n.d.ts +52 -0
- package/lib/i18n/i18n.d.ts.map +1 -1
- package/lib/i18n/translate.d.ts +3 -0
- package/lib/i18n/translate.d.ts.map +1 -1
- package/lib/i18n/translate.js.map +1 -1
- package/lib/init.js +1 -1
- package/lib/init.js.map +1 -1
- package/lib/theme/themes/darkTheme.json +3 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
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;AAgDrC,MAAM,mBAAmB,GAAG,CAC1B,EACE,OAAO,EACP,KAAK,EACL,aAAa,EACb,QAAQ,EACR,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,EAA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tE,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\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 const timeoutId = 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 return () => clearTimeout(timeoutId);\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 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"]}
|
|
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,CAAC,CAAC;IACtE,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,EAAe,CAAC;IAC9D,MAAM,EAAE,GAAG,EAAE,GAAG,YAAY,EAAE,CAAC;IAE/B,MAAM,gBAAgB,GAAG,WAAW,CAAC,GAAG,EAAE;QACxC,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE;YAC1B,IA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AuE;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"]}
|
package/lib/hooks/useI18n.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
10
10
|
status: string;
|
|
11
11
|
additional_info: string;
|
|
12
12
|
search_placeholder_default: string;
|
|
13
|
+
select_placeholder_default: string;
|
|
13
14
|
description: string;
|
|
14
15
|
all: string;
|
|
15
16
|
remove: string;
|
|
@@ -52,6 +53,7 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
52
53
|
edit_details: string;
|
|
53
54
|
add_emoji: string;
|
|
54
55
|
create_new: string;
|
|
56
|
+
submit_and_open: string;
|
|
55
57
|
add_condition: string;
|
|
56
58
|
open_noun: string;
|
|
57
59
|
close_noun: string;
|
|
@@ -86,6 +88,7 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
86
88
|
completed: string;
|
|
87
89
|
current: string;
|
|
88
90
|
not_started: string;
|
|
91
|
+
empty_value: string;
|
|
89
92
|
day_label_a11y: string;
|
|
90
93
|
day_placeholder: string;
|
|
91
94
|
quarter_label_a11y: string;
|
|
@@ -158,11 +161,14 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
158
161
|
combobox_search_instructions: string;
|
|
159
162
|
combobox_open_list_button_a11y: string;
|
|
160
163
|
combobox_close_list_button_a11y: string;
|
|
164
|
+
multiselect_instructions: string;
|
|
165
|
+
selected_items: string;
|
|
161
166
|
menu_selection_instructions: string;
|
|
162
167
|
menu_item_expand_arrow: string;
|
|
163
168
|
menu_item_collapse_arrow: string;
|
|
164
169
|
menu_item_collapse_shift_space: string;
|
|
165
170
|
menu_item_shift_space_expand_collapse: string;
|
|
171
|
+
menu_option_list: string;
|
|
166
172
|
modal_minimize: string;
|
|
167
173
|
modal_maximize: string;
|
|
168
174
|
modal_dock: string;
|
|
@@ -268,6 +274,7 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
268
274
|
rte_image_key_command: string;
|
|
269
275
|
expand_forwarded_message: string;
|
|
270
276
|
collapse_forwarded_message: string;
|
|
277
|
+
copy_to: string;
|
|
271
278
|
feed_new_post: string;
|
|
272
279
|
feed_new_reply: string;
|
|
273
280
|
feed_edit_post: string;
|
|
@@ -458,8 +465,10 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
458
465
|
condition_builder_switch_banner_text: string;
|
|
459
466
|
condition_builder_confirm_button_label: string;
|
|
460
467
|
condition_builder_empty_selection_error_text: string;
|
|
468
|
+
condition_builder_empty_value_text: string;
|
|
461
469
|
condition_builder_compare_with: string;
|
|
462
470
|
condition_builder_compare_with_another_field: string;
|
|
471
|
+
condition_builder_compare_with_parameter: string;
|
|
463
472
|
condition_builder_compare_with_relative_date: string;
|
|
464
473
|
condition_builder_compare_with_text_value: string;
|
|
465
474
|
condition_builder_compare_with_numeric_value: string;
|
|
@@ -468,10 +477,21 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
468
477
|
condition_builder_invalid_time_period: string;
|
|
469
478
|
condition_builder_invalid_relative_date: string;
|
|
470
479
|
condition_builder_invalid_value: string;
|
|
480
|
+
condition_builder_invalid_values: string;
|
|
481
|
+
condition_builder_invalid_time: string;
|
|
482
|
+
condition_builder_invalid_date: string;
|
|
471
483
|
condition_builder_invalid_number: string;
|
|
472
484
|
condition_builder_date_function_year: string;
|
|
473
485
|
condition_builder_date_function_quarter: string;
|
|
474
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;
|
|
475
495
|
condition_builder_day_number_of_month: {
|
|
476
496
|
zero: string;
|
|
477
497
|
one: string;
|
|
@@ -676,6 +696,8 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
676
696
|
condition_builder_time_period_previous: string;
|
|
677
697
|
condition_builder_time_period_next: string;
|
|
678
698
|
condition_builder_value_label: string;
|
|
699
|
+
condition_builder_field_label: string;
|
|
700
|
+
condition_builder_comparator_label: string;
|
|
679
701
|
promoted_filters_clear_all_button_label: string;
|
|
680
702
|
dev_mode: string;
|
|
681
703
|
expand_navigation: string;
|
|
@@ -695,6 +717,10 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
695
717
|
delete_step_title: string;
|
|
696
718
|
delete_step_outcome: string;
|
|
697
719
|
delete_all_outcomes: string;
|
|
720
|
+
reference: string;
|
|
721
|
+
delete_step_error: string;
|
|
722
|
+
delete_referenced_step_error: string;
|
|
723
|
+
delete_connector_error: string;
|
|
698
724
|
zoom_level: string;
|
|
699
725
|
close_configuration_panel: string;
|
|
700
726
|
clear_object_summary: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../src/hooks/useI18n.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../src/hooks/useI18n.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGZ,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
package/lib/hooks/useI18n.js
CHANGED
|
@@ -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
|
package/lib/hooks/useI18n.js.map
CHANGED
|
@@ -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;
|
|
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"]}
|
package/lib/i18n/default.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ declare const _default: {
|
|
|
6
6
|
status: string;
|
|
7
7
|
additional_info: string;
|
|
8
8
|
search_placeholder_default: string;
|
|
9
|
+
select_placeholder_default: string;
|
|
9
10
|
description: string;
|
|
10
11
|
all: string;
|
|
11
12
|
remove: string;
|
|
@@ -48,6 +49,7 @@ declare const _default: {
|
|
|
48
49
|
edit_details: string;
|
|
49
50
|
add_emoji: string;
|
|
50
51
|
create_new: string;
|
|
52
|
+
submit_and_open: string;
|
|
51
53
|
add_condition: string;
|
|
52
54
|
open_noun: string;
|
|
53
55
|
close_noun: string;
|
|
@@ -82,6 +84,7 @@ declare const _default: {
|
|
|
82
84
|
completed: string;
|
|
83
85
|
current: string;
|
|
84
86
|
not_started: string;
|
|
87
|
+
empty_value: string;
|
|
85
88
|
day_label_a11y: string;
|
|
86
89
|
day_placeholder: string;
|
|
87
90
|
quarter_label_a11y: string;
|
|
@@ -154,11 +157,14 @@ declare const _default: {
|
|
|
154
157
|
combobox_search_instructions: string;
|
|
155
158
|
combobox_open_list_button_a11y: string;
|
|
156
159
|
combobox_close_list_button_a11y: string;
|
|
160
|
+
multiselect_instructions: string;
|
|
161
|
+
selected_items: string;
|
|
157
162
|
menu_selection_instructions: string;
|
|
158
163
|
menu_item_expand_arrow: string;
|
|
159
164
|
menu_item_collapse_arrow: string;
|
|
160
165
|
menu_item_collapse_shift_space: string;
|
|
161
166
|
menu_item_shift_space_expand_collapse: string;
|
|
167
|
+
menu_option_list: string;
|
|
162
168
|
modal_minimize: string;
|
|
163
169
|
modal_maximize: string;
|
|
164
170
|
modal_dock: string;
|
|
@@ -264,6 +270,7 @@ declare const _default: {
|
|
|
264
270
|
rte_image_key_command: string;
|
|
265
271
|
expand_forwarded_message: string;
|
|
266
272
|
collapse_forwarded_message: string;
|
|
273
|
+
copy_to: string;
|
|
267
274
|
feed_new_post: string;
|
|
268
275
|
feed_new_reply: string;
|
|
269
276
|
feed_edit_post: string;
|
|
@@ -454,8 +461,10 @@ declare const _default: {
|
|
|
454
461
|
condition_builder_switch_banner_text: string;
|
|
455
462
|
condition_builder_confirm_button_label: string;
|
|
456
463
|
condition_builder_empty_selection_error_text: string;
|
|
464
|
+
condition_builder_empty_value_text: string;
|
|
457
465
|
condition_builder_compare_with: string;
|
|
458
466
|
condition_builder_compare_with_another_field: string;
|
|
467
|
+
condition_builder_compare_with_parameter: string;
|
|
459
468
|
condition_builder_compare_with_relative_date: string;
|
|
460
469
|
condition_builder_compare_with_text_value: string;
|
|
461
470
|
condition_builder_compare_with_numeric_value: string;
|
|
@@ -464,10 +473,21 @@ declare const _default: {
|
|
|
464
473
|
condition_builder_invalid_time_period: string;
|
|
465
474
|
condition_builder_invalid_relative_date: string;
|
|
466
475
|
condition_builder_invalid_value: string;
|
|
476
|
+
condition_builder_invalid_values: string;
|
|
477
|
+
condition_builder_invalid_time: string;
|
|
478
|
+
condition_builder_invalid_date: string;
|
|
467
479
|
condition_builder_invalid_number: string;
|
|
468
480
|
condition_builder_date_function_year: string;
|
|
469
481
|
condition_builder_date_function_quarter: string;
|
|
470
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;
|
|
471
491
|
condition_builder_day_number_of_month: {
|
|
472
492
|
zero: string;
|
|
473
493
|
one: string;
|
|
@@ -672,6 +692,8 @@ declare const _default: {
|
|
|
672
692
|
condition_builder_time_period_previous: string;
|
|
673
693
|
condition_builder_time_period_next: string;
|
|
674
694
|
condition_builder_value_label: string;
|
|
695
|
+
condition_builder_field_label: string;
|
|
696
|
+
condition_builder_comparator_label: string;
|
|
675
697
|
promoted_filters_clear_all_button_label: string;
|
|
676
698
|
dev_mode: string;
|
|
677
699
|
expand_navigation: string;
|
|
@@ -691,6 +713,10 @@ declare const _default: {
|
|
|
691
713
|
delete_step_title: string;
|
|
692
714
|
delete_step_outcome: string;
|
|
693
715
|
delete_all_outcomes: string;
|
|
716
|
+
reference: string;
|
|
717
|
+
delete_step_error: string;
|
|
718
|
+
delete_referenced_step_error: string;
|
|
719
|
+
delete_connector_error: string;
|
|
694
720
|
zoom_level: string;
|
|
695
721
|
close_configuration_panel: string;
|
|
696
722
|
clear_object_summary: 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,wBA40BE"}
|
package/lib/i18n/default.js
CHANGED
|
@@ -10,6 +10,7 @@ export default {
|
|
|
10
10
|
status: 'Status',
|
|
11
11
|
additional_info: 'Additional info',
|
|
12
12
|
search_placeholder_default: 'Search…',
|
|
13
|
+
select_placeholder_default: 'Select…',
|
|
13
14
|
description: 'Description',
|
|
14
15
|
all: 'All',
|
|
15
16
|
/* Verbs */
|
|
@@ -54,23 +55,24 @@ export default {
|
|
|
54
55
|
edit_details: 'Edit details',
|
|
55
56
|
add_emoji: 'Add emoji',
|
|
56
57
|
create_new: 'Create new',
|
|
58
|
+
submit_and_open: 'Submit and open',
|
|
57
59
|
add_condition: 'Add condition',
|
|
58
60
|
/* Dynamic verb {noun} */
|
|
59
|
-
open_noun: 'Open
|
|
60
|
-
close_noun: 'Close
|
|
61
|
-
view_all_noun: 'View all
|
|
62
|
-
view_less_noun: 'View less
|
|
63
|
-
expand_noun: 'Expand
|
|
64
|
-
add_noun: 'Add
|
|
65
|
-
collapse_noun: 'Collapse
|
|
66
|
-
checked_noun: '{0}
|
|
67
|
-
selected_noun: '{0}
|
|
68
|
-
deselected_noun: '{0}
|
|
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',
|
|
69
71
|
use_input_value: 'Use {0}',
|
|
70
|
-
preview_of_noun: 'Preview of
|
|
71
|
-
go_to_noun: 'Go to
|
|
72
|
+
preview_of_noun: 'Preview of {0}',
|
|
73
|
+
go_to_noun: 'Go to {0}',
|
|
72
74
|
/* States */
|
|
73
|
-
edited: 'Edited',
|
|
75
|
+
edited: 'Edited {0}',
|
|
74
76
|
done: 'Done',
|
|
75
77
|
uploading: 'Uploading',
|
|
76
78
|
loading: 'Loading…',
|
|
@@ -90,6 +92,7 @@ export default {
|
|
|
90
92
|
completed: 'Completed',
|
|
91
93
|
current: 'Current',
|
|
92
94
|
not_started: 'Not started',
|
|
95
|
+
empty_value: 'Empty value',
|
|
93
96
|
/* Date and time */
|
|
94
97
|
day_label_a11y: 'Day',
|
|
95
98
|
day_placeholder: 'DD',
|
|
@@ -173,12 +176,15 @@ export default {
|
|
|
173
176
|
combobox_search_instructions: 'Start typing to search',
|
|
174
177
|
combobox_open_list_button_a11y: 'Open combobox list',
|
|
175
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',
|
|
176
181
|
/* core:Menu */
|
|
177
182
|
menu_selection_instructions: 'Press enter to select items.',
|
|
178
183
|
menu_item_expand_arrow: 'Arrow right to expand.',
|
|
179
184
|
menu_item_collapse_arrow: 'Arrow left to collapse.',
|
|
180
185
|
menu_item_collapse_shift_space: 'Press shift space to collapse.',
|
|
181
186
|
menu_item_shift_space_expand_collapse: 'Press shift space to expand and collapse.',
|
|
187
|
+
menu_option_list: 'Options list',
|
|
182
188
|
/* core:Modal */
|
|
183
189
|
modal_minimize: 'Minimize modal',
|
|
184
190
|
modal_maximize: 'Maximize modal',
|
|
@@ -304,6 +310,7 @@ export default {
|
|
|
304
310
|
/* social:Email */
|
|
305
311
|
expand_forwarded_message: 'Expand forwarded message',
|
|
306
312
|
collapse_forwarded_message: 'Collapse forwarded message',
|
|
313
|
+
copy_to: 'Copy to',
|
|
307
314
|
/* social:Feed */
|
|
308
315
|
feed_new_post: 'New post',
|
|
309
316
|
feed_new_reply: 'New reply',
|
|
@@ -504,8 +511,10 @@ export default {
|
|
|
504
511
|
condition_builder_switch_banner_text: 'Switching from Advanced mode can reset all AND/OR/NOT operators. Do you want to continue?',
|
|
505
512
|
condition_builder_confirm_button_label: 'OK',
|
|
506
513
|
condition_builder_empty_selection_error_text: 'No selection',
|
|
514
|
+
condition_builder_empty_value_text: 'Empty value',
|
|
507
515
|
condition_builder_compare_with: 'Compare with',
|
|
508
516
|
condition_builder_compare_with_another_field: 'Another field',
|
|
517
|
+
condition_builder_compare_with_parameter: 'Parameter',
|
|
509
518
|
condition_builder_compare_with_relative_date: 'Relative date',
|
|
510
519
|
condition_builder_compare_with_text_value: 'Text value',
|
|
511
520
|
condition_builder_compare_with_numeric_value: 'Numeric value',
|
|
@@ -514,10 +523,21 @@ export default {
|
|
|
514
523
|
condition_builder_invalid_time_period: 'Invalid time period',
|
|
515
524
|
condition_builder_invalid_relative_date: 'Invalid relative date',
|
|
516
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',
|
|
517
529
|
condition_builder_invalid_number: 'Invalid number',
|
|
518
530
|
condition_builder_date_function_year: 'Year',
|
|
519
531
|
condition_builder_date_function_quarter: 'Quarter',
|
|
520
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',
|
|
521
541
|
condition_builder_day_number_of_month: {
|
|
522
542
|
zero: '{0}th day of the month',
|
|
523
543
|
one: '{0}st day of the month',
|
|
@@ -722,6 +742,8 @@ export default {
|
|
|
722
742
|
condition_builder_time_period_previous: 'Previous',
|
|
723
743
|
condition_builder_time_period_next: 'Next',
|
|
724
744
|
condition_builder_value_label: 'Value',
|
|
745
|
+
condition_builder_field_label: 'Field',
|
|
746
|
+
condition_builder_comparator_label: 'Comparator',
|
|
725
747
|
/* condition-builder:PromotedFilters */
|
|
726
748
|
promoted_filters_clear_all_button_label: 'Clear all filters',
|
|
727
749
|
/* build:AppShell */
|
|
@@ -746,6 +768,10 @@ export default {
|
|
|
746
768
|
delete_step_title: 'Delete step',
|
|
747
769
|
delete_step_outcome: 'Outcome to keep',
|
|
748
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',
|
|
749
775
|
/* build:Workbench */
|
|
750
776
|
zoom_level: 'Zoom level',
|
|
751
777
|
close_configuration_panel: 'Close configuration panel',
|