@pega/cosmos-react-build 9.0.0-build.2.9 → 9.0.0-build.3.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.
- package/lib/components/AuthoringPanel/AuthoringPanel.d.ts.map +1 -1
- package/lib/components/AuthoringPanel/AuthoringPanel.js +25 -6
- package/lib/components/AuthoringPanel/AuthoringPanel.js.map +1 -1
- package/lib/components/AuthoringPanel/AuthoringPanel.styles.d.ts +1 -0
- package/lib/components/AuthoringPanel/AuthoringPanel.styles.d.ts.map +1 -1
- package/lib/components/AuthoringPanel/AuthoringPanel.styles.js +39 -4
- package/lib/components/AuthoringPanel/AuthoringPanel.styles.js.map +1 -1
- package/lib/components/AuthoringPanel/AuthoringPanel.types.d.ts +6 -2
- package/lib/components/AuthoringPanel/AuthoringPanel.types.d.ts.map +1 -1
- package/lib/components/AuthoringPanel/AuthoringPanel.types.js.map +1 -1
- package/lib/components/AuthoringPanel/AuthoringPanelHeader.d.ts +1 -1
- package/lib/components/AuthoringPanel/AuthoringPanelHeader.d.ts.map +1 -1
- package/lib/components/AuthoringPanel/AuthoringPanelHeader.js +8 -3
- package/lib/components/AuthoringPanel/AuthoringPanelHeader.js.map +1 -1
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.d.ts.map +1 -1
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.js +2 -2
- package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.js.map +1 -1
- package/lib/components/PageTemplates/PageTemplate.types.d.ts +2 -0
- package/lib/components/PageTemplates/PageTemplate.types.d.ts.map +1 -1
- package/lib/components/PageTemplates/PageTemplate.types.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthoringPanel.d.ts","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthoringPanel.d.ts","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAU/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;;;;AAmJlE,wBAAqE"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
2
|
-
import { useEffect, forwardRef, useRef } from 'react';
|
|
3
|
-
import { Icon, Button, Flex, useTestIds, withTestIds, OneColumnPage, useConsolidatedRef, useI18n, Progress, useEscape } from '@pega/cosmos-react-core';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, forwardRef, useRef, useContext } from 'react';
|
|
3
|
+
import { Icon, Button, Flex, useTestIds, withTestIds, OneColumnPage, useConsolidatedRef, useI18n, Progress, useEscape, useDirection, AppShellContext, useBreakpoint, useFocusTrap, ErrorState, Drawer } from '@pega/cosmos-react-core';
|
|
4
|
+
import { resizeDrawerDefaultWidth } from '@pega/cosmos-react-core/lib/styles/constants';
|
|
4
5
|
import { getAuthoringPanelTestIds } from './AuthoringPanel.test-ids';
|
|
5
|
-
import { StyledPanelPage, StyledAuthoringPanel, StyledProgressContainer } from './AuthoringPanel.styles';
|
|
6
|
+
import { StyledPanelPage, StyledAuthoringPanel, StyledProgressContainer, StyledPreviewDrawer } from './AuthoringPanel.styles';
|
|
6
7
|
import AuthoringPanelHeader from './AuthoringPanelHeader';
|
|
7
|
-
const AuthoringPanel = forwardRef(({ testId, content, header, open, onDismiss, progress, actions, target }, ref) => {
|
|
8
|
+
const AuthoringPanel = forwardRef(({ testId, content, header, open, onDismiss, progress, actions, target, error, onErrorRetry }, ref) => {
|
|
8
9
|
const contentRef = useConsolidatedRef(ref);
|
|
9
10
|
const dismissButtonRef = useRef(null);
|
|
10
11
|
const t = useI18n();
|
|
11
12
|
const testIds = useTestIds(testId, getAuthoringPanelTestIds);
|
|
13
|
+
const previewRef = useConsolidatedRef(ref);
|
|
14
|
+
const direction = useDirection();
|
|
15
|
+
const { setPreviewActive } = useContext(AppShellContext);
|
|
16
|
+
const isSmallOrAbove = useBreakpoint('sm');
|
|
12
17
|
useEffect(() => {
|
|
13
18
|
if (open && dismissButtonRef.current && !progress) {
|
|
14
19
|
dismissButtonRef.current.focus();
|
|
@@ -24,7 +29,21 @@ const AuthoringPanel = forwardRef(({ testId, content, header, open, onDismiss, p
|
|
|
24
29
|
dismissPanel();
|
|
25
30
|
}
|
|
26
31
|
});
|
|
27
|
-
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (open) {
|
|
34
|
+
setPreviewActive(true);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
setPreviewActive(false);
|
|
38
|
+
}
|
|
39
|
+
}, [open]);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
return () => {
|
|
42
|
+
setPreviewActive(false);
|
|
43
|
+
};
|
|
44
|
+
}, []);
|
|
45
|
+
useFocusTrap(previewRef, true, [], false);
|
|
46
|
+
return (_jsx(Drawer, { "data-testid": testIds.root, as: StyledPreviewDrawer, role: 'complementary', forwardedAs: Flex, container: { direction: 'column' }, ref: previewRef, open: open && isSmallOrAbove, position: 'fixed', placement: direction.end, "aria-label": t('preview_of_noun', [header.primary.title]), shadow: true, nullWhenClosed: true, resizeable: true, size: resizeDrawerDefaultWidth, children: open && (_jsx(Flex, { item: { shrink: 0 }, as: StyledAuthoringPanel, open: open, "aria-label": header.primary, children: progress ? (_jsxs(Flex, { container: { direction: 'column' }, as: StyledProgressContainer, children: [onDismiss && (_jsx(Flex, { container: { justify: 'end' }, children: _jsx(Button, { "data-testid": testIds.dismiss, icon: true, variant: 'simple', compact: true, ref: dismissButtonRef, label: t('dismiss_label_a11y', ['panel']), onClick: dismissPanel, children: _jsx(Icon, { name: 'times' }) }) })), _jsx(Progress, { "data-testid": testIds.progress, visible: !!progress, focusOnVisible: true, placement: 'local', message: typeof progress === 'string' ? progress : undefined })] })) : (_jsx(Flex, { container: { gap: 1 }, as: OneColumnPage, ref: contentRef, title: header.primary.title, forwardedAs: StyledPanelPage, header: _jsx(AuthoringPanelHeader, { header: header, actions: actions, onDismiss: dismissPanel, dismissButtonRef: dismissButtonRef, testId: testId, error: error }), scrollContent: true, a: error ? (_jsx(ErrorState, { message: t('preview_error'), onRetry: onErrorRetry })) : (content) })) })) }));
|
|
28
47
|
});
|
|
29
48
|
export default withTestIds(AuthoringPanel, getAuthoringPanelTestIds);
|
|
30
49
|
//# sourceMappingURL=AuthoringPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthoringPanel.js","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AuthoringPanel.js","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlE,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,UAAU,EACV,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,OAAO,EACP,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,eAAe,EACf,aAAa,EACb,YAAY,EACZ,UAAU,EACV,MAAM,EACP,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAExF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,oBAAoB,MAAM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AQ,EAChB,OAAO,QACP,GAAG,EAAE,gBAAgB,EACrB,KAAK,EAAE,CAAC,CAAC,oBAAoB,EAAE,CAAC,OAAO,CAAC,CAAC,EACzC,OAAO,EAAE,YAAY,YAErB,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,GACd,GACJ,CACR,EAED,KAAC,QAAQ,mBACM,OAAO,CAAC,QAAQ,EAC7B,OAAO,EAAE,CAAC,CAAC,QAAQ,EACnB,cAAc,QACd,SAAS,EAAC,OAAO,EACjB,OAAO,EAAE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,GAC5D,IACG,CACR,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,EACrB,EAAE,EAAE,aAAa,EACjB,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,EAC3B,WAAW,EAAE,eAAe,EAC5B,MAAM,EACJ,KAAC,oBAAoB,IACnB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,YAAY,EACvB,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,GACZ,EAEJ,aAAa,QACb,CAAC,EACC,KAAK,CAAC,CAAC,CAAC,CACN,KAAC,UAAU,IAAC,OAAO,EAAE,CAAC,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,YAAY,GAAI,CACnE,CAAC,CAAC,CAAC,CACF,OAAO,CACR,GAEH,CACH,GACI,CACR,GACM,CACV,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { useEffect, forwardRef, useRef, useContext } from 'react';\nimport type { PropsWithoutRef, RefObject } from 'react';\n\nimport {\n Icon,\n Button,\n Flex,\n useTestIds,\n withTestIds,\n OneColumnPage,\n useConsolidatedRef,\n useI18n,\n Progress,\n useEscape,\n useDirection,\n AppShellContext,\n useBreakpoint,\n useFocusTrap,\n ErrorState,\n Drawer\n} from '@pega/cosmos-react-core';\nimport type { ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';\nimport { resizeDrawerDefaultWidth } from '@pega/cosmos-react-core/lib/styles/constants';\n\nimport { getAuthoringPanelTestIds } from './AuthoringPanel.test-ids';\nimport {\n StyledPanelPage,\n StyledAuthoringPanel,\n StyledProgressContainer,\n StyledPreviewDrawer\n} from './AuthoringPanel.styles';\nimport type { AuthoringPanelProps } from './AuthoringPanel.types';\nimport AuthoringPanelHeader from './AuthoringPanelHeader';\n\nconst AuthoringPanel: ForwardRefForwardPropsComponent<AuthoringPanelProps> = forwardRef(\n (\n {\n testId,\n content,\n header,\n open,\n onDismiss,\n progress,\n actions,\n target,\n error,\n onErrorRetry\n }: PropsWithoutRef<AuthoringPanelProps>,\n ref: AuthoringPanelProps['ref']\n ) => {\n const contentRef = useConsolidatedRef<HTMLDivElement>(ref);\n const dismissButtonRef: RefObject<HTMLButtonElement> = useRef<HTMLButtonElement>(null);\n const t = useI18n();\n const testIds = useTestIds(testId, getAuthoringPanelTestIds);\n const previewRef = useConsolidatedRef(ref);\n const direction = useDirection();\n\n const { setPreviewActive } = useContext(AppShellContext);\n const isSmallOrAbove = useBreakpoint('sm');\n\n useEffect(() => {\n if (open && dismissButtonRef.current && !progress) {\n dismissButtonRef.current.focus();\n }\n }, [open, progress]);\n\n const dismissPanel = () => {\n if (onDismiss) {\n onDismiss(target);\n }\n };\n\n useEscape(() => {\n if (open && onDismiss) {\n dismissPanel();\n }\n });\n\n useEffect(() => {\n if (open) {\n setPreviewActive(true);\n } else {\n setPreviewActive(false);\n }\n }, [open]);\n\n useEffect(() => {\n return () => {\n setPreviewActive(false);\n };\n }, []);\n\n useFocusTrap(previewRef, true, [], false);\n\n return (\n <Drawer\n data-testid={testIds.root}\n as={StyledPreviewDrawer}\n role='complementary'\n forwardedAs={Flex}\n container={{ direction: 'column' }}\n ref={previewRef}\n open={open && isSmallOrAbove}\n position='fixed'\n placement={direction.end}\n aria-label={t('preview_of_noun', [header.primary.title])}\n shadow\n nullWhenClosed\n resizeable\n size={resizeDrawerDefaultWidth}\n >\n {open && (\n <Flex\n item={{ shrink: 0 }}\n as={StyledAuthoringPanel}\n open={open}\n aria-label={header.primary}\n >\n {progress ? (\n <Flex container={{ direction: 'column' }} as={StyledProgressContainer}>\n {onDismiss && (\n <Flex container={{ justify: 'end' }}>\n <Button\n data-testid={testIds.dismiss}\n icon\n variant='simple'\n compact\n ref={dismissButtonRef}\n label={t('dismiss_label_a11y', ['panel'])}\n onClick={dismissPanel}\n >\n <Icon name='times' />\n </Button>\n </Flex>\n )}\n\n <Progress\n data-testid={testIds.progress}\n visible={!!progress}\n focusOnVisible\n placement='local'\n message={typeof progress === 'string' ? progress : undefined}\n />\n </Flex>\n ) : (\n <Flex\n container={{ gap: 1 }}\n as={OneColumnPage}\n ref={contentRef}\n title={header.primary.title}\n forwardedAs={StyledPanelPage}\n header={\n <AuthoringPanelHeader\n header={header}\n actions={actions}\n onDismiss={dismissPanel}\n dismissButtonRef={dismissButtonRef}\n testId={testId}\n error={error}\n />\n }\n scrollContent\n a={\n error ? (\n <ErrorState message={t('preview_error')} onRetry={onErrorRetry} />\n ) : (\n content\n )\n }\n />\n )}\n </Flex>\n )}\n </Drawer>\n );\n }\n);\n\nexport default withTestIds(AuthoringPanel, getAuthoringPanelTestIds);\n"]}
|
|
@@ -14,4 +14,5 @@ export declare const StyledPrimaryTextLink: import("styled-components").StyledCo
|
|
|
14
14
|
}, import("styled-components").DefaultTheme, {}, never>;
|
|
15
15
|
export declare const StyledTitlesContainer: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").FlexProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
16
16
|
export declare const StyledPrimaryContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
17
|
+
export declare const StyledPreviewDrawer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
17
18
|
//# sourceMappingURL=AuthoringPanel.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthoringPanel.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthoringPanel.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.styles.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,eAAO,MAAM,eAAe,yGAsB1B,CAAC;AAGH,eAAO,MAAM,oBAAoB,wIAchC,CAAC;AAGF,eAAO,MAAM,mBAAmB,kNAE/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,kNAEhC,CAAC;AAEF,eAAO,MAAM,uBAAuB,yGAQlC,CAAC;AAGH,eAAO,MAAM,aAAa,kNAIzB,CAAC;AAEF,eAAO,MAAM,sBAAsB;YAA0B,OAAO;SAalE,CAAC;AAGH,eAAO,MAAM,uBAAuB,oNAYlC,CAAC;AAGH,eAAO,MAAM,qBAAqB;2BAvChB,CAAC;uDAkDjB,CAAC;AAGH,eAAO,MAAM,qBAAqB,kNAEjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,yGAIjC,CAAC;AAGH,eAAO,MAAM,mBAAmB,yGAsB9B,CAAC"}
|
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import { Button, Text, StyledPageHeader, Link, defaultThemeProp, StyledButton, StyledVisual, Flex } from '@pega/cosmos-react-core';
|
|
2
|
+
import { Button, Text, StyledPageHeader, Link, defaultThemeProp, StyledButton, StyledVisual, Flex, readableHue } from '@pega/cosmos-react-core';
|
|
3
3
|
import { ellipsisOverflow } from '@pega/cosmos-react-core/lib/styles/mixins';
|
|
4
|
+
import { StyledRegions } from '@pega/cosmos-react-core/lib/components/PageTemplates/PageTemplates';
|
|
5
|
+
import { resizeDrawerMaxWidth, resizeDrawerMinWidth } from '@pega/cosmos-react-core/lib/styles/constants';
|
|
4
6
|
import { StyledPage } from '../PageTemplates/PageTemplates';
|
|
5
7
|
export const StyledPanelPage = styled(StyledPage)(({ theme }) => {
|
|
6
|
-
const { spacing
|
|
8
|
+
const { spacing } = theme.base;
|
|
7
9
|
return css `
|
|
8
10
|
width: 100%;
|
|
11
|
+
|
|
9
12
|
${StyledPageHeader} {
|
|
10
|
-
border-bottom: solid calc(0.125 * ${spacing}) ${palette['border-line']};
|
|
11
13
|
padding: calc(2 * ${spacing});
|
|
14
|
+
padding-block-end: 0;
|
|
12
15
|
}
|
|
13
16
|
${StyledVisual} {
|
|
14
17
|
align-self: start;
|
|
15
18
|
}
|
|
19
|
+
|
|
20
|
+
${StyledRegions} {
|
|
21
|
+
padding: 0;
|
|
22
|
+
|
|
23
|
+
& ${StyledPageHeader} {
|
|
24
|
+
border-bottom: none;
|
|
25
|
+
padding-block: 0;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
16
28
|
`;
|
|
17
29
|
});
|
|
18
30
|
StyledPanelPage.defaultProps = defaultThemeProp;
|
|
@@ -22,7 +34,6 @@ export const StyledAuthoringPanel = styled.div(({ open, theme }) => {
|
|
|
22
34
|
return css `
|
|
23
35
|
height: calc(100vh - 3rem);
|
|
24
36
|
position: relative;
|
|
25
|
-
width: calc(${theme.base['content-width'].md} - 10ch);
|
|
26
37
|
border-inline-start: solid calc(0.125 * ${spacing}) ${palette['border-line']};
|
|
27
38
|
transition-property: transform, opacity;
|
|
28
39
|
transition-duration: calc(2 * ${animation.speed});
|
|
@@ -90,4 +101,28 @@ export const StyledPrimaryContainer = styled.div(({ theme }) => {
|
|
|
90
101
|
`;
|
|
91
102
|
});
|
|
92
103
|
StyledPrimaryContainer.defaultProps = defaultThemeProp;
|
|
104
|
+
export const StyledPreviewDrawer = styled.div(({ theme }) => {
|
|
105
|
+
return css `
|
|
106
|
+
min-width: ${resizeDrawerMinWidth};
|
|
107
|
+
max-width: ${resizeDrawerMaxWidth};
|
|
108
|
+
width: var(--resize-drawer-width);
|
|
109
|
+
background-color: ${theme.base.palette['app-background']};
|
|
110
|
+
height: calc(100vh - var(--appshell-offset, 0rem));
|
|
111
|
+
top: var(--appshell-offset, 0);
|
|
112
|
+
z-index: calc(${theme.base['z-index'].drawer} + 500);
|
|
113
|
+
transition-property: transform, box-shadow, opacity, border-inline-start;
|
|
114
|
+
transition-duration: max(${theme.base.animation.speed}, 0.0001s);
|
|
115
|
+
transition-timing-function: ${theme.base.animation.timing.ease};
|
|
116
|
+
|
|
117
|
+
@media (min-width: ${theme.base.breakpoints.xl}) {
|
|
118
|
+
box-shadow: none;
|
|
119
|
+
border-inline-start: 0.0625rem solid
|
|
120
|
+
${readableHue(theme.base.palette['border-line'], theme.base.palette['app-background'], {
|
|
121
|
+
mode: 'both',
|
|
122
|
+
level: 'AANonText'
|
|
123
|
+
})};
|
|
124
|
+
}
|
|
125
|
+
`;
|
|
126
|
+
});
|
|
127
|
+
StyledPreviewDrawer.defaultProps = defaultThemeProp;
|
|
93
128
|
//# sourceMappingURL=AuthoringPanel.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthoringPanel.styles.js","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,MAAM,EACN,IAAI,EACJ,gBAAgB,EAChB,IAAI,EACJ,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,IAAI,
|
|
1
|
+
{"version":3,"file":"AuthoringPanel.styles.js","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.styles.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AI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE;QACrF,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,WAAW;KACnB,CAAC;;GAEP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,mBAAmB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport {\n Button,\n Text,\n StyledPageHeader,\n Link,\n defaultThemeProp,\n StyledButton,\n StyledVisual,\n Flex,\n readableHue\n} from '@pega/cosmos-react-core';\nimport { ellipsisOverflow } from '@pega/cosmos-react-core/lib/styles/mixins';\nimport { StyledRegions } from '@pega/cosmos-react-core/lib/components/PageTemplates/PageTemplates';\nimport {\n resizeDrawerMaxWidth,\n resizeDrawerMinWidth\n} from '@pega/cosmos-react-core/lib/styles/constants';\n\nimport { StyledPage } from '../PageTemplates/PageTemplates';\n\nimport type { AuthoringPanelProps } from './AuthoringPanel.types';\n\nexport const StyledPanelPage = styled(StyledPage)(({ theme }) => {\n const { spacing } = theme.base;\n return css`\n width: 100%;\n\n ${StyledPageHeader} {\n padding: calc(2 * ${spacing});\n padding-block-end: 0;\n }\n ${StyledVisual} {\n align-self: start;\n }\n\n ${StyledRegions} {\n padding: 0;\n\n & ${StyledPageHeader} {\n border-bottom: none;\n padding-block: 0;\n }\n }\n `;\n});\nStyledPanelPage.defaultProps = defaultThemeProp;\n\nexport const StyledAuthoringPanel = styled.div<Pick<AuthoringPanelProps, 'open'>>(\n ({ open, theme }) => {\n const { animation, palette, spacing } = theme.base;\n const translate = open ? 0 : '100%';\n return css`\n height: calc(100vh - 3rem);\n position: relative;\n border-inline-start: solid calc(0.125 * ${spacing}) ${palette['border-line']};\n transition-property: transform, opacity;\n transition-duration: calc(2 * ${animation.speed});\n transition-timing-function: ${animation.timing.ease};\n transform: ${open ? 'none' : `translateX(${translate})`};\n `;\n }\n);\nStyledAuthoringPanel.defaultProps = defaultThemeProp;\n\nexport const StyledHeaderContent = styled(Flex)`\n overflow: hidden;\n`;\n\nexport const StyledTitleContainer = styled(Flex)`\n overflow: hidden;\n`;\n\nexport const StyledProgressContainer = styled.div(({ theme }) => {\n return css`\n padding: calc(2 * ${theme.base.spacing});\n width: 100%;\n ${StyledButton} {\n z-index: ${theme.base['z-index'].drawer};\n }\n `;\n});\nStyledProgressContainer.defaultProps = defaultThemeProp;\n\nexport const StyledActions = styled(Flex)`\n ${StyledButton} {\n margin-inline-start: 0;\n }\n`;\n\nexport const StyledTextWithEllipsis = styled(Text)<{ isLink: boolean }>(({\n theme: {\n base: { spacing }\n },\n isLink\n}) => {\n return css`\n ${ellipsisOverflow}\n ${isLink === false &&\n `\n margin: calc(0.5 * ${spacing});\n `}\n `;\n});\nStyledTextWithEllipsis.defaultProps = defaultThemeProp;\n\nexport const StyledPrimaryTextButton = styled(Button)(({\n theme: {\n base: { spacing }\n }\n}) => {\n return css`\n overflow: hidden;\n height: 100%;\n max-width: fit-content;\n text-overflow: ellipsis;\n margin: calc(0.5 * ${spacing});\n `;\n});\nStyledPrimaryTextButton.defaultProps = defaultThemeProp;\n\nexport const StyledPrimaryTextLink = styled(Link)(({\n theme: {\n base: { spacing }\n }\n}) => {\n return css`\n margin: calc(0.5 * ${spacing});\n overflow: hidden;\n max-width: fit-content;\n ${ellipsisOverflow}\n `;\n});\nStyledPrimaryTextLink.defaultProps = defaultThemeProp;\n\nexport const StyledTitlesContainer = styled(Flex)`\n overflow: hidden;\n`;\n\nexport const StyledPrimaryContainer = styled.div(({ theme }) => {\n return css`\n margin-block-start: calc(-1 * ${theme.base.spacing});\n `;\n});\nStyledPrimaryContainer.defaultProps = defaultThemeProp;\n\nexport const StyledPreviewDrawer = styled.div(({ theme }) => {\n return css`\n min-width: ${resizeDrawerMinWidth};\n max-width: ${resizeDrawerMaxWidth};\n width: var(--resize-drawer-width);\n background-color: ${theme.base.palette['app-background']};\n height: calc(100vh - var(--appshell-offset, 0rem));\n top: var(--appshell-offset, 0);\n z-index: calc(${theme.base['z-index'].drawer} + 500);\n transition-property: transform, box-shadow, opacity, border-inline-start;\n transition-duration: max(${theme.base.animation.speed}, 0.0001s);\n transition-timing-function: ${theme.base.animation.timing.ease};\n\n @media (min-width: ${theme.base.breakpoints.xl}) {\n box-shadow: none;\n border-inline-start: 0.0625rem solid\n ${readableHue(theme.base.palette['border-line'], theme.base.palette['app-background'], {\n mode: 'both',\n level: 'AANonText'\n })};\n }\n `;\n});\n\nStyledPreviewDrawer.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Ref, ReactNode, MouseEvent, KeyboardEvent, RefObject } from 'react';
|
|
2
|
-
import type { FieldValueListProps, ProgressProps, TestIdProp, BaseProps, TextProps, OmitStrict, Action } from '@pega/cosmos-react-core';
|
|
2
|
+
import type { FieldValueListProps, ProgressProps, TestIdProp, BaseProps, TextProps, OmitStrict, Action, ErrorStateProps } from '@pega/cosmos-react-core';
|
|
3
3
|
import type { IconTileProps } from '../IconTile';
|
|
4
4
|
import { getAuthoringPanelTestIds } from './AuthoringPanel.test-ids';
|
|
5
5
|
interface AdditionalInfoProps {
|
|
@@ -57,11 +57,15 @@ export interface AuthoringPanelProps extends BaseProps, TestIdProp {
|
|
|
57
57
|
* On dismiss, focus is returned back to this element.
|
|
58
58
|
*/
|
|
59
59
|
target: HTMLElement | null;
|
|
60
|
+
/** If true, the authoring panel will render in an error state. */
|
|
61
|
+
error?: boolean;
|
|
62
|
+
/** Callback fired when "Try again" button is clicked in an error state. */
|
|
63
|
+
onErrorRetry?: ErrorStateProps['onRetry'];
|
|
60
64
|
}
|
|
61
65
|
interface PaneltestIdsProps {
|
|
62
66
|
testIds: Partial<ReturnType<typeof getAuthoringPanelTestIds>>;
|
|
63
67
|
}
|
|
64
|
-
export interface AuthoringPanelHeaderProps extends TestIdProp {
|
|
68
|
+
export interface AuthoringPanelHeaderProps extends Pick<AuthoringPanelProps, 'error'>, TestIdProp {
|
|
65
69
|
header: AuthoringPanelProps['header'];
|
|
66
70
|
actions: AuthoringPanelProps['actions'];
|
|
67
71
|
onDismiss: AuthoringPanelProps['onDismiss'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthoringPanel.types.d.ts","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElF,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACV,MAAM,
|
|
1
|
+
{"version":3,"file":"AuthoringPanel.types.d.ts","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElF,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACV,MAAM,EACN,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAErE,UAAU,mBAAmB;IAC3B,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,MAAM,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACtC,mEAAmE;IACnE,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,mBAAoB,SAAQ,SAAS,EAAE,UAAU;IAChE;;OAEG;IACH,IAAI,EAAE,OAA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,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC;CAC/D;AAED,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CAAC,mBAAmB,EAAE,OAAO,CAAC,EAAE,UAAU;IAC/F,MAAM,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACtC,OAAO,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACxC,SAAS,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAC5C,gBAAgB,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,EACxE,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,EAC1B,iBAAiB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,4BAA6B,SAAQ,mBAAmB,EAAE,iBAAiB;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthoringPanel.types.js","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthoringPanel.types.js","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.types.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["import type { Ref, ReactNode, MouseEvent, KeyboardEvent, RefObject } from 'react';\n\nimport type {\n FieldValueListProps,\n ProgressProps,\n TestIdProp,\n BaseProps,\n TextProps,\n OmitStrict,\n Action,\n ErrorStateProps\n} from '@pega/cosmos-react-core';\n\nimport type { IconTileProps } from '../IconTile';\n\nimport { getAuthoringPanelTestIds } from './AuthoringPanel.test-ids';\n\ninterface AdditionalInfoProps {\n /** Title text in the Additional info dialog. */\n title: string;\n /** Description text in the Additional info dialog. */\n description?: string;\n /** Metadata for field list in the Additional info dialog. */\n fields: FieldValueListProps['fields'];\n /** Click handler for Edit button in the Additional info dialog. */\n onEdit?: (e: MouseEvent<HTMLButtonElement>) => void;\n}\n\nexport interface AuthoringPanelProps extends BaseProps, TestIdProp {\n /**\n * If true, the Panel will be visible.\n */\n open: boolean;\n /* If true, the Panel will render a progress loader. */\n progress?: boolean | ProgressProps['message'];\n header: {\n primary: {\n /** The primary header text on the panel. */\n title: string;\n /** URL to navigate to. This will render the primary header text as a link. */\n href?: string;\n /** Click handler for the link. If no href if passed, this will render the primary header text as a button. */\n onClick?: (e: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;\n };\n secondary?: {\n /** The secondary header text on the panel containing rule type information. */\n title: string;\n /** URL to navigate to. This will render the secondary header text as a link. */\n href?: string;\n /** Click handler for the link. If no href if passed, this will render the secondary header text as a button. */\n onClick?: (e: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;\n };\n /** Pass a title and fields to show additional information icon. */\n additionalInfo?: AdditionalInfoProps;\n /** A visual associated with the panel header. */\n visual?: OmitStrict<IconTileProps, 'size'>;\n };\n /** Dismiss handler for the authoring panel. */\n onDismiss?: (el: HTMLElement | null) => void;\n /**\n * A set of Action Buttons to render on the panel header.\n * If array contains one object, then a single button will be rendered.\n * If array contains multiple objects, then a menu button will be rendered with each button as menu item.\n */\n actions?: Action[];\n /** Ref to the element. */\n ref?: Ref<HTMLDivElement>;\n /** A region to display panel content. */\n content: ReactNode;\n /**\n * An element the panel is contextually and visually associated with. Normally a triggering button.\n * On dismiss, focus is returned back to this element.\n */\n target: HTMLElement | null;\n /** If true, the authoring panel will render in an error state. */\n error?: boolean;\n /** Callback fired when \"Try again\" button is clicked in an error state. */\n onErrorRetry?: ErrorStateProps['onRetry'];\n}\n\ninterface PaneltestIdsProps {\n testIds: Partial<ReturnType<typeof getAuthoringPanelTestIds>>;\n}\n\nexport interface AuthoringPanelHeaderProps extends Pick<AuthoringPanelProps, 'error'>, TestIdProp {\n header: AuthoringPanelProps['header'];\n actions: AuthoringPanelProps['actions'];\n onDismiss: AuthoringPanelProps['onDismiss'];\n dismissButtonRef: RefObject<HTMLButtonElement>;\n}\n\nexport interface HeaderTextProps\n extends Pick<AuthoringPanelProps['header']['primary'], 'href' | 'onClick'>,\n Pick<TextProps, 'variant'>,\n PaneltestIdsProps {\n title: string;\n titleTestId?: string;\n}\n\nexport interface AdditionalInfoContainerProps extends AdditionalInfoProps, PaneltestIdsProps {}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AuthoringPanelHeaderProps } from './AuthoringPanel.types';
|
|
2
|
-
declare const _default: (({ header, actions, onDismiss, testId, dismissButtonRef }: AuthoringPanelHeaderProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
2
|
+
declare const _default: (({ header, actions, onDismiss, testId, dismissButtonRef, error }: AuthoringPanelHeaderProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
3
3
|
getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["additional-info", "dismiss", "interactive-title", "actions", "progress", "title", "primary-action", "visual", "secondary", "visual", "secondary", "info-edit"]>;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthoringPanelHeader.d.ts","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanelHeader.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EACV,yBAAyB,EAG1B,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"AuthoringPanelHeader.d.ts","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanelHeader.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EACV,yBAAyB,EAG1B,MAAM,wBAAwB,CAAC;2FAsG7B,yBAAyB;;;AA8F5B,wBAA2E"}
|
|
@@ -25,12 +25,17 @@ const AdditionalInfoContainer = ({ title, description, fields, onEdit, testIds }
|
|
|
25
25
|
onEdit?.(e);
|
|
26
26
|
}, children: t('edit_details') }))] }) }));
|
|
27
27
|
};
|
|
28
|
-
const AuthoringPanelHeader = ({ header, actions, onDismiss, testId, dismissButtonRef }) => {
|
|
28
|
+
const AuthoringPanelHeader = ({ header, actions, onDismiss, testId, dismissButtonRef, error }) => {
|
|
29
29
|
const { additionalInfo, primary, secondary, visual, ...restHeaderProps } = header;
|
|
30
30
|
const t = useI18n();
|
|
31
31
|
const testIds = useTestIds(testId, getAuthoringPanelTestIds);
|
|
32
|
-
const visualNode = useMemo(() => visual ? (_jsx(Flex, { item: { shrink: 0 }, as: IconTile, testId: testIds.visual, name: visual.name, label: visual.label, category: visual.category, inverted: visual.inverted, size: 'xl' })) : undefined, [visual]);
|
|
33
|
-
return (_jsxs(Flex, { container: {
|
|
32
|
+
const visualNode = useMemo(() => visual ? (_jsx(Flex, { item: { shrink: 0 }, as: IconTile, testId: testIds.visual, name: visual.name, label: visual.label, category: visual.category, inverted: visual.inverted, set: visual.set, size: 'xl' })) : undefined, [visual]);
|
|
33
|
+
return (_jsxs(Flex, { container: {
|
|
34
|
+
direction: 'row',
|
|
35
|
+
alignItems: 'center',
|
|
36
|
+
justify: error ? 'end' : 'between',
|
|
37
|
+
colGap: 0.5
|
|
38
|
+
}, children: [!error && (_jsxs(Flex, { container: { alignItems: 'center', colGap: 0.5 }, as: StyledTitlesContainer, children: [visualNode, _jsxs(Flex, { container: { direction: 'column' }, as: StyledTitlesContainer, children: [secondary?.title && (_jsx(HeaderTitleText, { ...restHeaderProps, title: secondary.title, onClick: secondary.onClick, href: secondary.href, variant: 'primary', titleTestId: testIds.secondary, testIds: testIds })), _jsx(Flex, { as: secondary ? StyledPrimaryContainer : undefined, container: { wrap: 'wrap' }, children: _jsx(HeaderTitleText, { ...restHeaderProps, title: primary.title, onClick: primary.onClick, href: primary.href, variant: 'h2', titleTestId: testIds.title, testIds: testIds }) })] })] })), (actions || onDismiss) && (_jsxs(StyledActions, { container: { alignItems: 'end', colGap: 1 }, children: [!error && (_jsxs(_Fragment, { children: [additionalInfo && _jsx(AdditionalInfoContainer, { ...additionalInfo, testIds: testIds }), actions && actions.length > 0 && (_jsx(Actions, { "data-testid": testIds.actions, iconOnly: true, compact: true, menuAt: 2, items: actions }))] })), onDismiss && (_jsx(Button, { "data-testid": testIds.dismiss, icon: true, variant: 'simple', compact: true, ref: dismissButtonRef, label: t('dismiss_label_a11y', ['panel']), onClick: onDismiss, children: _jsx(Icon, { name: 'times' }) }))] }))] }));
|
|
34
39
|
};
|
|
35
40
|
export default withTestIds(AuthoringPanelHeader, getAuthoringPanelTestIds);
|
|
36
41
|
//# sourceMappingURL=AuthoringPanelHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthoringPanelHeader.js","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanelHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGxC,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,cAAc,EACd,OAAO,EACP,cAAc,EACd,OAAO,EACP,OAAO,EACP,UAAU,EACV,IAAI,EACJ,WAAW,EACX,UAAU,EACX,MAAM,yBAAyB,CAAC;AAGjC,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAE5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,aAAa,EACd,MAAM,yBAAyB,CAAC;AAOjC,MAAM,eAAe,GAAG,CAAC,EACvB,KAAK,EACL,IAAI,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,WAAW,EACK,EAAE,EAAE;IACpB,MAAM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,OAAO,EAAC,IAAI,EACZ,WAAW,EAAE,OAAO,CAAC,KAAK,EAC1B,OAAO,EAAE,OAAO,GAChB,GACG,IACF,IACF,EACN,CAAC,OAAO,IAAI,SAAS,CAAC,IAAI,CACzB,MAAC,aAAa,IAAC,SAAS,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,aACvD,cAAc,IAAI,KAAC,uBAAuB,OAAK,cAAc,EAAE,OAAO,EAAE,OAAO,GAAI,EACnF,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAChC,KAAC,OAAO,mBAAc,OAAO,CAAC,OAAO,EAAE,QAAQ,QAAC,OAAO,QAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,GAAI,CACtF,EACA,SAAS,IAAI,CACZ,KAAC,MAAM,mBACQ,OAAO,CAAC,OAAO,EAC5B,IAAI,QACJ,OAAO,EAAC,QAAQ,EAChB,OAAO,QACP,GAAG,EAAE,gBAAgB,EACrB,KAAK,EAAE,CAAC,CAAC,oBAAoB,EAAE,CAAC,OAAO,CAAC,CAAC,EACzC,OAAO,EAAE,SAAS,YAElB,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,GACd,CACV,IACa,CACjB,IACI,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,oBAAoB,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { useRef, useMemo } from 'react';\nimport type { MouseEvent } from 'react';\n\nimport {\n Icon,\n Button,\n Flex,\n AdditionalInfo,\n Actions,\n FieldValueList,\n useI18n,\n Tooltip,\n useElement,\n Text,\n withTestIds,\n useTestIds\n} from '@pega/cosmos-react-core';\nimport type { DialogHandleValue } from '@pega/cosmos-react-core';\n\nimport IconTile from '../IconTile/IconTile';\n\nimport { getAuthoringPanelTestIds } from './AuthoringPanel.test-ids';\nimport {\n StyledTextWithEllipsis,\n StyledPrimaryTextButton,\n StyledPrimaryTextLink,\n StyledPrimaryContainer,\n StyledTitlesContainer,\n StyledActions\n} from './AuthoringPanel.styles';\nimport type {\n AuthoringPanelHeaderProps,\n HeaderTextProps,\n AdditionalInfoContainerProps\n} from './AuthoringPanel.types';\n\nconst HeaderTitleText = ({\n title,\n href,\n onClick,\n testIds,\n variant,\n titleTestId\n}: HeaderTextProps) => {\n const [el, setEl] = useElement();\n const getHeaderText = () => {\n if (onClick) {\n return (\n <StyledPrimaryTextButton\n variant='link'\n onClick={onClick}\n data-testid={testIds.interactiveTitle}\n >\n <StyledTextWithEllipsis data-testid={titleTestId} variant={variant} ref={setEl}>\n {title}\n </StyledTextWithEllipsis>\n </StyledPrimaryTextButton>\n );\n }\n if (href) {\n return (\n <StyledPrimaryTextLink href={href} variant='link' data-testid={testIds.interactiveTitle}>\n <StyledTextWithEllipsis data-testid={titleTestId} variant={variant} ref={setEl}>\n {title}\n </StyledTextWithEllipsis>\n </StyledPrimaryTextLink>\n );\n }\n return (\n <StyledTextWithEllipsis\n data-testid={titleTestId}\n variant={variant}\n ref={setEl}\n isLink={false}\n >\n {title}\n </StyledTextWithEllipsis>\n );\n };\n\n return (\n <>\n {getHeaderText()}\n\n {el && (\n <Tooltip target={el} smart showDelay='none' hideDelay='none'>\n {title}\n </Tooltip>\n )}\n </>\n );\n};\n\nconst AdditionalInfoContainer = ({\n title,\n description,\n fields,\n onEdit,\n testIds\n}: AdditionalInfoContainerProps) => {\n const t = useI18n();\n const infoDialogHandle = useRef<DialogHandleValue>(null);\n return (\n <AdditionalInfo\n data-testid={testIds.additionalInfo}\n heading={title}\n dialogHandle={infoDialogHandle}\n >\n <Flex container={{ direction: 'column', alignItems: 'start', gap: 2 }}>\n <Flex container={{ direction: 'column', gap: 1 }} item={{ grow: 1 }}>\n {description && <Text as='p'>{description}</Text>}\n <FieldValueList variant='inline' fields={fields} />\n </Flex>\n {onEdit && (\n <Button\n data-testid={testIds.infoEdit}\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n infoDialogHandle.current?.close();\n onEdit?.(e);\n }}\n >\n {t('edit_details')}\n </Button>\n )}\n </Flex>\n </AdditionalInfo>\n );\n};\n\nconst AuthoringPanelHeader = ({\n header,\n actions,\n onDismiss,\n testId,\n dismissButtonRef\n}: AuthoringPanelHeaderProps) => {\n const { additionalInfo, primary, secondary, visual, ...restHeaderProps } = header;\n const t = useI18n();\n const testIds = useTestIds(testId, getAuthoringPanelTestIds);\n const visualNode = useMemo(\n () =>\n visual ? (\n <Flex\n item={{ shrink: 0 }}\n as={IconTile}\n testId={testIds.visual}\n name={visual.name}\n label={visual.label}\n category={visual.category}\n inverted={visual.inverted}\n size='xl'\n />\n ) : undefined,\n [visual]\n );\n return (\n <Flex container={{ direction: 'row', alignItems: 'center', justify: 'between', colGap: 0.5 }}>\n <Flex container={{ alignItems: 'center', colGap: 0.5 }} as={StyledTitlesContainer}>\n {visualNode}\n <Flex container={{ direction: 'column' }} as={StyledTitlesContainer}>\n {secondary?.title && (\n <HeaderTitleText\n {...restHeaderProps}\n title={secondary.title}\n onClick={secondary.onClick}\n href={secondary.href}\n variant='primary'\n titleTestId={testIds.secondary}\n testIds={testIds}\n />\n )}\n <Flex as={secondary ? StyledPrimaryContainer : undefined} container={{ wrap: 'wrap' }}>\n <HeaderTitleText\n {...restHeaderProps}\n title={primary.title}\n onClick={primary.onClick}\n href={primary.href}\n variant='h2'\n titleTestId={testIds.title}\n testIds={testIds}\n />\n </Flex>\n </Flex>\n </Flex>\n {(actions || onDismiss) && (\n <StyledActions container={{ alignItems: 'end', colGap: 1 }}>\n {additionalInfo && <AdditionalInfoContainer {...additionalInfo} testIds={testIds} />}\n {actions && actions.length > 0 && (\n <Actions data-testid={testIds.actions} iconOnly compact menuAt={3} items={actions} />\n )}\n {onDismiss && (\n <Button\n data-testid={testIds.dismiss}\n icon\n variant='simple'\n compact\n ref={dismissButtonRef}\n label={t('dismiss_label_a11y', ['panel'])}\n onClick={onDismiss}\n >\n <Icon name='times' />\n </Button>\n )}\n </StyledActions>\n )}\n </Flex>\n );\n};\n\nexport default withTestIds(AuthoringPanelHeader, getAuthoringPanelTestIds);\n"]}
|
|
1
|
+
{"version":3,"file":"AuthoringPanelHeader.js","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanelHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGxC,OAAO,EACL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,cAAc,EACd,OAAO,EACP,cAAc,EACd,OAAO,EACP,OAAO,EACP,UAAU,EACV,IAAI,EACJ,WAAW,EACX,UAAU,EACX,MAAM,yBAAyB,CAAC;AAGjC,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAE5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,aAAa,EACd,MAAM,yBAAyB,CAAC;AAOjC,MAAM,eAAe,GAAG,CAAC,EACvB,KAAK,EACL,IAAI,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,WAAW,EACK,EAAE,EAAE;IACpB,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,UAAU,EAAE,CAAC;IACjC,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CACL,KAAC,uBAAuB,IACtB,OAAO,EAAC,MAAM,EACd,OAAO,EAAE,OAAO,iBACH,OAAO,CAAC,gBAAgB,YAErC,KAAC,sBAAsB,mBAAc,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,YAC3E,KAAK,GACiB,GACD,CAC3B,CAAC;QACJ,CAAC;QACD,IAAI,IAAI,EAAE,CAAC;YACT,OAAO,CACL,KAAC,qBAAqB,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAC,MAAM,iBAAc,O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,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAChC,KAAC,OAAO,mBACO,OAAO,CAAC,OAAO,EAC5B,QAAQ,QACR,OAAO,QACP,MAAM,EAAE,CAAC,EACT,KAAK,EAAE,OAAO,GACd,CACH,IACA,CACJ,EACA,SAAS,IAAI,CACZ,KAAC,MAAM,mBACQ,OAAO,CAAC,OAAO,EAC5B,IAAI,QACJ,OAAO,EAAC,QAAQ,EAChB,OAAO,QACP,GAAG,EAAE,gBAAgB,EACrB,KAAK,EAAE,CAAC,CAAC,oBAAoB,EAAE,CAAC,OAAO,CAAC,CAAC,EACzC,OAAO,EAAE,SAAS,YAElB,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,GACd,CACV,IACa,CACjB,IACI,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,oBAAoB,EAAE,wBAAwB,CAAC,CAAC","sourcesContent":["import { useRef, useMemo } from 'react';\nimport type { MouseEvent } from 'react';\n\nimport {\n Icon,\n Button,\n Flex,\n AdditionalInfo,\n Actions,\n FieldValueList,\n useI18n,\n Tooltip,\n useElement,\n Text,\n withTestIds,\n useTestIds\n} from '@pega/cosmos-react-core';\nimport type { DialogHandleValue } from '@pega/cosmos-react-core';\n\nimport IconTile from '../IconTile/IconTile';\n\nimport { getAuthoringPanelTestIds } from './AuthoringPanel.test-ids';\nimport {\n StyledTextWithEllipsis,\n StyledPrimaryTextButton,\n StyledPrimaryTextLink,\n StyledPrimaryContainer,\n StyledTitlesContainer,\n StyledActions\n} from './AuthoringPanel.styles';\nimport type {\n AuthoringPanelHeaderProps,\n HeaderTextProps,\n AdditionalInfoContainerProps\n} from './AuthoringPanel.types';\n\nconst HeaderTitleText = ({\n title,\n href,\n onClick,\n testIds,\n variant,\n titleTestId\n}: HeaderTextProps) => {\n const [el, setEl] = useElement();\n const getHeaderText = () => {\n if (onClick) {\n return (\n <StyledPrimaryTextButton\n variant='link'\n onClick={onClick}\n data-testid={testIds.interactiveTitle}\n >\n <StyledTextWithEllipsis data-testid={titleTestId} variant={variant} ref={setEl}>\n {title}\n </StyledTextWithEllipsis>\n </StyledPrimaryTextButton>\n );\n }\n if (href) {\n return (\n <StyledPrimaryTextLink href={href} variant='link' data-testid={testIds.interactiveTitle}>\n <StyledTextWithEllipsis data-testid={titleTestId} variant={variant} ref={setEl}>\n {title}\n </StyledTextWithEllipsis>\n </StyledPrimaryTextLink>\n );\n }\n return (\n <StyledTextWithEllipsis\n data-testid={titleTestId}\n variant={variant}\n ref={setEl}\n isLink={false}\n >\n {title}\n </StyledTextWithEllipsis>\n );\n };\n\n return (\n <>\n {getHeaderText()}\n\n {el && (\n <Tooltip target={el} smart showDelay='none' hideDelay='none'>\n {title}\n </Tooltip>\n )}\n </>\n );\n};\n\nconst AdditionalInfoContainer = ({\n title,\n description,\n fields,\n onEdit,\n testIds\n}: AdditionalInfoContainerProps) => {\n const t = useI18n();\n const infoDialogHandle = useRef<DialogHandleValue>(null);\n return (\n <AdditionalInfo\n data-testid={testIds.additionalInfo}\n heading={title}\n dialogHandle={infoDialogHandle}\n >\n <Flex container={{ direction: 'column', alignItems: 'start', gap: 2 }}>\n <Flex container={{ direction: 'column', gap: 1 }} item={{ grow: 1 }}>\n {description && <Text as='p'>{description}</Text>}\n <FieldValueList variant='inline' fields={fields} />\n </Flex>\n {onEdit && (\n <Button\n data-testid={testIds.infoEdit}\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n infoDialogHandle.current?.close();\n onEdit?.(e);\n }}\n >\n {t('edit_details')}\n </Button>\n )}\n </Flex>\n </AdditionalInfo>\n );\n};\n\nconst AuthoringPanelHeader = ({\n header,\n actions,\n onDismiss,\n testId,\n dismissButtonRef,\n error\n}: AuthoringPanelHeaderProps) => {\n const { additionalInfo, primary, secondary, visual, ...restHeaderProps } = header;\n const t = useI18n();\n const testIds = useTestIds(testId, getAuthoringPanelTestIds);\n const visualNode = useMemo(\n () =>\n visual ? (\n <Flex\n item={{ shrink: 0 }}\n as={IconTile}\n testId={testIds.visual}\n name={visual.name}\n label={visual.label}\n category={visual.category}\n inverted={visual.inverted}\n set={visual.set}\n size='xl'\n />\n ) : undefined,\n [visual]\n );\n return (\n <Flex\n container={{\n direction: 'row',\n alignItems: 'center',\n justify: error ? 'end' : 'between',\n colGap: 0.5\n }}\n >\n {!error && (\n <Flex container={{ alignItems: 'center', colGap: 0.5 }} as={StyledTitlesContainer}>\n {visualNode}\n <Flex container={{ direction: 'column' }} as={StyledTitlesContainer}>\n {secondary?.title && (\n <HeaderTitleText\n {...restHeaderProps}\n title={secondary.title}\n onClick={secondary.onClick}\n href={secondary.href}\n variant='primary'\n titleTestId={testIds.secondary}\n testIds={testIds}\n />\n )}\n <Flex as={secondary ? StyledPrimaryContainer : undefined} container={{ wrap: 'wrap' }}>\n <HeaderTitleText\n {...restHeaderProps}\n title={primary.title}\n onClick={primary.onClick}\n href={primary.href}\n variant='h2'\n titleTestId={testIds.title}\n testIds={testIds}\n />\n </Flex>\n </Flex>\n </Flex>\n )}\n {(actions || onDismiss) && (\n <StyledActions container={{ alignItems: 'end', colGap: 1 }}>\n {!error && (\n <>\n {additionalInfo && <AdditionalInfoContainer {...additionalInfo} testIds={testIds} />}\n {actions && actions.length > 0 && (\n <Actions\n data-testid={testIds.actions}\n iconOnly\n compact\n menuAt={2}\n items={actions}\n />\n )}\n </>\n )}\n {onDismiss && (\n <Button\n data-testid={testIds.dismiss}\n icon\n variant='simple'\n compact\n ref={dismissButtonRef}\n label={t('dismiss_label_a11y', ['panel'])}\n onClick={onDismiss}\n >\n <Icon name='times' />\n </Button>\n )}\n </StyledActions>\n )}\n </Flex>\n );\n};\n\nexport default withTestIds(AuthoringPanelHeader, getAuthoringPanelTestIds);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConstructPageTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE/E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAKxE,QAAA,MAAM,qBAAqB,EAAE,+BAA+B,CAAC,0BAA0B,
|
|
1
|
+
{"version":3,"file":"ConstructPageTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE/E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAKxE,QAAA,MAAM,qBAAqB,EAAE,+BAA+B,CAAC,0BAA0B,CA+BpF,CAAC;AAEJ,eAAe,qBAAqB,CAAC"}
|
|
@@ -3,8 +3,8 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
import { TabbedPage as CoreTabbedPage, Banner } from '@pega/cosmos-react-core';
|
|
4
4
|
import { StyledPage } from '../PageTemplates';
|
|
5
5
|
import ConstructPageHeader from './ConstructPageHeader';
|
|
6
|
-
const ConstructPageTemplate = forwardRef(({ tabs, errorBanner, header, progress = false, testId, ...restProps }, ref) => {
|
|
7
|
-
return (_jsx(CoreTabbedPage, { ...restProps, title: header.title, as: StyledPage, header: _jsx(ConstructPageHeader, { ...header, progress: progress, testId: testId }), tabs: tabs, ref: ref, banners: errorBanner && _jsx(Banner, { testId: testId, ...errorBanner }), scrollContent: true }));
|
|
6
|
+
const ConstructPageTemplate = forwardRef(({ tabs, errorBanner, header, progress = false, testId, isPreview = false, ...restProps }, ref) => {
|
|
7
|
+
return (_jsx(CoreTabbedPage, { ...restProps, title: !isPreview ? header.title : '', as: StyledPage, header: !isPreview ? (_jsx(ConstructPageHeader, { ...header, progress: progress, testId: testId })) : undefined, tabs: tabs, ref: ref, banners: errorBanner && _jsx(Banner, { testId: testId, ...errorBanner }), scrollContent: true }));
|
|
8
8
|
});
|
|
9
9
|
export default ConstructPageTemplate;
|
|
10
10
|
//# sourceMappingURL=ConstructPageTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConstructPageTemplate.js","sourceRoot":"","sources":["../../../../src/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAI/E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AAExD,MAAM,qBAAqB,GACzB,UAAU,CACR,CACE,EACE,IAAI,EACJ,WAAW,EACX,MAAM,EACN,QAAQ,GAAG,KAAK,EAChB,MAAM,EACN,GAAG,SAAS,EACgC,EAC9C,GAAwB,EACxB,EAAE;IACF,OAAO,CACL,KAAC,cAAc,OACT,SAAS,EACb,KAAK,EAAE,MAAM,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"ConstructPageTemplate.js","sourceRoot":"","sources":["../../../../src/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAI/E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AAExD,MAAM,qBAAqB,GACzB,UAAU,CACR,CACE,EACE,IAAI,EACJ,WAAW,EACX,MAAM,EACN,QAAQ,GAAG,KAAK,EAChB,MAAM,EACN,SAAS,GAAG,KAAK,EACjB,GAAG,SAAS,EACgC,EAC9C,GAAwB,EACxB,EAAE;IACF,OAAO,CACL,KAAC,cAAc,OACT,SAAS,EACb,KAAK,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EACrC,EAAE,EAAE,UAAU,EACd,MAAM,EACJ,CAAC,SAAS,CAAC,CAAC,CAAC,CACX,KAAC,mBAAmB,OAAK,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAI,CACxE,CAAC,CAAC,CAAC,SAAS,EAEf,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,WAAW,IAAI,KAAC,MAAM,IAAC,MAAM,EAAE,MAAM,KAAM,WAAW,GAAI,EACnE,aAAa,SACb,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEJ,eAAe,qBAAqB,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { Ref, PropsWithoutRef } from 'react';\n\nimport { TabbedPage as CoreTabbedPage, Banner } from '@pega/cosmos-react-core';\nimport type { ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';\n\nimport type { ConstructPageTemplateProps } from '../PageTemplate.types';\nimport { StyledPage } from '../PageTemplates';\n\nimport ConstructPageHeader from './ConstructPageHeader';\n\nconst ConstructPageTemplate: ForwardRefForwardPropsComponent<ConstructPageTemplateProps> =\n forwardRef(\n (\n {\n tabs,\n errorBanner,\n header,\n progress = false,\n testId,\n isPreview = false,\n ...restProps\n }: PropsWithoutRef<ConstructPageTemplateProps>,\n ref: Ref<HTMLDivElement>\n ) => {\n return (\n <CoreTabbedPage\n {...restProps}\n title={!isPreview ? header.title : ''}\n as={StyledPage}\n header={\n !isPreview ? (\n <ConstructPageHeader {...header} progress={progress} testId={testId} />\n ) : undefined\n }\n tabs={tabs}\n ref={ref}\n banners={errorBanner && <Banner testId={testId} {...errorBanner} />}\n scrollContent\n />\n );\n }\n );\n\nexport default ConstructPageTemplate;\n"]}
|
|
@@ -81,6 +81,8 @@ export interface ConstructPageTemplateProps extends PageTemplateProps {
|
|
|
81
81
|
tabs: OmitStrict<TabsProps, 'tabs'> & {
|
|
82
82
|
tabs: TabbedPageTab[];
|
|
83
83
|
};
|
|
84
|
+
/** Determines if the template is in preview mode */
|
|
85
|
+
isPreview?: boolean;
|
|
84
86
|
}
|
|
85
87
|
export interface InventoryPageTemplateProps extends PageTemplateProps {
|
|
86
88
|
header: PageHeaderProps & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageTemplate.types.d.ts","sourceRoot":"","sources":["../../../src/components/PageTemplates/PageTemplate.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,SAAS,EACT,aAAa,EACb,aAAa,EACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EACd,MAAM,oEAAoE,CAAC;AAE5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,QAAQ,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE1E,MAAM,WAAW,iBAAkB,SAAQ,SAAS,EAAE,UAAU;IAC9D,uDAAuD;IACvD,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC,CAAC;IACtE,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gCAAgC;IAChC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,KAAK,eAAe,GAAG;IACrB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG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AK,IAAI,CAAC;YAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;SACf,CAAC;QACF;;4HAEoH;QACpH,aAAa,CAAC,EAAE,qBAAqB,GAAG;YACtC,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;SAClC,CAAC;QACF;;;WAGG;QACH,eAAe,CAAC,EAAE,qBAAqB,CAAC;QACxC,kFAAkF;QAClF,iBAAiB,CAAC,EAAE,qBAAqB,EAAE,CAAC;KAC7C,CAAC;IACF,qCAAqC;IACrC,IAAI,EAAE,UAAU,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG;QACpC,IAAI,EAAE,aAAa,EAAE,CAAC;KACvB,CAAC;
|
|
1
|
+
{"version":3,"file":"PageTemplate.types.d.ts","sourceRoot":"","sources":["../../../src/components/PageTemplates/PageTemplate.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,SAAS,EACT,aAAa,EACb,aAAa,EACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EACd,MAAM,oEAAoE,CAAC;AAE5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,QAAQ,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE1E,MAAM,WAAW,iBAAkB,SAAQ,SAAS,EAAE,UAAU;IAC9D,uDAAuD;IACvD,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC,CAAC;IACtE,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gCAAgC;IAChC,GAAG,CAAC,EAAE,GAA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AC;CAC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageTemplate.types.js","sourceRoot":"","sources":["../../../src/components/PageTemplates/PageTemplate.types.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,QAAQ,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["import type { MouseEvent, Ref } from 'react';\n\nimport type {\n BannerProps,\n OmitStrict,\n TestIdProp,\n ButtonProps,\n BaseProps,\n TabsProps,\n MenuItemProps,\n TestIdsRecord\n} from '@pega/cosmos-react-core';\nimport type {\n OneColumnPageProps,\n TabbedPageTab\n} from '@pega/cosmos-react-core/lib/components/PageTemplates/PageTemplates';\n\nimport type { IconTileProps } from '../IconTile';\n\nimport type { PageBannerProps } from './OverviewPageTemplate/PageBanner';\nimport { elements as pageHeaderElements } from './PageTemplates.test-ids';\n\nexport interface PageTemplateProps extends BaseProps, TestIdProp {\n /** PropTypes for error banner inside Page Template. */\n errorBanner?: Pick<BannerProps, 'variant' | 'onDismiss' | 'messages'>;\n /** If true, disables all the action buttons on page header. */\n progress?: boolean;\n /** Ref to the Page Template. */\n ref?: Ref<HTMLDivElement>;\n}\n\ntype PageHeaderProps = {\n /** The primary header text on the page header. */\n title: string;\n /** Description text for the page header and additional info dialog. */\n description?: string;\n};\n\nexport type HeaderActionItemProps = Pick<MenuItemProps, 'id' | 'onClick' | 'disabled' | 'primary'>;\n\nexport interface MetaFieldValueListProps {\n id?: string;\n name: string;\n value?: string;\n onClick?: (value: string) => void;\n}\n\nexport interface ActionButtonProps {\n testIds: Partial<TestIdsRecord<typeof pageHeaderElements>>;\n progress?: PageTemplateProps['progress'];\n primaryAction?: HeaderActionItemProps & {\n variant?: ButtonProps['variant'];\n };\n secondaryAction?: HeaderActionItemProps;\n additionalActions?: HeaderActionItemProps[];\n animatePrimaryButton?: boolean;\n}\n\nexport interface ConstructPageTemplateProps extends PageTemplateProps {\n header: PageHeaderProps & {\n /**\n * Metadata for the Page Header and additional info dialog.\n * Only First 4 items of metadata are rendered on page header.\n */\n metadata?: {\n /** Primary Metadata\n * Primary Metadata highlights the important metadata for the user by staying next to the title\n */\n primary?: MetaFieldValueListProps[];\n /** Secondary Metadata\n * Secondary Metadata highlights the next secondary meta information for the user by staying close to the action button\n */\n secondary?: [MetaFieldValueListProps] | [MetaFieldValueListProps, MetaFieldValueListProps];\n /** Additional Metadata\n * All meta information for the user shown within the interaction of Info icon.\n */\n additional: MetaFieldValueListProps[];\n };\n /** A visual associated with the page header. */\n visual: OmitStrict<IconTileProps, 'size'>;\n /** The type of the page content. */\n type: {\n name: string;\n onClick?: (e?: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;\n href?: string;\n };\n /**\n * PrimaryAction button on page header.\n * If variant is set as primary, live log is triggered announcing the user about dirty changes state on the page. */\n primaryAction?: HeaderActionItemProps & {\n variant?: ButtonProps['variant'];\n };\n /**\n * SecondaryAction to the page header.\n * Secondary Action button shifts inside the additionalActions based on screen width.\n */\n secondaryAction?: HeaderActionItemProps;\n /** A set of Action Buttons to render on the Action Menu button on page header. */\n additionalActions?: HeaderActionItemProps[];\n };\n /** Props for tabbedpage component */\n tabs: OmitStrict<TabsProps, 'tabs'> & {\n tabs: TabbedPageTab[];\n };\n}\n\nexport interface InventoryPageTemplateProps extends PageTemplateProps {\n header: PageHeaderProps & {\n /**\n * PrimaryAction button on page header.\n * If variant is set as primary, live log is triggered announcing the user about dirty changes state on the page. */\n primaryAction?: HeaderActionItemProps & {\n variant?: ButtonProps['variant'];\n };\n /**\n * SecondaryAction to the page header.\n * Secondary Action button shifts inside the additionalActions based on screen width.\n */\n secondaryAction?: HeaderActionItemProps;\n /** A set of Action Buttons to render on the Action Menu button on page header. */\n additionalActions?: HeaderActionItemProps[];\n };\n content: OneColumnPageProps['a'];\n}\n\nexport interface OverviewPageTemplateProps extends TestIdProp, BaseProps {\n header: PageBannerProps;\n content: OneColumnPageProps['a'];\n ref?: Ref<HTMLDivElement>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"PageTemplate.types.js","sourceRoot":"","sources":["../../../src/components/PageTemplates/PageTemplate.types.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,QAAQ,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["import type { MouseEvent, Ref } from 'react';\n\nimport type {\n BannerProps,\n OmitStrict,\n TestIdProp,\n ButtonProps,\n BaseProps,\n TabsProps,\n MenuItemProps,\n TestIdsRecord\n} from '@pega/cosmos-react-core';\nimport type {\n OneColumnPageProps,\n TabbedPageTab\n} from '@pega/cosmos-react-core/lib/components/PageTemplates/PageTemplates';\n\nimport type { IconTileProps } from '../IconTile';\n\nimport type { PageBannerProps } from './OverviewPageTemplate/PageBanner';\nimport { elements as pageHeaderElements } from './PageTemplates.test-ids';\n\nexport interface PageTemplateProps extends BaseProps, TestIdProp {\n /** PropTypes for error banner inside Page Template. */\n errorBanner?: Pick<BannerProps, 'variant' | 'onDismiss' | 'messages'>;\n /** If true, disables all the action buttons on page header. */\n progress?: boolean;\n /** Ref to the Page Template. */\n ref?: Ref<HTMLDivElement>;\n}\n\ntype PageHeaderProps = {\n /** The primary header text on the page header. */\n title: string;\n /** Description text for the page header and additional info dialog. */\n description?: string;\n};\n\nexport type HeaderActionItemProps = Pick<MenuItemProps, 'id' | 'onClick' | 'disabled' | 'primary'>;\n\nexport interface MetaFieldValueListProps {\n id?: string;\n name: string;\n value?: string;\n onClick?: (value: string) => void;\n}\n\nexport interface ActionButtonProps {\n testIds: Partial<TestIdsRecord<typeof pageHeaderElements>>;\n progress?: PageTemplateProps['progress'];\n primaryAction?: HeaderActionItemProps & {\n variant?: ButtonProps['variant'];\n };\n secondaryAction?: HeaderActionItemProps;\n additionalActions?: HeaderActionItemProps[];\n animatePrimaryButton?: boolean;\n}\n\nexport interface ConstructPageTemplateProps extends PageTemplateProps {\n header: PageHeaderProps & {\n /**\n * Metadata for the Page Header and additional info dialog.\n * Only First 4 items of metadata are rendered on page header.\n */\n metadata?: {\n /** Primary Metadata\n * Primary Metadata highlights the important metadata for the user by staying next to the title\n */\n primary?: MetaFieldValueListProps[];\n /** Secondary Metadata\n * Secondary Metadata highlights the next secondary meta information for the user by staying close to the action button\n */\n secondary?: [MetaFieldValueListProps] | [MetaFieldValueListProps, MetaFieldValueListProps];\n /** Additional Metadata\n * All meta information for the user shown within the interaction of Info icon.\n */\n additional: MetaFieldValueListProps[];\n };\n /** A visual associated with the page header. */\n visual: OmitStrict<IconTileProps, 'size'>;\n /** The type of the page content. */\n type: {\n name: string;\n onClick?: (e?: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;\n href?: string;\n };\n /**\n * PrimaryAction button on page header.\n * If variant is set as primary, live log is triggered announcing the user about dirty changes state on the page. */\n primaryAction?: HeaderActionItemProps & {\n variant?: ButtonProps['variant'];\n };\n /**\n * SecondaryAction to the page header.\n * Secondary Action button shifts inside the additionalActions based on screen width.\n */\n secondaryAction?: HeaderActionItemProps;\n /** A set of Action Buttons to render on the Action Menu button on page header. */\n additionalActions?: HeaderActionItemProps[];\n };\n /** Props for tabbedpage component */\n tabs: OmitStrict<TabsProps, 'tabs'> & {\n tabs: TabbedPageTab[];\n };\n /** Determines if the template is in preview mode */\n isPreview?: boolean;\n}\n\nexport interface InventoryPageTemplateProps extends PageTemplateProps {\n header: PageHeaderProps & {\n /**\n * PrimaryAction button on page header.\n * If variant is set as primary, live log is triggered announcing the user about dirty changes state on the page. */\n primaryAction?: HeaderActionItemProps & {\n variant?: ButtonProps['variant'];\n };\n /**\n * SecondaryAction to the page header.\n * Secondary Action button shifts inside the additionalActions based on screen width.\n */\n secondaryAction?: HeaderActionItemProps;\n /** A set of Action Buttons to render on the Action Menu button on page header. */\n additionalActions?: HeaderActionItemProps[];\n };\n content: OneColumnPageProps['a'];\n}\n\nexport interface OverviewPageTemplateProps extends TestIdProp, BaseProps {\n header: PageBannerProps;\n content: OneColumnPageProps['a'];\n ref?: Ref<HTMLDivElement>;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-build",
|
|
3
|
-
"version": "9.0.0-build.
|
|
3
|
+
"version": "9.0.0-build.3.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"author": "Pegasystems",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"build": "tsc -b tsconfig.build.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pega/cosmos-react-core": "9.0.0-build.
|
|
18
|
-
"@pega/cosmos-react-dnd": "9.0.0-build.
|
|
19
|
-
"@pega/cosmos-react-rte": "9.0.0-build.
|
|
17
|
+
"@pega/cosmos-react-core": "9.0.0-build.3.0",
|
|
18
|
+
"@pega/cosmos-react-dnd": "9.0.0-build.3.0",
|
|
19
|
+
"@pega/cosmos-react-rte": "9.0.0-build.3.0",
|
|
20
20
|
"@types/codemirror": "^5.60.15",
|
|
21
21
|
"@types/dagre": "^0.7.46",
|
|
22
22
|
"@types/react": "^17.0.62 || ^18.3.3",
|