@pega/cosmos-react-cs 2.0.0-dev.2.1 → 2.0.0-dev.20.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/Article/Article.d.ts.map +1 -1
- package/lib/components/Article/Article.js +4 -19
- package/lib/components/Article/Article.js.map +1 -1
- package/lib/components/Article/ArticleFooter.d.ts.map +1 -1
- package/lib/components/Article/ArticleFooter.js +6 -7
- package/lib/components/Article/ArticleFooter.js.map +1 -1
- package/lib/components/Article/ArticleSkeleton.d.ts.map +1 -1
- package/lib/components/Article/ArticleSkeleton.js +7 -8
- package/lib/components/Article/ArticleSkeleton.js.map +1 -1
- package/lib/components/ArticleList/ArticleList.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleList.js +6 -10
- package/lib/components/ArticleList/ArticleList.js.map +1 -1
- package/lib/components/ArticleList/ArticleListHeader.d.ts +4 -1
- package/lib/components/ArticleList/ArticleListHeader.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleListHeader.js +43 -34
- package/lib/components/ArticleList/ArticleListHeader.js.map +1 -1
- package/lib/components/ArticleList/ArticleSummary.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleSummary.js +10 -7
- package/lib/components/ArticleList/ArticleSummary.js.map +1 -1
- package/lib/components/ArticleList/SummarySkeleton.d.ts.map +1 -1
- package/lib/components/ArticleList/SummarySkeleton.js +3 -11
- package/lib/components/ArticleList/SummarySkeleton.js.map +1 -1
- package/lib/components/CSCaseView/CSCaseView.d.ts +9 -0
- package/lib/components/CSCaseView/CSCaseView.d.ts.map +1 -0
- package/lib/components/CSCaseView/CSCaseView.js +16 -0
- package/lib/components/CSCaseView/CSCaseView.js.map +1 -0
- package/lib/components/CSCaseView/index.d.ts +3 -0
- package/lib/components/CSCaseView/index.d.ts.map +1 -0
- package/lib/components/CSCaseView/index.js +2 -0
- package/lib/components/CSCaseView/index.js.map +1 -0
- package/lib/components/CallControlPanel/Call.d.ts +6 -0
- package/lib/components/CallControlPanel/Call.d.ts.map +1 -0
- package/lib/components/CallControlPanel/Call.js +145 -0
- package/lib/components/CallControlPanel/Call.js.map +1 -0
- package/lib/components/CallControlPanel/CallControlPanel.d.ts +6 -0
- package/lib/components/CallControlPanel/CallControlPanel.d.ts.map +1 -0
- package/lib/components/CallControlPanel/CallControlPanel.js +68 -0
- package/lib/components/CallControlPanel/CallControlPanel.js.map +1 -0
- package/lib/components/CallControlPanel/CallControlPanel.styles.d.ts +15 -0
- package/lib/components/CallControlPanel/CallControlPanel.styles.d.ts.map +1 -0
- package/lib/components/CallControlPanel/CallControlPanel.styles.js +118 -0
- package/lib/components/CallControlPanel/CallControlPanel.styles.js.map +1 -0
- package/lib/components/CallControlPanel/CallControlPanel.types.d.ts +112 -0
- package/lib/components/CallControlPanel/CallControlPanel.types.d.ts.map +1 -0
- package/lib/components/CallControlPanel/CallControlPanel.types.js +2 -0
- package/lib/components/CallControlPanel/CallControlPanel.types.js.map +1 -0
- package/lib/components/CallControlPanel/CallControlPanelIcon.d.ts +19 -0
- package/lib/components/CallControlPanel/CallControlPanelIcon.d.ts.map +1 -0
- package/lib/components/CallControlPanel/CallControlPanelIcon.js +74 -0
- package/lib/components/CallControlPanel/CallControlPanelIcon.js.map +1 -0
- package/lib/components/CallControlPanel/CallTransfer.d.ts +19 -0
- package/lib/components/CallControlPanel/CallTransfer.d.ts.map +1 -0
- package/lib/components/CallControlPanel/CallTransfer.js +121 -0
- package/lib/components/CallControlPanel/CallTransfer.js.map +1 -0
- package/lib/components/CallControlPanel/CalleePicker.d.ts +20 -0
- package/lib/components/CallControlPanel/CalleePicker.d.ts.map +1 -0
- package/lib/components/CallControlPanel/CalleePicker.js +61 -0
- package/lib/components/CallControlPanel/CalleePicker.js.map +1 -0
- package/lib/components/CallControlPanel/ContactsList.d.ts +23 -0
- package/lib/components/CallControlPanel/ContactsList.d.ts.map +1 -0
- package/lib/components/CallControlPanel/ContactsList.js +88 -0
- package/lib/components/CallControlPanel/ContactsList.js.map +1 -0
- package/lib/components/CallControlPanel/DTMFKeypad.d.ts +11 -0
- package/lib/components/CallControlPanel/DTMFKeypad.d.ts.map +1 -0
- package/lib/components/CallControlPanel/DTMFKeypad.js +23 -0
- package/lib/components/CallControlPanel/DTMFKeypad.js.map +1 -0
- package/lib/components/CallControlPanel/StopWatch.d.ts +9 -0
- package/lib/components/CallControlPanel/StopWatch.d.ts.map +1 -0
- package/lib/components/CallControlPanel/StopWatch.js +28 -0
- package/lib/components/CallControlPanel/StopWatch.js.map +1 -0
- package/lib/components/CallControlPanel/index.d.ts +4 -0
- package/lib/components/CallControlPanel/index.d.ts.map +1 -0
- package/lib/components/CallControlPanel/index.js +3 -0
- package/lib/components/CallControlPanel/index.js.map +1 -0
- package/lib/components/CallControlPanel/utils.d.ts +7 -0
- package/lib/components/CallControlPanel/utils.d.ts.map +1 -0
- package/lib/components/CallControlPanel/utils.js +35 -0
- package/lib/components/CallControlPanel/utils.js.map +1 -0
- package/lib/components/DialPad/DialPad.d.ts +16 -0
- package/lib/components/DialPad/DialPad.d.ts.map +1 -0
- package/lib/components/DialPad/DialPad.js +33 -0
- package/lib/components/DialPad/DialPad.js.map +1 -0
- package/lib/components/DialPad/DialPad.types.d.ts +33 -0
- package/lib/components/DialPad/DialPad.types.d.ts.map +1 -0
- package/lib/components/DialPad/DialPad.types.js +2 -0
- package/lib/components/DialPad/DialPad.types.js.map +1 -0
- package/lib/components/DialPad/DialPadKeyboard.d.ts +12 -0
- package/lib/components/DialPad/DialPadKeyboard.d.ts.map +1 -0
- package/lib/components/DialPad/DialPadKeyboard.js +87 -0
- package/lib/components/DialPad/DialPadKeyboard.js.map +1 -0
- package/lib/components/DialPad/DialPadKeyboard.styles.d.ts +5 -0
- package/lib/components/DialPad/DialPadKeyboard.styles.d.ts.map +1 -0
- package/lib/components/DialPad/DialPadKeyboard.styles.js +76 -0
- package/lib/components/DialPad/DialPadKeyboard.styles.js.map +1 -0
- package/lib/components/DialPad/KeyboardNavigation.d.ts +6 -0
- package/lib/components/DialPad/KeyboardNavigation.d.ts.map +1 -0
- package/lib/components/DialPad/KeyboardNavigation.js +156 -0
- package/lib/components/DialPad/KeyboardNavigation.js.map +1 -0
- package/lib/components/DialPad/utils.d.ts +4 -0
- package/lib/components/DialPad/utils.d.ts.map +1 -0
- package/lib/components/DialPad/utils.js +7 -0
- package/lib/components/DialPad/utils.js.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts +6 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.js +75 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.js.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts +9 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js +142 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts +31 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.js +2 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.js.map +1 -0
- package/lib/components/IntelligentGuidance/index.d.ts +3 -0
- package/lib/components/IntelligentGuidance/index.d.ts.map +1 -0
- package/lib/components/IntelligentGuidance/index.js +2 -0
- package/lib/components/IntelligentGuidance/index.js.map +1 -0
- package/lib/components/InteractionNotification/InteractionNotification.d.ts.map +1 -1
- package/lib/components/InteractionNotification/InteractionNotification.js +19 -26
- package/lib/components/InteractionNotification/InteractionNotification.js.map +1 -1
- package/lib/components/InteractionTimer/InteractionTimer.d.ts +2 -4
- package/lib/components/InteractionTimer/InteractionTimer.d.ts.map +1 -1
- package/lib/components/InteractionTimer/InteractionTimer.js +14 -11
- package/lib/components/InteractionTimer/InteractionTimer.js.map +1 -1
- package/lib/components/TaskManager/Picker/Picker.d.ts.map +1 -1
- package/lib/components/TaskManager/Picker/Picker.js +138 -48
- package/lib/components/TaskManager/Picker/Picker.js.map +1 -1
- package/lib/components/TaskManager/Picker/Picker.types.d.ts +11 -2
- package/lib/components/TaskManager/Picker/Picker.types.d.ts.map +1 -1
- package/lib/components/TaskManager/Picker/Picker.types.js.map +1 -1
- package/lib/components/TaskManager/TaskManager.context.d.ts +1 -0
- package/lib/components/TaskManager/TaskManager.context.d.ts.map +1 -1
- package/lib/components/TaskManager/TaskManager.d.ts.map +1 -1
- package/lib/components/TaskManager/TaskManager.js +54 -83
- package/lib/components/TaskManager/TaskManager.js.map +1 -1
- package/lib/components/TaskManager/TaskManager.styles.d.ts +15 -20
- package/lib/components/TaskManager/TaskManager.styles.d.ts.map +1 -1
- package/lib/components/TaskManager/TaskManager.styles.js +173 -166
- package/lib/components/TaskManager/TaskManager.styles.js.map +1 -1
- package/lib/components/TaskManager/TaskManager.types.d.ts +12 -6
- package/lib/components/TaskManager/TaskManager.types.d.ts.map +1 -1
- package/lib/components/TaskManager/TaskManager.types.js.map +1 -1
- package/lib/components/TaskManager/TaskManagerTabs.d.ts +6 -0
- package/lib/components/TaskManager/TaskManagerTabs.d.ts.map +1 -0
- package/lib/components/TaskManager/TaskManagerTabs.js +159 -0
- package/lib/components/TaskManager/TaskManagerTabs.js.map +1 -0
- package/lib/components/TaskManager/TaskView.d.ts.map +1 -1
- package/lib/components/TaskManager/TaskView.js +3 -6
- package/lib/components/TaskManager/TaskView.js.map +1 -1
- package/lib/components/TaskManager/index.d.ts +1 -1
- package/lib/components/TaskManager/index.d.ts.map +1 -1
- package/lib/components/TaskManager/index.js.map +1 -1
- package/lib/index.d.ts +6 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -1
- package/package.json +14 -14
- package/lib/components/TaskManager/TaskDrawer.d.ts +0 -6
- package/lib/components/TaskManager/TaskDrawer.d.ts.map +0 -1
- package/lib/components/TaskManager/TaskDrawer.js +0 -84
- package/lib/components/TaskManager/TaskDrawer.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyboardNavigation.js","sourceRoot":"","sources":["../../../src/components/DialPad/KeyboardNavigation.ts"],"names":[],"mappings":"AAGA,MAAM,SAAS,GAA6B;IAC1C;QACE,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,EAAE;QACX,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,CAAC;KACR;IACD;QACE,IAAI,EAAE,GAAG;QACT,GAAG,EAAE,KAAK;QACV,OAAO,EAAE,EAAE;QACX,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,CAAC;QACP,IAAI,EAAE,CAAC;KACR;IACD;QACE,IAAI,EAAE,GAAG;QACT,GAAG,EAAE,KAAK;QACV,OAAO,EAAE,EAAE;QACX,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,CAAC;QACP,IAAI,EAAE,CAAC;KACR;IACD;QACE,IAAI,EAAE,GAAG;QACT,GAAG,EAAE,KAAK;QACV,OAAO,EAAE,EAAE;QACX,GAAG,EAAE,SAAS;QACd,EAAE,EAAE,CAAC;QACL,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,CAAC;KACR;IACD;QACE,IAAI,EAAE,GAAG;QACT,GAAG,EAAE,KAAK;QACV,OAAO,EAAE,EAAE;QACX,GAAG,EAAE,SAAS;QACd,EAAE,EAAE,CAAC;QACL,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,CAAC;QACP,IAAI,EAAE,CAAC;KACR;IACD;QACE,IAAI,EAAE,GAAG;QACT,GAAG,EAAE,KAAK;QACV,OAAO,EAAE,EAAE;QACX,GAAG,EAAE,SAAS;QACd,EAAE,EAAE,CAAC;QACL,IAAI,EAAE,CAAC;QACP,IAAI,EAAE,CAAC;KACR;IACD;QACE,IAAI,EAAE,GAA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CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IAC1C,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;CAC7C,CAAC","sourcesContent":["// cSpell:words PQRS WXYZ\nimport { NavigationGraphElement } from './DialPad.types';\n\nconst baseGraph: NavigationGraphElement[] = [\n {\n sign: '1',\n keyCode: 49,\n ref: undefined,\n right: 1,\n down: 3\n },\n {\n sign: '2',\n alt: 'ABC',\n keyCode: 50,\n ref: undefined,\n right: 2,\n down: 4,\n left: 0\n },\n {\n sign: '3',\n alt: 'DEF',\n keyCode: 51,\n ref: undefined,\n down: 5,\n left: 1\n },\n {\n sign: '4',\n alt: 'GHI',\n keyCode: 52,\n ref: undefined,\n up: 0,\n right: 4,\n down: 6\n },\n {\n sign: '5',\n alt: 'JKL',\n keyCode: 53,\n ref: undefined,\n up: 1,\n right: 5,\n down: 7,\n left: 3\n },\n {\n sign: '6',\n alt: 'MNO',\n keyCode: 54,\n ref: undefined,\n up: 2,\n down: 8,\n left: 4\n },\n {\n sign: '7',\n alt: 'PQRS',\n keyCode: 55,\n ref: undefined,\n up: 3,\n right: 7,\n down: 9\n },\n {\n sign: '8',\n alt: 'TUV',\n keyCode: 56,\n ref: undefined,\n up: 4,\n right: 8,\n down: 10,\n left: 6\n },\n {\n sign: '9',\n alt: 'WXYZ',\n keyCode: 57,\n ref: undefined,\n up: 5,\n down: 11,\n left: 7\n },\n {\n special: '*',\n keyCode: 42,\n ref: undefined,\n up: 6,\n right: 10,\n down: 12\n }\n];\n\nexport const dtmfGraph = baseGraph.concat([\n {\n sign: '0',\n alt: '+',\n keyCode: 48,\n altKeyCode: 43,\n ref: undefined,\n up: 7,\n right: 11,\n left: 9\n },\n {\n special: '#',\n keyCode: 35,\n ref: undefined,\n up: 8,\n left: 10\n },\n {\n icon: 'backspace',\n keyCode: 127,\n ref: undefined,\n up: 10\n }\n]);\n\nexport const defaultGraph = baseGraph.concat([\n {\n sign: '0',\n alt: '+',\n keyCode: 48,\n altKeyCode: 43,\n ref: undefined,\n up: 7,\n right: 11,\n down: 12,\n left: 9\n },\n {\n special: '#',\n keyCode: 35,\n ref: undefined,\n up: 8,\n down: 12,\n left: 10\n },\n {\n icon: 'backspace',\n keyCode: 127,\n ref: undefined,\n up: 10\n }\n]);\n\nexport const defaultButtonGrid = [\n [defaultGraph[0], defaultGraph[1], defaultGraph[2]],\n [defaultGraph[3], defaultGraph[4], defaultGraph[5]],\n [defaultGraph[6], defaultGraph[7], defaultGraph[8]],\n [defaultGraph[9], defaultGraph[10], defaultGraph[11]],\n [defaultGraph[12]]\n];\n\nexport const dtmfButtonGrid = [\n [dtmfGraph[0], dtmfGraph[1], dtmfGraph[2]],\n [dtmfGraph[3], dtmfGraph[4], dtmfGraph[5]],\n [dtmfGraph[6], dtmfGraph[7], dtmfGraph[8]],\n [dtmfGraph[9], dtmfGraph[10], dtmfGraph[11]]\n];\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/DialPad/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAO,MAAM,kBAAkB,MAAO,aAAa,KAAG,MAIrD,CAAC;AAEF,eAAO,MAAM,iBAAiB,MAAO,aAAa,YAEjD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const getDialButtonIndex = (e) => {
|
|
2
|
+
return ['1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '0', '#', 'Backspace'].findIndex(key => key === e.key);
|
|
3
|
+
};
|
|
4
|
+
export const isNavigationEvent = (e) => {
|
|
5
|
+
return ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(e.key);
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/DialPad/utils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAgB,EAAU,EAAE;IAC7D,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC,SAAS,CACxF,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CACrB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAgB,EAAE,EAAE;IACpD,OAAO,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAC7E,CAAC,CAAC","sourcesContent":["import { KeyboardEvent } from 'react';\n\nexport const getDialButtonIndex = (e: KeyboardEvent): number => {\n return ['1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '0', '#', 'Backspace'].findIndex(\n key => key === e.key\n );\n};\n\nexport const isNavigationEvent = (e: KeyboardEvent) => {\n return ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(e.key);\n};\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { ForwardProps } from '@pega/cosmos-react-core';
|
|
3
|
+
import type IntelligentGuidanceProps from './IntelligentGuidance.types';
|
|
4
|
+
declare const IntelligentGuidance: FunctionComponent<IntelligentGuidanceProps & ForwardProps>;
|
|
5
|
+
export default IntelligentGuidance;
|
|
6
|
+
//# sourceMappingURL=IntelligentGuidance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntelligentGuidance.d.ts","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAOlB,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,YAAY,EAQb,MAAM,yBAAyB,CAAC;AAQjC,OAAO,KAAK,wBAAwB,MAAM,6BAA6B,CAAC;AAIxE,QAAA,MAAM,mBAAmB,EAAE,iBAAiB,CAAC,wBAAwB,GAAG,YAAY,CA8GnF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
3
|
+
import { Icon, registerIcon, useI18n, Count, useBreakpoint, usePrevious } from '@pega/cosmos-react-core';
|
|
4
|
+
import * as polarisSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/polaris-solid.icon';
|
|
5
|
+
import { StyledIntelligentGuidanceList, StyledIntelligentGuidance, StyledIntelligentGuidanceButton } from './IntelligentGuidance.styles';
|
|
6
|
+
registerIcon(polarisSolidIcon);
|
|
7
|
+
const IntelligentGuidance = forwardRef(({ items, heading, ...restProps }, ref) => {
|
|
8
|
+
const t = useI18n();
|
|
9
|
+
const isMediumOrAbove = useBreakpoint('md');
|
|
10
|
+
const [isCollapsed, setIsCollapsed] = useState(true);
|
|
11
|
+
const previousItems = usePrevious(items);
|
|
12
|
+
const summaryListRef = useRef(null);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const previousItemsCount = previousItems?.length || 0;
|
|
15
|
+
if (previousItemsCount < items.length) {
|
|
16
|
+
setIsCollapsed(false);
|
|
17
|
+
}
|
|
18
|
+
else if (previousItemsCount && !items.length) {
|
|
19
|
+
setIsCollapsed(true);
|
|
20
|
+
}
|
|
21
|
+
}, [previousItems, items]);
|
|
22
|
+
const listItems = items.map(item => {
|
|
23
|
+
return {
|
|
24
|
+
id: item.id,
|
|
25
|
+
visual: _jsx(Icon, { name: item.icon }, void 0),
|
|
26
|
+
primary: item.label,
|
|
27
|
+
secondary: item.type,
|
|
28
|
+
actions: item.onDismiss
|
|
29
|
+
? [
|
|
30
|
+
{
|
|
31
|
+
text: t('dismiss_label_a11y', [item.label]),
|
|
32
|
+
id: item.id,
|
|
33
|
+
icon: 'times',
|
|
34
|
+
onClick: (id, e) => {
|
|
35
|
+
e.stopPropagation();
|
|
36
|
+
item.onDismiss?.(id, e);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
: undefined,
|
|
41
|
+
container: { colGap: 1 },
|
|
42
|
+
role: 'button',
|
|
43
|
+
tabIndex: 0,
|
|
44
|
+
'aria-label': t('continue_label_a11y', [item.label]),
|
|
45
|
+
onClick: item.onClick,
|
|
46
|
+
onKeyDown: (e) => {
|
|
47
|
+
if (e.key === 'Enter') {
|
|
48
|
+
item.onClick(e);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
const [headerHeight, setHeaderHeight] = useState(0);
|
|
54
|
+
useLayoutEffect(() => {
|
|
55
|
+
if (summaryListRef.current) {
|
|
56
|
+
setHeaderHeight(summaryListRef.current.querySelector('header')?.offsetHeight || 0);
|
|
57
|
+
}
|
|
58
|
+
}, [summaryListRef.current]);
|
|
59
|
+
return (_jsx(StyledIntelligentGuidance, { ...restProps, ref: ref, role: 'region', "aria-live": 'polite', "aria-relevant": 'all', isCollapsed: isCollapsed, hasItems: !!items.length, children: isMediumOrAbove || !isCollapsed ? (_jsx(StyledIntelligentGuidanceList, { ref: summaryListRef, icon: 'polaris-solid', name: heading, count: items.length, items: listItems, actions: [
|
|
60
|
+
{
|
|
61
|
+
text: t(isCollapsed
|
|
62
|
+
? 'expand_intelligent_guidance_button_a11y'
|
|
63
|
+
: 'collapse_intelligent_guidance_button_a11y'),
|
|
64
|
+
id: 'IntelligentGuidanceButton',
|
|
65
|
+
icon: 'caret-down',
|
|
66
|
+
onClick() {
|
|
67
|
+
setIsCollapsed(prevState => !prevState);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
], EmptyStateText: t('no_recommendations'), style: { '--headerHeight': `${headerHeight}px` } }, void 0)) : (_jsxs(StyledIntelligentGuidanceButton, { variant: 'simple', "aria-label": t('expand_intelligent_guidance_button_a11y'), icon: true, onClick: () => {
|
|
71
|
+
setIsCollapsed(false);
|
|
72
|
+
}, children: [_jsx(Icon, { name: 'polaris-solid' }, void 0), _jsx(Count, { children: items.length }, void 0)] }, void 0)) }, void 0));
|
|
73
|
+
});
|
|
74
|
+
export default IntelligentGuidance;
|
|
75
|
+
//# sourceMappingURL=IntelligentGuidance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntelligentGuidance.js","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAIV,SAAS,EACT,eAAe,EACf,MAAM,EACN,QAAQ,EACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,IAAI,EACJ,YAAY,EAEZ,OAAO,EACP,KAAK,EACL,aAAa,EACb,WAAW,EACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,gBAAgB,MAAM,sEAAsE,CAAC;AAEzG,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EACzB,+BAA+B,EAChC,MAAM,8BAA8B,CAAC;AAGtC,YAAY,CAAC,gBAAgB,CAAC,CAAC;AAE/B,MAAM,mBAAmB,GAA+D,UAAU,CAChG,CACE,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,SAAS,EAA6C,EAC3E,GAAoC,EACpC,EAAE;IACF,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,eAAe,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAC5C,MAAM,CA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AI,EAAE,YAAY;oBAClB,OAAO;wBACL,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;oBAC1C,CAAC;iBACF;aACF,EACD,cAAc,EAAE,CAAC,CAAC,oBAAoB,CAAC,EACvC,KAAK,EAAE,EAAE,gBAAgB,EAAE,GAAG,YAAY,IAAI,EAAE,WAChD,CACH,CAAC,CAAC,CAAC,CACF,MAAC,+BAA+B,IAC9B,OAAO,EAAC,QAAQ,gBACJ,CAAC,CAAC,yCAAyC,CAAC,EACxD,IAAI,QACJ,OAAO,EAAE,GAAG,EAAE;gBACZ,cAAc,CAAC,KAAK,CAAC,CAAC;YACxB,CAAC,aAED,KAAC,IAAI,IAAC,IAAI,EAAC,eAAe,WAAG,EAC7B,KAAC,KAAK,cAAE,KAAK,CAAC,MAAM,WAAS,YACG,CACnC,WACyB,CAC7B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n KeyboardEvent,\n PropsWithoutRef,\n useEffect,\n useLayoutEffect,\n useRef,\n useState\n} from 'react';\n\nimport {\n ForwardProps,\n Icon,\n registerIcon,\n SummaryListItem,\n useI18n,\n Count,\n useBreakpoint,\n usePrevious\n} from '@pega/cosmos-react-core';\nimport * as polarisSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/polaris-solid.icon';\n\nimport {\n StyledIntelligentGuidanceList,\n StyledIntelligentGuidance,\n StyledIntelligentGuidanceButton\n} from './IntelligentGuidance.styles';\nimport type IntelligentGuidanceProps from './IntelligentGuidance.types';\n\nregisterIcon(polarisSolidIcon);\n\nconst IntelligentGuidance: FunctionComponent<IntelligentGuidanceProps & ForwardProps> = forwardRef(\n (\n { items, heading, ...restProps }: PropsWithoutRef<IntelligentGuidanceProps>,\n ref: IntelligentGuidanceProps['ref']\n ) => {\n const t = useI18n();\n const isMediumOrAbove = useBreakpoint('md');\n const [isCollapsed, setIsCollapsed] = useState(true);\n const previousItems = usePrevious(items);\n const summaryListRef = useRef<HTMLElement>(null);\n\n useEffect(() => {\n const previousItemsCount = previousItems?.length || 0;\n if (previousItemsCount < items.length) {\n setIsCollapsed(false);\n } else if (previousItemsCount && !items.length) {\n setIsCollapsed(true);\n }\n }, [previousItems, items]);\n\n const listItems: SummaryListItem[] = items.map(item => {\n return {\n id: item.id,\n visual: <Icon name={item.icon} />,\n primary: item.label,\n secondary: item.type,\n actions: item.onDismiss\n ? [\n {\n text: t('dismiss_label_a11y', [item.label]),\n id: item.id,\n icon: 'times',\n onClick: (id, e) => {\n e.stopPropagation();\n item.onDismiss?.(id, e);\n }\n }\n ]\n : undefined,\n container: { colGap: 1 },\n role: 'button',\n tabIndex: 0,\n 'aria-label': t('continue_label_a11y', [item.label]),\n onClick: item.onClick,\n onKeyDown: (e: KeyboardEvent) => {\n if (e.key === 'Enter') {\n item.onClick(e);\n }\n }\n };\n });\n\n const [headerHeight, setHeaderHeight] = useState(0);\n\n useLayoutEffect(() => {\n if (summaryListRef.current) {\n setHeaderHeight(summaryListRef.current.querySelector('header')?.offsetHeight || 0);\n }\n }, [summaryListRef.current]);\n\n return (\n <StyledIntelligentGuidance\n {...restProps}\n ref={ref}\n role='region'\n aria-live='polite'\n aria-relevant='all'\n isCollapsed={isCollapsed}\n hasItems={!!items.length}\n >\n {isMediumOrAbove || !isCollapsed ? (\n <StyledIntelligentGuidanceList\n ref={summaryListRef}\n icon='polaris-solid'\n name={heading}\n count={items.length}\n items={listItems}\n actions={[\n {\n text: t(\n isCollapsed\n ? 'expand_intelligent_guidance_button_a11y'\n : 'collapse_intelligent_guidance_button_a11y'\n ),\n id: 'IntelligentGuidanceButton',\n icon: 'caret-down',\n onClick() {\n setIsCollapsed(prevState => !prevState);\n }\n }\n ]}\n EmptyStateText={t('no_recommendations')}\n style={{ '--headerHeight': `${headerHeight}px` }}\n />\n ) : (\n <StyledIntelligentGuidanceButton\n variant='simple'\n aria-label={t('expand_intelligent_guidance_button_a11y')}\n icon\n onClick={() => {\n setIsCollapsed(false);\n }}\n >\n <Icon name='polaris-solid' />\n <Count>{items.length}</Count>\n </StyledIntelligentGuidanceButton>\n )}\n </StyledIntelligentGuidance>\n );\n }\n);\n\nexport default IntelligentGuidance;\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledIntelligentGuidanceList: import("styled-components").StyledComponent<import("react").FC<import("@pega/cosmos-react-core").SummaryListProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const StyledIntelligentGuidanceButton: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").ButtonProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export interface StyledIntelligentGuidanceProps {
|
|
5
|
+
isCollapsed: boolean;
|
|
6
|
+
hasItems: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const StyledIntelligentGuidance: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledIntelligentGuidanceProps, never>;
|
|
9
|
+
//# sourceMappingURL=IntelligentGuidance.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntelligentGuidance.styles.d.ts","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.styles.ts"],"names":[],"mappings":";AAwBA,eAAO,MAAM,6BAA6B,2NA8ExC,CAAC;AAIH,eAAO,MAAM,+BAA+B,qOAiB1C,CAAC;AAaH,MAAM,WAAW,8BAA8B;IAC7C,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,yBAAyB,qIA8BrC,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import styled, { css, keyframes } from 'styled-components';
|
|
2
|
+
import { lighten } from 'polished';
|
|
3
|
+
import { Button, defaultThemeProp, StyledButton, StyledCard, StyledFlex, StyledIcon, StyledEmptyState, SummaryList, StyledText, tryCatch, StyledSummaryItem, StyledVisual } from '@pega/cosmos-react-core';
|
|
4
|
+
import { StyledCount } from '@pega/cosmos-react-core/lib/components/Badges/Count';
|
|
5
|
+
import { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';
|
|
6
|
+
import { StyledSummaryListContent } from '@pega/cosmos-react-core/lib/components/SummaryList/SummaryList';
|
|
7
|
+
const navWidth = '4rem';
|
|
8
|
+
const itemIconSize = '2rem';
|
|
9
|
+
export const StyledIntelligentGuidanceList = styled(SummaryList)(({ theme }) => {
|
|
10
|
+
const borderColor = tryCatch(() => lighten(0.1, theme.components['app-shell'].nav['background-color']));
|
|
11
|
+
const hoverColor = tryCatch(() => lighten(0.05, theme.components['app-shell'].nav['background-color']));
|
|
12
|
+
return css `
|
|
13
|
+
min-width: 20rem;
|
|
14
|
+
max-width: 20rem;
|
|
15
|
+
color: ${theme.base.palette.light};
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
box-shadow: ${theme.base.shadow.low};
|
|
18
|
+
@media (min-width: ${theme.base.breakpoints.lg}) {
|
|
19
|
+
min-width: 23rem;
|
|
20
|
+
max-width: 23rem;
|
|
21
|
+
}
|
|
22
|
+
&:not(& &) {
|
|
23
|
+
background-color: ${theme.components['app-shell'].nav['background-color']};
|
|
24
|
+
}
|
|
25
|
+
${StyledCardHeader} {
|
|
26
|
+
&:not(${StyledCard} ${StyledCard} > &) {
|
|
27
|
+
padding: ${theme.base.spacing};
|
|
28
|
+
}
|
|
29
|
+
${StyledFlex} > ${StyledIcon} {
|
|
30
|
+
width: ${itemIconSize};
|
|
31
|
+
height: ${itemIconSize};
|
|
32
|
+
padding: calc(0.75 * ${theme.base.spacing});
|
|
33
|
+
border-radius: calc(3 * ${theme.base['border-radius']});
|
|
34
|
+
background-color: ${theme.base.palette.success};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
${StyledSummaryListContent} {
|
|
38
|
+
&:not(${StyledCard} ${StyledCard} > &) {
|
|
39
|
+
padding: 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
${StyledButton}:enabled:focus {
|
|
43
|
+
box-shadow: ${theme.base.shadow['focus-inverted']};
|
|
44
|
+
}
|
|
45
|
+
${StyledSummaryItem} {
|
|
46
|
+
padding: ${theme.base.spacing};
|
|
47
|
+
border-top: ${theme.components.button['border-width']} solid ${borderColor};
|
|
48
|
+
outline: none;
|
|
49
|
+
${StyledVisual} ${StyledIcon} {
|
|
50
|
+
width: ${itemIconSize};
|
|
51
|
+
height: ${itemIconSize};
|
|
52
|
+
padding: calc(0.75 * ${theme.base.spacing});
|
|
53
|
+
}
|
|
54
|
+
${StyledButton} {
|
|
55
|
+
visibility: hidden;
|
|
56
|
+
}
|
|
57
|
+
&:not(:last-child) {
|
|
58
|
+
border-bottom: none;
|
|
59
|
+
}
|
|
60
|
+
&:hover {
|
|
61
|
+
background-color: ${hoverColor};
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
}
|
|
64
|
+
&:hover,
|
|
65
|
+
&:focus,
|
|
66
|
+
&:focus-within {
|
|
67
|
+
${StyledButton} {
|
|
68
|
+
visibility: visible;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
&:enabled:focus,
|
|
72
|
+
&:not([disabled]):focus {
|
|
73
|
+
box-shadow: inset ${theme.base.shadow['focus-inverted']};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
${StyledEmptyState} {
|
|
77
|
+
padding-bottom: ${theme.base.spacing};
|
|
78
|
+
${StyledIcon}, ${StyledText} {
|
|
79
|
+
color: ${theme.base.palette.light};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
`;
|
|
83
|
+
});
|
|
84
|
+
StyledIntelligentGuidanceList.defaultProps = defaultThemeProp;
|
|
85
|
+
export const StyledIntelligentGuidanceButton = styled(Button)(({ theme }) => {
|
|
86
|
+
return css `
|
|
87
|
+
box-shadow: ${theme.base.shadow.low};
|
|
88
|
+
color: ${theme.base.palette.light};
|
|
89
|
+
background-color: ${theme.base.palette.success};
|
|
90
|
+
width: 4rem;
|
|
91
|
+
height: 4rem;
|
|
92
|
+
svg {
|
|
93
|
+
width: 2.25rem;
|
|
94
|
+
height: 2.25rem;
|
|
95
|
+
}
|
|
96
|
+
${StyledCount} {
|
|
97
|
+
position: absolute;
|
|
98
|
+
right: 0;
|
|
99
|
+
top: 0;
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
});
|
|
103
|
+
StyledIntelligentGuidanceButton.defaultProps = defaultThemeProp;
|
|
104
|
+
const slideIn = keyframes `
|
|
105
|
+
0% {
|
|
106
|
+
transform: translateY(100%);
|
|
107
|
+
}
|
|
108
|
+
100% {
|
|
109
|
+
transform: translateY(0);
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
112
|
+
export const StyledIntelligentGuidance = styled.div(({ theme, isCollapsed }) => {
|
|
113
|
+
return css `
|
|
114
|
+
position: fixed;
|
|
115
|
+
inset-inline-start: calc(2 * ${theme.base.spacing} + ${navWidth});
|
|
116
|
+
bottom: ${isCollapsed ? `calc(2 * ${theme.base.spacing}) ` : 0};
|
|
117
|
+
@media (min-width: ${theme.base.breakpoints.md}) {
|
|
118
|
+
bottom: 0;
|
|
119
|
+
}
|
|
120
|
+
z-index: ${theme.base['z-index'].popover};
|
|
121
|
+
${StyledIntelligentGuidanceList}:not(${StyledIntelligentGuidanceList} ${StyledIntelligentGuidanceList}) {
|
|
122
|
+
border-bottom-left-radius: 0;
|
|
123
|
+
border-bottom-right-radius: 0;
|
|
124
|
+
transition: transform calc(4 * ${theme.base.animation.speed})
|
|
125
|
+
${theme.base.animation.timing.ease};
|
|
126
|
+
${isCollapsed &&
|
|
127
|
+
css `
|
|
128
|
+
transform: translateY(calc(100% - var(--headerHeight)));
|
|
129
|
+
`}
|
|
130
|
+
${StyledCardHeader} ${StyledButton} {
|
|
131
|
+
transition: transform calc(2 * ${theme.base.animation.speed})
|
|
132
|
+
${theme.base.animation.timing.ease};
|
|
133
|
+
transform: ${isCollapsed ? 'rotate(-180deg)' : 'rotate(0)'};
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
${StyledIntelligentGuidanceButton} {
|
|
137
|
+
animation: ${slideIn} calc(4 * ${theme.base.animation.speed});
|
|
138
|
+
}
|
|
139
|
+
`;
|
|
140
|
+
});
|
|
141
|
+
StyledIntelligentGuidance.defaultProps = defaultThemeProp;
|
|
142
|
+
//# sourceMappingURL=IntelligentGuidance.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntelligentGuidance.styles.js","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,YAAY,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,gEAAgE,CAAC;AAE1G,MAAM,QAAQ,GAAG,MAAM,CAAC;AACxB,MAAM,YAAY,GAAG,MAAM,CAAC;AAE5B,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7E,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,EAAE,CAChC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC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CACC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK;cACvD,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI;uBACvB,WAAW,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,WAAW;;;QAG5D,+BAA+B;qBAClB,OAAO,aAAa,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK;;KAE9D,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,yBAAyB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css, keyframes } from 'styled-components';\nimport { lighten } from 'polished';\n\nimport {\n Button,\n defaultThemeProp,\n StyledButton,\n StyledCard,\n StyledFlex,\n StyledIcon,\n StyledEmptyState,\n SummaryList,\n StyledText,\n tryCatch,\n StyledSummaryItem,\n StyledVisual\n} from '@pega/cosmos-react-core';\nimport { StyledCount } from '@pega/cosmos-react-core/lib/components/Badges/Count';\nimport { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';\nimport { StyledSummaryListContent } from '@pega/cosmos-react-core/lib/components/SummaryList/SummaryList';\n\nconst navWidth = '4rem';\nconst itemIconSize = '2rem';\n\nexport const StyledIntelligentGuidanceList = styled(SummaryList)(({ theme }) => {\n const borderColor = tryCatch(() =>\n lighten(0.1, theme.components['app-shell'].nav['background-color'])\n );\n const hoverColor = tryCatch(() =>\n lighten(0.05, theme.components['app-shell'].nav['background-color'])\n );\n return css`\n min-width: 20rem;\n max-width: 20rem;\n color: ${theme.base.palette.light};\n overflow: hidden;\n box-shadow: ${theme.base.shadow.low};\n @media (min-width: ${theme.base.breakpoints.lg}) {\n min-width: 23rem;\n max-width: 23rem;\n }\n &:not(& &) {\n background-color: ${theme.components['app-shell'].nav['background-color']};\n }\n ${StyledCardHeader} {\n &:not(${StyledCard} ${StyledCard} > &) {\n padding: ${theme.base.spacing};\n }\n ${StyledFlex} > ${StyledIcon} {\n width: ${itemIconSize};\n height: ${itemIconSize};\n padding: calc(0.75 * ${theme.base.spacing});\n border-radius: calc(3 * ${theme.base['border-radius']});\n background-color: ${theme.base.palette.success};\n }\n }\n ${StyledSummaryListContent} {\n &:not(${StyledCard} ${StyledCard} > &) {\n padding: 0;\n }\n }\n ${StyledButton}:enabled:focus {\n box-shadow: ${theme.base.shadow['focus-inverted']};\n }\n ${StyledSummaryItem} {\n padding: ${theme.base.spacing};\n border-top: ${theme.components.button['border-width']} solid ${borderColor};\n outline: none;\n ${StyledVisual} ${StyledIcon} {\n width: ${itemIconSize};\n height: ${itemIconSize};\n padding: calc(0.75 * ${theme.base.spacing});\n }\n ${StyledButton} {\n visibility: hidden;\n }\n &:not(:last-child) {\n border-bottom: none;\n }\n &:hover {\n background-color: ${hoverColor};\n cursor: pointer;\n }\n &:hover,\n &:focus,\n &:focus-within {\n ${StyledButton} {\n visibility: visible;\n }\n }\n &:enabled:focus,\n &:not([disabled]):focus {\n box-shadow: inset ${theme.base.shadow['focus-inverted']};\n }\n }\n ${StyledEmptyState} {\n padding-bottom: ${theme.base.spacing};\n ${StyledIcon}, ${StyledText} {\n color: ${theme.base.palette.light};\n }\n }\n `;\n});\n\nStyledIntelligentGuidanceList.defaultProps = defaultThemeProp;\n\nexport const StyledIntelligentGuidanceButton = styled(Button)(({ theme }) => {\n return css`\n box-shadow: ${theme.base.shadow.low};\n color: ${theme.base.palette.light};\n background-color: ${theme.base.palette.success};\n width: 4rem;\n height: 4rem;\n svg {\n width: 2.25rem;\n height: 2.25rem;\n }\n ${StyledCount} {\n position: absolute;\n right: 0;\n top: 0;\n }\n `;\n});\n\nStyledIntelligentGuidanceButton.defaultProps = defaultThemeProp;\n\nconst slideIn = keyframes`\n 0% {\n transform: translateY(100%);\n }\n 100% {\n transform: translateY(0);\n }\n`;\n\nexport interface StyledIntelligentGuidanceProps {\n isCollapsed: boolean;\n hasItems: boolean;\n}\n\nexport const StyledIntelligentGuidance = styled.div<StyledIntelligentGuidanceProps>(\n ({ theme, isCollapsed }) => {\n return css`\n position: fixed;\n inset-inline-start: calc(2 * ${theme.base.spacing} + ${navWidth});\n bottom: ${isCollapsed ? `calc(2 * ${theme.base.spacing}) ` : 0};\n @media (min-width: ${theme.base.breakpoints.md}) {\n bottom: 0;\n }\n z-index: ${theme.base['z-index'].popover};\n ${StyledIntelligentGuidanceList}:not(${StyledIntelligentGuidanceList} ${StyledIntelligentGuidanceList}) {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n transition: transform calc(4 * ${theme.base.animation.speed})\n ${theme.base.animation.timing.ease};\n ${isCollapsed &&\n css`\n transform: translateY(calc(100% - var(--headerHeight)));\n `}\n ${StyledCardHeader} ${StyledButton} {\n transition: transform calc(2 * ${theme.base.animation.speed})\n ${theme.base.animation.timing.ease};\n transform: ${isCollapsed ? 'rotate(-180deg)' : 'rotate(0)'};\n }\n }\n ${StyledIntelligentGuidanceButton} {\n animation: ${slideIn} calc(4 * ${theme.base.animation.speed});\n }\n `;\n }\n);\n\nStyledIntelligentGuidance.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { MouseEvent, KeyboardEvent, Ref } from 'react';
|
|
2
|
+
import { BaseProps, IconProps } from '@pega/cosmos-react-core';
|
|
3
|
+
export interface IntelligentGuidanceItemProps {
|
|
4
|
+
/** Unique id for item */
|
|
5
|
+
id: string;
|
|
6
|
+
/** The label text of the item. */
|
|
7
|
+
label: string;
|
|
8
|
+
/**
|
|
9
|
+
* Name of the icon (to be selected from default Pega icon set)
|
|
10
|
+
*/
|
|
11
|
+
icon: IconProps['name'];
|
|
12
|
+
/** Represents the type of task */
|
|
13
|
+
type: string;
|
|
14
|
+
/**
|
|
15
|
+
* Click handler for the action button.
|
|
16
|
+
*/
|
|
17
|
+
onClick: (e: MouseEvent | KeyboardEvent) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Dismiss handler for the action button.
|
|
20
|
+
*/
|
|
21
|
+
onDismiss?: (id: IntelligentGuidanceItemProps['id'], e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement>) => void;
|
|
22
|
+
}
|
|
23
|
+
export default interface IntelligentGuidanceProps extends BaseProps {
|
|
24
|
+
/** List of guidance items. */
|
|
25
|
+
items: IntelligentGuidanceItemProps[];
|
|
26
|
+
/** Header text. */
|
|
27
|
+
heading: string;
|
|
28
|
+
/** Ref for the wrapping element. */
|
|
29
|
+
ref?: Ref<HTMLDivElement>;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=IntelligentGuidance.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntelligentGuidance.types.d.ts","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE/D,MAAM,WAAW,4BAA4B;IAC3C,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,GAAG,aAAa,KAAK,IAAI,CAAC;IACjD;;OAEG;IACH,SAAS,CAAC,EAAE,CACV,EAAE,EAAE,4BAA4B,CAAC,IAAI,CAAC,EACtC,CAAC,EAAE,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,GAAG,gBAAgB,CAAC,KACpE,IAAI,CAAC;CACX;AAED,MAAM,CAAC,OAAO,WAAW,wBAAyB,SAAQ,SAAS;IACjE,8BAA8B;IAC9B,KAAK,EAAE,4BAA4B,EAAE,CAAC;IACtC,mBAAmB;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntelligentGuidance.types.js","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.types.ts"],"names":[],"mappings":"","sourcesContent":["import { MouseEvent, KeyboardEvent, Ref } from 'react';\n\nimport { BaseProps, IconProps } from '@pega/cosmos-react-core';\n\nexport interface IntelligentGuidanceItemProps {\n /** Unique id for item */\n id: string;\n /** The label text of the item. */\n label: string;\n /**\n * Name of the icon (to be selected from default Pega icon set)\n */\n icon: IconProps['name'];\n /** Represents the type of task */\n type: string;\n /**\n * Click handler for the action button.\n */\n onClick: (e: MouseEvent | KeyboardEvent) => void;\n /**\n * Dismiss handler for the action button.\n */\n onDismiss?: (\n id: IntelligentGuidanceItemProps['id'],\n e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement>\n ) => void;\n}\n\nexport default interface IntelligentGuidanceProps extends BaseProps {\n /** List of guidance items. */\n items: IntelligentGuidanceItemProps[];\n /** Header text. */\n heading: string;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["export { default } from './IntelligentGuidance';\nexport { default as IntelligentGuidanceProps } from './IntelligentGuidance.types';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InteractionNotification.d.ts","sourceRoot":"","sources":["../../../src/components/InteractionNotification/InteractionNotification.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"InteractionNotification.d.ts","sourceRoot":"","sources":["../../../src/components/InteractionNotification/InteractionNotification.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAmB,GAAG,EAAE,MAAM,OAAO,CAAC;AAG5E,OAAO,EAQL,WAAW,EACX,YAAY,EAWZ,mBAAmB,EAEpB,MAAM,yBAAyB,CAAC;AAKjC,MAAM,WAAW,4BAA4B;IAC3C,wBAAwB;IACxB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,wFAAwF;IACxF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oDAAoD;IACpD,MAAM,EAAE;QAAE,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1D,iFAAiF;IACjF,MAAM,CAAC,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACvC,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAqED,QAAA,MAAM,uBAAuB,EAAE,iBAAiB,CAAC,4BAA4B,GAAG,YAAY,CA6CzF,CAAC;AAEJ,eAAe,uBAAuB,CAAC"}
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import styled, { css } from 'styled-components';
|
|
3
|
-
import { Button, Card, CardContent, CardHeader, Status, Text, SummaryItem, defaultThemeProp, Flex, StyledText, Avatar, FieldValueList, StyledFieldName, CardFooter, StyledFieldValueList, StyledButton, useI18n } from '@pega/cosmos-react-core';
|
|
4
|
+
import { Button, Card, CardContent, CardHeader, Status, Text, SummaryItem, defaultThemeProp, Flex, StyledText, Avatar, FieldValueList, StyledFieldName, CardFooter, StyledFieldValueList, StyledButton, useI18n, useDirection } from '@pega/cosmos-react-core';
|
|
4
5
|
import { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';
|
|
5
6
|
import { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';
|
|
6
7
|
import { StyledCardFooter } from '@pega/cosmos-react-core/lib/components/Card/CardFooter';
|
|
7
|
-
const StyledInteractionNotification = styled(Card)(
|
|
8
|
+
const StyledInteractionNotification = styled(Card)(({ theme: { base } }) => {
|
|
9
|
+
const { rtl } = useDirection();
|
|
8
10
|
return css `
|
|
9
11
|
position: fixed;
|
|
10
12
|
inset-inline-end: 1rem;
|
|
11
13
|
inset-block-start: 4rem;
|
|
12
14
|
width: clamp(21.5rem, calc(100% - 2rem), 25rem);
|
|
13
|
-
z-index: ${
|
|
14
|
-
color: ${
|
|
15
|
-
animation: SlideIn calc(4 * ${
|
|
16
|
-
padding: calc(0.75 * ${
|
|
15
|
+
z-index: ${base['z-index'].modal};
|
|
16
|
+
color: ${base.colors.white};
|
|
17
|
+
animation: SlideIn calc(4 * ${base.animation.speed});
|
|
18
|
+
padding: calc(0.75 * ${base.spacing}) 0;
|
|
17
19
|
|
|
18
20
|
&:not(& &) {
|
|
19
|
-
background-color: ${
|
|
21
|
+
background-color: ${base.colors.slate['extra-dark']};
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
@keyframes SlideIn {
|
|
23
25
|
0% {
|
|
24
|
-
${
|
|
26
|
+
${rtl
|
|
25
27
|
? css `
|
|
26
28
|
transform: translateX(calc(-100% - 1rem));
|
|
27
29
|
`
|
|
@@ -37,15 +39,15 @@ const StyledInteractionNotification = styled(Card)(props => {
|
|
|
37
39
|
|
|
38
40
|
${StyledCardHeader} {
|
|
39
41
|
${StyledButton} {
|
|
40
|
-
margin-inline-start: calc(2 * ${
|
|
42
|
+
margin-inline-start: calc(2 * ${base.spacing});
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
${StyledCardContent} {
|
|
45
|
-
margin: calc(2 * ${
|
|
47
|
+
margin: calc(2 * ${base.spacing}) 0;
|
|
46
48
|
|
|
47
49
|
${StyledText} {
|
|
48
|
-
color: ${
|
|
50
|
+
color: ${base.colors.white};
|
|
49
51
|
white-space: nowrap;
|
|
50
52
|
overflow: hidden;
|
|
51
53
|
text-overflow: ellipsis;
|
|
@@ -56,12 +58,12 @@ const StyledInteractionNotification = styled(Card)(props => {
|
|
|
56
58
|
|
|
57
59
|
${StyledCardFooter} {
|
|
58
60
|
${StyledFieldValueList} {
|
|
59
|
-
border-top: solid 0.0625rem ${
|
|
60
|
-
padding-top: calc(2 * ${
|
|
61
|
-
color: ${
|
|
61
|
+
border-top: solid 0.0625rem ${base.colors.gray.medium};
|
|
62
|
+
padding-top: calc(2 * ${base.spacing});
|
|
63
|
+
color: ${base.colors.white};
|
|
62
64
|
|
|
63
65
|
${StyledFieldName} {
|
|
64
|
-
color: ${
|
|
66
|
+
color: ${base.colors.white};
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
69
|
}
|
|
@@ -70,16 +72,7 @@ const StyledInteractionNotification = styled(Card)(props => {
|
|
|
70
72
|
StyledInteractionNotification.defaultProps = defaultThemeProp;
|
|
71
73
|
const InteractionNotification = forwardRef(({ icon, title, primaryText, secondaryText, status, fields, onAccept }, ref) => {
|
|
72
74
|
const t = useI18n();
|
|
73
|
-
return (
|
|
74
|
-
React.createElement(CardHeader, { actions: React.createElement(Button, { variant: 'primary', onClick: onAccept }, t('accept')) },
|
|
75
|
-
React.createElement(SummaryItem, { visual: React.createElement(Avatar, { shape: 'circle', size: 'm', name: title, icon: icon }), primary: title })),
|
|
76
|
-
React.createElement(CardContent, null,
|
|
77
|
-
React.createElement(Flex, { container: { direction: 'column', alignItems: 'center', itemGap: 1 } },
|
|
78
|
-
React.createElement(Text, { variant: 'h1' }, primaryText),
|
|
79
|
-
secondaryText && React.createElement(Text, { variant: 'secondary' }, secondaryText),
|
|
80
|
-
React.createElement(Status, { variant: status.variant }, status.text))),
|
|
81
|
-
fields && fields.length !== 0 && (React.createElement(CardFooter, null,
|
|
82
|
-
React.createElement(FieldValueList, { variant: 'inline', fields: fields })))));
|
|
75
|
+
return (_jsxs(StyledInteractionNotification, { ref: ref, children: [_jsx(CardHeader, { actions: _jsx(Button, { variant: 'primary', onClick: onAccept, children: t('accept') }, void 0), children: _jsx(SummaryItem, { visual: _jsx(Avatar, { shape: 'circle', size: 'm', name: title, icon: icon }, void 0), primary: title }, void 0) }, void 0), _jsx(CardContent, { children: _jsxs(Flex, { container: { direction: 'column', alignItems: 'center', gap: 1 }, children: [_jsx(Text, { variant: 'h1', children: primaryText }, void 0), secondaryText && _jsx(Text, { variant: 'secondary', children: secondaryText }, void 0), _jsx(Status, { variant: status.variant, children: status.text }, void 0)] }, void 0) }, void 0), fields && fields.length !== 0 && (_jsx(CardFooter, { children: _jsx(FieldValueList, { variant: 'inline', fields: fields }, void 0) }, void 0))] }, void 0));
|
|
83
76
|
});
|
|
84
77
|
export default InteractionNotification;
|
|
85
78
|
//# sourceMappingURL=InteractionNotification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InteractionNotification.js","sourceRoot":"","sources":["../../../src/components/InteractionNotification/InteractionNotification.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"InteractionNotification.js","sourceRoot":"","sources":["../../../src/components/InteractionNotification/InteractionNotification.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA2C,MAAM,OAAO,CAAC;AAC5E,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM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,CAAC,CACF,CAAC;AAEJ,eAAe,uBAAuB,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Button,\n Card,\n CardContent,\n CardHeader,\n Status,\n Text,\n SummaryItem,\n StatusProps,\n ForwardProps,\n defaultThemeProp,\n Flex,\n StyledText,\n Avatar,\n FieldValueList,\n StyledFieldName,\n CardFooter,\n StyledFieldValueList,\n StyledButton,\n useI18n,\n FieldValueListProps,\n useDirection\n} from '@pega/cosmos-react-core';\nimport { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';\nimport { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';\nimport { StyledCardFooter } from '@pega/cosmos-react-core/lib/components/Card/CardFooter';\n\nexport interface InteractionNotificationProps {\n /** Ref to Component. */\n ref?: Ref<HTMLDivElement>;\n /** Name of the icon used in header. */\n icon: string;\n /** Interaction title. */\n title: string;\n /** Primary information of the notification. For example caller name . */\n primaryText: string;\n /** Secondary information of the notification. For example phone number of the caller */\n secondaryText?: string;\n /** Represents the current status of interaction. */\n status: { variant: StatusProps['variant']; text: string };\n /** Information structured as field values to be displayed below main section. */\n fields?: FieldValueListProps['fields'];\n /** Callback when accept button is clicked. */\n onAccept?: () => void;\n}\n\nconst StyledInteractionNotification = styled(Card)(({ theme: { base } }) => {\n const { rtl } = useDirection();\n return css`\n position: fixed;\n inset-inline-end: 1rem;\n inset-block-start: 4rem;\n width: clamp(21.5rem, calc(100% - 2rem), 25rem);\n z-index: ${base['z-index'].modal};\n color: ${base.colors.white};\n animation: SlideIn calc(4 * ${base.animation.speed});\n padding: calc(0.75 * ${base.spacing}) 0;\n\n &:not(& &) {\n background-color: ${base.colors.slate['extra-dark']};\n }\n\n @keyframes SlideIn {\n 0% {\n ${rtl\n ? css`\n transform: translateX(calc(-100% - 1rem));\n `\n : css`\n transform: translateX(calc(100% + 1rem));\n `}\n }\n\n 100% {\n transform: translateX(0);\n }\n }\n\n ${StyledCardHeader} {\n ${StyledButton} {\n margin-inline-start: calc(2 * ${base.spacing});\n }\n }\n\n ${StyledCardContent} {\n margin: calc(2 * ${base.spacing}) 0;\n\n ${StyledText} {\n color: ${base.colors.white};\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 100%;\n text-align: center;\n }\n }\n\n ${StyledCardFooter} {\n ${StyledFieldValueList} {\n border-top: solid 0.0625rem ${base.colors.gray.medium};\n padding-top: calc(2 * ${base.spacing});\n color: ${base.colors.white};\n\n ${StyledFieldName} {\n color: ${base.colors.white};\n }\n }\n }\n `;\n});\n\nStyledInteractionNotification.defaultProps = defaultThemeProp;\n\nconst InteractionNotification: FunctionComponent<InteractionNotificationProps & ForwardProps> =\n forwardRef(\n (\n {\n icon,\n title,\n primaryText,\n secondaryText,\n status,\n fields,\n onAccept\n }: PropsWithoutRef<InteractionNotificationProps>,\n ref: InteractionNotificationProps['ref']\n ) => {\n const t = useI18n();\n\n return (\n <StyledInteractionNotification ref={ref}>\n <CardHeader\n actions={\n <Button variant='primary' onClick={onAccept}>\n {t('accept')}\n </Button>\n }\n >\n <SummaryItem\n visual={<Avatar shape='circle' size='m' name={title} icon={icon} />}\n primary={title}\n />\n </CardHeader>\n <CardContent>\n <Flex container={{ direction: 'column', alignItems: 'center', gap: 1 }}>\n <Text variant='h1'>{primaryText}</Text>\n {secondaryText && <Text variant='secondary'>{secondaryText}</Text>}\n <Status variant={status.variant}>{status.text}</Status>\n </Flex>\n </CardContent>\n {fields && fields.length !== 0 && (\n <CardFooter>\n <FieldValueList variant='inline' fields={fields} />\n </CardFooter>\n )}\n </StyledInteractionNotification>\n );\n }\n );\n\nexport default InteractionNotification;\n"]}
|
|
@@ -5,9 +5,7 @@ export interface InteractionTimerProps extends BaseProps, AsProp {
|
|
|
5
5
|
icon: string;
|
|
6
6
|
/** Ref to Component */
|
|
7
7
|
ref?: Ref<HTMLDivElement>;
|
|
8
|
-
/** Current Sla
|
|
9
|
-
* @default 'goal'
|
|
10
|
-
*/
|
|
8
|
+
/** Current Sla. This is used to display progress ring color. */
|
|
11
9
|
sla?: 'goal' | 'deadline' | 'past-deadline';
|
|
12
10
|
/** Progress % of the current stage
|
|
13
11
|
* @default 0
|
|
@@ -25,7 +23,7 @@ export interface InteractionTimerProps extends BaseProps, AsProp {
|
|
|
25
23
|
export declare const StyledInteractionTimerIconWrapper: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
26
24
|
export declare const StyledInteractionTimerIcon: import("styled-components").StyledComponent<"svg", import("styled-components").DefaultTheme, {}, never>;
|
|
27
25
|
export declare const StyledInteractionTimerMetaText: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
28
|
-
export declare const StyledInteractionTimer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme,
|
|
26
|
+
export declare const StyledInteractionTimer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("@pega/cosmos-react-core").OmitStrict<InteractionTimerProps, "sla"> & Required<Pick<InteractionTimerProps, "sla">>, never>;
|
|
29
27
|
declare const InteractionTimer: FunctionComponent<InteractionTimerProps & ForwardProps>;
|
|
30
28
|
export default InteractionTimer;
|
|
31
29
|
//# sourceMappingURL=InteractionTimer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InteractionTimer.d.ts","sourceRoot":"","sources":["../../../src/components/InteractionTimer/InteractionTimer.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"InteractionTimer.d.ts","sourceRoot":"","sources":["../../../src/components/InteractionTimer/InteractionTimer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAmB,GAAG,EAAE,MAAM,OAAO,CAAC;AAG5E,OAAO,EACL,SAAS,EACT,MAAM,EAKN,YAAY,EAIb,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,qBAAsB,SAAQ,SAAS,EAAE,MAAM;IAC9D,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,gEAAgE;IAChE,GAAG,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,eAAe,CAAC;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,iCAAiC,0GAAgB,CAAC;AAC/D,eAAO,MAAM,0BAA0B,yGAAe,CAAC;AACvD,eAAO,MAAM,8BAA8B,0GAAgB,CAAC;AAI5D,eAAO,MAAM,sBAAsB,gOAgElC,CAAC;AAIF,QAAA,MAAM,gBAAgB,EAAE,iBAAiB,CAAC,qBAAqB,GAAG,YAAY,CA4C7E,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import styled, { css } from 'styled-components';
|
|
3
4
|
import { Flex, Icon, Text, Progress, defaultThemeProp, StyledProgressRing } from '@pega/cosmos-react-core';
|
|
4
5
|
export const StyledInteractionTimerIconWrapper = styled.span ``;
|
|
@@ -7,6 +8,7 @@ export const StyledInteractionTimerMetaText = styled.span ``;
|
|
|
7
8
|
export const StyledInteractionTimer = styled.div(({ sla, hasNotifications, theme: { components: { 'interaction-timer': InteractionTimerTheme } }, theme }) => {
|
|
8
9
|
return css `
|
|
9
10
|
width: calc(8 * ${theme.base.spacing});
|
|
11
|
+
flex-shrink: 0;
|
|
10
12
|
|
|
11
13
|
${StyledInteractionTimerIconWrapper} {
|
|
12
14
|
font-size: 2.2rem;
|
|
@@ -27,13 +29,18 @@ export const StyledInteractionTimer = styled.div(({ sla, hasNotifications, theme
|
|
|
27
29
|
}
|
|
28
30
|
`}
|
|
29
31
|
}
|
|
32
|
+
|
|
30
33
|
${StyledProgressRing} {
|
|
31
34
|
circle {
|
|
32
35
|
stroke-width: 1;
|
|
33
|
-
stroke: ${
|
|
36
|
+
stroke: ${sla
|
|
37
|
+
? InteractionTimerTheme.sla[sla].progress['secondary-color']
|
|
38
|
+
: 'currentcolor'};
|
|
34
39
|
}
|
|
35
|
-
circle
|
|
36
|
-
stroke: ${
|
|
40
|
+
circle + circle {
|
|
41
|
+
stroke: ${sla
|
|
42
|
+
? InteractionTimerTheme.sla[sla].progress['primary-color']
|
|
43
|
+
: 'currentcolor'};
|
|
37
44
|
}
|
|
38
45
|
}
|
|
39
46
|
${StyledInteractionTimerIcon} {
|
|
@@ -55,15 +62,11 @@ export const StyledInteractionTimer = styled.div(({ sla, hasNotifications, theme
|
|
|
55
62
|
`;
|
|
56
63
|
});
|
|
57
64
|
StyledInteractionTimer.defaultProps = defaultThemeProp;
|
|
58
|
-
const InteractionTimer = forwardRef(({ icon, progress = 0, hasNotifications = false, meta, sla
|
|
59
|
-
return (
|
|
65
|
+
const InteractionTimer = forwardRef(({ icon, progress = 0, hasNotifications = false, meta, sla, ariaLabel, ...restProps }, ref) => {
|
|
66
|
+
return (_jsxs(Flex, { ...restProps, ref: ref, container: {
|
|
60
67
|
direction: 'column',
|
|
61
68
|
alignItems: 'center'
|
|
62
|
-
}, sla: sla, hasNotifications: hasNotifications, as: StyledInteractionTimer, "aria-label": ariaLabel },
|
|
63
|
-
React.createElement(StyledInteractionTimerIconWrapper, null,
|
|
64
|
-
React.createElement(Icon, { name: icon, as: StyledInteractionTimerIcon }),
|
|
65
|
-
React.createElement(Progress, { variant: 'ring', minValue: 0, maxValue: 100, value: progress, placement: 'inline' })),
|
|
66
|
-
meta && (React.createElement(Text, { variant: 'secondary', as: StyledInteractionTimerMetaText }, meta))));
|
|
69
|
+
}, sla: sla, hasNotifications: hasNotifications, as: StyledInteractionTimer, "aria-label": ariaLabel, children: [_jsxs(StyledInteractionTimerIconWrapper, { children: [_jsx(Icon, { name: icon, as: StyledInteractionTimerIcon }, void 0), _jsx(Progress, { variant: 'ring', minValue: 0, maxValue: 100, value: progress, placement: 'inline' }, void 0)] }, void 0), meta && (_jsx(Text, { variant: 'secondary', as: StyledInteractionTimerMetaText, children: meta }, void 0))] }, void 0));
|
|
67
70
|
});
|
|
68
71
|
export default InteractionTimer;
|
|
69
72
|
//# sourceMappingURL=InteractionTimer.js.map
|