@pega/cosmos-react-core 9.0.0-build.28.1 → 9.0.0-build.28.3

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 (31) hide show
  1. package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
  2. package/lib/components/ComboBox/ComboBox.js +2 -3
  3. package/lib/components/ComboBox/ComboBox.js.map +1 -1
  4. package/lib/components/ComboBox/ComboBox.styles.d.ts +3 -0
  5. package/lib/components/ComboBox/ComboBox.styles.d.ts.map +1 -1
  6. package/lib/components/ComboBox/ComboBox.styles.js +33 -31
  7. package/lib/components/ComboBox/ComboBox.styles.js.map +1 -1
  8. package/lib/components/FieldGroup/FieldGroup.d.ts +2 -0
  9. package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
  10. package/lib/components/FieldGroup/FieldGroup.js +10 -4
  11. package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
  12. package/lib/components/FieldGroup/FieldGroupList.d.ts.map +1 -1
  13. package/lib/components/FieldGroup/FieldGroupList.js +7 -1
  14. package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
  15. package/lib/components/SummaryList/SummaryList.d.ts +5 -0
  16. package/lib/components/SummaryList/SummaryList.d.ts.map +1 -1
  17. package/lib/components/SummaryList/SummaryList.js +2 -2
  18. package/lib/components/SummaryList/SummaryList.js.map +1 -1
  19. package/lib/components/SummaryList/ViewAll.d.ts +1 -1
  20. package/lib/components/SummaryList/ViewAll.d.ts.map +1 -1
  21. package/lib/components/SummaryList/ViewAll.js +5 -4
  22. package/lib/components/SummaryList/ViewAll.js.map +1 -1
  23. package/lib/hooks/useI18n.d.ts +1 -0
  24. package/lib/hooks/useI18n.d.ts.map +1 -1
  25. package/lib/i18n/default.d.ts +1 -0
  26. package/lib/i18n/default.d.ts.map +1 -1
  27. package/lib/i18n/default.js +2 -1
  28. package/lib/i18n/default.js.map +1 -1
  29. package/lib/i18n/i18n.d.ts +1 -0
  30. package/lib/i18n/i18n.d.ts.map +1 -1
  31. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SummaryList.d.ts","sourceRoot":"","sources":["../../../src/components/SummaryList/SummaryList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAa,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAG/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EACV,YAAY,EACZ,+BAA+B,EAC/B,cAAc,EACd,UAAU,EACV,MAAM,EACN,UAAU,EACX,MAAM,aAAa,CAAC;AAKrB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,uGAAuG;IACvG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,iDAAiD;IACjD,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IACrC,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wHAAwH;IACxH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,qKAAqK;IACrK,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,4KAA4K;IAC5K,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;IACzC,2DAA2D;IAC3D,WAAW,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IACzC;;;OAGG;IACH,KAAK,CAAC,EAAE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ACxB;AAED,MAAM,WAAW,eACf,SAAQ,UAAU,CAAC,gBAAgB,EAAE,SAAS,CAAC,EAC7C,IAAI,CAAC,YAAY,EAAE,iBAAiB,CAAC,EACrC,YAAY;IACd,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,oIAAoI;IACpI,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,uBAAuB;;6IAMnC,CAAC;AAIF,eAAO,MAAM,wBAAwB;cACzB,OAAO,GAAG,MAAM;wJAoB3B,CAAC;AAIF,eAAO,MAAM,qBAAqB;;;;iDAQjC,CAAC;AAIF,eAAO,MAAM,gBAAgB,GAAI,iBAAiB,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,MAAM,CAAC,4CAqCzF,CAAC;AAEF,QAAA,MAAM,WAAW,EAAE,+BAA+B,CAAC,gBAAgB,CAsHlE,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -57,7 +57,7 @@ export const SummaryListItems = ({ name, items }) => {
57
57
  : contextualLabel })) }, id));
58
58
  }) }));
59
59
  };
