@pega/cosmos-react-tools 3.0.0-dev.28.0 → 3.0.0-dev.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/lib/components/Clipboard/Clipboard.js +1 -1
  2. package/lib/components/Clipboard/Clipboard.js.map +1 -1
  3. package/lib/components/DevTools/Content.d.ts +9 -0
  4. package/lib/components/DevTools/Content.d.ts.map +1 -0
  5. package/lib/components/DevTools/Content.js +11 -0
  6. package/lib/components/DevTools/Content.js.map +1 -0
  7. package/lib/components/DevTools/DevTools.d.ts +6 -0
  8. package/lib/components/DevTools/DevTools.d.ts.map +1 -0
  9. package/lib/components/DevTools/DevTools.js +13 -0
  10. package/lib/components/DevTools/DevTools.js.map +1 -0
  11. package/lib/components/DevTools/DevTools.styles.d.ts +6 -0
  12. package/lib/components/DevTools/DevTools.styles.d.ts.map +1 -0
  13. package/lib/components/DevTools/DevTools.styles.js +49 -0
  14. package/lib/components/DevTools/DevTools.styles.js.map +1 -0
  15. package/lib/components/DevTools/DevTools.types.d.ts +19 -0
  16. package/lib/components/DevTools/DevTools.types.d.ts.map +1 -0
  17. package/lib/components/DevTools/DevTools.types.js +2 -0
  18. package/lib/components/DevTools/DevTools.types.js.map +1 -0
  19. package/lib/components/DevTools/Header.d.ts +8 -0
  20. package/lib/components/DevTools/Header.d.ts.map +1 -0
  21. package/lib/components/DevTools/Header.js +11 -0
  22. package/lib/components/DevTools/Header.js.map +1 -0
  23. package/lib/components/DevTools/index.d.ts +3 -0
  24. package/lib/components/DevTools/index.d.ts.map +1 -0
  25. package/lib/components/DevTools/index.js +2 -0
  26. package/lib/components/DevTools/index.js.map +1 -0
  27. package/lib/components/PreviewShell/Footer.d.ts.map +1 -1
  28. package/lib/components/PreviewShell/Footer.js +21 -12
  29. package/lib/components/PreviewShell/Footer.js.map +1 -1
  30. package/lib/components/PreviewShell/PreviewShell.d.ts.map +1 -1
  31. package/lib/components/PreviewShell/PreviewShell.js +6 -6
  32. package/lib/components/PreviewShell/PreviewShell.js.map +1 -1
  33. package/lib/components/PreviewShell/PreviewShell.styles.d.ts +0 -2
  34. package/lib/components/PreviewShell/PreviewShell.styles.d.ts.map +1 -1
  35. package/lib/components/PreviewShell/PreviewShell.styles.js +9 -35
  36. package/lib/components/PreviewShell/PreviewShell.styles.js.map +1 -1
  37. package/lib/components/PreviewShell/PreviewShell.types.d.ts +6 -15
  38. package/lib/components/PreviewShell/PreviewShell.types.d.ts.map +1 -1
  39. package/lib/components/PreviewShell/PreviewShell.types.js.map +1 -1
  40. package/lib/index.d.ts +2 -0
  41. package/lib/index.d.ts.map +1 -1
  42. package/lib/index.js +2 -0
  43. package/lib/index.js.map +1 -1
  44. package/package.json +2 -2
