@pega/cosmos-react-cs 5.0.0-dev.2.1 → 5.0.0-dev.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/CallControlPanel/AttachInteractionDialog.d.ts +3 -1
- package/lib/components/CallControlPanel/AttachInteractionDialog.d.ts.map +1 -1
- package/lib/components/CallControlPanel/CallControlPanel.styles.d.ts +1 -1
- package/lib/components/CallControlPanel/CallControlPanel.styles.d.ts.map +1 -1
- package/lib/components/CallControlPanel/CallHandover/CallHandoverForm.d.ts +3 -1
- package/lib/components/CallControlPanel/CallHandover/CallHandoverForm.d.ts.map +1 -1
- package/lib/components/InteractionTimer/InteractionTimer.d.ts +1 -1
- package/lib/components/InteractionTimer/InteractionTimer.d.ts.map +1 -1
- package/lib/components/InteractionTimer/InteractionTimer.js +2 -2
- package/lib/components/InteractionTimer/InteractionTimer.js.map +1 -1
- package/lib/components/Picker/Picker.js +1 -1
- package/lib/components/Picker/Picker.js.map +1 -1
- package/lib/components/Picker/Picker.styles.d.ts +1 -1
- package/lib/components/Picker/Picker.styles.d.ts.map +1 -1
- package/lib/components/TaskManager/TaskManager.styles.d.ts +2 -2
- package/lib/components/TaskManager/TaskManager.styles.d.ts.map +1 -1
- package/lib/components/TaskManager/TaskPicker.d.ts +1 -1
- package/lib/components/TaskManager/TaskPicker.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -39,7 +39,9 @@ export interface AttachInteractionDialogProps extends AttachInteractionProps, Pi
|
|
|
39
39
|
/** When invoked, sets the dialog target to null to close. Maintains interface support where onSubmit receives close arg. */
|
|
40
40
|
close: () => void;
|
|
41
41
|
}
|
|
42
|
-
export declare const StyledInteractionForm: import("styled-components").StyledComponent<import("react").FC<import("@pega/cosmos-react-core").FormProps & import("@pega/cosmos-react-core").ForwardProps
|
|
42
|
+
export declare const StyledInteractionForm: import("styled-components").StyledComponent<import("react").FC<import("@pega/cosmos-react-core").FormProps & import("@pega/cosmos-react-core").ForwardProps> & {
|
|
43
|
+
getTestIds: (testIdProp?: string | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly []>;
|
|
44
|
+
}, import("styled-components").DefaultTheme, {}, never>;
|
|
43
45
|
declare const AttachInteractionDialog: FunctionComponent<AttachInteractionDialogProps>;
|
|
44
46
|
export default AttachInteractionDialog;
|
|
45
47
|
//# sourceMappingURL=AttachInteractionDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachInteractionDialog.d.ts","sourceRoot":"","sources":["../../../src/components/CallControlPanel/AttachInteractionDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAyB,MAAM,OAAO,CAAC;AAGjE,OAAO,EAQL,WAAW,EAEX,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,yCAAyC;IACzC,QAAQ,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IAC5B,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,mBAAmB,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,sBAAsB;IACrC,iCAAiC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,gBAAgB,EAAE,CAAC,IAAI,EAAE,qBAAqB,EAAE,GAAG,EAAE;QAAE,KAAK,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;IACpF,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,8BAA8B;IAC9B,aAAa,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IACjC,8DAA8D;IAC9D,aAAa,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IACtC,mCAAmC;IACnC,kBAAkB,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IACtC,kEAAkE;IAClE,kBAAkB,CAAC,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IAC5C,uDAAuD;IACvD,OAAO,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC,CAAC;CACnE;AAED,MAAM,WAAW,4BACf,SAAQ,sBAAsB,EAC5B,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC;IACjC,4HAA4H;IAC5H,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"AttachInteractionDialog.d.ts","sourceRoot":"","sources":["../../../src/components/CallControlPanel/AttachInteractionDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAyB,MAAM,OAAO,CAAC;AAGjE,OAAO,EAQL,WAAW,EAEX,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,yCAAyC;IACzC,QAAQ,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IAC5B,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,mBAAmB,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,sBAAsB;IACrC,iCAAiC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,gBAAgB,EAAE,CAAC,IAAI,EAAE,qBAAqB,EAAE,GAAG,EAAE;QAAE,KAAK,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;IACpF,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,8BAA8B;IAC9B,aAAa,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IACjC,8DAA8D;IAC9D,aAAa,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IACtC,mCAAmC;IACnC,kBAAkB,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IACtC,kEAAkE;IAClE,kBAAkB,CAAC,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IAC5C,uDAAuD;IACvD,OAAO,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC,CAAC;CACnE;AAED,MAAM,WAAW,4BACf,SAAQ,sBAAsB,EAC5B,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC;IACjC,4HAA4H;IAC5H,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,eAAO,MAAM,qBAAqB;;uDAAiB,CAAC;AAIpD,QAAA,MAAM,uBAAuB,EAAE,iBAAiB,CAAC,4BAA4B,CA0G5E,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ProgressProps } from '@pega/cosmos-react-core';
|
|
3
3
|
export declare const StyledCallContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
4
|
export declare const StyledIncomingContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
-
export declare const StyledHoldInfo: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<
|
|
5
|
+
export declare const StyledHoldInfo: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("@pega/cosmos-react-core").StatusProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
6
6
|
export declare const StyledStatusRow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
7
7
|
export declare const StyledSLAProgress: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ProgressProps & {
|
|
8
8
|
determinate: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallControlPanel.styles.d.ts","sourceRoot":"","sources":["../../../src/components/CallControlPanel/CallControlPanel.styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAQL,aAAa,EAMd,MAAM,yBAAyB,CAAC;AAKjC,eAAO,MAAM,mBAAmB,yGAoC/B,CAAC;AAIF,eAAO,MAAM,uBAAuB,yGASlC,CAAC;AAIH,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"CallControlPanel.styles.d.ts","sourceRoot":"","sources":["../../../src/components/CallControlPanel/CallControlPanel.styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAQL,aAAa,EAMd,MAAM,yBAAyB,CAAC;AAKjC,eAAO,MAAM,mBAAmB,yGAoC/B,CAAC;AAIF,eAAO,MAAM,uBAAuB,yGASlC,CAAC;AAIH,eAAO,MAAM,cAAc,0PAI1B,CAAC;AAIF,eAAO,MAAM,eAAe,yGAiB3B,CAAC;AAIF,eAAO,MAAM,iBAAiB;;;;;SAwC5B,CAAC;AAIH,eAAO,MAAM,kBAAkB,mOAI9B,CAAC"}
|
|
@@ -23,7 +23,9 @@ export interface CallHandoverFormProps {
|
|
|
23
23
|
/** Label of the submit button. */
|
|
24
24
|
submitButtonText: string;
|
|
25
25
|
}
|
|
26
|
-
export declare const StyledCallHandoverForm: import("styled-components").StyledComponent<import("react").FC<import("@pega/cosmos-react-core").FormProps & import("@pega/cosmos-react-core").ForwardProps
|
|
26
|
+
export declare const StyledCallHandoverForm: import("styled-components").StyledComponent<import("react").FC<import("@pega/cosmos-react-core").FormProps & import("@pega/cosmos-react-core").ForwardProps> & {
|
|
27
|
+
getTestIds: (testIdProp?: string | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly []>;
|
|
28
|
+
}, import("styled-components").DefaultTheme, {}, never>;
|
|
27
29
|
declare const CallHandoverForm: FunctionComponent<CallHandoverFormProps>;
|
|
28
30
|
export default CallHandoverForm;
|
|
29
31
|
//# sourceMappingURL=CallHandoverForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallHandoverForm.d.ts","sourceRoot":"","sources":["../../../../src/components/CallControlPanel/CallHandover/CallHandoverForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAsD,MAAM,OAAO,CAAC;AAmBnG,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAI/E,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC,gDAAgD;IAChD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,uCAAuC;IACvC,eAAe,CAAC,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC7C,mCAAmC;IACnC,kBAAkB,CAAC,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAChD,+BAA+B;IAC/B,eAAe,EAAE,QAAQ,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAClD,2BAA2B;IAC3B,kBAAkB,CAAC,EAAE,QAAQ,CAAC,oBAAoB,EAAE,CAAC,CAAC;IACtD,uCAAuC;IACvC,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC;IAC3B,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAAC;IACtC,kCAAkC;IAClC,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"CallHandoverForm.d.ts","sourceRoot":"","sources":["../../../../src/components/CallControlPanel/CallHandover/CallHandoverForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAsD,MAAM,OAAO,CAAC;AAmBnG,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAI/E,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC,gDAAgD;IAChD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,uCAAuC;IACvC,eAAe,CAAC,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC7C,mCAAmC;IACnC,kBAAkB,CAAC,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAChD,+BAA+B;IAC/B,eAAe,EAAE,QAAQ,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAClD,2BAA2B;IAC3B,kBAAkB,CAAC,EAAE,QAAQ,CAAC,oBAAoB,EAAE,CAAC,CAAC;IACtD,uCAAuC;IACvC,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC;IAC3B,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAAC;IACtC,kCAAkC;IAClC,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,sBAAsB;;uDAMlC,CAAC;AAIF,QAAA,MAAM,gBAAgB,EAAE,iBAAiB,CAAC,qBAAqB,CAmH9D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -21,7 +21,7 @@ export interface InteractionTimerProps extends BaseProps, AsProp, NoChildrenProp
|
|
|
21
21
|
ariaLabel?: string;
|
|
22
22
|
}
|
|
23
23
|
export declare const StyledInteractionTimerIconWrapper: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
24
|
-
export declare const StyledInteractionTimerIcon: import("styled-components").StyledComponent<"
|
|
24
|
+
export declare const StyledInteractionTimerIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@pega/cosmos-react-core").IconProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
25
25
|
export declare const StyledInteractionTimerMetaText: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
26
26
|
export declare const StyledInteractionTimer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<InteractionTimerProps, "progress" | "icon" | "meta" | "children" | "ref" | "as" | "className" | "forwardedAs" | "ariaLabel" | "hasNotifications"> & Required<Pick<InteractionTimerProps, "sla">>, never>;
|
|
27
27
|
declare const InteractionTimer: FunctionComponent<InteractionTimerProps & ForwardProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InteractionTimer.d.ts","sourceRoot":"","sources":["../../../src/components/InteractionTimer/InteractionTimer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,GAAG,EAIJ,MAAM,OAAO,CAAC;AAGf,OAAO,EACL,SAAS,EACT,MAAM,EAKN,YAAY,EAIZ,cAAc,EAEf,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,qBAAsB,SAAQ,SAAS,EAAE,MAAM,EAAE,cAAc;IAC9E,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,
|
|
1
|
+
{"version":3,"file":"InteractionTimer.d.ts","sourceRoot":"","sources":["../../../src/components/InteractionTimer/InteractionTimer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,GAAG,EAIJ,MAAM,OAAO,CAAC;AAGf,OAAO,EACL,SAAS,EACT,MAAM,EAKN,YAAY,EAIZ,cAAc,EAEf,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,qBAAsB,SAAQ,SAAS,EAAE,MAAM,EAAE,cAAc;IAC9E,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,0LAAiB,CAAC;AACzD,eAAO,MAAM,8BAA8B,0GAAgB,CAAC;AAI5D,eAAO,MAAM,sBAAsB,4SAgElC,CAAC;AAIF,QAAA,MAAM,gBAAgB,EAAE,iBAAiB,CAAC,qBAAqB,GAAG,YAAY,CAmE7E,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { forwardRef, useEffect, useRef, useState } from 'react';
|
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
4
|
import { Flex, Icon, Text, Progress, defaultThemeProp, StyledProgressRing, useConsolidatedRef } from '@pega/cosmos-react-core';
|
|
5
5
|
export const StyledInteractionTimerIconWrapper = styled.span ``;
|
|
6
|
-
export const StyledInteractionTimerIcon = styled
|
|
6
|
+
export const StyledInteractionTimerIcon = styled(Icon) ``;
|
|
7
7
|
export const StyledInteractionTimerMetaText = styled.span ``;
|
|
8
8
|
export const StyledInteractionTimer = styled.div(({ sla, hasNotifications, theme: { components: { 'interaction-timer': InteractionTimerTheme } }, theme }) => {
|
|
9
9
|
return css `
|
|
@@ -84,7 +84,7 @@ const InteractionTimer = forwardRef(function InteractionTimer({ icon, progress =
|
|
|
84
84
|
return (_jsxs(Flex, { ...restProps, ref: containerRef, container: {
|
|
85
85
|
direction: 'column',
|
|
86
86
|
alignItems: 'center'
|
|
87
|
-
}, sla: sla, hasNotifications: hasNotifications, as: StyledInteractionTimer, "aria-label": currentTimeLabel, role: 'timer', children: [_jsxs(StyledInteractionTimerIconWrapper, { children: [_jsx(
|
|
87
|
+
}, sla: sla, hasNotifications: hasNotifications, as: StyledInteractionTimer, "aria-label": currentTimeLabel, role: 'timer', children: [_jsxs(StyledInteractionTimerIconWrapper, { children: [_jsx(StyledInteractionTimerIcon, { name: icon }), _jsx(Progress, { variant: 'ring', minValue: 0, maxValue: 100, value: progress, placement: 'inline', "aria-hidden": 'true' })] }), meta && (_jsx(Text, { variant: 'secondary', as: StyledInteractionTimerMetaText, "aria-hidden": 'true', children: meta }))] }));
|
|
88
88
|
});
|
|
89
89
|
export default InteractionTimer;
|
|
90
90
|
//# sourceMappingURL=InteractionTimer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InteractionTimer.js","sourceRoot":"","sources":["../../../src/components/InteractionTimer/InteractionTimer.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAIV,SAAS,EACT,MAAM,EACN,QAAQ,EACT,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAGL,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,QAAQ,EAER,gBAAgB,EAChB,kBAAkB,EAGlB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAuBjC,MAAM,CAAC,MAAM,iCAAiC,GAAG,MAAM,CAAC,IAAI,CAAA,EAAE,CAAC;AAC/D,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"InteractionTimer.js","sourceRoot":"","sources":["../../../src/components/InteractionTimer/InteractionTimer.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAIV,SAAS,EACT,MAAM,EACN,QAAQ,EACT,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAGL,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,QAAQ,EAER,gBAAgB,EAChB,kBAAkB,EAGlB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAuBjC,MAAM,CAAC,MAAM,iCAAiC,GAAG,MAAM,CAAC,IAAI,CAAA,EAAE,CAAC;AAC/D,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA,EAAE,CAAC;AACzD,MAAM,CAAC,MAAM,8BAA8B,GAAG,MAAM,CAAC,IAAI,CAAA,EAAE,CAAC;AAI5D,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAC9C,CAAC,EACC,GAAG,EACH,gBAAgB,EAChB,KAAK,EAAE,EACL,UAAU,EAAE,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,EAC3D,EACD,KAAK,EACN,EAAE,EAAE;IACH,OAAO,GAAG,CAAA;wBACU,KAAK,CAAC,IAAI,CAAC,OAAO;;;QAGlC,iCAAiC;;;;8BAIX,KAAK,CAAC,IAAI,CAAC,OAAO;UACtC,gBAAgB;QAClB,GAAG,CAAA;;;gCAGqB,qBAAqB,CAAC,wBAAwB,CAAC;;;;;;;;SAQtE;;;QAGD,kBAAkB;;;oBAGN,GAAG;QACX,CAAC,CAAC,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QAC5D,CAAC,CAAC,cAAc;;;oBAGR,GAAG;QACX,C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IAEP,OAAO,CACL,MAAC,IAAI,OACC,SAAS,EACb,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE;YACT,SAAS,EAAE,QAAQ;YACnB,UAAU,EAAE,QAAQ;SACrB,EACD,GAAG,EAAE,GAAG,EACR,gBAAgB,EAAE,gBAAgB,EAClC,EAAE,EAAE,sBAAsB,gBACd,gBAAgB,EAC5B,IAAI,EAAC,OAAO,aAEZ,MAAC,iCAAiC,eAChC,KAAC,0BAA0B,IAAC,IAAI,EAAE,IAAI,GAAI,EAC1C,KAAC,QAAQ,IACP,OAAO,EAAC,MAAM,EACd,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,GAAG,EACb,KAAK,EAAE,QAAQ,EACf,SAAS,EAAC,QAAQ,iBACN,MAAM,GAClB,IACgC,EACnC,IAAI,IAAI,CACP,KAAC,IAAI,IAAC,OAAO,EAAC,WAAW,EAAC,EAAE,EAAE,8BAA8B,iBAAc,MAAM,YAC7E,IAAI,GACA,CACR,IACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n PropsWithoutRef,\n Ref,\n useEffect,\n useRef,\n useState\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n BaseProps,\n AsProp,\n Flex,\n Icon,\n Text,\n Progress,\n ForwardProps,\n defaultThemeProp,\n StyledProgressRing,\n PropsWithDefaults,\n NoChildrenProp,\n useConsolidatedRef\n} from '@pega/cosmos-react-core';\n\nexport interface InteractionTimerProps extends BaseProps, AsProp, NoChildrenProp {\n /** Name of the icon */\n icon: string;\n /** Ref to Component */\n ref?: Ref<HTMLDivElement>;\n /** Current Sla. This is used to display progress ring color. */\n sla?: 'goal' | 'deadline' | 'past-deadline';\n /** Progress % of the current stage\n * @default 0\n */\n progress?: number;\n /** Indicates if there are any unread notifications\n * @default false\n */\n hasNotifications?: boolean;\n /** Meta info */\n meta?: string;\n /** Aria label for screen readers. */\n ariaLabel?: string;\n}\n\nexport const StyledInteractionTimerIconWrapper = styled.span``;\nexport const StyledInteractionTimerIcon = styled(Icon)``;\nexport const StyledInteractionTimerMetaText = styled.span``;\n\ntype InteractionTimerPropsWithDefaults = PropsWithDefaults<InteractionTimerProps, 'sla'>;\n\nexport const StyledInteractionTimer = styled.div<InteractionTimerPropsWithDefaults>(\n ({\n sla,\n hasNotifications,\n theme: {\n components: { 'interaction-timer': InteractionTimerTheme }\n },\n theme\n }) => {\n return css`\n width: calc(8 * ${theme.base.spacing});\n flex-shrink: 0;\n\n ${StyledInteractionTimerIconWrapper} {\n font-size: 2.2rem;\n position: relative;\n display: inline-flex;\n padding: calc(0.3 * ${theme.base.spacing});\n ${hasNotifications &&\n css`\n &::after {\n position: absolute;\n background-color: ${InteractionTimerTheme['notification-indicator']};\n border-radius: 50%;\n content: '';\n top: 0;\n right: 0;\n width: 0.3rem;\n height: 0.3rem;\n }\n `}\n }\n\n ${StyledProgressRing} {\n circle {\n stroke-width: 1;\n stroke: ${sla\n ? InteractionTimerTheme.sla[sla].progress['secondary-color']\n : 'currentcolor'};\n }\n circle + circle {\n stroke: ${sla\n ? InteractionTimerTheme.sla[sla].progress['primary-color']\n : 'currentcolor'};\n }\n }\n ${StyledInteractionTimerIcon} {\n font-size: 1.5rem;\n margin: auto;\n position: absolute;\n display: inline-flex;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n width: 100%;\n align-items: center;\n justify-content: center;\n }\n ${StyledInteractionTimerMetaText} {\n color: inherit;\n }\n `;\n }\n);\n\nStyledInteractionTimer.defaultProps = defaultThemeProp;\n\nconst InteractionTimer: FunctionComponent<InteractionTimerProps & ForwardProps> = forwardRef(\n function InteractionTimer(\n {\n icon,\n progress = 0,\n hasNotifications = false,\n meta,\n sla,\n ariaLabel,\n ...restProps\n }: PropsWithoutRef<InteractionTimerProps>,\n ref: InteractionTimerProps['ref']\n ) {\n const [currentTimeLabel, setCurrentTimeLabel] = useState('');\n const containerRef = useConsolidatedRef(ref);\n const labelRef = useRef('');\n\n useEffect(() => {\n if (ariaLabel) labelRef.current = ariaLabel;\n }, [ariaLabel]);\n\n useEffect(() => {\n const onFocus = () => {\n if (document.activeElement?.contains(containerRef.current) && labelRef.current) {\n setCurrentTimeLabel(labelRef.current);\n }\n };\n\n document.addEventListener('focusin', onFocus);\n return () => {\n document.removeEventListener('focusin', onFocus);\n };\n }, []);\n\n return (\n <Flex\n {...restProps}\n ref={containerRef}\n container={{\n direction: 'column',\n alignItems: 'center'\n }}\n sla={sla}\n hasNotifications={hasNotifications}\n as={StyledInteractionTimer}\n aria-label={currentTimeLabel}\n role='timer'\n >\n <StyledInteractionTimerIconWrapper>\n <StyledInteractionTimerIcon name={icon} />\n <Progress\n variant='ring'\n minValue={0}\n maxValue={100}\n value={progress}\n placement='inline'\n aria-hidden='true'\n />\n </StyledInteractionTimerIconWrapper>\n {meta && (\n <Text variant='secondary' as={StyledInteractionTimerMetaText} aria-hidden='true'>\n {meta}\n </Text>\n )}\n </Flex>\n );\n }\n);\n\nexport default InteractionTimer;\n"]}
|
|
@@ -9,7 +9,7 @@ import { StyledSelectedItemsWrapper, StyledSummaryItem, StyledDragHandle, Styled
|
|
|
9
9
|
registerIcon(timesIcon, dragIcon, trashIcon);
|
|
10
10
|
const SelectedItem = ({ previewRef, dragRef, onRemoveSelection, id, primary, secondary }) => {
|
|
11
11
|
const t = useI18n();
|
|
12
|
-
return (_jsx("li", { children: _jsx(StyledSummaryItem, {
|
|
12
|
+
return (_jsx("li", { children: _jsx(StyledSummaryItem, { ref: previewRef, visual: dragRef ? (_jsx(StyledDragHandle, { ref: dragRef, children: _jsx(Icon, { name: 'drag' }) })) : undefined, primary: primary, secondary: secondary, actions: _jsx(Button, { variant: 'simple', icon: true, "aria-label": t('delete_noun', [primary]), label: t('delete'), onClick: () => onRemoveSelection?.(id), children: _jsx(Icon, { name: 'trash' }) }) }) }));
|
|
13
13
|
};
|
|
14
14
|
const selectedItemRenderer = ({ dragRef, previewRef, data, onRemoveSelection }) => (_jsx(SelectedItem, { dragRef: dragRef, previewRef: previewRef, onRemoveSelection: onRemoveSelection, ...data }));
|
|
15
15
|
const DraggableSelectedList = ({ selectedItems, onChange, itemRenderer }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Picker.js","sourceRoot":"","sources":["../../../src/components/Picker/Picker.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAGV,WAAW,EACX,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,QAAQ,EACT,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,UAAU,EACV,WAAW,EACX,IAAI,EACJ,OAAO,EACP,MAAM,EACN,SAAS,EACT,YAAY,EACZ,aAAa,EAEb,mBAAmB,EACnB,IAAI,EACL,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,eAAe,EAAqB,MAAM,wBAAwB,CAAC;AAC1F,OAAO,KAAK,SAAS,MAAM,8DAA8D,CAAC;AAC1F,OAAO,KAAK,QAAQ,MAAM,6DAA6D,CAAC;AACxF,OAAO,KAAK,SAAS,MAAM,8DAA8D,CAAC;AAG1F,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AAEzB,YAAY,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAE7C,MAAM,YAAY,GAAG,CAAC,EACpB,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,EAAE,EACF,OAAO,EACP,SAAS,EACS,EAAE,EAAE;IACtB,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,OAAO,CACL,uBACE,KAAC,iBAAiB,OACZ,CAAC,UAAU,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,EACvC,MAAM,EACJ,OAAO,CAAC,CAAC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QAAQ,EAC7C,0BAA0B,QAC1B,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;IAEF,OAAO,CACL,MAAC,IAAI,IACH,EAAE,EAAE,mBAAmB,EACvB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,aAE7D,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,aAC7C,eAAe,EACf,cAAc,IACV,EACN,WAAW,IAAI,CACd,MAAC,IAAI,IACH,EAAE,EAAE,0BAA0B,EAC9B,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAClC,GAAG,EAAE,uBAAuB,aAE5B,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,YAAE,CAAC,CAAC,uBAAuB,EAAE,CAAC,eAAe,CAAC,CAAC,GAAQ,EAExE,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACvB,aAAa,CACd,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IAAC,OAAO,EAAE,CAAC,CAAC,0BAA0B,EAAE,CAAC,eAAe,CAAC,CAAC,GAAI,CAC1E,IACI,CACR,IACI,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n PropsWithoutRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n useState\n} from 'react';\n\nimport {\n Button,\n Flex,\n Icon,\n Menu,\n menuHelpers,\n EmptyState,\n SearchInput,\n Text,\n useI18n,\n Switch,\n useArrows,\n registerIcon,\n getFocusables,\n ForwardProps,\n createStringMatcher,\n Grid\n} from '@pega/cosmos-react-core';\nimport { MenuItemProps } from '@pega/cosmos-react-core/lib/components/Menu/Menu.types';\nimport { DragDropList, DragDropManager, ItemRendererProps } from '@pega/cosmos-react-dnd';\nimport * as timesIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';\nimport * as dragIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/drag.icon';\nimport * as trashIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/trash.icon';\n\nimport { DraggableSelectedListProps, PickerProps, SelectedItemProps } from './Picker.types';\nimport {\n StyledSelectedItemsWrapper,\n StyledSummaryItem,\n StyledDragHandle,\n StyledPickerContent,\n StyledSelectedItems\n} from './Picker.styles';\n\nregisterIcon(timesIcon, dragIcon, trashIcon);\n\nconst SelectedItem = ({\n previewRef,\n dragRef,\n onRemoveSelection,\n id,\n primary,\n secondary\n}: SelectedItemProps) => {\n const t = useI18n();\n return (\n <li>\n <StyledSummaryItem\n {...(previewRef && { ref: previewRef })}\n visual={\n dragRef ? (\n <StyledDragHandle ref={dragRef}>\n <Icon name='drag' />\n </StyledDragHandle>\n ) : undefined\n }\n primary={primary}\n secondary={secondary}\n actions={\n <Button\n variant='simple'\n icon\n aria-label={t('delete_noun', [primary])}\n label={t('delete')}\n onClick={() => onRemoveSelection?.(id)}\n >\n <Icon name='trash' />\n </Button>\n }\n />\n </li>\n );\n};\n\nconst selectedItemRenderer = ({\n dragRef,\n previewRef,\n data,\n onRemoveSelection\n}: ItemRendererProps<MenuItemProps> & Pick<SelectedItemProps, 'onRemoveSelection'>) => (\n <SelectedItem\n dragRef={dragRef}\n previewRef={previewRef}\n onRemoveSelection={onRemoveSelection}\n {...data}\n />\n);\n\nconst DraggableSelectedList = ({\n selectedItems,\n onChange,\n itemRenderer\n}: DraggableSelectedListProps) => {\n return (\n <DragDropManager>\n <DragDropList\n as={StyledSelectedItems}\n accept='picker-selection'\n items={selectedItems.map(item => ({\n id: item.id,\n type: 'picker-selection',\n data: item\n }))}\n itemRenderer={itemRenderer}\n onChange={onChange}\n />\n </DragDropManager>\n );\n};\n\nconst Picker: FunctionComponent<PickerProps & ForwardProps> = forwardRef(function Picker(\n {\n items,\n multiSelect = false,\n onModeToggle,\n contextualLabel,\n reorderSelections = false,\n selections,\n onSelectionChange,\n handle\n }: PropsWithoutRef<PickerProps>,\n ref: PickerProps['ref']\n) {\n const t = useI18n();\n const [searchInput, setSearchInput] = useState('');\n const filterRegex = createStringMatcher(searchInput);\n const searchEleRef = useRef<HTMLInputElement>(null);\n const selectedItemsWrapperRef = useRef<HTMLDivElement>(null);\n const switchRef = useRef<HTMLInputElement>(null);\n\n useImperativeHandle(handle, () => ({\n focusToggleSwitch: () => {\n switchRef.current?.focus();\n }\n }));\n\n const renderItems = useMemo(() => {\n return menuHelpers.mapTree(\n searchInput\n ? menuHelpers.flatten(items).filter(({ primary, items: childItems }: MenuItemProps) => {\n return filterRegex.test(primary) && !childItems?.length;\n })\n : items,\n item => {\n let selectable = false;\n\n if (!item.items) {\n selectable = true;\n }\n\n return {\n ...item,\n selected: selectable ? !!menuHelpers.getItem(selections, item.id) : undefined\n };\n }\n );\n }, [selections, searchInput, items, filterRegex]);\n\n const removeSelectedItem = useCallback(\n (uid: string) => {\n const itemToRemove = menuHelpers.getItem(selections, uid);\n onSelectionChange(selections.filter(item => item.id !== itemToRemove?.id));\n // 0 second timeout added because DOM needs to be up to date after list is updated before running query\n // setting the focus to the first element in the list on deletion and if empty then to search input\n setTimeout(() => {\n const focusable = getFocusables(selectedItemsWrapperRef);\n if (focusable.length > 0) focusable[0].focus();\n else searchEleRef.current?.focus();\n }, 0);\n },\n [selections]\n );\n\n useArrows(\n selectedItemsWrapperRef,\n {\n selector: 'button',\n dir: 'up-down'\n },\n [selections.length]\n );\n\n const selectedItems = useMemo(() => {\n return reorderSelections ? (\n <DraggableSelectedList\n selectedItems={selections}\n onChange={newItems => {\n onSelectionChange(\n newItems.map(({ type, data }) => ({\n ...data,\n type\n })) as MenuItemProps[]\n );\n }}\n itemRenderer={props =>\n selectedItemRenderer({ ...props, onRemoveSelection: removeSelectedItem })\n }\n />\n ) : (\n <StyledSelectedItems>\n {selections.map(({ id, primary, secondary }) => (\n <SelectedItem\n key={id}\n id={id}\n primary={primary}\n secondary={secondary}\n onRemoveSelection={removeSelectedItem}\n />\n ))}\n </StyledSelectedItems>\n );\n }, [selections, reorderSelections, removeSelectedItem]);\n\n const searchAndSwitch = (\n <Flex container={{ direction: 'column', gap: 1, pad: [0.5, 1] }}>\n <SearchInput\n ref={searchEleRef}\n value={searchInput}\n onSearchChange={setSearchInput}\n placeholder={t('search_picker_items', [contextualLabel])}\n autoFocus\n />\n {onModeToggle && (\n <Switch\n label={t('select_multiple')}\n on={multiSelect}\n onChange={onModeToggle}\n ref={switchRef}\n />\n )}\n </Flex>\n );\n\n const availableItems = (\n <Menu\n items={renderItems}\n role='listbox'\n onItemClick={(uid: string) => {\n const clickedItem = menuHelpers.getItem(renderItems, uid);\n const parentItem = clickedItem?.ancestors\n ? clickedItem.ancestors[0]\n : menuHelpers.getParentItem(renderItems, uid);\n\n if (!clickedItem) return;\n if (multiSelect) {\n searchEleRef.current?.focus();\n\n if (selections.find(item => item.id === uid)) {\n onSelectionChange(selections.filter(item => item.id !== clickedItem?.id));\n } else {\n let secondary;\n if (parentItem)\n secondary = menuHelpers.isItem(parentItem) ? parentItem.primary : parentItem.label;\n\n onSelectionChange([\n ...selections,\n {\n ...clickedItem,\n secondary\n } as MenuItemProps\n ]);\n }\n setSearchInput('');\n } else {\n onSelectionChange([clickedItem]);\n }\n }}\n focusControlEl={searchEleRef.current ?? undefined}\n emptyText={t('no_picker_items', [contextualLabel])}\n accent={filterRegex}\n mode={multiSelect ? 'multi-select' : 'action'}\n arrowNavigationUnsupported\n scrollAt={Infinity}\n />\n );\n\n return (\n <Grid\n as={StyledPickerContent}\n ref={ref}\n container={{ autoFlow: 'column', autoCols: 'minmax(0, 1fr)' }}\n >\n <Flex container={{ direction: 'column', gap: 1 }}>\n {searchAndSwitch}\n {availableItems}\n </Flex>\n {multiSelect && (\n <Flex\n as={StyledSelectedItemsWrapper}\n container={{ direction: 'column' }}\n ref={selectedItemsWrapperRef}\n >\n <Text variant='h3'>{t('selected_picker_items', [contextualLabel])}</Text>\n\n {selections.length > 0 ? (\n selectedItems\n ) : (\n <EmptyState message={t('no_selected_picker_items', [contextualLabel])} />\n )}\n </Flex>\n )}\n </Grid>\n );\n});\n\nexport default Picker;\n"]}
|
|
1
|
+
{"version":3,"file":"Picker.js","sourceRoot":"","sources":["../../../src/components/Picker/Picker.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAGV,WAAW,EACX,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,QAAQ,EACT,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,UAAU,EACV,WAAW,EACX,IAAI,EACJ,OAAO,EACP,MAAM,EACN,SAAS,EACT,YAAY,EACZ,aAAa,EAEb,mBAAmB,EACnB,IAAI,EACL,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,eAAe,EAAqB,MAAM,wBAAwB,CAAC;AAC1F,OAAO,KAAK,SAAS,MAAM,8DAA8D,CAAC;AAC1F,OAAO,KAAK,QAAQ,MAAM,6DAA6D,CAAC;AACxF,OAAO,KAAK,SAAS,MAAM,8DAA8D,CAAC;AAG1F,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AAEzB,YAAY,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAE7C,MAAM,YAAY,GAAG,CAAC,EACpB,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,EAAE,EACF,OAAO,EACP,SAAS,EACS,EAAE,EAAE;IACtB,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,OAAO,CACL,uBACE,KAAC,iBAAiB,IAChB,GAAG,EAAE,UAAU,EACf,MAAM,EACJ,OAAO,CAAC,CAAC,CAAC,CACR,KAAC,gBAAgB,IAAC,GAAG,EAAE,OAAO,YAC5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,CACH,CAAC;IAEF,OAAO,CACL,MAAC,IAAI,IACH,EAAE,EAAE,mBAAmB,EACvB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,aAE7D,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,aAC7C,eAAe,EACf,cAAc,IACV,EACN,WAAW,IAAI,CACd,MAAC,IAAI,IACH,EAAE,EAAE,0BAA0B,EAC9B,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAClC,GAAG,EAAE,uBAAuB,aAE5B,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,YAAE,CAAC,CAAC,uBAAuB,EAAE,CAAC,eAAe,CAAC,CAAC,GAAQ,EAExE,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACvB,aAAa,CACd,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IAAC,OAAO,EAAE,CAAC,CAAC,0BAA0B,EAAE,CAAC,eAAe,CAAC,CAAC,GAAI,CAC1E,IACI,CACR,IACI,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n PropsWithoutRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n useState\n} from 'react';\n\nimport {\n Button,\n Flex,\n Icon,\n Menu,\n menuHelpers,\n EmptyState,\n SearchInput,\n Text,\n useI18n,\n Switch,\n useArrows,\n registerIcon,\n getFocusables,\n ForwardProps,\n createStringMatcher,\n Grid\n} from '@pega/cosmos-react-core';\nimport { MenuItemProps } from '@pega/cosmos-react-core/lib/components/Menu/Menu.types';\nimport { DragDropList, DragDropManager, ItemRendererProps } from '@pega/cosmos-react-dnd';\nimport * as timesIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/times.icon';\nimport * as dragIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/drag.icon';\nimport * as trashIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/trash.icon';\n\nimport { DraggableSelectedListProps, PickerProps, SelectedItemProps } from './Picker.types';\nimport {\n StyledSelectedItemsWrapper,\n StyledSummaryItem,\n StyledDragHandle,\n StyledPickerContent,\n StyledSelectedItems\n} from './Picker.styles';\n\nregisterIcon(timesIcon, dragIcon, trashIcon);\n\nconst SelectedItem = ({\n previewRef,\n dragRef,\n onRemoveSelection,\n id,\n primary,\n secondary\n}: SelectedItemProps) => {\n const t = useI18n();\n return (\n <li>\n <StyledSummaryItem\n ref={previewRef}\n visual={\n dragRef ? (\n <StyledDragHandle ref={dragRef}>\n <Icon name='drag' />\n </StyledDragHandle>\n ) : undefined\n }\n primary={primary}\n secondary={secondary}\n actions={\n <Button\n variant='simple'\n icon\n aria-label={t('delete_noun', [primary])}\n label={t('delete')}\n onClick={() => onRemoveSelection?.(id)}\n >\n <Icon name='trash' />\n </Button>\n }\n />\n </li>\n );\n};\n\nconst selectedItemRenderer = ({\n dragRef,\n previewRef,\n data,\n onRemoveSelection\n}: ItemRendererProps<MenuItemProps> & Pick<SelectedItemProps, 'onRemoveSelection'>) => (\n <SelectedItem\n dragRef={dragRef}\n previewRef={previewRef}\n onRemoveSelection={onRemoveSelection}\n {...data}\n />\n);\n\nconst DraggableSelectedList = ({\n selectedItems,\n onChange,\n itemRenderer\n}: DraggableSelectedListProps) => {\n return (\n <DragDropManager>\n <DragDropList\n as={StyledSelectedItems}\n accept='picker-selection'\n items={selectedItems.map(item => ({\n id: item.id,\n type: 'picker-selection',\n data: item\n }))}\n itemRenderer={itemRenderer}\n onChange={onChange}\n />\n </DragDropManager>\n );\n};\n\nconst Picker: FunctionComponent<PickerProps & ForwardProps> = forwardRef(function Picker(\n {\n items,\n multiSelect = false,\n onModeToggle,\n contextualLabel,\n reorderSelections = false,\n selections,\n onSelectionChange,\n handle\n }: PropsWithoutRef<PickerProps>,\n ref: PickerProps['ref']\n) {\n const t = useI18n();\n const [searchInput, setSearchInput] = useState('');\n const filterRegex = createStringMatcher(searchInput);\n const searchEleRef = useRef<HTMLInputElement>(null);\n const selectedItemsWrapperRef = useRef<HTMLDivElement>(null);\n const switchRef = useRef<HTMLInputElement>(null);\n\n useImperativeHandle(handle, () => ({\n focusToggleSwitch: () => {\n switchRef.current?.focus();\n }\n }));\n\n const renderItems = useMemo(() => {\n return menuHelpers.mapTree(\n searchInput\n ? menuHelpers.flatten(items).filter(({ primary, items: childItems }: MenuItemProps) => {\n return filterRegex.test(primary) && !childItems?.length;\n })\n : items,\n item => {\n let selectable = false;\n\n if (!item.items) {\n selectable = true;\n }\n\n return {\n ...item,\n selected: selectable ? !!menuHelpers.getItem(selections, item.id) : undefined\n };\n }\n );\n }, [selections, searchInput, items, filterRegex]);\n\n const removeSelectedItem = useCallback(\n (uid: string) => {\n const itemToRemove = menuHelpers.getItem(selections, uid);\n onSelectionChange(selections.filter(item => item.id !== itemToRemove?.id));\n // 0 second timeout added because DOM needs to be up to date after list is updated before running query\n // setting the focus to the first element in the list on deletion and if empty then to search input\n setTimeout(() => {\n const focusable = getFocusables(selectedItemsWrapperRef);\n if (focusable.length > 0) focusable[0].focus();\n else searchEleRef.current?.focus();\n }, 0);\n },\n [selections]\n );\n\n useArrows(\n selectedItemsWrapperRef,\n {\n selector: 'button',\n dir: 'up-down'\n },\n [selections.length]\n );\n\n const selectedItems = useMemo(() => {\n return reorderSelections ? (\n <DraggableSelectedList\n selectedItems={selections}\n onChange={newItems => {\n onSelectionChange(\n newItems.map(({ type, data }) => ({\n ...data,\n type\n })) as MenuItemProps[]\n );\n }}\n itemRenderer={props =>\n selectedItemRenderer({ ...props, onRemoveSelection: removeSelectedItem })\n }\n />\n ) : (\n <StyledSelectedItems>\n {selections.map(({ id, primary, secondary }) => (\n <SelectedItem\n key={id}\n id={id}\n primary={primary}\n secondary={secondary}\n onRemoveSelection={removeSelectedItem}\n />\n ))}\n </StyledSelectedItems>\n );\n }, [selections, reorderSelections, removeSelectedItem]);\n\n const searchAndSwitch = (\n <Flex container={{ direction: 'column', gap: 1, pad: [0.5, 1] }}>\n <SearchInput\n ref={searchEleRef}\n value={searchInput}\n onSearchChange={setSearchInput}\n placeholder={t('search_picker_items', [contextualLabel])}\n autoFocus\n />\n {onModeToggle && (\n <Switch\n label={t('select_multiple')}\n on={multiSelect}\n onChange={onModeToggle}\n ref={switchRef}\n />\n )}\n </Flex>\n );\n\n const availableItems = (\n <Menu\n items={renderItems}\n role='listbox'\n onItemClick={(uid: string) => {\n const clickedItem = menuHelpers.getItem(renderItems, uid);\n const parentItem = clickedItem?.ancestors\n ? clickedItem.ancestors[0]\n : menuHelpers.getParentItem(renderItems, uid);\n\n if (!clickedItem) return;\n if (multiSelect) {\n searchEleRef.current?.focus();\n\n if (selections.find(item => item.id === uid)) {\n onSelectionChange(selections.filter(item => item.id !== clickedItem?.id));\n } else {\n let secondary;\n if (parentItem)\n secondary = menuHelpers.isItem(parentItem) ? parentItem.primary : parentItem.label;\n\n onSelectionChange([\n ...selections,\n {\n ...clickedItem,\n secondary\n } as MenuItemProps\n ]);\n }\n setSearchInput('');\n } else {\n onSelectionChange([clickedItem]);\n }\n }}\n focusControlEl={searchEleRef.current ?? undefined}\n emptyText={t('no_picker_items', [contextualLabel])}\n accent={filterRegex}\n mode={multiSelect ? 'multi-select' : 'action'}\n arrowNavigationUnsupported\n scrollAt={Infinity}\n />\n );\n\n return (\n <Grid\n as={StyledPickerContent}\n ref={ref}\n container={{ autoFlow: 'column', autoCols: 'minmax(0, 1fr)' }}\n >\n <Flex container={{ direction: 'column', gap: 1 }}>\n {searchAndSwitch}\n {availableItems}\n </Flex>\n {multiSelect && (\n <Flex\n as={StyledSelectedItemsWrapper}\n container={{ direction: 'column' }}\n ref={selectedItemsWrapperRef}\n >\n <Text variant='h3'>{t('selected_picker_items', [contextualLabel])}</Text>\n\n {selections.length > 0 ? (\n selectedItems\n ) : (\n <EmptyState message={t('no_selected_picker_items', [contextualLabel])} />\n )}\n </Flex>\n )}\n </Grid>\n );\n});\n\nexport default Picker;\n"]}
|
|
@@ -5,6 +5,6 @@ export declare const StyledSummaryItem: import("styled-components").StyledCompon
|
|
|
5
5
|
getTestIds: (testIdProp?: string | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["primary", "secondary", "visual", "actions"]>;
|
|
6
6
|
}, import("styled-components").DefaultTheme, {}, never>;
|
|
7
7
|
export declare const StyledSelectedItems: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
-
export declare const StyledCount: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<
|
|
8
|
+
export declare const StyledCount: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("@pega/cosmos-react-core").CountProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
9
9
|
export declare const StyledPickerContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
10
10
|
//# sourceMappingURL=Picker.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Picker.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Picker/Picker.styles.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,0BAA0B,yGAetC,CAAC;AAIF,eAAO,MAAM,gBAAgB,yGAK5B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;uDAmB7B,CAAC;AAIF,eAAO,MAAM,mBAAmB,wGAW/B,CAAC;AAIF,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Picker.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Picker/Picker.styles.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,0BAA0B,yGAetC,CAAC;AAIF,eAAO,MAAM,gBAAgB,yGAK5B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;uDAmB7B,CAAC;AAIF,eAAO,MAAM,mBAAmB,wGAW/B,CAAC;AAIF,eAAO,MAAM,WAAW,yPAUvB,CAAC;AAIF,eAAO,MAAM,mBAAmB,yGAS/B,CAAC"}
|
|
@@ -21,14 +21,14 @@ interface StyledTaskManagerProps {
|
|
|
21
21
|
export declare const StyledTaskManager: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledTaskManagerProps, never>;
|
|
22
22
|
export declare const StyledTaskManagerBanner: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
23
23
|
export declare const StyledPopover: import("styled-components").StyledComponent<(<Modifiers extends string = string>(props: import("@pega/cosmos-react-core").PopoverProps<Modifiers> & import("@pega/cosmos-react-core").ForwardProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null), import("styled-components").DefaultTheme, {}, never>;
|
|
24
|
-
export declare const StyledAgentScriptIcon: import("styled-components").StyledComponent<import("react").
|
|
24
|
+
export declare const StyledAgentScriptIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@pega/cosmos-react-core").IconProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
25
25
|
export declare const StyledSymbol: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
26
26
|
verbatimStatus?: DialogueProps['verbatimStatus'];
|
|
27
27
|
}, never>;
|
|
28
28
|
export declare const StyledIconWrap: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
29
29
|
verbatimStatus?: DialogueProps['verbatimStatus'];
|
|
30
30
|
}, never>;
|
|
31
|
-
export declare const StyledCountBadge: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<
|
|
31
|
+
export declare const StyledCountBadge: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("@pega/cosmos-react-core").CountProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
32
32
|
export declare const StyledEntityPopover: import("styled-components").StyledComponent<(<Modifiers extends string = string>(props: import("@pega/cosmos-react-core").PopoverProps<Modifiers> & import("@pega/cosmos-react-core").ForwardProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null), import("styled-components").DefaultTheme, {}, never>;
|
|
33
33
|
export declare const StyledContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
34
34
|
export default StyledTaskManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskManager.styles.d.ts","sourceRoot":"","sources":["../../../src/components/TaskManager/TaskManager.styles.ts"],"names":[],"mappings":";AAwBA,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzE,eAAO,MAAM,cAAc;aAAyB,OAAO;SAOzD,CAAC;AAEH,eAAO,MAAM,gCAAgC,yGAAe,CAAC;AAC7D,eAAO,MAAM,YAAY,yOAAuB,CAAC;AAEjD,eAAO,MAAM,qBAAqB,yGAchC,CAAC;AAIH,eAAO,MAAM,qBAAqB,wGAWhC,CAAC;AAIH,eAAO,MAAM,aAAa,0GAMxB,CAAC;AAIH,eAAO,MAAM,oBAAoB,yHAmE/B,CAAC;AAIH,eAAO,MAAM,kBAAkB,wGA2B7B,CAAC;AAIH,eAAO,MAAM,sBAAsB,2JASjC,CAAC;AAIH,eAAO,MAAM,qBAAqB;;uDAIhC,CAAC;AAIH,UAAU,sBAAsB;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,iBAAiB,6HAiE7B,CAAC;AAIF,eAAO,MAAM,uBAAuB,yGAkBlC,CAAC;AAIH,eAAO,MAAM,aAAa,6VAIxB,CAAC;AAIH,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"TaskManager.styles.d.ts","sourceRoot":"","sources":["../../../src/components/TaskManager/TaskManager.styles.ts"],"names":[],"mappings":";AAwBA,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzE,eAAO,MAAM,cAAc;aAAyB,OAAO;SAOzD,CAAC;AAEH,eAAO,MAAM,gCAAgC,yGAAe,CAAC;AAC7D,eAAO,MAAM,YAAY,yOAAuB,CAAC;AAEjD,eAAO,MAAM,qBAAqB,yGAchC,CAAC;AAIH,eAAO,MAAM,qBAAqB,wGAWhC,CAAC;AAIH,eAAO,MAAM,aAAa,0GAMxB,CAAC;AAIH,eAAO,MAAM,oBAAoB,yHAmE/B,CAAC;AAIH,eAAO,MAAM,kBAAkB,wGA2B7B,CAAC;AAIH,eAAO,MAAM,sBAAsB,2JASjC,CAAC;AAIH,eAAO,MAAM,qBAAqB;;uDAIhC,CAAC;AAIH,UAAU,sBAAsB;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,iBAAiB,6HAiE7B,CAAC;AAIF,eAAO,MAAM,uBAAuB,yGAkBlC,CAAC;AAIH,eAAO,MAAM,aAAa,6VAIxB,CAAC;AAIH,eAAO,MAAM,qBAAqB,0LAAiB,CAAC;AAEpD,eAAO,MAAM,YAAY;qBACN,aAAa,CAAC,gBAAgB,CAAC;SA4BjD,CAAC;AAIF,eAAO,MAAM,cAAc;qBACR,aAAa,CAAC,gBAAgB,CAAC;SAkCjD,CAAC;AAIF,eAAO,MAAM,gBAAgB,yPAkB5B,CAAC;AAIF,eAAO,MAAM,mBAAmB,6VAU/B,CAAC;AAIF,eAAO,MAAM,aAAa,yGAUxB,CAAC;AAIH,eAAe,iBAAiB,CAAC"}
|
|
@@ -13,7 +13,7 @@ export interface TaskPickerProps extends BaseProps, Pick<PickerProps, 'items'> {
|
|
|
13
13
|
ref?: Ref<HTMLDivElement>;
|
|
14
14
|
}
|
|
15
15
|
export declare const StyledSingleTaskDialog: typeof Dialog;
|
|
16
|
-
export declare const StyledMultiTaskDialog: import("styled-components").StyledComponent<import("react").FC<FormDialogProps & Pick<import("react").HTMLAttributes<HTMLDivElement>, "hidden" | "color" | "style" | "translate" | "prefix" | "slot" | "title" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">>, import("styled-components").DefaultTheme, {}, never>;
|
|
16
|
+
export declare const StyledMultiTaskDialog: import("styled-components").StyledComponent<import("react").FC<FormDialogProps & Pick<import("react").HTMLAttributes<HTMLDivElement>, "hidden" | "color" | "content" | "style" | "translate" | "prefix" | "slot" | "title" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">>, import("styled-components").DefaultTheme, {}, never>;
|
|
17
17
|
declare const TaskPicker: FunctionComponent<TaskPickerProps & ForwardProps>;
|
|
18
18
|
export default TaskPicker;
|
|
19
19
|
//# sourceMappingURL=TaskPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskPicker.d.ts","sourceRoot":"","sources":["../../../src/components/TaskManager/TaskPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,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,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;IAClC,yBAAyB;IACzB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,sBAAsB,EAAE,OAAO,MAM1C,CAAC;AAEH,eAAO,MAAM,qBAAqB,mtJAyBjC,CAAC;AAIF,QAAA,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,GAAG,YAAY,CAmHjE,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-cs",
|
|
3
|
-
"version": "5.0.0-dev.
|
|
3
|
+
"version": "5.0.0-dev.3.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/pegasystems/cosmos-react.git",
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
"build": "tsc -b"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@pega/cosmos-react-core": "5.0.0-dev.
|
|
24
|
-
"@pega/cosmos-react-dnd": "5.0.0-dev.
|
|
25
|
-
"@types/react": "^16.14.
|
|
26
|
-
"@types/react-dom": "^16.9.
|
|
23
|
+
"@pega/cosmos-react-core": "5.0.0-dev.3.0",
|
|
24
|
+
"@pega/cosmos-react-dnd": "5.0.0-dev.3.0",
|
|
25
|
+
"@types/react": "^16.14.43 || ^17.0.62",
|
|
26
|
+
"@types/react-dom": "^16.9.19 || ^17.0.20",
|
|
27
27
|
"@types/styled-components": "^5.1.26",
|
|
28
28
|
"polished": "^4.1.0",
|
|
29
|
-
"react": "^
|
|
30
|
-
"react-dom": "^
|
|
29
|
+
"react": "^17.0.0",
|
|
30
|
+
"react-dom": "^17.0.0",
|
|
31
31
|
"styled-components": "^5.2.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
@@ -39,6 +39,6 @@
|
|
|
39
39
|
"@storybook/theming": "~7.0.24",
|
|
40
40
|
"@testing-library/react": "^12.1.3",
|
|
41
41
|
"@testing-library/user-event": "^13.5.0",
|
|
42
|
-
"typescript": "~5.
|
|
42
|
+
"typescript": "~5.2.2"
|
|
43
43
|
}
|
|
44
44
|
}
|