60
- const SummaryList = forwardRef(function SummaryList({ icon, name, headingTag = 'h2', count, actions, items, onViewAll, loading, noItemsText, error, deletedItemId, onDeleteFocusComplete, fallbackFocusRef, ...restProps }, ref) {
60
+ const SummaryList = forwardRef(function SummaryList({ icon, name, headingTag = 'h2', hideHeader, count, actions, items, onViewAll, loading, noItemsText, error, deletedItemId, onDeleteFocusComplete, fallbackFocusRef, ...restProps }, ref) {
61
61
  const t = useI18n();
62
62
  // Delete focus management
63
63
  const [actionRefMap, getActionRefCb] = useRefMap();
@@ -113,7 +113,7 @@ const SummaryList = forwardRef(function SummaryList({ icon, name, headingTag = '
113
113
  }
114
114
  return items.length > 0 ? (_jsx(SummaryListItems, { name: name, items: processedItems })) : (_jsx(EmptyState, { message: noItemsText }));
115
115
  }, [loading, items, processedItems, noItemsText, error]);
116
- return (_jsxs(Card, { ref: ref, ...restProps, children: [(icon || name || typeof count === 'number' || actions) && (_jsxs(StyledSummaryListHeader, { children: [_jsxs(Flex, { container: { alignItems: 'center', gap: 1 }, children: [icon && (typeof icon === 'string' ? _jsx(Icon, { name: icon }) : _jsx(Icon, { ...icon })), name && _jsx(Text, { variant: headingTag, children: name }), typeof count === 'number' && _jsx(Count, { children: count })] }), actions && _jsx(Actions, { ref: headerActionsRef, items: actions, contextualLabel: name })] })), _jsx(StyledSummaryListContent, { loading: loading, children: content }), !error && typeof count === 'number' && count > items.length && onViewAll && (_jsx(CardFooter, { justify: 'center', children: _jsx(Button, { variant: 'link', "aria-label": name ? t('view_all_noun', [name.toLowerCase()]) : t('view_all'), onClick: onViewAll, children: t('view_all') }) }))] }));
116
+ return (_jsxs(Card, { ref: ref, ...restProps, children: [!hideHeader && (icon || name || typeof count === 'number' || actions) && (_jsxs(StyledSummaryListHeader, { children: [_jsxs(Flex, { container: { alignItems: 'center', gap: 1 }, children: [icon && (typeof icon === 'string' ? _jsx(Icon, { name: icon }) : _jsx(Icon, { ...icon })), name && _jsx(Text, { variant: headingTag, children: name }), typeof count === 'number' && _jsx(Count, { children: count })] }), actions && _jsx(Actions, { ref: headerActionsRef, items: actions, contextualLabel: name })] })), _jsx(StyledSummaryListContent, { loading: loading, children: content }), !error && typeof count === 'number' && count > items.length && onViewAll && (_jsx(CardFooter, { justify: 'center', children: _jsx(Button, { variant: 'link', "aria-label": name ? t('view_all_noun', [name.toLowerCase()]) : t('view_all'), onClick: onViewAll, children: t('view_all') }) }))] }));
117
117
  });
118
118
  export default SummaryList;
119
119
  //# sourceMappingURL=SummaryList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SummaryList.js","sourceRoot":"","sources":["../../../src/components/SummaryList/SummaryList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CA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K,GAAG,KAAK,CAAC,MAAM,IAAI,SAAS,IAAI,CAC3E,KAAC,UAAU,IAAC,OAAO,EAAC,QAAQ,YAC1B,KAAC,MAAM,IACL,OAAO,EAAC,MAAM,gBACF,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAC3E,OAAO,EAAE,SAAS,YAEjB,CAAC,CAAC,UAAU,CAAC,GACP,GACE,CACd,IACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef, useEffect, useMemo, useRef } from 'react';\nimport type { PropsWithoutRef, Ref, RefObject } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Actions from '../Actions';\nimport type { ActionsProps } from '../Actions';\nimport Flex from '../Flex';\nimport Text from '../Text';\nimport Count from '../Badges/Count';\nimport Icon, { type IconProps } from '../Icon';\nimport Card, { CardHeader, CardContent, CardFooter, StyledCard } from '../Card';\nimport EmptyState from '../EmptyState';\nimport type { EmptyStateProps } from '../EmptyState';\nimport type {\n ForwardProps,\n ForwardRefForwardPropsComponent,\n NoChildrenProp,\n OmitStrict,\n Action,\n HeadingTag\n} from '../../types';\nimport { omitProps } from '../../styles';\nimport { useI18n, usePrevious, useRefMap } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport SummaryItem from '../SummaryItem';\nimport type { SummaryItemProps } from '../SummaryItem';\nimport Progress from '../Progress';\nimport Button from '../Button';\nimport ErrorState from '../ErrorState';\nimport type { ErrorStateProps } from '../ErrorState';\nimport { StyledCardFooter } from '../Card/CardFooter';\n\nexport interface SummaryListProps extends NoChildrenProp {\n /** Name of the utility to be used as its heading along with associated actions and aria attributes. */\n name?: string;\n /**\n * The heading tag to render the provided name as with.\n * @default 'h2'\n */\n headingTag?: HeadingTag;\n /** Identifier for the icon within Pega icons. */\n icon?: IconProps['name'] | IconProps;\n /** Integer representing the total count of items for a list utility dataset. */\n count?: number;\n /** Top level actions for the utility. If more than one action is passed a consolidated ActionMenu will be generated. */\n actions?: Action[];\n /** If the utility is in a state of fetching data. */\n loading?: boolean | string;\n /** An array of SummaryListItem objects to render. Pass an appropriately limited length array with a desired sort order based on design system defaults or config. */\n items: SummaryListItem[];\n /** User click initiated callback for when to show view all modal. List lengths less than the count prop will display a \"View all\" button with this function is bound to. */\n onViewAll?: (callback: Function) => void;\n /** A simple message to display when there are no items. */\n noItemsText?: EmptyStateProps['message'];\n /**\n * Indicate an error occurred while acquiring data for the list.\n * The default error state may be overridden with custom props.\n */\n error?: boolean | ErrorStateProps;\n /** ID of the item that was just deleted. Setting this triggers post-delete focus management. */\n deletedItemId?: string;\n /** Called after focus has been managed post-delete so the consumer can clear deletedItemId. */\n onDeleteFocusComplete?: () => void;\n /** Ref to the fallback element (e.g. Add button) to focus when the list becomes empty after deletion. */\n fallbackFocusRef?: RefObject<HTMLElement | null>;\n /** Ref for the SummaryList's root element. */\n ref?: Ref<HTMLElement>;\n}\n\nexport interface SummaryListItem\n extends OmitStrict<SummaryItemProps, 'actions'>,\n Pick<ActionsProps, 'contextualLabel'>,\n ForwardProps {\n /** A unique id to represent the item. */\n id: string;\n /** A set of Actions to render alongside the item. If more than one action is passed a consolidated ActionMenu will be generated. */\n actions?: Action[];\n /** Ref for the action menu button element. */\n actionsRef?: ActionsProps['ref'];\n}\n\nexport const StyledSummaryListHeader = styled(CardHeader)(\n ({ theme }) => css`\n &:not(${StyledCard} ${StyledCard} > &) {\n padding-block-end: calc(${theme.base.spacing} / 2);\n }\n `\n);\n\nStyledSummaryListHeader.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryListContent = styled(CardContent).withConfig(omitProps('loading'))<{\n loading?: boolean | string;\n}>(\n ({ theme, loading }) => css`\n ${loading &&\n css`\n min-height: 4rem;\n `}\n\n &:not(:last-child) > ul > li:last-child {\n border-block-end: 0.0625rem solid ${theme.base.palette['border-line']};\n }\n\n &:not(${StyledCard} ${StyledCard} > &) {\n padding-block-end: calc(${theme.base.spacing} / 2);\n\n & + ${StyledCardFooter} {\n padding-block-start: ${theme.base.spacing};\n }\n }\n `\n);\n\nStyledSummaryListContent.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryListItem = styled(SummaryItem)(\n ({ theme }) => css`\n padding-block: ${theme.base.spacing};\n\n &:not(:last-child) {\n border-block-end: 0.0625rem solid ${theme.base.palette['border-line']};\n }\n `\n);\n\nStyledSummaryListItem.defaultProps = defaultThemeProp;\n\nexport const SummaryListItems = ({ name, items }: Pick<SummaryListProps, 'items' | 'name'>) => {\n const t = useI18n();\n return (\n <ul>\n {items.map(\n ({\n id,\n actions: itemActions,\n actionsRef,\n contextualLabel,\n iconColor,\n ...restItemProps\n }) => {\n return (\n <StyledSummaryListItem\n key={id}\n {...restItemProps}\n forwardedAs='li'\n actions={\n itemActions && (\n <Actions\n ref={actionsRef}\n items={itemActions}\n contextualLabel={\n name && contextualLabel\n ? t('action_from_summarylist_heading', [contextualLabel, name])\n : contextualLabel\n }\n />\n )\n }\n />\n );\n }\n )}\n </ul>\n );\n};\n\nconst SummaryList: ForwardRefForwardPropsComponent<SummaryListProps> = forwardRef(\n function SummaryList(\n {\n icon,\n name,\n headingTag = 'h2',\n count,\n actions,\n items,\n onViewAll,\n loading,\n noItemsText,\n error,\n deletedItemId,\n onDeleteFocusComplete,\n fallbackFocusRef,\n ...restProps\n }: PropsWithoutRef<SummaryListProps>,\n ref: SummaryListProps['ref']\n ) {\n const t = useI18n();\n\n // Delete focus management\n const [actionRefMap, getActionRefCb] = useRefMap<HTMLButtonElement>();\n const prevItems = usePrevious(items);\n const hasProcessedDeleteRef = useRef(false);\n const headerActionsRef = useRef<HTMLButtonElement>(null);\n\n const processedItems = useMemo(() => {\n return items.map(item => {\n const refCb = getActionRefCb(item.id);\n return {\n ...item,\n actionsRef(el: HTMLButtonElement | null) {\n refCb(el);\n if (typeof item.actionsRef === 'function') item.actionsRef(el);\n }\n };\n });\n }, [items]);\n\n useEffect(() => {\n if (!deletedItemId) {\n hasProcessedDeleteRef.current = false;\n return;\n }\n if (hasProcessedDeleteRef.current) return;\n\n const stillPresent = items.some(item => item.id === deletedItemId);\n if (stillPresent) return;\n\n hasProcessedDeleteRef.current = true;\n\n if (items.length === 0) {\n const fallbackEl = fallbackFocusRef?.current ?? headerActionsRef.current;\n fallbackEl?.focus();\n } else {\n const prevIndex = prevItems?.findIndex(item => item.id === deletedItemId) ?? -1;\n let targetIndex = Math.min(prevIndex, items.length - 1);\n if (targetIndex < 0) targetIndex = 0;\n\n const targetId = items[targetIndex]?.id;\n if (targetId) {\n actionRefMap.get(targetId)?.focus();\n }\n }\n\n onDeleteFocusComplete?.();\n }, [deletedItemId, items]);\n\n const content = useMemo(() => {\n if (loading) {\n return (\n <Progress placement='local' message={typeof loading === 'string' ? loading : undefined} />\n );\n }\n\n if (error) {\n return <ErrorState {...(error === true ? {} : error)} />;\n }\n\n return items.length > 0 ? (\n <SummaryListItems name={name} items={processedItems} />\n ) : (\n <EmptyState message={noItemsText} />\n );\n }, [loading, items, processedItems, noItemsText, error]);\n\n return (\n <Card ref={ref} {...restProps}>\n {(icon || name || typeof count === 'number' || actions) && (\n <StyledSummaryListHeader>\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n {icon && (typeof icon === 'string' ? <Icon name={icon} /> : <Icon {...icon} />)}\n {name && <Text variant={headingTag}>{name}</Text>}\n {typeof count === 'number' && <Count>{count}</Count>}\n </Flex>\n {actions && <Actions ref={headerActionsRef} items={actions} contextualLabel={name} />}\n </StyledSummaryListHeader>\n )}\n\n <StyledSummaryListContent loading={loading}>{content}</StyledSummaryListContent>\n\n {!error && typeof count === 'number' && count > items.length && onViewAll && (\n <CardFooter justify='center'>\n <Button\n variant='link'\n aria-label={name ? t('view_all_noun', [name.toLowerCase()]) : t('view_all')}\n onClick={onViewAll}\n >\n {t('view_all')}\n </Button>\n </CardFooter>\n )}\n </Card>\n );\n }\n);\n\nexport default SummaryList;\n"]}
1
+ {"version":3,"file":"SummaryList.js","sourceRoot":"","sources":["../../../src/components/SummaryList/SummaryList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,IAAI,EAAE,EAAkB,MAAM,SAAS,CAAC;AAC/C,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,UAAU,MAAM,eAAe,CAAC;AAUvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,UAAU,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAwDtD,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,UAAU,CAAC,CACvD,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;YACR,UAAU,IAAI,UAAU;gCACJ,KAAK,CAAC,IAAI,CAAC,OAAO;;GAE/C,CACF,CAAC;AAEF,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;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AAC,OAAO,IAAC,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,IAAI,GAAI,IAC7D,CAC3B,EAED,KAAC,wBAAwB,IAAC,OAAO,EAAE,OAAO,YAAG,OAAO,GAA4B,EAE/E,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,IAAI,SAAS,IAAI,CAC3E,KAAC,UAAU,IAAC,OAAO,EAAC,QAAQ,YAC1B,KAAC,MAAM,IACL,OAAO,EAAC,MAAM,gBACF,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAC3E,OAAO,EAAE,SAAS,YAEjB,CAAC,CAAC,UAAU,CAAC,GACP,GACE,CACd,IACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef, useEffect, useMemo, useRef } from 'react';\nimport type { PropsWithoutRef, Ref, RefObject } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Actions from '../Actions';\nimport type { ActionsProps } from '../Actions';\nimport Flex from '../Flex';\nimport Text from '../Text';\nimport Count from '../Badges/Count';\nimport Icon, { type IconProps } from '../Icon';\nimport Card, { CardHeader, CardContent, CardFooter, StyledCard } from '../Card';\nimport EmptyState from '../EmptyState';\nimport type { EmptyStateProps } from '../EmptyState';\nimport type {\n ForwardProps,\n ForwardRefForwardPropsComponent,\n NoChildrenProp,\n OmitStrict,\n Action,\n HeadingTag\n} from '../../types';\nimport { omitProps } from '../../styles';\nimport { useI18n, usePrevious, useRefMap } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport SummaryItem from '../SummaryItem';\nimport type { SummaryItemProps } from '../SummaryItem';\nimport Progress from '../Progress';\nimport Button from '../Button';\nimport ErrorState from '../ErrorState';\nimport type { ErrorStateProps } from '../ErrorState';\nimport { StyledCardFooter } from '../Card/CardFooter';\n\nexport interface SummaryListProps extends NoChildrenProp {\n /** Name of the utility to be used as its heading along with associated actions and aria attributes. */\n name?: string;\n /**\n * The heading tag to render the provided name as with.\n * @default 'h2'\n */\n headingTag?: HeadingTag;\n /**\n * Hides the header while still allowing 'name' prop to supply aria attributes\n * @default false\n */\n hideHeader?: boolean;\n /** Identifier for the icon within Pega icons. */\n icon?: IconProps['name'] | IconProps;\n /** Integer representing the total count of items for a list utility dataset. */\n count?: number;\n /** Top level actions for the utility. If more than one action is passed a consolidated ActionMenu will be generated. */\n actions?: Action[];\n /** If the utility is in a state of fetching data. */\n loading?: boolean | string;\n /** An array of SummaryListItem objects to render. Pass an appropriately limited length array with a desired sort order based on design system defaults or config. */\n items: SummaryListItem[];\n /** User click initiated callback for when to show view all modal. List lengths less than the count prop will display a \"View all\" button with this function is bound to. */\n onViewAll?: (callback: Function) => void;\n /** A simple message to display when there are no items. */\n noItemsText?: EmptyStateProps['message'];\n /**\n * Indicate an error occurred while acquiring data for the list.\n * The default error state may be overridden with custom props.\n */\n error?: boolean | ErrorStateProps;\n /** ID of the item that was just deleted. Setting this triggers post-delete focus management. */\n deletedItemId?: string;\n /** Called after focus has been managed post-delete so the consumer can clear deletedItemId. */\n onDeleteFocusComplete?: () => void;\n /** Ref to the fallback element (e.g. Add button) to focus when the list becomes empty after deletion. */\n fallbackFocusRef?: RefObject<HTMLElement | null>;\n /** Ref for the SummaryList's root element. */\n ref?: Ref<HTMLElement>;\n}\n\nexport interface SummaryListItem\n extends OmitStrict<SummaryItemProps, 'actions'>,\n Pick<ActionsProps, 'contextualLabel'>,\n ForwardProps {\n /** A unique id to represent the item. */\n id: string;\n /** A set of Actions to render alongside the item. If more than one action is passed a consolidated ActionMenu will be generated. */\n actions?: Action[];\n /** Ref for the action menu button element. */\n actionsRef?: ActionsProps['ref'];\n}\n\nexport const StyledSummaryListHeader = styled(CardHeader)(\n ({ theme }) => css`\n &:not(${StyledCard} ${StyledCard} > &) {\n padding-block-end: calc(${theme.base.spacing} / 2);\n }\n `\n);\n\nStyledSummaryListHeader.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryListContent = styled(CardContent).withConfig(omitProps('loading'))<{\n loading?: boolean | string;\n}>(\n ({ theme, loading }) => css`\n ${loading &&\n css`\n min-height: 4rem;\n `}\n\n &:not(:last-child) > ul > li:last-child {\n border-block-end: 0.0625rem solid ${theme.base.palette['border-line']};\n }\n\n &:not(${StyledCard} ${StyledCard} > &) {\n padding-block-end: calc(${theme.base.spacing} / 2);\n\n & + ${StyledCardFooter} {\n padding-block-start: ${theme.base.spacing};\n }\n }\n `\n);\n\nStyledSummaryListContent.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryListItem = styled(SummaryItem)(\n ({ theme }) => css`\n padding-block: ${theme.base.spacing};\n\n &:not(:last-child) {\n border-block-end: 0.0625rem solid ${theme.base.palette['border-line']};\n }\n `\n);\n\nStyledSummaryListItem.defaultProps = defaultThemeProp;\n\nexport const SummaryListItems = ({ name, items }: Pick<SummaryListProps, 'items' | 'name'>) => {\n const t = useI18n();\n return (\n <ul>\n {items.map(\n ({\n id,\n actions: itemActions,\n actionsRef,\n contextualLabel,\n iconColor,\n ...restItemProps\n }) => {\n return (\n <StyledSummaryListItem\n key={id}\n {...restItemProps}\n forwardedAs='li'\n actions={\n itemActions && (\n <Actions\n ref={actionsRef}\n items={itemActions}\n contextualLabel={\n name && contextualLabel\n ? t('action_from_summarylist_heading', [contextualLabel, name])\n : contextualLabel\n }\n />\n )\n }\n />\n );\n }\n )}\n </ul>\n );\n};\n\nconst SummaryList: ForwardRefForwardPropsComponent<SummaryListProps> = forwardRef(\n function SummaryList(\n {\n icon,\n name,\n headingTag = 'h2',\n hideHeader,\n count,\n actions,\n items,\n onViewAll,\n loading,\n noItemsText,\n error,\n deletedItemId,\n onDeleteFocusComplete,\n fallbackFocusRef,\n ...restProps\n }: PropsWithoutRef<SummaryListProps>,\n ref: SummaryListProps['ref']\n ) {\n const t = useI18n();\n\n // Delete focus management\n const [actionRefMap, getActionRefCb] = useRefMap<HTMLButtonElement>();\n const prevItems = usePrevious(items);\n const hasProcessedDeleteRef = useRef(false);\n const headerActionsRef = useRef<HTMLButtonElement>(null);\n\n const processedItems = useMemo(() => {\n return items.map(item => {\n const refCb = getActionRefCb(item.id);\n return {\n ...item,\n actionsRef(el: HTMLButtonElement | null) {\n refCb(el);\n if (typeof item.actionsRef === 'function') item.actionsRef(el);\n }\n };\n });\n }, [items]);\n\n useEffect(() => {\n if (!deletedItemId) {\n hasProcessedDeleteRef.current = false;\n return;\n }\n if (hasProcessedDeleteRef.current) return;\n\n const stillPresent = items.some(item => item.id === deletedItemId);\n if (stillPresent) return;\n\n hasProcessedDeleteRef.current = true;\n\n if (items.length === 0) {\n const fallbackEl = fallbackFocusRef?.current ?? headerActionsRef.current;\n fallbackEl?.focus();\n } else {\n const prevIndex = prevItems?.findIndex(item => item.id === deletedItemId) ?? -1;\n let targetIndex = Math.min(prevIndex, items.length - 1);\n if (targetIndex < 0) targetIndex = 0;\n\n const targetId = items[targetIndex]?.id;\n if (targetId) {\n actionRefMap.get(targetId)?.focus();\n }\n }\n\n onDeleteFocusComplete?.();\n }, [deletedItemId, items]);\n\n const content = useMemo(() => {\n if (loading) {\n return (\n <Progress placement='local' message={typeof loading === 'string' ? loading : undefined} />\n );\n }\n\n if (error) {\n return <ErrorState {...(error === true ? {} : error)} />;\n }\n\n return items.length > 0 ? (\n <SummaryListItems name={name} items={processedItems} />\n ) : (\n <EmptyState message={noItemsText} />\n );\n }, [loading, items, processedItems, noItemsText, error]);\n\n return (\n <Card ref={ref} {...restProps}>\n {!hideHeader && (icon || name || typeof count === 'number' || actions) && (\n <StyledSummaryListHeader>\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n {icon && (typeof icon === 'string' ? <Icon name={icon} /> : <Icon {...icon} />)}\n {name && <Text variant={headingTag}>{name}</Text>}\n {typeof count === 'number' && <Count>{count}</Count>}\n </Flex>\n {actions && <Actions ref={headerActionsRef} items={actions} contextualLabel={name} />}\n </StyledSummaryListHeader>\n )}\n\n <StyledSummaryListContent loading={loading}>{content}</StyledSummaryListContent>\n\n {!error && typeof count === 'number' && count > items.length && onViewAll && (\n <CardFooter justify='center'>\n <Button\n variant='link'\n aria-label={name ? t('view_all_noun', [name.toLowerCase()]) : t('view_all')}\n onClick={onViewAll}\n >\n {t('view_all')}\n </Button>\n </CardFooter>\n )}\n </Card>\n );\n }\n);\n\nexport default SummaryList;\n"]}
@@ -2,7 +2,7 @@ import type { Ref, RefObject } from 'react';
2
2
  import type { SearchInputProps } from '../SearchInput';
3
3
  import type { ForwardRefForwardPropsComponent } from '../../types';
4
4
  import type { SummaryListProps } from './SummaryList';
5
- export interface ViewAllProps extends Pick<SummaryListProps, 'loading' | 'actions' | 'items'> {
5
+ export interface ViewAllProps extends Pick<SummaryListProps, 'name' | 'loading' | 'actions' | 'items'> {
6
6
  searchInputProps?: SearchInputProps;
7
7
  /** ID of the item that was just deleted. Setting this triggers post-delete focus management. */
8
8
  deletedItemId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ViewAll.d.ts","sourceRoot":"","sources":["../../../src/components/SummaryList/ViewAll.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAmB,SAAS,EAAE,MAAM,OAAO,CAAC;AAO7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAOvD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAGnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC3F,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,gGAAgG;IAChG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+FA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Ac,CAAC"}
@@ -10,7 +10,7 @@ import Progress from '../Progress';
10
10
  import { StyledCard } from '../Card';
11
11
  import { StyledCardContent } from '../Card/CardContent';
12
12
  import { omitProps } from '../../styles';
13
- import { usePrevious } from '../../hooks';
13
+ import { usePrevious, useI18n } from '../../hooks';
14
14
  import SummaryList from './SummaryList';
15
15
  const StyledToolbar = styled.div(({ theme: { base } }) => {
16
16
  return css `
@@ -38,7 +38,8 @@ export const StyledViewAll = styled.div.withConfig(omitProps('loading'))(({ load
38
38
  min-height: 8rem;
39
39
  `}
40
40
  `);
41
- const SearchableList = forwardRef(function SearchableList({ loading, actions, items, searchInputProps, deletedItemId, onDeleteFocusComplete, fallbackFocusRef, ...restProps }, ref) {
41
+ const SearchableList = forwardRef(function SearchableList({ name, loading, actions, items, searchInputProps, deletedItemId, onDeleteFocusComplete, fallbackFocusRef, ...restProps }, ref) {
42
+ const t = useI18n();
42
43
  const [searchValue, setSearchValue] = useState('');
43
44
  const prevItemsLength = usePrevious(items.length);
44
45
  const hasProcessedEmptyRef = useRef(false);
@@ -60,8 +61,8 @@ const SearchableList = forwardRef(function SearchableList({ loading, actions, it
60
61
  return (_jsxs(StyledViewAll, { ref: ref, loading: loading, ...restProps, children: [!loading && (searchInputProps || actions) && (_jsxs(Flex, { container: { justify: 'between', alignItems: 'center', gap: 2 }, as: StyledToolbar, children: [searchInputProps && (_jsx(Flex, { container: { alignItems: 'center', gap: 1 }, item: { grow: 1 }, children: _jsx(SearchInput, { onSearchChange: val => {
61
62
  searchInputProps.onSearchChange?.(val);
62
63
  setSearchValue(val);
63
- }, value: searchInputProps.value || searchValue }) })), actions && _jsx(Actions, { ref: toolbarActionsRef, iconOnly: false, items: actions })] })), loading && _jsx(Progress, { placement: 'local' }), !loading &&
64
- (items.length ? (_jsx(SummaryList, { items: items, deletedItemId: deletedItemId, onDeleteFocusComplete: onDeleteFocusComplete, fallbackFocusRef: fallbackFocusRef })) : (_jsx(EmptyState, {})))] }));
64
+ }, searchInputAriaLabel: name ? t('search_noun', [name]) : t('search'), value: searchInputProps.value || searchValue }) })), actions && (_jsx(Actions, { ref: toolbarActionsRef, contextualLabel: name, iconOnly: false, items: actions }))] })), loading && _jsx(Progress, { placement: 'local' }), !loading &&
65
+ (items.length ? (_jsx(SummaryList, { name: name, items: items, deletedItemId: deletedItemId, onDeleteFocusComplete: onDeleteFocusComplete, fallbackFocusRef: fallbackFocusRef, hideHeader: true })) : (_jsx(EmptyState, {})))] }));
65
66
  });
66
67
  export default SearchableList;
67
68
  //# sourceMappingURL=ViewAll.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ViewAll.js","sourceRoot":"","sources":["../../../src/components/SummaryList/ViewAll.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,WAAW,EAAE,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,WAAW,MAAM,eAAe,CAAC;AAcxC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE;IACvD,OAAO,GAAG,CAAA;;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ACZ,aAAa,EAAE,aAAa,EAC5B,qBAAqB,EAAE,qBAAqB,EAC5C,gBAAgB,EAAE,gBAAgB,GAClC,CACH,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,KAAG,CACf,CAAC,IACU,CACjB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { Ref, PropsWithoutRef, RefObject } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Actions from '../Actions';\nimport Flex from '../Flex';\nimport EmptyState from '../EmptyState';\nimport SearchInput, { StyledSearchInput } from '../SearchInput';\nimport type { SearchInputProps } from '../SearchInput';\nimport { defaultThemeProp } from '../../theme';\nimport Progress from '../Progress';\nimport { StyledCard } from '../Card';\nimport { StyledCardContent } from '../Card/CardContent';\nimport { omitProps } from '../../styles';\nimport { usePrevious } from '../../hooks';\nimport type { ForwardRefForwardPropsComponent } from '../../types';\n\nimport SummaryList from './SummaryList';\nimport type { SummaryListProps } from './SummaryList';\n\nexport interface ViewAllProps extends Pick<SummaryListProps, 'loading' | 'actions' | 'items'> {\n searchInputProps?: SearchInputProps;\n /** ID of the item that was just deleted. Setting this triggers post-delete focus management. */\n deletedItemId?: string;\n /** Called after focus has been managed post-delete so the consumer can clear deletedItemId. */\n onDeleteFocusComplete?: () => void;\n /** Ref to the fallback element (e.g. Add button) to focus when the list becomes empty after deletion. */\n fallbackFocusRef?: RefObject<HTMLElement | null>;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst StyledToolbar = styled.div(({ theme: { base } }) => {\n return css`\n position: sticky;\n top: 0;\n z-index: 1;\n background-color: ${base.palette['primary-background']};\n margin-bottom: ${base.spacing};\n transform: translateY(calc(-0.5 * ${base.spacing}));\n padding: ${base.spacing} 0;\n\n ${StyledSearchInput} {\n flex-grow: 1;\n }\n `;\n});\n\nStyledToolbar.defaultProps = defaultThemeProp;\n\nexport const StyledViewAll = styled.div.withConfig(omitProps('loading'))<{\n loading: ViewAllProps['loading'];\n}>(\n ({ loading }) => css`\n ${StyledCardContent}:not(${StyledCard} ${StyledCard} > ${StyledCardContent}) {\n padding: 0;\n }\n\n ${loading &&\n css`\n min-height: 8rem;\n `}\n `\n);\n\nconst SearchableList: ForwardRefForwardPropsComponent<ViewAllProps> = forwardRef(\n function SearchableList(\n {\n loading,\n actions,\n items,\n searchInputProps,\n deletedItemId,\n onDeleteFocusComplete,\n fallbackFocusRef,\n ...restProps\n }: PropsWithoutRef<ViewAllProps>,\n ref: ViewAllProps['ref']\n ) {\n const [searchValue, setSearchValue] = useState<SearchInputProps['value']>('');\n const prevItemsLength = usePrevious(items.length);\n const hasProcessedEmptyRef = useRef(false);\n const toolbarActionsRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n if (!deletedItemId) {\n hasProcessedEmptyRef.current = false;\n return;\n }\n if (hasProcessedEmptyRef.current) return;\n if (items.length === 0 && (prevItemsLength ?? 0) > 0) {\n hasProcessedEmptyRef.current = true;\n const el = fallbackFocusRef?.current ?? toolbarActionsRef.current;\n el?.focus();\n onDeleteFocusComplete?.();\n }\n }, [deletedItemId, items.length]);\n\n return (\n <StyledViewAll ref={ref} loading={loading} {...restProps}>\n {!loading && (searchInputProps || actions) && (\n <Flex container={{ justify: 'between', alignItems: 'center', gap: 2 }} as={StyledToolbar}>\n {searchInputProps && (\n <Flex container={{ alignItems: 'center', gap: 1 }} item={{ grow: 1 }}>\n <SearchInput\n onSearchChange={val => {\n searchInputProps.onSearchChange?.(val);\n setSearchValue(val);\n }}\n value={searchInputProps.value || searchValue}\n />\n </Flex>\n )}\n {actions && <Actions ref={toolbarActionsRef} iconOnly={false} items={actions} />}\n </Flex>\n )}\n\n {loading && <Progress placement='local' />}\n {!loading &&\n (items.length ? (\n <SummaryList\n items={items}\n deletedItemId={deletedItemId}\n onDeleteFocusComplete={onDeleteFocusComplete}\n fallbackFocusRef={fallbackFocusRef}\n />\n ) : (\n <EmptyState />\n ))}\n </StyledViewAll>\n );\n }\n);\n\nexport default SearchableList;\n"]}
1
+ {"version":3,"file":"ViewAll.js","sourceRoot":"","sources":["../../../src/components/SummaryList/ViewAll.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,WAAW,EAAE,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGnD,OAAO,WAAW,MAAM,eAAe,CAAC;AAexC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE;IACvD,OAAO,GAAG,CAAA;;;;wBAIY,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;qBACrC,IAAI,CAAC,OAAO;wCACO,IAAI,CAAC,OAAO;eACrC,IAAI,CAAC,OAAO;;MAErB,iBAAiB;;;GAGpB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAa,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE9C,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,C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,gBAAgB,EAClC,UAAU,SACV,CACH,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,KAAG,CACf,CAAC,IACU,CACjB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { Ref, PropsWithoutRef, RefObject } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Actions from '../Actions';\nimport Flex from '../Flex';\nimport EmptyState from '../EmptyState';\nimport SearchInput, { StyledSearchInput } from '../SearchInput';\nimport type { SearchInputProps } from '../SearchInput';\nimport { defaultThemeProp } from '../../theme';\nimport Progress from '../Progress';\nimport { StyledCard } from '../Card';\nimport { StyledCardContent } from '../Card/CardContent';\nimport { omitProps } from '../../styles';\nimport { usePrevious, useI18n } from '../../hooks';\nimport type { ForwardRefForwardPropsComponent } from '../../types';\n\nimport SummaryList from './SummaryList';\nimport type { SummaryListProps } from './SummaryList';\n\nexport interface ViewAllProps\n extends Pick<SummaryListProps, 'name' | 'loading' | 'actions' | 'items'> {\n searchInputProps?: SearchInputProps;\n /** ID of the item that was just deleted. Setting this triggers post-delete focus management. */\n deletedItemId?: string;\n /** Called after focus has been managed post-delete so the consumer can clear deletedItemId. */\n onDeleteFocusComplete?: () => void;\n /** Ref to the fallback element (e.g. Add button) to focus when the list becomes empty after deletion. */\n fallbackFocusRef?: RefObject<HTMLElement | null>;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst StyledToolbar = styled.div(({ theme: { base } }) => {\n return css`\n position: sticky;\n top: 0;\n z-index: 1;\n background-color: ${base.palette['primary-background']};\n margin-bottom: ${base.spacing};\n transform: translateY(calc(-0.5 * ${base.spacing}));\n padding: ${base.spacing} 0;\n\n ${StyledSearchInput} {\n flex-grow: 1;\n }\n `;\n});\n\nStyledToolbar.defaultProps = defaultThemeProp;\n\nexport const StyledViewAll = styled.div.withConfig(omitProps('loading'))<{\n loading: ViewAllProps['loading'];\n}>(\n ({ loading }) => css`\n ${StyledCardContent}:not(${StyledCard} ${StyledCard} > ${StyledCardContent}) {\n padding: 0;\n }\n\n ${loading &&\n css`\n min-height: 8rem;\n `}\n `\n);\n\nconst SearchableList: ForwardRefForwardPropsComponent<ViewAllProps> = forwardRef(\n function SearchableList(\n {\n name,\n loading,\n actions,\n items,\n searchInputProps,\n deletedItemId,\n onDeleteFocusComplete,\n fallbackFocusRef,\n ...restProps\n }: PropsWithoutRef<ViewAllProps>,\n ref: ViewAllProps['ref']\n ) {\n const t = useI18n();\n const [searchValue, setSearchValue] = useState<SearchInputProps['value']>('');\n const prevItemsLength = usePrevious(items.length);\n const hasProcessedEmptyRef = useRef(false);\n const toolbarActionsRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n if (!deletedItemId) {\n hasProcessedEmptyRef.current = false;\n return;\n }\n if (hasProcessedEmptyRef.current) return;\n if (items.length === 0 && (prevItemsLength ?? 0) > 0) {\n hasProcessedEmptyRef.current = true;\n const el = fallbackFocusRef?.current ?? toolbarActionsRef.current;\n el?.focus();\n onDeleteFocusComplete?.();\n }\n }, [deletedItemId, items.length]);\n\n return (\n <StyledViewAll ref={ref} loading={loading} {...restProps}>\n {!loading && (searchInputProps || actions) && (\n <Flex container={{ justify: 'between', alignItems: 'center', gap: 2 }} as={StyledToolbar}>\n {searchInputProps && (\n <Flex container={{ alignItems: 'center', gap: 1 }} item={{ grow: 1 }}>\n <SearchInput\n onSearchChange={val => {\n searchInputProps.onSearchChange?.(val);\n setSearchValue(val);\n }}\n searchInputAriaLabel={name ? t('search_noun', [name]) : t('search')}\n value={searchInputProps.value || searchValue}\n />\n </Flex>\n )}\n {actions && (\n <Actions\n ref={toolbarActionsRef}\n contextualLabel={name}\n iconOnly={false}\n items={actions}\n />\n )}\n </Flex>\n )}\n\n {loading && <Progress placement='local' />}\n {!loading &&\n (items.length ? (\n <SummaryList\n name={name}\n items={items}\n deletedItemId={deletedItemId}\n onDeleteFocusComplete={onDeleteFocusComplete}\n fallbackFocusRef={fallbackFocusRef}\n hideHeader\n />\n ) : (\n <EmptyState />\n ))}\n </StyledViewAll>\n );\n }\n);\n\nexport default SearchableList;\n"]}
@@ -160,6 +160,7 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
160
160
  choose_noun: string;
161
161
  select_noun: string;
162
162
  resize_noun: string;
163
+ search_noun: string;
163
164
  actions_for: string;
164
165
  edited: string;
165
166
  deleted: string;
@@ -1 +1 @@
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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;;;;;;;;;;;;;;;;;;;GAGZ,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -156,6 +156,7 @@ declare const _default: {
156
156
  choose_noun: string;
157
157
  select_noun: string;
158
158
  resize_noun: string;
159
+ search_noun: string;
159
160
  actions_for: string;
160
161
  edited: string;
161
162
  deleted: string;
@@ -1 +1 @@
1
- {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/i18n/default.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2C/B,wCAAwC;;IAGxC,oCAAoC;;;;;IAMpC,oCAAoC;;;;;;IAOpC,uCAAuC;;;;;;;;;;;IAavC,6CAA6C;;;;;;;IAQ7C,uCAAuC;;;;;;;;IAUvC,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhlE3C,wBAgoEE"}
@@ -163,6 +163,7 @@ export default {
163
163
  choose_noun: 'Choose {0}',
164
164
  select_noun: 'Select {0}',
165
165
  resize_noun: 'Resize {0}',
166
+ search_noun: 'Search {0}',
166
167
  /* Contextual actions label */
167
168
  actions_for: 'Actions - {0}',
168
169
  /* States */
@@ -467,7 +468,7 @@ export default {
467
468
  search_in: 'Search in',
468
469
  search_in_noun: 'Search in {0}',
469
470
  /* core:SummaryList */
470
- action_from_summarylist_heading: '{0} from {1}',
471
+ action_from_summarylist_heading: '{0} - {1}',
471
472
  selected_search_filter: 'Filter search by: {0}',
472
473
  /* work:CaseView */
473
474
  utilities_label: 'Utilities',