@pega/cosmos-react-wss 5.0.0-dev.4.9 → 5.0.0-dev.5.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/AppShell/AppShell.d.ts +6 -0
- package/lib/components/AppShell/AppShell.d.ts.map +1 -0
- package/lib/components/AppShell/AppShell.js +127 -0
- package/lib/components/AppShell/AppShell.js.map +1 -0
- package/lib/components/AppShell/AppShell.styles.d.ts +39 -0
- package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -0
- package/lib/components/AppShell/AppShell.styles.js +302 -0
- package/lib/components/AppShell/AppShell.styles.js.map +1 -0
- package/lib/components/AppShell/AppShell.types.d.ts +96 -0
- package/lib/components/AppShell/AppShell.types.d.ts.map +1 -0
- package/lib/components/AppShell/AppShell.types.js +2 -0
- package/lib/components/AppShell/AppShell.types.js.map +1 -0
- package/lib/components/AppShell/MobileHeaderContent.d.ts +11 -0
- package/lib/components/AppShell/MobileHeaderContent.d.ts.map +1 -0
- package/lib/components/AppShell/MobileHeaderContent.js +9 -0
- package/lib/components/AppShell/MobileHeaderContent.js.map +1 -0
- package/lib/components/AppShell/NavLinks.d.ts +11 -0
- package/lib/components/AppShell/NavLinks.d.ts.map +1 -0
- package/lib/components/AppShell/NavLinks.js +15 -0
- package/lib/components/AppShell/NavLinks.js.map +1 -0
- package/lib/components/AppShell/Notifications.d.ts +9 -0
- package/lib/components/AppShell/Notifications.d.ts.map +1 -0
- package/lib/components/AppShell/Notifications.js +18 -0
- package/lib/components/AppShell/Notifications.js.map +1 -0
- package/lib/components/AppShell/index.d.ts +3 -0
- package/lib/components/AppShell/index.d.ts.map +1 -0
- package/lib/components/AppShell/index.js +2 -0
- package/lib/components/AppShell/index.js.map +1 -0
- package/lib/components/CaseView/CaseView.d.ts +6 -0
- package/lib/components/CaseView/CaseView.d.ts.map +1 -0
- package/lib/components/CaseView/CaseView.js +35 -0
- package/lib/components/CaseView/CaseView.js.map +1 -0
- package/lib/components/CaseView/CaseView.styles.d.ts +5 -0
- package/lib/components/CaseView/CaseView.styles.d.ts.map +1 -0
- package/lib/components/CaseView/CaseView.styles.js +49 -0
- package/lib/components/CaseView/CaseView.styles.js.map +1 -0
- package/lib/components/CaseView/CaseView.types.d.ts +25 -0
- package/lib/components/CaseView/CaseView.types.d.ts.map +1 -0
- package/lib/components/CaseView/CaseView.types.js +2 -0
- package/lib/components/CaseView/CaseView.types.js.map +1 -0
- package/lib/components/CaseView/index.d.ts +3 -0
- package/lib/components/CaseView/index.d.ts.map +1 -0
- package/lib/components/CaseView/index.js +2 -0
- package/lib/components/CaseView/index.js.map +1 -0
- package/lib/components/PageTemplates/BannerPage.d.ts +36 -0
- package/lib/components/PageTemplates/BannerPage.d.ts.map +1 -0
- package/lib/components/PageTemplates/BannerPage.js +70 -0
- package/lib/components/PageTemplates/BannerPage.js.map +1 -0
- package/lib/components/PageTemplates/index.d.ts +3 -0
- package/lib/components/PageTemplates/index.d.ts.map +1 -0
- package/lib/components/PageTemplates/index.js +2 -0
- package/lib/components/PageTemplates/index.js.map +1 -0
- package/lib/components/QuickCreate/QuickCreate.d.ts +17 -0
- package/lib/components/QuickCreate/QuickCreate.d.ts.map +1 -0
- package/lib/components/QuickCreate/QuickCreate.js +43 -0
- package/lib/components/QuickCreate/QuickCreate.js.map +1 -0
- package/lib/components/QuickCreate/index.d.ts +3 -0
- package/lib/components/QuickCreate/index.d.ts.map +1 -0
- package/lib/components/QuickCreate/index.js +2 -0
- package/lib/components/QuickCreate/index.js.map +1 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerPage.js","sourceRoot":"","sources":["../../../src/components/PageTemplates/BannerPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;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AAE,MAAM,CAAC,OAAO,EACvB,eAAe,EAAE,MAAM,CAAC,eAAe,EACvC,eAAe,EAAE,MAAM,CAAC,eAAe,EACvC,EAAE,EAAE,YAAY,EAChB,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,EACnF,SAAS,EAAE,MAAM,CAAC,SAAS,YAE3B,MAAC,sBAAsB,eACrB,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,YAAE,MAAM,CAAC,KAAK,GAAQ,EACvC,MAAM,CAAC,OAAO,IAAI,CACjB,KAAC,IAAI,IAAC,OAAO,EAAC,SAAS,EAAC,EAAE,EAAC,GAAG,YAC3B,MAAM,CAAC,OAAO,GACV,CACR,IACsB,GACpB,GACe,CACzB,EACD,MAAC,IAAI,IACH,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,EACrB,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAClC,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,EACtD,EAAE,EAAE,sBAAsB,aAE1B,wBAAM,CAAC,GAAO,EACb,CAAC,IAAI,wBAAM,CAAC,GAAO,IACf,IACH,CACP,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { readableColor, transparentize } from 'polished';\nimport { FC, forwardRef, PropsWithoutRef, ReactNode, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n defaultThemeProp,\n Flex,\n ForwardProps,\n Grid,\n Text,\n tryCatch\n} from '@pega/cosmos-react-core';\n\nexport interface BannerOptions {\n /** An image url for the banner */\n backgroundImage?: string;\n /** A title for the banner */\n title: string;\n /** A fallback background color if the background image is not provided */\n backgroundColor?: string;\n /** Text that will appear below the title */\n message?: string;\n /** The light variant will provide a white translucent filter over the background image\n * with dark text. The dark variant will provide the opposite.\n * @default 'light'\n */\n variant?: 'light' | 'dark';\n /** Toggles the translucent filter provided by the variant\n * @default true\n */\n tintImage?: boolean;\n}\n\nexport interface BannerPageProps {\n banner: BannerOptions;\n /** Content for the first column */\n a: ReactNode;\n /** Content for the second column. If not provided the first column will stretch. */\n b?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n /** Variants for the sizing of the content columns. Two column will make the columns equal in size. */\n variant?: 'two-column' | 'narrow-wide' | 'wide-narrow';\n}\n\nexport const StyledBannerContainer = styled.div<\n Pick<BannerOptions, 'backgroundImage' | 'backgroundColor'>\n>(({ backgroundImage, backgroundColor, theme }) => {\n return css`\n width: 100%;\n height: calc(${theme.base.spacing} * 38);\n\n ${backgroundImage &&\n css`\n background-image: url('${backgroundImage}');\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n `}\n\n ${backgroundColor &&\n css`\n background-color: ${backgroundColor};\n `}\n `;\n});\n\nStyledBannerContainer.defaultProps = defaultThemeProp;\n\nexport const StyledBanner = styled.div<\n Pick<BannerOptions, 'variant' | 'backgroundColor' | 'backgroundImage' | 'tintImage'>\n>(\n ({\n variant = 'light',\n backgroundColor,\n backgroundImage,\n tintImage = true,\n theme: {\n base: {\n palette: { light, dark }\n }\n }\n }) => {\n let textColor = variant === 'light' ? dark : light;\n let overlayColor = variant === 'light' ? transparentize(0.3, light) : transparentize(0.3, dark);\n if (backgroundColor && !backgroundImage) {\n textColor = tryCatch(() => readableColor(backgroundColor, light, dark)) ?? dark;\n overlayColor = 'transparent';\n } else if (!backgroundColor && !backgroundImage) {\n overlayColor = 'transparent';\n textColor = dark;\n }\n return css`\n background-color: ${tintImage ? overlayColor : 'transparent'};\n color: ${textColor};\n width: 100%;\n height: 100%;\n text-align: center;\n `;\n }\n);\n\nStyledBanner.defaultProps = defaultThemeProp;\n\nexport const StyledContentContainer = styled.div(\n ({\n theme: {\n base: { breakpoints, spacing }\n }\n }) => {\n return css`\n padding: calc(${spacing} * 2);\n width: 100%;\n margin: 0 auto;\n @media screen and (min-width: ${breakpoints.md}) {\n width: 100%;\n padding: calc(${spacing} * 2.5);\n }\n @media screen and (min-width: ${breakpoints.lg}) {\n max-width: 93.75rem;\n }\n `;\n }\n);\n\nStyledContentContainer.defaultProps = defaultThemeProp;\n\nconst variantMap = {\n 'two-column': '1fr 1fr',\n 'narrow-wide': '3fr 7fr',\n 'wide-narrow': '7fr 3fr'\n};\n\nexport const BannerPage: FC<BannerPageProps & ForwardProps> = forwardRef(function BannerPage(\n { banner, a, b, variant = 'two-column', ...restProps }: PropsWithoutRef<BannerPageProps>,\n ref: BannerPageProps['ref']\n) {\n const gridCols = variantMap[variant];\n return (\n <div ref={ref} {...restProps}>\n {banner && (\n <StyledBannerContainer\n backgroundImage={banner.backgroundImage}\n backgroundColor={banner.backgroundColor}\n >\n <Flex\n variant={banner.variant}\n backgroundImage={banner.backgroundImage}\n backgroundColor={banner.backgroundColor}\n as={StyledBanner}\n container={{ justify: 'center', alignItems: 'center', direction: 'column', gap: 1 }}\n tintImage={banner.tintImage}\n >\n <StyledContentContainer>\n <Text variant='h1'>{banner.title}</Text>\n {banner.message && (\n <Text variant='primary' as='p'>\n {banner.message}\n </Text>\n )}\n </StyledContentContainer>\n </Flex>\n </StyledBannerContainer>\n )}\n <Grid\n container={{ gap: 2 }}\n md={{ container: { cols: '1fr' } }}\n lg={{ container: { cols: b ? `${gridCols}` : '1fr' } }}\n as={StyledContentContainer}\n >\n <div>{a}</div>\n {b && <div>{b}</div>}\n </Grid>\n </div>\n );\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PageTemplates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/PageTemplates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { BannerPage } from './BannerPage';\nexport type { BannerPageProps } from './BannerPage';\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Ref, FunctionComponent, MouseEventHandler } from 'react';
|
|
2
|
+
import { BaseProps, ForwardProps, NoChildrenProp } from '@pega/cosmos-react-core';
|
|
3
|
+
export interface QuickCreateAction {
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
onClick: MouseEventHandler;
|
|
7
|
+
}
|
|
8
|
+
export interface QuickCreateProps extends BaseProps, NoChildrenProp {
|
|
9
|
+
heading: string;
|
|
10
|
+
actions: QuickCreateAction[];
|
|
11
|
+
ref?: Ref<HTMLDivElement>;
|
|
12
|
+
}
|
|
13
|
+
export declare const StyledQuickCreate: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
14
|
+
export declare const StyledQuickCreateButton: import("styled-components").StyledComponent<FunctionComponent<import("@pega/cosmos-react-core").ButtonProps & ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
15
|
+
declare const QuickCreate: FunctionComponent<QuickCreateProps & ForwardProps>;
|
|
16
|
+
export default QuickCreate;
|
|
17
|
+
//# sourceMappingURL=QuickCreate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuickCreate.d.ts","sourceRoot":"","sources":["../../../src/components/QuickCreate/QuickCreate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,GAAG,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG9E,OAAO,EACL,SAAS,EAIT,YAAY,EAGZ,cAAc,EAIf,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAiB,SAAQ,SAAS,EAAE,cAAc;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,iBAAiB,yGAI7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,mLAclC,CAAC;AAYH,QAAA,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,GAAG,YAAY,CAqCnE,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import styled, { css } from 'styled-components';
|
|
4
|
+
import { Button, defaultThemeProp, Flex, Grid, Icon, StyledIcon, Text, useTheme } from '@pega/cosmos-react-core';
|
|
5
|
+
export const StyledQuickCreate = styled.div `
|
|
6
|
+
& > ul {
|
|
7
|
+
list-style: none;
|
|
8
|
+
}
|
|
9
|
+
`;
|
|
10
|
+
export const StyledQuickCreateButton = styled(Button)(({ theme }) => {
|
|
11
|
+
return css `
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 6rem;
|
|
14
|
+
padding: calc(${theme.base.spacing} * 2);
|
|
15
|
+
border-radius: calc(${`${theme.base['border-radius']} * ${theme.base['border-radius']}`});
|
|
16
|
+
justify-content: start;
|
|
17
|
+
text-align: start;
|
|
18
|
+
|
|
19
|
+
& ${StyledIcon} {
|
|
20
|
+
width: 1em;
|
|
21
|
+
height: 1em;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
});
|
|
25
|
+
StyledQuickCreateButton.defaultProps = defaultThemeProp;
|
|
26
|
+
const StyledButtonText = styled.span `
|
|
27
|
+
display: -webkit-box;
|
|
28
|
+
-webkit-box-orient: vertical;
|
|
29
|
+
-webkit-line-clamp: 2;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
line-height: 1.5;
|
|
32
|
+
`;
|
|
33
|
+
const QuickCreate = forwardRef(function QuickCreate({ heading, actions, ...restProps }, ref) {
|
|
34
|
+
const theme = useTheme();
|
|
35
|
+
return (_jsxs(Flex, { ...restProps, container: { direction: 'column', gap: 2 }, as: StyledQuickCreate, ref: ref, children: [_jsx(Text, { variant: 'h2', children: heading }), _jsx(Grid, { as: 'ul', container: {
|
|
36
|
+
gap: 1,
|
|
37
|
+
cols: `repeat(auto-fill, minmax(min(${theme.base['content-width'].sm}, 100%), 1fr))`
|
|
38
|
+
}, children: actions.map(({ label, icon, onClick }) => {
|
|
39
|
+
return (_jsx("li", { children: _jsx(StyledQuickCreateButton, { onClick: onClick, variant: 'primary', children: _jsxs(Flex, { container: { gap: 2, alignItems: 'center' }, as: 'span', children: [icon && _jsx(Icon, { name: icon }), _jsx(StyledButtonText, { children: label })] }) }) }, label));
|
|
40
|
+
}) })] }));
|
|
41
|
+
});
|
|
42
|
+
export default QuickCreate;
|
|
43
|
+
//# sourceMappingURL=QuickCreate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuickCreate.js","sourceRoot":"","sources":["../../../src/components/QuickCreate/QuickCreate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA6C,MAAM,OAAO,CAAC;AAC9E,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAEL,MAAM,EACN,gBAAgB,EAChB,IAAI,EAEJ,IAAI,EACJ,IAAI,EAEJ,UAAU,EACV,IAAI,EACJ,QAAQ,EACT,MAAM,yBAAyB,CAAC;AAcjC,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAI1C,CAAC;AAEF,MAAM,CAAC,MAAM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AAQ,EAAE,EAAE,EAAE,EAAC,MAAM,aACzD,IAAI,IAAI,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,GAAI,EAC7B,KAAC,gBAAgB,cAAE,KAAK,GAAoB,IACvC,GACiB,IANnB,KAAK,CAOT,CACN,CAAC;gBACJ,CAAC,CAAC,GACG,IACF,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef, Ref, FunctionComponent, MouseEventHandler } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n BaseProps,\n Button,\n defaultThemeProp,\n Flex,\n ForwardProps,\n Grid,\n Icon,\n NoChildrenProp,\n StyledIcon,\n Text,\n useTheme\n} from '@pega/cosmos-react-core';\n\nexport interface QuickCreateAction {\n label: string;\n icon?: string;\n onClick: MouseEventHandler;\n}\n\nexport interface QuickCreateProps extends BaseProps, NoChildrenProp {\n heading: string;\n actions: QuickCreateAction[];\n ref?: Ref<HTMLDivElement>;\n}\n\nexport const StyledQuickCreate = styled.div`\n & > ul {\n list-style: none;\n }\n`;\n\nexport const StyledQuickCreateButton = styled(Button)(({ theme }) => {\n return css`\n width: 100%;\n height: 6rem;\n padding: calc(${theme.base.spacing} * 2);\n border-radius: calc(${`${theme.base['border-radius']} * ${theme.base['border-radius']}`});\n justify-content: start;\n text-align: start;\n\n & ${StyledIcon} {\n width: 1em;\n height: 1em;\n }\n `;\n});\n\nStyledQuickCreateButton.defaultProps = defaultThemeProp;\n\nconst StyledButtonText = styled.span`\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n line-height: 1.5;\n`;\n\nconst QuickCreate: FunctionComponent<QuickCreateProps & ForwardProps> = forwardRef(\n function QuickCreate(\n { heading, actions, ...restProps }: QuickCreateProps,\n ref: QuickCreateProps['ref']\n ) {\n const theme = useTheme();\n return (\n <Flex\n {...restProps}\n container={{ direction: 'column', gap: 2 }}\n as={StyledQuickCreate}\n ref={ref}\n >\n <Text variant='h2'>{heading}</Text>\n <Grid\n as='ul'\n container={{\n gap: 1,\n cols: `repeat(auto-fill, minmax(min(${theme.base['content-width'].sm}, 100%), 1fr))`\n }}\n >\n {actions.map(({ label, icon, onClick }) => {\n return (\n <li key={label}>\n <StyledQuickCreateButton onClick={onClick} variant='primary'>\n <Flex container={{ gap: 2, alignItems: 'center' }} as='span'>\n {icon && <Icon name={icon} />}\n <StyledButtonText>{label}</StyledButtonText>\n </Flex>\n </StyledQuickCreateButton>\n </li>\n );\n })}\n </Grid>\n </Flex>\n );\n }\n);\n\nexport default QuickCreate;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QuickCreate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/QuickCreate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { default } from './QuickCreate';\nexport type { QuickCreateProps } from './QuickCreate';\n"]}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as AppShell } from './components/AppShell';
|
|
2
|
+
export * from './components/AppShell';
|
|
3
|
+
export { default as CaseView } from './components/CaseView';
|
|
4
|
+
export * from './components/CaseView';
|
|
5
|
+
export * from './components/PageTemplates';
|
|
6
|
+
export { default as QuickCreate } from './components/QuickCreate';
|
|
7
|
+
export * from './components/QuickCreate';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// This file is autogenerated. Any changes will be overwritten.
|
|
2
|
+
export { default as AppShell } from './components/AppShell';
|
|
3
|
+
export * from './components/AppShell';
|
|
4
|
+
export { default as CaseView } from './components/CaseView';
|
|
5
|
+
export * from './components/CaseView';
|
|
6
|
+
export * from './components/PageTemplates';
|
|
7
|
+
export { default as QuickCreate } from './components/QuickCreate';
|
|
8
|
+
export * from './components/QuickCreate';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport { default as AppShell } from './components/AppShell';\nexport * from './components/AppShell';\nexport { default as CaseView } from './components/CaseView';\nexport * from './components/CaseView';\nexport * from './components/PageTemplates';\nexport { default as QuickCreate } from './components/QuickCreate';\nexport * from './components/QuickCreate';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-wss",
|
|
3
|
-
"version": "5.0.0-dev.
|
|
3
|
+
"version": "5.0.0-dev.5.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/pegasystems/cosmos-react.git",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"build": "tsc -b"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@pega/cosmos-react-core": "5.0.0-dev.
|
|
24
|
-
"@pega/cosmos-react-social": "5.0.0-dev.
|
|
25
|
-
"@pega/cosmos-react-work": "5.0.0-dev.
|
|
23
|
+
"@pega/cosmos-react-core": "5.0.0-dev.5.0",
|
|
24
|
+
"@pega/cosmos-react-social": "5.0.0-dev.5.0",
|
|
25
|
+
"@pega/cosmos-react-work": "5.0.0-dev.5.0",
|
|
26
26
|
"@types/react": "^17.0.62",
|
|
27
27
|
"@types/react-dom": "^17.0.20",
|
|
28
28
|
"@types/styled-components": "^5.1.26",
|