@@ -22,7 +22,7 @@ const FieldSummary = ({ primary, secondary, fields, actions }) => {
22
22
  const Clipboard = forwardRef(({ navigation, content, lastUpdated }, ref) => {
23
23
  const t = useI18n();
24
24
  const navContent = useMemo(() => _jsx(StandardTree, { ...navigation }), [navigation]);
25
- return (_jsxs(Flex, { as: StyledContainer, container: { direction: 'column' }, ref: ref, children: [_jsxs(Flex, { as: StyledMain, container: true, children: [_jsx(StyledTreeContainer, { children: navContent }), _jsxs(Flex, { container: { direction: 'column', pad: 1, gap: 1 }, as: StyledContent, ref: ref, children: [!content && _jsx(EmptyState, {}), content && content.loading && _jsx(Progress, { placement: 'local', message: t('loading') }), content && !content.loading && _jsx(FieldSummary, { ...content })] })] }), _jsx(StyledClipboardFooter, { children: lastUpdated && _jsx(Text, { variant: 'secondary', children: lastUpdated }) })] }));
25
+ return (_jsxs(Flex, { as: StyledContainer, container: { direction: 'column' }, ref: ref, children: [_jsxs(Flex, { as: StyledMain, container: true, children: [_jsx(StyledTreeContainer, { children: navContent }), _jsxs(Flex, { container: { direction: 'column', pad: 1, gap: 1 }, as: StyledContent, ref: ref, children: [!content && _jsx(EmptyState, {}), content && content.loading && _jsx(Progress, { placement: 'local', message: t('loading') }), content && !content.loading && _jsx(FieldSummary, { ...content })] })] }), _jsx(Flex, { as: StyledClipboardFooter, container: { alignItems: 'center' }, children: lastUpdated && _jsx(Text, { variant: 'secondary', children: lastUpdated }) })] }));
26
26
  });
27
27
  export default Clipboard;
28
28
  //# sourceMappingURL=Clipboard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Clipboard.js","sourceRoot":"","sources":["../../../src/components/Clipboard/Clipboard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,EACV,OAAO,EAEP,SAAS,EACT,MAAM,EACP,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,MAAM,EAEN,IAAI,EAEJ,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,IAAI,EACJ,KAAK,EACL,OAAO,EACP,UAAU,EACX,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,UAAU,EACV,WAAW,EACX,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,aAAa,GAAc,CAAC,IAAW,EAAE,EAAE;IAC/C,OAAO,CACL,4BACG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CACd,KAAC,MAAM,IAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,CAAC,CAAa,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,YAC1E,IAAI,CAAC,IAAI,GACH,CACV,CAAC,CAAC,CAAC,CACF,IAAI,CAAC,IAAI,CACV,GACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,YAAY,GAA0B,CAAC,EAC3C,OAAO,EACP,SAAS,EACT,MAAM,EACN,OAAO,EACW,EAAE,EAAE;IACtB,MAAM,UAAU,GAAG,MAAM,CAAkB,IAAI,CAAC,CAAC;IACjD,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,MAAM,aAAa,GAAG,SAAS,EA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EAAE,EAAE,UAAU,EAAE,SAAS,mBAC7B,KAAC,mBAAmB,cAAE,UAAU,GAAuB,EACvD,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,aAClF,CAAC,OAAO,IAAI,KAAC,UAAU,KAAG,EAC1B,OAAO,IAAI,OAAO,CAAC,OAAO,IAAI,KAAC,QAAQ,IAAC,SAAS,EAAC,OAAO,EAAC,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC,GAAI,EACnF,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,KAAC,YAAY,OAAK,OAAO,GAAI,IACxD,IACF,EAEP,KAAC,qBAAqB,cACnB,WAAW,IAAI,KAAC,IAAI,IAAC,OAAO,EAAC,WAAW,YAAE,WAAW,GAAQ,GACxC,IACnB,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AACF,eAAe,SAAS,CAAC","sourcesContent":["import {\n FunctionComponent,\n PropsWithoutRef,\n forwardRef,\n useMemo,\n FC,\n useEffect,\n useRef\n} from 'react';\n\nimport {\n Button,\n ColumnProps,\n Flex,\n ForwardProps,\n MetaList,\n Progress,\n StandardTree,\n SummaryItem,\n Text,\n Table,\n useI18n,\n EmptyState\n} from '@pega/cosmos-react-core';\n\nimport { ClipboardProps, FieldSummaryProps, Field } from './Clipboard.types';\nimport {\n StyledClipboardFooter,\n StyledContainer,\n StyledContent,\n StyledMain,\n StyledTitle,\n StyledTreeContainer\n} from './Clipboard.styles';\n\nconst FieldRenderer: FC<Field> = (cell: Field) => {\n return (\n <>\n {cell.onClick ? (\n <Button variant='link' onClick={(e: MouseEvent) => cell.onClick?.(cell.id, e)}>\n {cell.name}\n </Button>\n ) : (\n cell.name\n )}\n </>\n );\n};\n\nconst FieldSummary: FC<FieldSummaryProps> = ({\n primary,\n secondary,\n fields,\n actions\n}: FieldSummaryProps) => {\n const headingRef = useRef<HTMLSpanElement>(null);\n const t = useI18n();\n\n const metaListItems = secondary?.map(({ name, value }) => `${name}: ${value}`);\n\n const columns: ColumnProps<Field>[] = [\n {\n renderer: FieldRenderer,\n label: t('condition_builder_field_label')\n },\n { renderer: 'value', label: t('condition_builder_value_label') }\n ];\n\n useEffect(() => headingRef.current?.focus(), []);\n\n return (\n <>\n <SummaryItem\n primary={\n <StyledTitle tabIndex={-1} variant='h3' ref={headingRef}>\n {primary}\n </StyledTitle>\n }\n secondary={metaListItems && <MetaList items={metaListItems} />}\n actions={actions}\n />\n <Table title={primary} columns={columns} data={fields} />\n </>\n );\n};\n\nconst Clipboard: FunctionComponent<ClipboardProps & ForwardProps> = forwardRef(\n (\n { navigation, content, lastUpdated }: PropsWithoutRef<ClipboardProps>,\n ref: ClipboardProps['ref']\n ) => {\n const t = useI18n();\n const navContent = useMemo(() => <StandardTree {...navigation} />, [navigation]);\n\n return (\n <Flex as={StyledContainer} container={{ direction: 'column' }} ref={ref}>\n <Flex as={StyledMain} container>\n <StyledTreeContainer>{navContent}</StyledTreeContainer>\n <Flex container={{ direction: 'column', pad: 1, gap: 1 }} as={StyledContent} ref={ref}>\n {!content && <EmptyState />}\n {content && content.loading && <Progress placement='local' message={t('loading')} />}\n {content && !content.loading && <FieldSummary {...content} />}\n </Flex>\n </Flex>\n\n <StyledClipboardFooter>\n {lastUpdated && <Text variant='secondary'>{lastUpdated}</Text>}\n </StyledClipboardFooter>\n </Flex>\n );\n }\n);\nexport default Clipboard;\n"]}
1
+ {"version":3,"file":"Clipboard.js","sourceRoot":"","sources":["../../../src/components/Clipboard/Clipboard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,UAAU,EACV,OAAO,EAEP,SAAS,EACT,MAAM,EACP,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,MAAM,EAEN,IAAI,EAEJ,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,IAAI,EACJ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AAY,OAAK,OAAO,GAAI,IACxD,IACF,EAEP,KAAC,IAAI,IAAC,EAAE,EAAE,qBAAqB,EAAE,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,YACjE,WAAW,IAAI,KAAC,IAAI,IAAC,OAAO,EAAC,WAAW,YAAE,WAAW,GAAQ,GACzD,IACF,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AACF,eAAe,SAAS,CAAC","sourcesContent":["import {\n FunctionComponent,\n PropsWithoutRef,\n forwardRef,\n useMemo,\n FC,\n useEffect,\n useRef\n} from 'react';\n\nimport {\n Button,\n ColumnProps,\n Flex,\n ForwardProps,\n MetaList,\n Progress,\n StandardTree,\n SummaryItem,\n Text,\n Table,\n useI18n,\n EmptyState\n} from '@pega/cosmos-react-core';\n\nimport { ClipboardProps, FieldSummaryProps, Field } from './Clipboard.types';\nimport {\n StyledClipboardFooter,\n StyledContainer,\n StyledContent,\n StyledMain,\n StyledTitle,\n StyledTreeContainer\n} from './Clipboard.styles';\n\nconst FieldRenderer: FC<Field> = (cell: Field) => {\n return (\n <>\n {cell.onClick ? (\n <Button variant='link' onClick={(e: MouseEvent) => cell.onClick?.(cell.id, e)}>\n {cell.name}\n </Button>\n ) : (\n cell.name\n )}\n </>\n );\n};\n\nconst FieldSummary: FC<FieldSummaryProps> = ({\n primary,\n secondary,\n fields,\n actions\n}: FieldSummaryProps) => {\n const headingRef = useRef<HTMLSpanElement>(null);\n const t = useI18n();\n\n const metaListItems = secondary?.map(({ name, value }) => `${name}: ${value}`);\n\n const columns: ColumnProps<Field>[] = [\n {\n renderer: FieldRenderer,\n label: t('condition_builder_field_label')\n },\n { renderer: 'value', label: t('condition_builder_value_label') }\n ];\n\n useEffect(() => headingRef.current?.focus(), []);\n\n return (\n <>\n <SummaryItem\n primary={\n <StyledTitle tabIndex={-1} variant='h3' ref={headingRef}>\n {primary}\n </StyledTitle>\n }\n secondary={metaListItems && <MetaList items={metaListItems} />}\n actions={actions}\n />\n <Table title={primary} columns={columns} data={fields} />\n </>\n );\n};\n\nconst Clipboard: FunctionComponent<ClipboardProps & ForwardProps> = forwardRef(\n (\n { navigation, content, lastUpdated }: PropsWithoutRef<ClipboardProps>,\n ref: ClipboardProps['ref']\n ) => {\n const t = useI18n();\n const navContent = useMemo(() => <StandardTree {...navigation} />, [navigation]);\n\n return (\n <Flex as={StyledContainer} container={{ direction: 'column' }} ref={ref}>\n <Flex as={StyledMain} container>\n <StyledTreeContainer>{navContent}</StyledTreeContainer>\n <Flex container={{ direction: 'column', pad: 1, gap: 1 }} as={StyledContent} ref={ref}>\n {!content && <EmptyState />}\n {content && content.loading && <Progress placement='local' message={t('loading')} />}\n {content && !content.loading && <FieldSummary {...content} />}\n </Flex>\n </Flex>\n\n <Flex as={StyledClipboardFooter} container={{ alignItems: 'center' }}>\n {lastUpdated && <Text variant='secondary'>{lastUpdated}</Text>}\n </Flex>\n </Flex>\n );\n }\n);\nexport default Clipboard;\n"]}
@@ -0,0 +1,9 @@
1
+ import { FC, PropsWithoutRef, Ref } from 'react';
2
+ import { ForwardProps } from '@pega/cosmos-react-core';
3
+ import { DevToolsProps } from './DevTools.types';
4
+ interface ContentProps extends Pick<DevToolsProps, 'tabContent' | 'currentTabId'> {
5
+ ref?: Ref<HTMLDivElement>;
6
+ }
7
+ declare const Content: FC<ForwardProps & PropsWithoutRef<ContentProps>>;
8
+ export default Content;
9
+ //# sourceMappingURL=Content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../src/components/DevTools/Content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAc,eAAe,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAkB,YAAY,EAAgB,MAAM,yBAAyB,CAAC;AAIrF,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,UAAU,YAAa,SAAQ,IAAI,CAAC,aAAa,EAAE,YAAY,GAAG,cAAc,CAAC;IAC/E,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,GAAG,eAAe,CAAC,YAAY,CAAC,CAkB7D,CAAC;AACF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { TabPanel, Flex, registerIcon } from '@pega/cosmos-react-core';
4
+ import * as bugIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/bug.icon';
5
+ import { StyledToolsContent } from './DevTools.styles';
6
+ registerIcon(bugIcon);
7
+ const Content = forwardRef(({ currentTabId, tabContent }, ref) => {
8
+ return (_jsx(Flex, { as: StyledToolsContent, ref: ref, "aria-hidden": !tabContent, container: { pad: [1, 2] }, item: { grow: 1 }, children: tabContent && currentTabId && (_jsx(TabPanel, { tabId: currentTabId, currentTabId: currentTabId, children: tabContent })) }));
9
+ });
10
+ export default Content;
11
+ //# sourceMappingURL=Content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../src/components/DevTools/Content.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,UAAU,EAAwB,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAgB,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,KAAK,OAAO,MAAM,4DAA4D,CAAC;AAEtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGvD,YAAY,CAAC,OAAO,CAAC,CAAC;AAMtB,MAAM,OAAO,GAAqD,UAAU,CAC1E,CAAC,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,GAAwB,EAAE,EAAE;IACzD,OAAO,CACL,KAAC,IAAI,IACH,EAAE,EAAE,kBAAkB,EACtB,GAAG,EAAE,GAAG,iBACK,CAAC,UAAU,EACxB,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAC1B,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,YAEhB,UAAU,IAAI,YAAY,IAAI,CAC7B,KAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,YACtD,UAAU,GACF,CACZ,GACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AACF,eAAe,OAAO,CAAC","sourcesContent":["import { FC, forwardRef, PropsWithoutRef, Ref } from 'react';\n\nimport { TabPanel, Flex, ForwardProps, registerIcon } from '@pega/cosmos-react-core';\nimport * as bugIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/bug.icon';\n\nimport { StyledToolsContent } from './DevTools.styles';\nimport { DevToolsProps } from './DevTools.types';\n\nregisterIcon(bugIcon);\n\ninterface ContentProps extends Pick<DevToolsProps, 'tabContent' | 'currentTabId'> {\n ref?: Ref<HTMLDivElement>;\n}\n\nconst Content: FC<ForwardProps & PropsWithoutRef<ContentProps>> = forwardRef(\n ({ currentTabId, tabContent }, ref: ContentProps['ref']) => {\n return (\n <Flex\n as={StyledToolsContent}\n ref={ref}\n aria-hidden={!tabContent}\n container={{ pad: [1, 2] }}\n item={{ grow: 1 }}\n >\n {tabContent && currentTabId && (\n <TabPanel tabId={currentTabId} currentTabId={currentTabId}>\n {tabContent}\n </TabPanel>\n )}\n </Flex>\n );\n }\n);\nexport default Content;\n"]}
@@ -0,0 +1,6 @@
1
+ import { FC, PropsWithoutRef } from 'react';
2
+ import { ForwardProps } from '@pega/cosmos-react-core';
3
+ import { DevToolsProps } from './DevTools.types';
4
+ declare const DevTools: FC<ForwardProps & PropsWithoutRef<DevToolsProps>>;
5
+ export default DevTools;
6
+ //# sourceMappingURL=DevTools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevTools.d.ts","sourceRoot":"","sources":["../../../src/components/DevTools/DevTools.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAc,eAAe,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,YAAY,EAAgB,MAAM,yBAAyB,CAAC;AAIrE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMjD,QAAA,MAAM,QAAQ,EAAE,EAAE,CAAC,YAAY,GAAG,eAAe,CAAC,aAAa,CAAC,CAkB/D,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { registerIcon } from '@pega/cosmos-react-core';
4
+ import * as bugIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/bug.icon';
5
+ import { StyledDevTools } from './DevTools.styles';
6
+ import Header from './Header';
7
+ import Content from './Content';
8
+ registerIcon(bugIcon);
9
+ const DevTools = forwardRef(({ tabs, currentTabId, onTabClick, onContinueDebug, tabContent, utils }, ref) => {
10
+ return (_jsxs(StyledDevTools, { ref: ref, children: [_jsx(Header, { tabs: tabs, onTabClick: onTabClick, onContinueDebug: onContinueDebug, currentTabId: currentTabId, utils: utils }), _jsx(Content, { tabContent: tabContent, currentTabId: currentTabId })] }));
11
+ });
12
+ export default DevTools;
13
+ //# sourceMappingURL=DevTools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevTools.js","sourceRoot":"","sources":["../../../src/components/DevTools/DevTools.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,UAAU,EAAmB,MAAM,OAAO,CAAC;AAExD,OAAO,EAAgB,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,OAAO,MAAM,4DAA4D,CAAC;AAEtF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,YAAY,CAAC,OAAO,CAAC,CAAC;AAEtB,MAAM,QAAQ,GAAsD,UAAU,CAC5E,CACE,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,KAAK,EAAE,EACtE,GAAyB,EACzB,EAAE;IACF,OAAO,CACL,MAAC,cAAc,IAAC,GAAG,EAAE,GAAG,aACtB,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,GACZ,EACF,KAAC,OAAO,IAAC,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,GAAI,IAChD,CAClB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import { FC, forwardRef, PropsWithoutRef } from 'react';\n\nimport { ForwardProps, registerIcon } from '@pega/cosmos-react-core';\nimport * as bugIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/bug.icon';\n\nimport { StyledDevTools } from './DevTools.styles';\nimport { DevToolsProps } from './DevTools.types';\nimport Header from './Header';\nimport Content from './Content';\n\nregisterIcon(bugIcon);\n\nconst DevTools: FC<ForwardProps & PropsWithoutRef<DevToolsProps>> = forwardRef(\n (\n { tabs, currentTabId, onTabClick, onContinueDebug, tabContent, utils },\n ref: DevToolsProps['ref']\n ) => {\n return (\n <StyledDevTools ref={ref}>\n <Header\n tabs={tabs}\n onTabClick={onTabClick}\n onContinueDebug={onContinueDebug}\n currentTabId={currentTabId}\n utils={utils}\n />\n <Content tabContent={tabContent} currentTabId={currentTabId} />\n </StyledDevTools>\n );\n }\n);\n\nexport default DevTools;\n"]}
@@ -0,0 +1,6 @@
1
+ import { DevToolsProps } from './DevTools.types';
2
+ export declare const StyledDevTools: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Partial<DevToolsProps>, never>;
3
+ export declare const StyledTabContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
4
+ export declare const StyledToolsContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Partial<DevToolsProps>, never>;
5
+ export declare const StyledIcon: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").IconProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
6
+ //# sourceMappingURL=DevTools.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevTools.styles.d.ts","sourceRoot":"","sources":["../../../src/components/DevTools/DevTools.styles.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,cAAc,6HAMzB,CAAC;AAIH,eAAO,MAAM,kBAAkB,yGAuB9B,CAAC;AAIF,eAAO,MAAM,kBAAkB,6HAiB9B,CAAC;AAIF,eAAO,MAAM,UAAU,mOAGtB,CAAC"}
@@ -0,0 +1,49 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { defaultThemeProp, Icon } from '@pega/cosmos-react-core';
3
+ import { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';
4
+ import { StyledTabs } from '@pega/cosmos-react-core/lib/components/Tabs/Tabs';
5
+ export const StyledDevTools = styled.div(({ theme }) => {
6
+ return css `
7
+ background-color: ${theme.base.palette['primary-background']};
8
+ overflow: hidden;
9
+ height: 100vh;
10
+ `;
11
+ });
12
+ StyledDevTools.defaultProps = defaultThemeProp;
13
+ export const StyledTabContainer = styled.div(({ theme: { base: { palette } } }) => {
14
+ return css `
15
+ height: 2.5rem;
16
+ border-top: 0.0625rem solid ${palette['border-line']};
17
+ border-bottom: 0.0625rem solid ${palette['border-line']};
18
+ text-decoration: none;
19
+ background-color: ${palette['primary-background']};
20
+
21
+ & ${StyledTabs} {
22
+ height: 100%;
23
+ border-bottom: none;
24
+
25
+ button {
26
+ height: 100%;
27
+ }
28
+ }
29
+ `;
30
+ });
31
+ StyledTabContainer.defaultProps = defaultThemeProp;
32
+ export const StyledToolsContent = styled.div(({ theme: { base: { palette } } }) => {
33
+ return css `
34
+ height: calc(100% - 2.5rem);
35
+ padding: 0;
36
+ overflow: auto;
37
+ background-color: ${palette['primary-background']};
38
+
39
+ ${StyledTabPanel} {
40
+ width: 100%;
41
+ }
42
+ `;
43
+ });
44
+ StyledToolsContent.defaultProps = defaultThemeProp;
45
+ export const StyledIcon = styled(Icon) `
46
+ height: 100%;
47
+ width: 1.5em;
48
+ `;
49
+ //# sourceMappingURL=DevTools.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevTools.styles.js","sourceRoot":"","sources":["../../../src/components/DevTools/DevTools.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAI9E,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAyB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7E,OAAO,GAAG,CAAA;wBACY,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;;;GAG7D,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,cAAc,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAC1C,CAAC,EACC,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,EAClB,EACF,EAAE,EAAE;IACH,OAAO,GAAG,CAAA;;oCAEsB,OAAO,CAAC,aAAa,CAAC;uCACnB,OAAO,CAAC,aAAa,CAAC;;0BAEnC,OAAO,CAAC,oBAAoB,CAAC;;UAE7C,UAAU;;;;;;;;KAQf,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAC1C,CAAC,EACC,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,EAClB,EACF,EAAE,EAAE;IACH,OAAO,GAAG,CAAA;;;;0BAIY,OAAO,CAAC,oBAAoB,CAAC;;QAE/C,cAAc;;;KAGjB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEnD,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;;CAGrC,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp, Icon } from '@pega/cosmos-react-core';\nimport { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';\nimport { StyledTabs } from '@pega/cosmos-react-core/lib/components/Tabs/Tabs';\n\nimport { DevToolsProps } from './DevTools.types';\n\nexport const StyledDevTools = styled.div<Partial<DevToolsProps>>(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['primary-background']};\n overflow: hidden;\n height: 100vh;\n `;\n});\n\nStyledDevTools.defaultProps = defaultThemeProp;\n\nexport const StyledTabContainer = styled.div(\n ({\n theme: {\n base: { palette }\n }\n }) => {\n return css`\n height: 2.5rem;\n border-top: 0.0625rem solid ${palette['border-line']};\n border-bottom: 0.0625rem solid ${palette['border-line']};\n text-decoration: none;\n background-color: ${palette['primary-background']};\n\n & ${StyledTabs} {\n height: 100%;\n border-bottom: none;\n\n button {\n height: 100%;\n }\n }\n `;\n }\n);\n\nStyledTabContainer.defaultProps = defaultThemeProp;\n\nexport const StyledToolsContent = styled.div<Partial<DevToolsProps>>(\n ({\n theme: {\n base: { palette }\n }\n }) => {\n return css`\n height: calc(100% - 2.5rem);\n padding: 0;\n overflow: auto;\n background-color: ${palette['primary-background']};\n\n ${StyledTabPanel} {\n width: 100%;\n }\n `;\n }\n);\n\nStyledToolsContent.defaultProps = defaultThemeProp;\n\nexport const StyledIcon = styled(Icon)`\n height: 100%;\n width: 1.5em;\n`;\n"]}
@@ -0,0 +1,19 @@
1
+ import { ReactNode, Ref, MouseEvent } from 'react';
2
+ import { BaseProps, Tab, TabsProps } from '@pega/cosmos-react-core';
3
+ export interface DevToolsProps extends BaseProps {
4
+ /** An array of Tab data used to render the individual footer tabs. */
5
+ tabs: Tab[];
6
+ /** optional ID for making the corresponding tab active */
7
+ currentTabId?: TabsProps['currentTabId'];
8
+ /** Content for the tabs. */
9
+ tabContent: ReactNode;
10
+ /** Callback triggered every time a new tab is clicked and returns an id as well as the click event. */
11
+ onTabClick: (id: string, e?: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
12
+ /** Callback to shift the focus to the newly opened window. */
13
+ onContinueDebug?: (e?: MouseEvent<HTMLButtonElement>) => void;
14
+ /** Actions on the tools header */
15
+ utils?: ReactNode;
16
+ /** Ref for the footer */
17
+ ref?: Ref<HTMLDivElement>;
18
+ }
19
+ //# sourceMappingURL=DevTools.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevTools.types.d.ts","sourceRoot":"","sources":["../../../src/components/DevTools/DevTools.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpE,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,sEAAsE;IACtE,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,0DAA0D;IAC1D,YAAY,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACzC,8BAA8B;IAC9B,UAAU,EAAE,SAAS,CAAC;IACtB,uGAAuG;IACvG,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACxF,8DAA8D;IAC9D,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC9D,kCAAkC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,yBAAyB;IACzB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DevTools.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevTools.types.js","sourceRoot":"","sources":["../../../src/components/DevTools/DevTools.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ReactNode, Ref, MouseEvent } from 'react';\n\nimport { BaseProps, Tab, TabsProps } from '@pega/cosmos-react-core';\n\nexport interface DevToolsProps extends BaseProps {\n /** An array of Tab data used to render the individual footer tabs. */\n tabs: Tab[];\n /** optional ID for making the corresponding tab active */\n currentTabId?: TabsProps['currentTabId'];\n /** Content for the tabs. */\n tabContent: ReactNode;\n /** Callback triggered every time a new tab is clicked and returns an id as well as the click event. */\n onTabClick: (id: string, e?: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;\n /** Callback to shift the focus to the newly opened window. */\n onContinueDebug?: (e?: MouseEvent<HTMLButtonElement>) => void;\n /** Actions on the tools header */\n utils?: ReactNode;\n /** Ref for the footer */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { DevToolsProps } from './DevTools.types';
3
+ interface HeaderProps extends Pick<DevToolsProps, 'tabs' | 'currentTabId' | 'onTabClick' | 'onContinueDebug'> {
4
+ utils?: ReactNode;
5
+ }
6
+ declare const Header: FC<HeaderProps>;
7
+ export default Header;
8
+ //# sourceMappingURL=Header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/components/DevTools/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMtC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,UAAU,WACR,SAAQ,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,cAAc,GAAG,YAAY,GAAG,iBAAiB,CAAC;IACvF,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAgC3B,CAAC;AACF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Flex, Button, Tabs, Text, registerIcon, useI18n } from '@pega/cosmos-react-core';
3
+ import * as bugIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/bug.icon';
4
+ import { StyledTabContainer, StyledIcon } from './DevTools.styles';
5
+ registerIcon(bugIcon);
6
+ const Header = ({ tabs, currentTabId, onTabClick, onContinueDebug, utils }) => {
7
+ const t = useI18n();
8
+ return (_jsxs(Flex, { as: StyledTabContainer, container: { justify: onContinueDebug ? 'start' : 'between', alignItems: 'center' }, children: [_jsx(Flex, { container: { pad: [0, 1], alignItems: 'center' }, children: _jsx(StyledIcon, { name: 'bug' }) }), onContinueDebug ? (_jsxs(Flex, { container: { gap: 1 }, children: [_jsx(Text, { variant: 'secondary', children: t('active_session_info') }), _jsx(Button, { variant: 'link', onClick: onContinueDebug, children: t('continue_debugging') })] })) : (_jsxs(_Fragment, { children: [_jsx(Flex, { item: { grow: 1 }, as: Tabs, tabs: tabs, currentTabId: currentTabId, onTabClick: onTabClick }), utils] }))] }));
9
+ };
10
+ export default Header;
11
+ //# sourceMappingURL=Header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/components/DevTools/Header.tsx"],"names":[],"mappings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AE,UAAU,GACtB,EACD,KAAK,IACL,CACJ,IACI,CACR,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["import { FC, ReactNode } from 'react';\n\nimport { Flex, Button, Tabs, Text, registerIcon, useI18n } from '@pega/cosmos-react-core';\nimport * as bugIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/bug.icon';\n\nimport { StyledTabContainer, StyledIcon } from './DevTools.styles';\nimport { DevToolsProps } from './DevTools.types';\n\nregisterIcon(bugIcon);\n\ninterface HeaderProps\n extends Pick<DevToolsProps, 'tabs' | 'currentTabId' | 'onTabClick' | 'onContinueDebug'> {\n utils?: ReactNode;\n}\n\nconst Header: FC<HeaderProps> = ({ tabs, currentTabId, onTabClick, onContinueDebug, utils }) => {\n const t = useI18n();\n\n return (\n <Flex\n as={StyledTabContainer}\n container={{ justify: onContinueDebug ? 'start' : 'between', alignItems: 'center' }}\n >\n <Flex container={{ pad: [0, 1], alignItems: 'center' }}>\n <StyledIcon name='bug' />\n </Flex>\n {onContinueDebug ? (\n <Flex container={{ gap: 1 }}>\n <Text variant='secondary'>{t('active_session_info')}</Text>\n <Button variant='link' onClick={onContinueDebug}>\n {t('continue_debugging')}\n </Button>\n </Flex>\n ) : (\n <>\n <Flex\n item={{ grow: 1 }}\n as={Tabs}\n tabs={tabs}\n currentTabId={currentTabId}\n onTabClick={onTabClick}\n />\n {utils}\n </>\n )}\n </Flex>\n );\n};\nexport default Header;\n"]}
@@ -0,0 +1,3 @@
1
+ export { default } from './DevTools';
2
+ export { DevToolsProps } from './DevTools.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DevTools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from './DevTools';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/DevTools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC","sourcesContent":["export { default } from './DevTools';\nexport { DevToolsProps } from './DevTools.types';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../src/components/PreviewShell/Footer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA0B,eAAe,EAAwB,MAAM,OAAO,CAAC;AAE1F,OAAO,EAIL,YAAY,EAKb,MAAM,yBAAyB,CAAC;AAMjC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,YAAY,GAAG,eAAe,CAAC,WAAW,CAAC,CAmF3D,CAAC;AACF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../src/components/PreviewShell/Footer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA0B,eAAe,EAAuB,MAAM,OAAO,CAAC;AAEzF,OAAO,EAEL,YAAY,EAMb,MAAM,yBAAyB,CAAC;AASjC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAKnD,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,YAAY,GAAG,eAAe,CAAC,WAAW,CAAC,CAkF3D,CAAC;AACF,eAAe,MAAM,CAAC"}
@@ -1,29 +1,38 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useContext, useState } from 'react';
3
- import { TabPanel, Tabs, Flex, Button, Icon, MenuButton, useI18n } from '@pega/cosmos-react-core';
2
+ import { forwardRef, useContext, useMemo } from 'react';
3
+ import { Flex, Button, Icon, MenuButton, useI18n, registerIcon } from '@pega/cosmos-react-core';
4
4
  import { expandCollapseStates } from '@pega/cosmos-react-core/lib/hooks/useTransitionState';
5
- import { StyledTabContainer, StyledToolsContainer, StyledFooter } from './PreviewShell.styles';
6
- import { footerExpanded } from './utils';
5
+ import * as bugIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/bug.icon';
6
+ import Header from '../DevTools/Header';
7
+ import Content from '../DevTools/Content';
7
8
  import PreviewShellContext from './PreviewShellContext';
8
- const Footer = forwardRef(({ tabs, tabContent, onTabClick, newTabHref, menu }, ref) => {
9
+ import { footerExpanded } from './utils';
10
+ import { StyledFooter } from './PreviewShell.styles';
11
+ registerIcon(bugIcon);
12
+ const Footer = forwardRef(({ tabs, currentTabId, tabContent, onTabClick, onNewWindowClick, onContinueDebug, menu }, ref) => {
9
13
  const { footerState, toggleFooter } = useContext(PreviewShellContext);
10
- const [currentTabId, setCurrentTabId] = useState(tabs[0].id);
11
14
  const t = useI18n();
12
15
  const toggleButtonLabel = t(footerExpanded(footerState) ? 'collapse' : 'expand');
13
16
  const toggleButtonA11y = t(footerExpanded(footerState) ? 'collapse_noun' : 'expand_noun', [
14
- t('debug_tools')
17
+ t('dev_tools')
15
18
  ]);
16
19
  const handleTabChange = (id, e) => {
17
20
  if (!footerExpanded(footerState)) {
18
21
  toggleFooter();
19
22
  }
20
- setCurrentTabId(id);
21
23
  onTabClick(id, e);
22
24
  };
23
- return (_jsxs(Flex, { as: StyledFooter, container: { direction: 'column' }, children: [_jsxs(Flex, { as: StyledTabContainer, container: { justify: 'between' }, children: [_jsx(Flex, { item: { grow: 1 }, as: Tabs, tabs: tabs, currentTabId: currentTabId, onTabClick: handleTabChange }), _jsxs(Flex, { container: { alignItems: 'center', pad: [0, 2] }, children: [menu && (_jsx(MenuButton, { text: t('more_options'), variant: 'simple', icon: 'more', iconOnly: true, menu: menu })), newTabHref && (_jsx(Button, { variant: 'simple', href: newTabHref, target: '_blank', label: t('open_in_new_window_text'), icon: true, children: _jsx(Icon, { name: 'open' }) })), _jsx(Button, { variant: 'simple', icon: true, "aria-expanded": footerExpanded(footerState), label: footerState === expandCollapseStates.high ||
24
- footerState === expandCollapseStates.low
25
- ? toggleButtonLabel
26
- : undefined, "aria-label": toggleButtonA11y, onClick: toggleFooter, children: _jsx(Icon, { name: footerExpanded(footerState) ? 'caret-down' : 'caret-up' }) })] })] }), _jsx(Flex, { as: StyledToolsContainer, ref: ref, "aria-hidden": !footerExpanded(footerState), container: { pad: [1, 2] }, item: { grow: 1 }, children: footerState !== expandCollapseStates.low && (_jsx(TabPanel, { tabId: currentTabId, currentTabId: currentTabId, children: tabContent })) })] }));
25
+ const utils = useMemo(() => {
26
+ return (_jsxs(Flex, { container: { alignItems: 'center', pad: [0, 2] }, children: [menu && (_jsx(MenuButton, { text: t('more_options'), variant: 'simple', icon: 'more', iconOnly: true, menu: menu })), onNewWindowClick && (_jsx(Button, { variant: 'simple', label: t('open_in_new_window_text'), icon: true, onClick: (e) => {
27
+ if (footerExpanded(footerState)) {
28
+ toggleFooter();
29
+ }
30
+ onNewWindowClick(e);
31
+ }, children: _jsx(Icon, { name: 'open' }) })), _jsx(Button, { variant: 'simple', icon: true, "aria-expanded": footerExpanded(footerState), label: footerState === expandCollapseStates.high || footerState === expandCollapseStates.low
32
+ ? toggleButtonLabel
33
+ : undefined, "aria-label": toggleButtonA11y, onClick: toggleFooter, children: _jsx(Icon, { name: footerExpanded(footerState) ? 'caret-down' : 'caret-up' }) })] }));
34
+ }, [t, toggleButtonLabel, toggleButtonA11y, menu, onNewWindowClick, footerState, toggleFooter]);
35
+ return (_jsxs(StyledFooter, { children: [_jsx(Header, { tabs: tabs, onTabClick: handleTabChange, onContinueDebug: onContinueDebug, currentTabId: currentTabId, utils: utils }), _jsx(Content, { tabContent: footerState !== expandCollapseStates.low ? tabContent : undefined, currentTabId: currentTabId, ref: ref })] }));
27
36
  });
28
37
  export default Footer;
29
38
  //# sourceMappingURL=Footer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Footer.js","sourceRoot":"","sources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EH,gBAAgB,EAC5B,OAAO,EAAE,YAAY,YAErB,KAAC,IAAI,IAAC,IAAI,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,GAAI,GAChE,IACJ,IACF,EACP,KAAC,IAAI,IACH,EAAE,EAAE,oBAAoB,EACxB,GAAG,EAAE,GAAG,iBACK,CAAC,cAAc,CAAC,WAAW,CAAC,EACzC,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAC1B,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,YAEhB,WAAW,KAAK,oBAAoB,CAAC,GAAG,IAAI,CAC3C,KAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,YACtD,UAAU,GACF,CACZ,GACI,IACF,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["import { FC, forwardRef, MouseEvent, PropsWithoutRef, useContext, useState } from 'react';\n\nimport {\n TabPanel,\n Tabs,\n Flex,\n ForwardProps,\n Button,\n Icon,\n MenuButton,\n useI18n\n} from '@pega/cosmos-react-core';\nimport { expandCollapseStates } from '@pega/cosmos-react-core/lib/hooks/useTransitionState';\n\nimport { StyledTabContainer, StyledToolsContainer, StyledFooter } from './PreviewShell.styles';\nimport { footerExpanded } from './utils';\nimport PreviewShellContext from './PreviewShellContext';\nimport { FooterProps } from './PreviewShell.types';\n\nconst Footer: FC<ForwardProps & PropsWithoutRef<FooterProps>> = forwardRef(\n ({ tabs, tabContent, onTabClick, newTabHref, menu }, ref: FooterProps['ref']) => {\n const { footerState, toggleFooter } = useContext(PreviewShellContext);\n const [currentTabId, setCurrentTabId] = useState(tabs[0].id);\n const t = useI18n();\n\n const toggleButtonLabel = t(footerExpanded(footerState) ? 'collapse' : 'expand');\n const toggleButtonA11y = t(footerExpanded(footerState) ? 'collapse_noun' : 'expand_noun', [\n t('debug_tools')\n ]);\n\n const handleTabChange = (id: string, e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n if (!footerExpanded(footerState)) {\n toggleFooter();\n }\n setCurrentTabId(id);\n onTabClick(id, e);\n };\n\n return (\n <Flex as={StyledFooter} container={{ direction: 'column' }}>\n <Flex as={StyledTabContainer} container={{ justify: 'between' }}>\n <Flex\n item={{ grow: 1 }}\n as={Tabs}\n tabs={tabs}\n currentTabId={currentTabId}\n onTabClick={handleTabChange}\n />\n <Flex container={{ alignItems: 'center', pad: [0, 2] }}>\n {menu && (\n <MenuButton\n text={t('more_options')}\n variant='simple'\n icon='more'\n iconOnly\n menu={menu}\n />\n )}\n {newTabHref && (\n <Button\n variant='simple'\n href={newTabHref}\n target='_blank'\n label={t('open_in_new_window_text')}\n icon\n >\n <Icon name='open' />\n </Button>\n )}\n <Button\n variant='simple'\n icon\n aria-expanded={footerExpanded(footerState)}\n label={\n footerState === expandCollapseStates.high ||\n footerState === expandCollapseStates.low\n ? toggleButtonLabel\n : undefined\n }\n aria-label={toggleButtonA11y}\n onClick={toggleFooter}\n >\n <Icon name={footerExpanded(footerState) ? 'caret-down' : 'caret-up'} />\n </Button>\n </Flex>\n </Flex>\n <Flex\n as={StyledToolsContainer}\n ref={ref}\n aria-hidden={!footerExpanded(footerState)}\n container={{ pad: [1, 2] }}\n item={{ grow: 1 }}\n >\n {footerState !== expandCollapseStates.low && (\n <TabPanel tabId={currentTabId} currentTabId={currentTabId}>\n {tabContent}\n </TabPanel>\n )}\n </Flex>\n </Flex>\n );\n }\n);\nexport default Footer;\n"]}
1
+ {"version":3,"file":"Footer.js","sourceRoot":"","sources":["../../../src/components/PreviewShell/Footer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,UAAU,EAA+B,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEzF,OAAO,EACL,IAAI,EAEJ,MAAM,EACN,IAAI,EACJ,UAAU,EACV,OAAO,EACP,YAAY,EACb,MAAM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AC3B,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,GACZ,EACF,KAAC,OAAO,IACN,UAAU,EAAE,WAAW,KAAK,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAC7E,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,GAAG,GACR,IACW,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["import { FC, forwardRef, MouseEvent, PropsWithoutRef, useContext, useMemo } from 'react';\n\nimport {\n Flex,\n ForwardProps,\n Button,\n Icon,\n MenuButton,\n useI18n,\n registerIcon\n} from '@pega/cosmos-react-core';\nimport { expandCollapseStates } from '@pega/cosmos-react-core/lib/hooks/useTransitionState';\nimport * as bugIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/bug.icon';\n\nimport Header from '../DevTools/Header';\nimport Content from '../DevTools/Content';\n\nimport PreviewShellContext from './PreviewShellContext';\nimport { footerExpanded } from './utils';\nimport { FooterProps } from './PreviewShell.types';\nimport { StyledFooter } from './PreviewShell.styles';\n\nregisterIcon(bugIcon);\n\nconst Footer: FC<ForwardProps & PropsWithoutRef<FooterProps>> = forwardRef(\n (\n { tabs, currentTabId, tabContent, onTabClick, onNewWindowClick, onContinueDebug, menu },\n ref: FooterProps['ref']\n ) => {\n const { footerState, toggleFooter } = useContext(PreviewShellContext);\n const t = useI18n();\n\n const toggleButtonLabel = t(footerExpanded(footerState) ? 'collapse' : 'expand');\n const toggleButtonA11y = t(footerExpanded(footerState) ? 'collapse_noun' : 'expand_noun', [\n t('dev_tools')\n ]);\n\n const handleTabChange = (id: string, e?: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n if (!footerExpanded(footerState)) {\n toggleFooter();\n }\n onTabClick(id, e);\n };\n\n const utils = useMemo(() => {\n return (\n <Flex container={{ alignItems: 'center', pad: [0, 2] }}>\n {menu && (\n <MenuButton\n text={t('more_options')}\n variant='simple'\n icon='more'\n iconOnly\n menu={menu}\n />\n )}\n {onNewWindowClick && (\n <Button\n variant='simple'\n label={t('open_in_new_window_text')}\n icon\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n if (footerExpanded(footerState)) {\n toggleFooter();\n }\n onNewWindowClick(e);\n }}\n >\n <Icon name='open' />\n </Button>\n )}\n <Button\n variant='simple'\n icon\n aria-expanded={footerExpanded(footerState)}\n label={\n footerState === expandCollapseStates.high || footerState === expandCollapseStates.low\n ? toggleButtonLabel\n : undefined\n }\n aria-label={toggleButtonA11y}\n onClick={toggleFooter}\n >\n <Icon name={footerExpanded(footerState) ? 'caret-down' : 'caret-up'} />\n </Button>\n </Flex>\n );\n }, [t, toggleButtonLabel, toggleButtonA11y, menu, onNewWindowClick, footerState, toggleFooter]);\n\n return (\n <StyledFooter>\n <Header\n tabs={tabs}\n onTabClick={handleTabChange}\n onContinueDebug={onContinueDebug}\n currentTabId={currentTabId}\n utils={utils}\n />\n <Content\n tabContent={footerState !== expandCollapseStates.low ? tabContent : undefined}\n currentTabId={currentTabId}\n ref={ref}\n />\n </StyledFooter>\n );\n }\n);\nexport default Footer;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"PreviewShell.d.ts","sourceRoot":"","sources":["../../../src/components/PreviewShell/PreviewShell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,iBAAiB,EAA8B,MAAM,OAAO,CAAC;AAEnG,OAAO,EACL,YAAY,EAKb,MAAM,yBAAyB,CAAC;AAOjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,GAAG,YAAY,CAiGrE,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"PreviewShell.d.ts","sourceRoot":"","sources":["../../../src/components/PreviewShell/PreviewShell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,iBAAiB,EAA8B,MAAM,OAAO,CAAC;AAEnG,OAAO,EACL,YAAY,EAKb,MAAM,yBAAyB,CAAC;AAKjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAIzD,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,GAAG,YAAY,CAsFrE,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -3,10 +3,10 @@ import { forwardRef, useRef, useEffect, useMemo } from 'react';
3
3
  import { useI18n, useTransitionState, SkipLinks } from '@pega/cosmos-react-core';
4
4
  import { expandCollapseStates } from '@pega/cosmos-react-core/lib/hooks/useTransitionState';
5
5
  import { StyledIframe, StyledMain, StyledPreviewContainer } from './PreviewShell.styles';
6
- import Footer from './Footer';
7
- import PreviewShellContext from './PreviewShellContext';
8
6
  import Header from './Header';
9
- const PreviewShell = forwardRef(({ header, frameurl, footer: { tabs, tabContent, onTabClick, newTabHref, menu, expanded, onBeforeExpand, onAfterExpand, onBeforeCollapse, onAfterCollapse } }, ref) => {
7
+ import PreviewShellContext from './PreviewShellContext';
8
+ import Footer from './Footer';
9
+ const PreviewShell = forwardRef(({ header, frameurl, footer: { expanded, onBeforeExpand, onAfterExpand, onBeforeCollapse, onAfterCollapse, ...footerRestProps } }, ref) => {
10
10
  const footerEl = useRef(null);
11
11
  const t = useI18n();
12
12
  const skipLinks = useMemo(() => [
@@ -18,9 +18,9 @@ const PreviewShell = forwardRef(({ header, frameurl, footer: { tabs, tabContent,
18
18
  }
19
19
  },
20
20
  {
21
- label: t('go_to_noun', [t('debug_tools')]),
21
+ label: t('go_to_noun', [t('dev_tools')]),
22
22
  target: {
23
- ariaLabel: t('debug_tools'),
23
+ ariaLabel: t('dev_tools'),
24
24
  selector: 'footer'
25
25
  }
26
26
  }
@@ -51,7 +51,7 @@ const PreviewShell = forwardRef(({ header, frameurl, footer: { tabs, tabContent,
51
51
  return (_jsxs(PreviewShellContext.Provider, { value: useMemo(() => ({
52
52
  footerState,
53
53
  toggleFooter
54
- }), [footerState, toggleFooter]), children: [_jsx(SkipLinks, { items: skipLinks }), _jsx(Header, { ...header }), _jsx(StyledMain, { ref: ref, children: _jsx(StyledPreviewContainer, { tabIndex: 0, "aria-label": t('preview_frame'), children: _jsx(StyledIframe, { src: frameurl, title: t('preview_frame') }) }) }), _jsx(Footer, { tabs: tabs, newTabHref: newTabHref, menu: menu, tabContent: tabContent, onTabClick: onTabClick, ref: footerEl })] }));
54
+ }), [footerState, toggleFooter]), children: [_jsx(SkipLinks, { items: skipLinks }), _jsx(Header, { ...header }), _jsx(StyledMain, { ref: ref, children: _jsx(StyledPreviewContainer, { tabIndex: 0, "aria-label": t('preview_frame'), children: _jsx(StyledIframe, { src: frameurl, title: t('preview_frame') }) }) }), _jsx(Footer, { ...footerRestProps, ref: footerEl })] }));
55
55
  });
56
56
  export default PreviewShell;
57
57
  //# sourceMappingURL=PreviewShell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PreviewShell.js","sourceRoot":"","sources":["../../../src/components/PreviewShell/PreviewShell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAsC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEnG,OAAO,EAEL,OAAO,EACP,kBAAkB,EAElB,SAAS,EACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sDAAsD,CAAC;AAE5F,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACzF,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,MAAM,MAAM,UAAU,CAAC;AAG9B,MAAM,YAAY,GAAwD,UAAU,CAClF,CACE,EACE,MAAM,EACN,QAAQ,EACR,MAAM,EAAE,EACN,IAAI,EACJ,UAAU,EACV,UAAU,EACV,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,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,WAAW,KAAK,oBAAoB,CAAC,OAAO,EAAE;YACvD,gBAAgB,EAAE,EAAE,CAAC;SACtB;aAAM,IAAI,WAAW,KAAK,oBAAoB,CAAC,GAAG,EAAE;YACnD,eAAe,EAAE,EAAE,CAAC;SACrB;aAAM;YACL,aAAa,EAAE,EAAE,CAAC;SACnB;IACH,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,OAAO,CACL,MAAC,mBAAmB,CAAC,QAAQ,IAC3B,KAAK,EAAE,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC;YACL,WAAW;YACX,YAAY;SACb,CAAC,EACF,CAAC,WAAW,EAAE,YAAY,CAAC,CAC5B,aAED,KAAC,SAAS,IAAC,KAAK,EAAE,SAAS,GAAI,EAC/B,KAAC,MAAM,OAAK,MAAM,GAAI,EACtB,KAAC,UAAU,IAAC,GAAG,EAAE,GAAG,YAClB,KAAC,sBAAsB,IAAC,QAAQ,EAAE,CAAC,gBAAc,CAAC,CAAC,eAAe,CAAC,YACjE,KAAC,YAAY,IAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,eAAe,CAAC,GAAI,GACnC,GACd,EACb,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,QAAQ,GACb,IAC2B,CAChC,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { forwardRef, PropsWithoutRef, FunctionComponent, useRef, useEffect, useMemo } from 'react';\n\nimport {\n ForwardProps,\n useI18n,\n useTransitionState,\n SkipLinksProps,\n SkipLinks\n} from '@pega/cosmos-react-core';\nimport { expandCollapseStates } from '@pega/cosmos-react-core/lib/hooks/useTransitionState';\n\nimport { StyledIframe, StyledMain, StyledPreviewContainer } from './PreviewShell.styles';\nimport Footer from './Footer';\nimport PreviewShellContext from './PreviewShellContext';\nimport Header from './Header';\nimport { PreviewShellProps } from './PreviewShell.types';\n\nconst PreviewShell: FunctionComponent<PreviewShellProps & ForwardProps> = forwardRef(\n (\n {\n header,\n frameurl,\n footer: {\n tabs,\n tabContent,\n onTabClick,\n newTabHref,\n menu,\n expanded,\n onBeforeExpand,\n onAfterExpand,\n onBeforeCollapse,\n onAfterCollapse\n }\n }: PropsWithoutRef<PreviewShellProps>,\n ref: PreviewShellProps['ref']\n ) => {\n const footerEl = useRef<HTMLDivElement>(null);\n const t = useI18n();\n const skipLinks: SkipLinksProps['items'] = useMemo(\n () => [\n {\n label: t('go_to_main_content'),\n target: {\n ariaLabel: t('main_content'),\n selector: 'main'\n }\n },\n {\n label: t('go_to_noun', [t('debug_tools')]),\n target: {\n ariaLabel: t('debug_tools'),\n selector: 'footer'\n }\n }\n ],\n [t]\n );\n\n const {\n state: footerState,\n toggle: toggleFooter,\n set: setFooterState\n } = useTransitionState({\n ref: footerEl,\n property: 'height',\n states: expandCollapseStates,\n defaultState: expanded ? expandCollapseStates.high : expandCollapseStates.low\n });\n\n useEffect(() => {\n setFooterState(expanded ? expandCollapseStates.high : expandCollapseStates.low);\n }, [expanded]);\n\n useEffect(() => {\n if (footerState === expandCollapseStates.rising) {\n onBeforeExpand?.();\n } else if (footerState === expandCollapseStates.falling) {\n onBeforeCollapse?.();\n } else if (footerState === expandCollapseStates.low) {\n onAfterCollapse?.();\n } else {\n onAfterExpand?.();\n }\n }, [footerState]);\n\n return (\n <PreviewShellContext.Provider\n value={useMemo(\n () => ({\n footerState,\n toggleFooter\n }),\n [footerState, toggleFooter]\n )}\n >\n <SkipLinks items={skipLinks} />\n <Header {...header} />\n <StyledMain ref={ref}>\n <StyledPreviewContainer tabIndex={0} aria-label={t('preview_frame')}>\n <StyledIframe src={frameurl} title={t('preview_frame')} />\n </StyledPreviewContainer>\n </StyledMain>\n <Footer\n tabs={tabs}\n newTabHref={newTabHref}\n menu={menu}\n tabContent={tabContent}\n onTabClick={onTabClick}\n ref={footerEl}\n />\n </PreviewShellContext.Provider>\n );\n }\n);\n\nexport default PreviewShell;\n"]}
1
+ {"version":3,"file":"PreviewShell.js","sourceRoot":"","sources":["../../../src/components/PreviewShell/PreviewShell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAsC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEnG,OAAO,EAEL,OAAO,EACP,kBAAkB,EAElB,SAAS,EACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sDAAsD,CAAC;AAE5F,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACzF,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,YAAY,GAAwD,UAAU,CAClF,CACE,EACE,MAAM,EACN,QAAQ,EACR,MAAM,EAAE,EACN,QAAQ,EACR,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,GAAG,eAAe,EACnB,EACkC,EACrC,GAA6B,EAC7B,EAAE;IACF,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC9C,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,SAAS,GAA4B,OAAO,CAChD,GAAG,EAAE,CAAC;QACJ;YACE,KAAK,EAAE,CAAC,CAAC,oBAAoB,CAAC;YAC9B,MAAM,EAAE;gBACN,SAAS,EAAE,CAAC,CAAC,cAAc,CAAC;gBAC5B,QAAQ,EAAE,MAAM;aACjB;SACF;QACD;YACE,KAAK,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;YACxC,MAAM,EAAE;gBACN,SAAS,EAAE,CAAC,CAAC,WAAW,CAA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C,UAAU,IAAC,GAAG,EAAE,GAAG,YAClB,KAAC,sBAAsB,IAAC,QAAQ,EAAE,CAAC,gBAAc,CAAC,CAAC,eAAe,CAAC,YACjE,KAAC,YAAY,IAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,eAAe,CAAC,GAAI,GACnC,GACd,EACb,KAAC,MAAM,OAAK,eAAe,EAAE,GAAG,EAAE,QAAQ,GAAI,IACjB,CAChC,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { forwardRef, PropsWithoutRef, FunctionComponent, useRef, useEffect, useMemo } from 'react';\n\nimport {\n ForwardProps,\n useI18n,\n useTransitionState,\n SkipLinksProps,\n SkipLinks\n} from '@pega/cosmos-react-core';\nimport { expandCollapseStates } from '@pega/cosmos-react-core/lib/hooks/useTransitionState';\n\nimport { StyledIframe, StyledMain, StyledPreviewContainer } from './PreviewShell.styles';\nimport Header from './Header';\nimport { PreviewShellProps } from './PreviewShell.types';\nimport PreviewShellContext from './PreviewShellContext';\nimport Footer from './Footer';\n\nconst PreviewShell: FunctionComponent<PreviewShellProps & ForwardProps> = forwardRef(\n (\n {\n header,\n frameurl,\n footer: {\n expanded,\n onBeforeExpand,\n onAfterExpand,\n onBeforeCollapse,\n onAfterCollapse,\n ...footerRestProps\n }\n }: PropsWithoutRef<PreviewShellProps>,\n ref: PreviewShellProps['ref']\n ) => {\n const footerEl = useRef<HTMLDivElement>(null);\n const t = useI18n();\n const skipLinks: SkipLinksProps['items'] = useMemo(\n () => [\n {\n label: t('go_to_main_content'),\n target: {\n ariaLabel: t('main_content'),\n selector: 'main'\n }\n },\n {\n label: t('go_to_noun', [t('dev_tools')]),\n target: {\n ariaLabel: t('dev_tools'),\n selector: 'footer'\n }\n }\n ],\n [t]\n );\n\n const {\n state: footerState,\n toggle: toggleFooter,\n set: setFooterState\n } = useTransitionState({\n ref: footerEl,\n property: 'height',\n states: expandCollapseStates,\n defaultState: expanded ? expandCollapseStates.high : expandCollapseStates.low\n });\n\n useEffect(() => {\n setFooterState(expanded ? expandCollapseStates.high : expandCollapseStates.low);\n }, [expanded]);\n\n useEffect(() => {\n if (footerState === expandCollapseStates.rising) {\n onBeforeExpand?.();\n } else if (footerState === expandCollapseStates.falling) {\n onBeforeCollapse?.();\n } else if (footerState === expandCollapseStates.low) {\n onAfterCollapse?.();\n } else {\n onAfterExpand?.();\n }\n }, [footerState]);\n\n return (\n <PreviewShellContext.Provider\n value={useMemo(\n () => ({\n footerState,\n toggleFooter\n }),\n [footerState, toggleFooter]\n )}\n >\n <SkipLinks items={skipLinks} />\n <Header {...header} />\n <StyledMain ref={ref}>\n <StyledPreviewContainer tabIndex={0} aria-label={t('preview_frame')}>\n <StyledIframe src={frameurl} title={t('preview_frame')} />\n </StyledPreviewContainer>\n </StyledMain>\n <Footer {...footerRestProps} ref={footerEl} />\n </PreviewShellContext.Provider>\n );\n }\n);\n\nexport default PreviewShell;\n"]}
@@ -7,6 +7,4 @@ export declare const StyledMain: import("styled-components").StyledComponent<"ma
7
7
  export declare const StyledIframe: import("styled-components").StyledComponent<"iframe", import("styled-components").DefaultTheme, {}, never>;
8
8
  export declare const StyledPreviewContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
9
9
  export declare const StyledFooter: import("styled-components").StyledComponent<"footer", import("styled-components").DefaultTheme, {}, never>;
10
- export declare const StyledTabContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
11
- export declare const StyledToolsContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
12
10
  //# sourceMappingURL=PreviewShell.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PreviewShell.styles.d.ts","sourceRoot":"","sources":["../../../src/components/PreviewShell/PreviewShell.styles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAYjE,eAAO,MAAM,YAAY,4GAOvB,CAAC;AAIH,eAAO,MAAM,WAAW,EAAE,OAAO,IAS/B,CAAC;AAIH,eAAO,MAAM,gBAAgB,0QAM3B,CAAC;AAIH,eAAO,MAAM,cAAc,4GAQ1B,CAAC;AAIF,eAAO,MAAM,UAAU,0GAcrB,CAAC;AAIH,eAAO,MAAM,YAAY,4GAIxB,CAAC;AAEF,eAAO,MAAM,sBAAsB,yGAUjC,CAAC;AAIH,eAAO,MAAM,YAAY,4GAKvB,CAAC;AAIH,eAAO,MAAM,kBAAkB,yGAgB7B,CAAC;AAIH,eAAO,MAAM,oBAAoB,yGAsBhC,CAAC"}
1
+ {"version":3,"file":"PreviewShell.styles.d.ts","sourceRoot":"","sources":["../../../src/components/PreviewShell/PreviewShell.styles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAYjE,eAAO,MAAM,YAAY,4GAOvB,CAAC;AAIH,eAAO,MAAM,WAAW,EAAE,OAAO,IAS/B,CAAC;AAIH,eAAO,MAAM,gBAAgB,0QAM3B,CAAC;AAIH,eAAO,MAAM,cAAc,4GAQ1B,CAAC;AAIF,eAAO,MAAM,UAAU,0GAcrB,CAAC;AAIH,eAAO,MAAM,YAAY,4GAIxB,CAAC;AAEF,eAAO,MAAM,sBAAsB,yGAUjC,CAAC;AAIH,eAAO,MAAM,YAAY,4GAsBxB,CAAC"}
@@ -1,9 +1,8 @@
1
1
  import styled, { css } from 'styled-components';
2
2
  import { useContext } from 'react';
3
3
  import { defaultThemeProp, Text } from '@pega/cosmos-react-core';
4
- import { StyledTabs } from '@pega/cosmos-react-core/lib/components/Tabs/Tabs';
5
4
  import BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';
6
- import { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';
5
+ import { StyledToolsContent } from '../DevTools/DevTools.styles';
7
6
  import PreviewShellContext from './PreviewShellContext';
8
7
  import footerexpanded from './utils';
9
8
  const footerExpandedHeight = '50vh';
@@ -77,46 +76,21 @@ export const StyledPreviewContainer = styled.div(({ theme }) => {
77
76
  `;
78
77
  });
79
78
  StyledPreviewContainer.defaultProps = defaultThemeProp;
80
- export const StyledFooter = styled.footer(({ theme }) => {
81
- return css `
82
- background-color: ${theme.base.palette['primary-background']};
83
- overflow: hidden;
84
- `;
85
- });
86
- StyledFooter.defaultProps = defaultThemeProp;
87
- export const StyledTabContainer = styled.div(({ theme }) => {
88
- return css `
89
- height: ${footerOffset};
90
- border-top: 0.0625rem solid ${theme.base.palette['border-line']};
91
- border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};
92
- text-decoration: none;
93
-
94
- & ${StyledTabs} {
95
- height: 100%;
96
- border-bottom: none;
97
-
98
- button {
99
- height: 100%;
100
- }
101
- }
102
- `;
103
- });
104
- StyledTabContainer.defaultProps = defaultThemeProp;
105
- export const StyledToolsContainer = styled.div(({ theme: { base: { animation } } }) => {
79
+ export const StyledFooter = styled.footer(({ theme: { base: { palette, animation } } }) => {
106
80
  const { footerState } = useContext(PreviewShellContext);
107
81
  const containerHeight = footerexpanded(footerState)
108
82
  ? `calc(${footerExpandedHeight} - ${footerOffset})`
109
83
  : 0;
110
84
  return css `
111
- height: ${containerHeight};
112
- padding: 0;
113
- transition: height ${animation.speed} ${animation.timing.ease};
114
- overflow: auto;
85
+ background-color: ${palette['primary-background']};
86
+ overflow: hidden;
87
+ height: auto;
115
88
 
116
- ${StyledTabPanel} {
117
- width: 100%;
89
+ ${StyledToolsContent} {
90
+ height: ${containerHeight};
91
+ transition: height ${animation.speed} ${animation.timing.ease};
118
92
  }
119
93
  `;
120
94
  });
121
- StyledToolsContainer.defaultProps = defaultThemeProp;
95
+ StyledFooter.defaultProps = defaultThemeProp;
122
96
  //# sourceMappingURL=PreviewShell.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PreviewShell.styles.js","sourceRoot":"","sources":["../../../src/components/PreviewShell/PreviewShell.styles.ts"],"names":[],"mappings":"AAAA,OAAO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;IAEN,OAAO,GAAG,CAAA;gBACE,eAAe;;2BAEJ,SAAS,CAAC,KAAK,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI;;;QAG3D,cAAc;;;KAGjB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,oBAAoB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { useContext } from 'react';\n\nimport { defaultThemeProp, Text } from '@pega/cosmos-react-core';\nimport { StyledTabs } from '@pega/cosmos-react-core/lib/components/Tabs/Tabs';\nimport BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';\nimport { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';\n\nimport PreviewShellContext from './PreviewShellContext';\nimport footerexpanded from './utils';\n\nconst footerExpandedHeight = '50vh';\nconst footerOffset = '2.5rem';\nconst headerHeight = '3rem';\n\nexport const StyledHeader = styled.header(({ theme }) => {\n return css`\n height: ${headerHeight};\n padding: 0 calc(2 * ${theme.base.spacing});\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n background-color: ${theme.base.palette['primary-background']};\n `;\n});\n\nStyledHeader.defaultProps = defaultThemeProp;\n\nexport const StyledTitle: typeof Text = styled(Text)(({ theme }) => {\n return css`\n max-width: ${theme.base['content-width'].xs};\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ${theme.base.palette['foreground-color']};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n `;\n});\n\nStyledTitle.defaultProps = defaultThemeProp;\n\nexport const StyledBareButton = styled(BareButton)(({ theme }) => {\n return css`\n &:not([disabled]):focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `;\n});\n\nStyledBareButton.defaultProps = defaultThemeProp;\n\nexport const StyledOperator = styled.button(\n ({ theme }) => css`\n border-radius: 50%;\n\n :focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `\n);\n\nStyledOperator.defaultProps = defaultThemeProp;\n\nexport const StyledMain = styled.main(({ theme }) => {\n const { footerState } = useContext(PreviewShellContext);\n const heightDelta = footerexpanded(footerState)\n ? `${footerExpandedHeight} - ${headerHeight}`\n : `${footerOffset} - ${headerHeight}`;\n\n return css`\n height: calc(100vh - ${heightDelta});\n transition: height ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n width: 100%;\n padding: calc(2 * ${theme.base.spacing});\n background-color: ${theme.base.colors.slate.medium};\n overflow: hidden;\n `;\n});\n\nStyledMain.defaultProps = defaultThemeProp;\n\nexport const StyledIframe = styled.iframe`\n width: 100%;\n height: 100%;\n border: none;\n`;\n\nexport const StyledPreviewContainer = styled.div(({ theme }) => {\n return css`\n height: 100%;\n width: 100%;\n &:focus,\n &:focus-visible {\n box-shadow: ${theme.base.shadow.focus};\n outline: none;\n }\n `;\n});\n\nStyledPreviewContainer.defaultProps = defaultThemeProp;\n\nexport const StyledFooter = styled.footer(({ theme }) => {\n return css`\n background-color: ${theme.base.palette['primary-background']};\n overflow: hidden;\n `;\n});\n\nStyledFooter.defaultProps = defaultThemeProp;\n\nexport const StyledTabContainer = styled.div(({ theme }) => {\n return css`\n height: ${footerOffset};\n border-top: 0.0625rem solid ${theme.base.palette['border-line']};\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n text-decoration: none;\n\n & ${StyledTabs} {\n height: 100%;\n border-bottom: none;\n\n button {\n height: 100%;\n }\n }\n `;\n});\n\nStyledTabContainer.defaultProps = defaultThemeProp;\n\nexport const StyledToolsContainer = styled.div(\n ({\n theme: {\n base: { animation }\n }\n }) => {\n const { footerState } = useContext(PreviewShellContext);\n const containerHeight = footerexpanded(footerState)\n ? `calc(${footerExpandedHeight} - ${footerOffset})`\n : 0;\n\n return css`\n height: ${containerHeight};\n padding: 0;\n transition: height ${animation.speed} ${animation.timing.ease};\n overflow: auto;\n\n ${StyledTabPanel} {\n width: 100%;\n }\n `;\n }\n);\n\nStyledToolsContainer.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"PreviewShell.styles.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,CAAC,MAAM,CAAA;;;;CAIxC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7D,OAAO,GAAG,CAAA;;;;;oBAKQ,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;;;GAGxC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,sBAAsB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEvD,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CACvC,CAAC,EACC,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAC7B,EACF,EAAE,EAAE;IACH,MAAM,EAAE,WAAW,EAAE,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IACxD,MAAM,eAAe,GAAG,cAAc,CAAC,WAAW,CAAC;QACjD,CAAC,CAAC,QAAQ,oBAAoB,MAAM,YAAY,GAAG;QACnD,CAAC,CAAC,CAAC,CAAC;IAEN,OAAO,GAAG,CAAA;0BACY,OAAO,CAAC,oBAAoB,CAAC;;;;QAI/C,kBAAkB;kBACR,eAAe;6BACJ,SAAS,CAAC,KAAK,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI;;KAEhE,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,YAAY,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { useContext } from 'react';\n\nimport { defaultThemeProp, Text } from '@pega/cosmos-react-core';\nimport BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';\n\nimport { StyledToolsContent } from '../DevTools/DevTools.styles';\n\nimport PreviewShellContext from './PreviewShellContext';\nimport footerexpanded from './utils';\n\nconst footerExpandedHeight = '50vh';\nconst footerOffset = '2.5rem';\nconst headerHeight = '3rem';\n\nexport const StyledHeader = styled.header(({ theme }) => {\n return css`\n height: ${headerHeight};\n padding: 0 calc(2 * ${theme.base.spacing});\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n background-color: ${theme.base.palette['primary-background']};\n `;\n});\n\nStyledHeader.defaultProps = defaultThemeProp;\n\nexport const StyledTitle: typeof Text = styled(Text)(({ theme }) => {\n return css`\n max-width: ${theme.base['content-width'].xs};\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ${theme.base.palette['foreground-color']};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n `;\n});\n\nStyledTitle.defaultProps = defaultThemeProp;\n\nexport const StyledBareButton = styled(BareButton)(({ theme }) => {\n return css`\n &:not([disabled]):focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `;\n});\n\nStyledBareButton.defaultProps = defaultThemeProp;\n\nexport const StyledOperator = styled.button(\n ({ theme }) => css`\n border-radius: 50%;\n\n :focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `\n);\n\nStyledOperator.defaultProps = defaultThemeProp;\n\nexport const StyledMain = styled.main(({ theme }) => {\n const { footerState } = useContext(PreviewShellContext);\n const heightDelta = footerexpanded(footerState)\n ? `${footerExpandedHeight} - ${headerHeight}`\n : `${footerOffset} - ${headerHeight}`;\n\n return css`\n height: calc(100vh - ${heightDelta});\n transition: height ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n width: 100%;\n padding: calc(2 * ${theme.base.spacing});\n background-color: ${theme.base.colors.slate.medium};\n overflow: hidden;\n `;\n});\n\nStyledMain.defaultProps = defaultThemeProp;\n\nexport const StyledIframe = styled.iframe`\n width: 100%;\n height: 100%;\n border: none;\n`;\n\nexport const StyledPreviewContainer = styled.div(({ theme }) => {\n return css`\n height: 100%;\n width: 100%;\n &:focus,\n &:focus-visible {\n box-shadow: ${theme.base.shadow.focus};\n outline: none;\n }\n `;\n});\n\nStyledPreviewContainer.defaultProps = defaultThemeProp;\n\nexport const StyledFooter = styled.footer(\n ({\n theme: {\n base: { palette, animation }\n }\n }) => {\n const { footerState } = useContext(PreviewShellContext);\n const containerHeight = footerexpanded(footerState)\n ? `calc(${footerExpandedHeight} - ${footerOffset})`\n : 0;\n\n return css`\n background-color: ${palette['primary-background']};\n overflow: hidden;\n height: auto;\n\n ${StyledToolsContent} {\n height: ${containerHeight};\n transition: height ${animation.speed} ${animation.timing.ease};\n }\n `;\n }\n);\n\nStyledFooter.defaultProps = defaultThemeProp;\n"]}
@@ -1,6 +1,7 @@
1
- import { MouseEvent, ReactNode, Ref } from 'react';
2
- import { AppShellProps, AvatarProps, BaseProps, LinkProps, MenuProps, NoChildrenProp, OmitStrict, StatusProps, Tab } from '@pega/cosmos-react-core';
1
+ import { MouseEvent, Ref } from 'react';
2
+ import { AppShellProps, AvatarProps, BaseProps, MenuProps, NoChildrenProp, OmitStrict, StatusProps } from '@pega/cosmos-react-core';
3
3
  import { AppInfoProps } from '@pega/cosmos-react-core/lib/components/AppShell/AppShell.types';
4
+ import { DevToolsProps } from '../DevTools';
4
5
  interface OperatorProps extends OmitStrict<AppShellProps['operator'], 'avatar'> {
5
6
  avatar: AvatarProps;
6
7
  }
@@ -12,22 +13,12 @@ export interface HeaderProps extends BaseProps, NoChildrenProp, Pick<AppInfoProp
12
13
  /** Ref for the header */
13
14
  ref?: Ref<HTMLDivElement>;
14
15
  }
15
- export interface FooterProps {
16
+ export interface FooterProps extends OmitStrict<DevToolsProps, 'utils'> {
16
17
  /**
17
18
  * If true, the footer will be expanded.
18
19
  * @default false
19
20
  */
20
21
  expanded?: boolean;
21
- /** An array of Tab data used to render the individual footer tabs.
22
- * @default []
23
- */
24
- tabs: Tab[];
25
- /** Content for the tabs. */
26
- tabContent: ReactNode;
27
- /** Callback triggered every time a new tab is clicked and returns an id as well as the click event. */
28
- onTabClick: (id: string, event?: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
29
- /** URL to open footer in a new window. */
30
- newTabHref?: LinkProps['href'];
31
22
  /** Menu items to be shown on more options button */
32
23
  menu?: MenuProps;
33
24
  /** Callback fired before footer expands. */
@@ -38,8 +29,8 @@ export interface FooterProps {
38
29
  onBeforeCollapse?: () => void;
39
30
  /** Callback fired after footer collapses. */
40
31
  onAfterCollapse?: () => void;
41
- /** Ref for the footer */
42
- ref?: Ref<HTMLDivElement>;
32
+ /** Callback to open footer in a new window. */
33
+ onNewWindowClick?: (e?: MouseEvent<HTMLButtonElement>) => void;
43
34
  }
44
35
  export interface PreviewShellProps {
45
36
  /** Header of the shell */
@@ -1 +1 @@
1
- {"version":3,"file":"PreviewShell.types.d.ts","sourceRoot":"","sources":["../../../src/components/PreviewShell/PreviewShell.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EACL,aAAa,EACb,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EACT,cAAc,EACd,UAAU,EACV,WAAW,EACX,GAAG,EACJ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,gEAAgE,CAAC;AAE9F,UAAU,aAAc,SAAQ,UAAU,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC;IAC7E,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,WACf,SAAQ,SAAS,EACf,cAAc,EACd,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IACpD,uDAAuD;IACvD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,0CAA0C;IAC1C,QAAQ,EAAE,aAAa,CAAC;IACxB,yBAAyB;IACzB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,8BAA8B;IAC9B,UAAU,EAAE,SAAS,CAAC;IACtB,uGAAuG;IACvG,UAAU,EAAE,C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;IAC7E,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,WACf,SAAQ,SAAS,EACf,cAAc,EACd,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IACpD,uDAAuD;IACvD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,0CAA0C;IAC1C,QAAQ,EAAE,aAAa,CAAC;IACxB,yBAAyB;IACzB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,WAAY,SAAQ,UAAU,CAAC,aAAa,EAAE,OAAO,CAAC;IACrE;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oDAAoD;IACpD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,8CAA8C;IAC9C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,6CAA6C;IAC7C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,+CAA+C;IAC/C,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,8CAA8C;IAC9C,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,+CAA+C;IAC/C,gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAChE;AAED,MAAM,WAAW,iBAAiB;IAChC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC;IACpB,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC;IACpB,wBAAwB;IACxB,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CACxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"PreviewShell.types.js","sourceRoot":"","sources":["../../../src/components/PreviewShell/PreviewShell.types.ts"],"names":[],"mappings":"","sourcesContent":["import { MouseEvent, ReactNode, Ref } from 'react';\n\nimport {\n AppShellProps,\n AvatarProps,\n BaseProps,\n LinkProps,\n MenuProps,\n NoChildrenProp,\n OmitStrict,\n StatusProps,\n Tab\n} from '@pega/cosmos-react-core';\nimport { AppInfoProps } from '@pega/cosmos-react-core/lib/components/AppShell/AppShell.types';\n\ninterface OperatorProps extends OmitStrict<AppShellProps['operator'], 'avatar'> {\n avatar: AvatarProps;\n}\n\nexport interface HeaderProps\n extends BaseProps,\n NoChildrenProp,\n Pick<AppInfoProps, 'appName' | 'href' | 'onClick'> {\n /** Represents the current status of the application */\n status?: StatusProps;\n /** The active user of the application. */\n operator: OperatorProps;\n /** Ref for the header */\n ref?: Ref<HTMLDivElement>;\n}\n\nexport interface FooterProps {\n /**\n * If true, the footer will be expanded.\n * @default false\n */\n expanded?: boolean;\n /** An array of Tab data used to render the individual footer tabs.\n * @default []\n */\n tabs: Tab[];\n /** Content for the tabs. */\n tabContent: ReactNode;\n /** Callback triggered every time a new tab is clicked and returns an id as well as the click event. */\n onTabClick: (id: string, event?: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;\n /** URL to open footer in a new window. */\n newTabHref?: LinkProps['href'];\n /** Menu items to be shown on more options button */\n menu?: MenuProps;\n /** Callback fired before footer expands. */\n onBeforeExpand?: () => void;\n /** Callback fired after footer expands. */\n onAfterExpand?: () => void;\n /** Callback fired before footer collapses. */\n onBeforeCollapse?: () => void;\n /** Callback fired after footer collapses. */\n onAfterCollapse?: () => void;\n /** Ref for the footer */\n ref?: Ref<HTMLDivElement>;\n}\n\nexport interface PreviewShellProps {\n /** Header of the shell */\n header: HeaderProps;\n /** src for the main content iframe */\n frameurl: string;\n /** Footer of the shell */\n footer: FooterProps;\n /** Ref for the shell */\n ref?: Ref<HTMLElement>;\n}\n"]}
1
+ {"version":3,"file":"PreviewShell.types.js","sourceRoot":"","sources":["../../../src/components/PreviewShell/PreviewShell.types.ts"],"names":[],"mappings":"","sourcesContent":["import { MouseEvent, Ref } from 'react';\n\nimport {\n AppShellProps,\n AvatarProps,\n BaseProps,\n MenuProps,\n NoChildrenProp,\n OmitStrict,\n StatusProps\n} from '@pega/cosmos-react-core';\nimport { AppInfoProps } from '@pega/cosmos-react-core/lib/components/AppShell/AppShell.types';\n\nimport { DevToolsProps } from '../DevTools';\n\ninterface OperatorProps extends OmitStrict<AppShellProps['operator'], 'avatar'> {\n avatar: AvatarProps;\n}\n\nexport interface HeaderProps\n extends BaseProps,\n NoChildrenProp,\n Pick<AppInfoProps, 'appName' | 'href' | 'onClick'> {\n /** Represents the current status of the application */\n status?: StatusProps;\n /** The active user of the application. */\n operator: OperatorProps;\n /** Ref for the header */\n ref?: Ref<HTMLDivElement>;\n}\n\nexport interface FooterProps extends OmitStrict<DevToolsProps, 'utils'> {\n /**\n * If true, the footer will be expanded.\n * @default false\n */\n expanded?: boolean;\n /** Menu items to be shown on more options button */\n menu?: MenuProps;\n /** Callback fired before footer expands. */\n onBeforeExpand?: () => void;\n /** Callback fired after footer expands. */\n onAfterExpand?: () => void;\n /** Callback fired before footer collapses. */\n onBeforeCollapse?: () => void;\n /** Callback fired after footer collapses. */\n onAfterCollapse?: () => void;\n /** Callback to open footer in a new window. */\n onNewWindowClick?: (e?: MouseEvent<HTMLButtonElement>) => void;\n}\n\nexport interface PreviewShellProps {\n /** Header of the shell */\n header: HeaderProps;\n /** src for the main content iframe */\n frameurl: string;\n /** Footer of the shell */\n footer: FooterProps;\n /** Ref for the shell */\n ref?: Ref<HTMLElement>;\n}\n"]}
package/lib/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  export { default as Clipboard } from './components/Clipboard';
2
2
  export * from './components/Clipboard';
3
+ export { default as DevTools } from './components/DevTools';
4
+ export * from './components/DevTools';
3
5
  export { default as PreviewShell } from './components/PreviewShell';
4
6
  export * from './components/PreviewShell';
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC"}
package/lib/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  // This file is autogenerated. Any changes will be overwritten.
2
2
  export { default as Clipboard } from './components/Clipboard';
3
3
  export * from './components/Clipboard';
4
+ export { default as DevTools } from './components/DevTools';
5
+ export * from './components/DevTools';
4
6
  export { default as PreviewShell } from './components/PreviewShell';
5
7
  export * from './components/PreviewShell';
6
8
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport { default as Clipboard } from './components/Clipboard';\nexport * from './components/Clipboard';\nexport { default as PreviewShell } from './components/PreviewShell';\nexport * from './components/PreviewShell';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport { default as Clipboard } from './components/Clipboard';\nexport * from './components/Clipboard';\nexport { default as DevTools } from './components/DevTools';\nexport * from './components/DevTools';\nexport { default as PreviewShell } from './components/PreviewShell';\nexport * from './components/PreviewShell';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-tools",
3
- "version": "3.0.0-dev.28.0",
3
+ "version": "3.0.0-dev.29.0",
4
4
  "author": "Pegasystems",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -20,7 +20,7 @@
20
20
  "build": "tsc -b"
21
21
  },
22
22
  "dependencies": {
23
- "@pega/cosmos-react-core": "3.0.0-dev.28.0",
23
+ "@pega/cosmos-react-core": "3.0.0-dev.29.0",
24
24
  "@types/react": "^16.14.24 || ^17.0.38",
25
25
  "@types/react-dom": "^16.9.14 || ^17.0.11",
26
26
  "@types/styled-components": "^5.1.7",