@pega/cosmos-react-build 10.0.0-build.4.20 → 10.0.0-build.4.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/AuthoringPanel/AuthoringPanel.styles.d.ts +2 -2
- package/lib/components/AuthoringPanel/AuthoringPanel.styles.d.ts.map +1 -1
- package/lib/components/FieldReference/FieldReference.types.d.ts +1 -3
- package/lib/components/FieldReference/FieldReference.types.d.ts.map +1 -1
- package/lib/components/FieldReference/FieldReference.types.js.map +1 -1
- package/lib/components/FieldReference/FieldReferenceDisplay.js +1 -1
- package/lib/components/FieldReference/FieldReferenceDisplay.js.map +1 -1
- package/package.json +4 -4
|
@@ -563,9 +563,9 @@ export declare const StyledTextWithEllipsis: import("styled-components/dist/type
|
|
|
563
563
|
export declare const StyledPrimaryTextButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<import("@pega/cosmos-react-core").ButtonProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement> & import("@pega/cosmos-react-core").ForwardProps, "ref"> & {
|
|
564
564
|
ref?: ((instance: HTMLAnchorElement | HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement | HTMLButtonElement> | null | undefined;
|
|
565
565
|
}, never>> & string & Omit<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").ButtonProps>, keyof import("react").Component<any, {}, any>>;
|
|
566
|
-
export declare const StyledPrimaryTextLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<import("@pega/cosmos-react-core").LinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement
|
|
566
|
+
export declare const StyledPrimaryTextLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<import("@pega/cosmos-react-core").LinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>, "ref"> & {
|
|
567
567
|
ref?: ((instance: HTMLAnchorElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
|
|
568
|
-
}, never>> & string & Omit<import("
|
|
568
|
+
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<import("@pega/cosmos-react-core").LinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>> & {
|
|
569
569
|
getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["preview-popover", "preview", "new-tab"]>;
|
|
570
570
|
}, keyof import("react").Component<any, {}, any>>;
|
|
571
571
|
export declare const StyledTitlesContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<(Omit<Omit<Pick<import("@pega/cosmos-react-core/lib/components/Flex/Flex").BaseFlexProps & import("@pega/cosmos-react-core").BaseProps & import("@pega/cosmos-react-core").AsProp & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthoringPanel.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AuthoringPanel/AuthoringPanel.styles.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,eAAO,MAAM,eAAe;;;;mBAoC1B,CAAC;AAGH,eAAO,MAAM,oBAAoB,sQAchC,CAAC;AAGF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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path to the field reference. */
|
|
48
48
|
fieldPath: [Context, ...Field[]] | Field[];
|
|
49
49
|
/** If defined, the fieldPath will render as a Link with these props forwarded. */
|
|
50
|
-
link?: Pick<LinkProps, 'href' | 'previewable' | 'onPreview' | 'target'
|
|
51
|
-
onClick?: (e: MouseEvent) => void;
|
|
52
|
-
};
|
|
50
|
+
link?: Pick<LinkProps, 'href' | 'previewable' | 'onPreview' | 'target' | 'onClick'>;
|
|
53
51
|
/** Pass an array of Action objects to append button(s) inline. */
|
|
54
52
|
actions?: Action[];
|
|
55
53
|
/** Data to render in a tooltip upon hover of the component. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldReference.types.d.ts","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReference.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,aAAa,IAAI,kBAAkB,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAElF,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,uBAAuB,EACvB,MAAM,EACN,SAAS,EACT,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAElG,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,KAAK;IACpB,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CACL;AAED,MAAM,WAAW,OAAO;IACtB,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAW,SAAQ,OAAO;IACzC,yCAAyC;IACzC,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAChC,2GAA2G;IAC3G,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,sBAAuB,SAAQ,KAAK;IACnD,0GAA0G;IAC1G,KAAK,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACjC,6GAA6G;IAC7G,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACrC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,0BAA2B,SAAQ,cAAc,EAAE,UAAU;IAC5E,uCAAuC;IACvC,SAAS,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC;IAC3C,kFAAkF;IAClF,IAAI,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,
|
|
1
|
+
{"version":3,"file":"FieldReference.types.d.ts","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReference.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,aAAa,IAAI,kBAAkB,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAElF,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,UAAU,EACV,SAAS,EACT,gBAAgB,EAChB,uBAAuB,EACvB,MAAM,EACN,SAAS,EACT,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAElG,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE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BAAkB,KAAK,OAAO,GAAG,IAAI,CAAC;IACtD,4DAA4D;IAC5D,MAAM,CAAC,EAAE,GAAG,CAAC,yBAAyB,CAAC,CAAC;IACxC,iDAAiD;IACjD,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldReference.types.js","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReference.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Ref, KeyboardEvent as ReactKeyboardEvent, MouseEvent } from 'react';\n\nimport type {\n IconProps,\n MenuItemProps,\n NoChildrenProp,\n TestIdProp,\n MenuProps,\n FormControlProps,\n FieldValueListItemProps,\n Action,\n LinkProps,\n OmitStrict\n} from '@pega/cosmos-react-core';\nimport type { ParentMenuItemProps } from '@pega/cosmos-react-core/lib/components/Menu/Menu.types';\n\nexport interface Selected {\n id: string;\n text: string;\n}\n\nexport interface Field {\n /** The unique id for the field. */\n id: string;\n /** The name of the field. */\n name: string;\n /** The type of the field. */\n type?: string;\n /** Props forwarded to the Icon component. */\n icon?: IconProps;\n /** Additional data related to the field. */\n metadata?: {\n name: FieldValueListItemProps['name'];\n value: string;\n }[];\n}\n\nexport interface Context {\n /** The unique id for the context. */\n id: string;\n /** The context label. */\n name: string;\n}\n\nexport interface AltContext extends Context {\n /** Items associated with the context. */\n items: FieldReferenceMenuItem[];\n /** If true or false, the altContext will be selectable. If undefined, the altContext not be selectable. */\n selected?: MenuItemProps['selected'];\n}\n\nexport interface FieldReferenceMenuItem extends Field {\n /** A set of nested child items. If an empty array is provided, the item will still render as a parent. */\n items?: FieldReferenceMenuItem[];\n /** If true or false, the parent item will be selectable. If undefined, the parent will not be selectable. */\n selected?: MenuItemProps['selected'];\n /**\n * Corresponding field item from the source.\n * Useful if the `id` alone is not unique enough to identify the source\n */\n originalItem?: unknown;\n}\n\nexport interface FieldReferenceDisplayProps extends NoChildrenProp, TestIdProp {\n /** The path to the field reference. */\n fieldPath: [Context, ...Field[]] | Field[];\n /** If defined, the fieldPath will render as a Link with these props forwarded. */\n link?: Pick<LinkProps, 'href' | 'previewable' | 'onPreview' | 'target'
|
|
1
|
+
{"version":3,"file":"FieldReference.types.js","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReference.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Ref, KeyboardEvent as ReactKeyboardEvent, MouseEvent } from 'react';\n\nimport type {\n IconProps,\n MenuItemProps,\n NoChildrenProp,\n TestIdProp,\n MenuProps,\n FormControlProps,\n FieldValueListItemProps,\n Action,\n LinkProps,\n OmitStrict\n} from '@pega/cosmos-react-core';\nimport type { ParentMenuItemProps } from '@pega/cosmos-react-core/lib/components/Menu/Menu.types';\n\nexport interface Selected {\n id: string;\n text: string;\n}\n\nexport interface Field {\n /** The unique id for the field. */\n id: string;\n /** The name of the field. */\n name: string;\n /** The type of the field. */\n type?: string;\n /** Props forwarded to the Icon component. */\n icon?: IconProps;\n /** Additional data related to the field. */\n metadata?: {\n name: FieldValueListItemProps['name'];\n value: string;\n }[];\n}\n\nexport interface Context {\n /** The unique id for the context. */\n id: string;\n /** The context label. */\n name: string;\n}\n\nexport interface AltContext extends Context {\n /** Items associated with the context. */\n items: FieldReferenceMenuItem[];\n /** If true or false, the altContext will be selectable. If undefined, the altContext not be selectable. */\n selected?: MenuItemProps['selected'];\n}\n\nexport interface FieldReferenceMenuItem extends Field {\n /** A set of nested child items. If an empty array is provided, the item will still render as a parent. */\n items?: FieldReferenceMenuItem[];\n /** If true or false, the parent item will be selectable. If undefined, the parent will not be selectable. */\n selected?: MenuItemProps['selected'];\n /**\n * Corresponding field item from the source.\n * Useful if the `id` alone is not unique enough to identify the source\n */\n originalItem?: unknown;\n}\n\nexport interface FieldReferenceDisplayProps extends NoChildrenProp, TestIdProp {\n /** The path to the field reference. */\n fieldPath: [Context, ...Field[]] | Field[];\n /** If defined, the fieldPath will render as a Link with these props forwarded. */\n link?: Pick<LinkProps, 'href' | 'previewable' | 'onPreview' | 'target' | 'onClick'>;\n /** Pass an array of Action objects to append button(s) inline. */\n actions?: Action[];\n /** Data to render in a tooltip upon hover of the component. */\n tooltipData?: FieldValueListItemProps[];\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nexport interface FieldReferenceMenuProps\n extends Pick<MenuProps, 'itemLayout' | 'scrollAt' | 'loading' | 'loadMore' | 'onCreateNew'> {\n /** Menu items to display. */\n items: FieldReferenceMenuItem[];\n /** The current context that the menu is within. */\n currentContext?: Context;\n /** Menu items to display above the standard list. These should be items that are outside of the currentContext. */\n altContexts?: AltContext[];\n /** Parent menu item for drill-down. */\n parentItem?: FieldReferenceMenuItem | AltContext;\n /**\n * A custom label for the create new action.\n * @default 'Create new'\n * */\n createNewLabel?: string;\n}\n\nexport interface FieldReferencedMenuListProps extends TestIdProp {\n items: ParentMenuItemProps['items'];\n id?: string;\n parent?: { id: string; primary: string };\n ref?: Ref<HTMLFieldSetElement>;\n}\n\nexport interface FieldReferenceHandleValue {\n /** Used to open the menu programmatically. */\n openMenu: () => void;\n /** Used to close the menu programmatically. */\n closeMenu: () => void;\n}\nexport interface FieldReferenceProps\n extends OmitStrict<FieldReferenceInputProps, 'onFilterChange'> {\n /** Defines the use of FieldReferenceWrapper component\n * fieldPicker represents component usage for fieldReference\n * objectSelect represents component usage for ObjectSelect\n * @default Field\n */\n mode: 'object-select' | 'field-picker';\n onFilterChange?: FieldReferenceInputProps['onFilterChange'];\n}\nexport default interface FieldReferenceInputProps\n extends NoChildrenProp,\n TestIdProp,\n Pick<\n FormControlProps,\n | 'id'\n | 'label'\n | 'labelHidden'\n | 'required'\n | 'disabled'\n | 'readOnly'\n | 'status'\n | 'info'\n | 'placeholder'\n | 'additionalInfo'\n > {\n /** Props related to the menu. */\n menu: FieldReferenceMenuProps;\n /**\n * If true, tooltips will be shown when hovering over menu items and selected paths.\n * @default true\n */\n showTooltips?: boolean;\n /**\n * If true, the current context will be prepended to all field reference paths.\n * @default false\n * */\n showCurrentContext?: boolean;\n /**\n * If true, only a selected leaf node will be shown in the selected path.\n * @default true\n * */\n showPath?: boolean;\n /** Callback fired when an altContext item is clicked. */\n onAltContextClick?: (altContext: AltContext) => void;\n /** The current selection. */\n selected?: Field[];\n /** Callback fired when the selected field path is modified. */\n onSelectedChange: (selectedValue: FieldReferenceMenuItem[]) => void;\n /** The value of the search filter. */\n filterValue?: string;\n /** Callback fired when the filtering input value changes. */\n onFilterChange: (filterValue: string) => void;\n /** If defined, the selected fieldPath will render as a Link when the input is in a resting state, with these props forwarded. */\n link?: FieldReferenceDisplayProps['link'];\n /** Pass an array of Action objects to append button(s) inline when the input is in a selected resting state. */\n actions?: FieldReferenceDisplayProps['actions'];\n /** Callback fired when the Field Reference input gains focus. */\n onFocus?: () => void;\n /**\n * Callback fired when the Field Reference looses focus within its containing element.\n * This is not specific to the input element.\n * Note, behavior will be enhanced in an upcoming release and the input will be the only focusable element.\n */\n onBlur?: () => void;\n /**\n * Fired when the user clicks on the dropdown icon to initiate opening the menu.\n * If you want to offer default menu items without an input value, pass this function.\n * This function can be an appropriate time to fetch menu item data.\n * Remember to set the loading prop to true when fetching data for an empty list.\n *\n * @param open value defining whether the click opens or closes the menu\n */\n onDropdownButtonClick?: (open: boolean) => void;\n /** Fired when user clicks on the Field Reference input. */\n onClick?: (e: MouseEvent) => void;\n /** Fired when menu opens. */\n onMenuOpen?: () => void;\n /**\n * Fired before running default component onKeyDown handler.\n * Returning `false` from this function prevents default onKeyDown handling.\n */\n onKeyDown?: (e: ReactKeyboardEvent) => boolean | void;\n /** Ref that can be used to access the imperative handle. */\n handle?: Ref<FieldReferenceHandleValue>;\n /** Reference to the component's root element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
|
|
@@ -23,7 +23,7 @@ const FieldReferenceDisplay = forwardRef(function FieldReferenceDisplay({ testId
|
|
|
23
23
|
cols: type ? 'auto 1fr' : 'auto',
|
|
24
24
|
areas: type ? '"primary secondary"' : '"primary"'
|
|
25
25
|
}, children: [_jsxs(Flex, { container: { alignItems: 'center', colGap: 1 }, children: [icon && _jsx(Icon, { "data-testid": testIds.icon, ...icon, size: 's' }), link ? (_jsx(Link, { "data-testid": testIds.fieldPath, ref: setLinkEl, ...link, onClick: link.onClick
|
|
26
|
-
?
|
|
26
|
+
? e => {
|
|
27
27
|
link.onClick?.(e);
|
|
28
28
|
}
|
|
29
29
|
: undefined, children: fieldPath.map(field => field.name).join(' . ') })) : (_jsx(Text, { "data-testid": testIds.fieldPath, children: fieldPath.map(field => field.name).join(' . ') }))] }), type && (_jsx(Flex, { container: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldReferenceDisplay.js","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReferenceDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,WAAW,EACX,OAAO,EACP,OAAO,EACP,IAAI,EACJ,OAAO,EACP,UAAU,EACX,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,EAC/B,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,qBAAqB,GAAG,UAAU,CAAC,SAAS,qBAAqB,CACrE,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAA+C,EAC9F,GAAsC;IAEtC,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,EAAE,+BAA+B,CAAC,CAAC;IACpE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,UAAU,EAAkB,CAAC;IAC/D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,UAAU,EAAqB,CAAC;IAE5D,MAAM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AG,GAAG,EAC9D,IAAI,CAAC,CAAC,CAAC,CACN,KAAC,IAAI,mBACU,OAAO,CAAC,SAAS,EAC9B,GAAG,EAAE,SAAS,KACV,IAAI,EACR,OAAO,EACL,IAAI,CAAC,OAAO;gDACV,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"FieldReferenceDisplay.js","sourceRoot":"","sources":["../../../src/components/FieldReference/FieldReferenceDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EACL,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,WAAW,EACX,OAAO,EACP,OAAO,EACP,IAAI,EACJ,OAAO,EACP,UAAU,EACX,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,EAC/B,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,qBAAqB,GAAG,UAAU,CAAC,SAAS,qBAAqB,CACrE,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAA+C,EAC9F,GAAsC;IAEtC,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,EAAE,+BAA+B,CAAC,CAAC;IACpE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,UAAU,EAAkB,CAAC;IAC/D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,UAAU,EAAqB,CAAC;IAE5D,MAAM,IAAI,GACR,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,EAAE,MAAM,CAAC;QACtD,CAAC,CAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAY,CAAC,IAAI;QACnC,CAAC,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,CAAC,CAAC;gDACpB,CAAC;gDACH,CAAC,CAAC,SAAS,YAGd,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAC1C,CACR,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,mBAAc,OAAO,CAAC,SAAS,YACjC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAC1C,CACR,IACI,EACN,IAAI,IAAI,CACP,KAAC,IAAI,IACH,SAAS,EAAE;wCACT,OAAO,EAAE,KAAK;qCACf,EACD,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,YAEjB,KAAC,IAAI,mBAAc,OAAO,CAAC,IAAI,EAAE,OAAO,EAAC,WAAW,YACjD,IAAI,GACA,GACF,CACR,IACI,EACN,OAAO,IAAI,KAAC,OAAO,IAAC,KAAK,EAAE,OAAO,GAAI,IACtC,CACJ,CAAC,CAAC,CAAC,CACF,KAAC,OAAO,KAAG,CACZ,GACI,EAEN,WAAW,IAAI,CACd,KAAC,OAAO,IAAC,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,EAAC,MAAM,EAAC,cAAc,kBACpF,KAAC,oBAAoB,IAAC,MAAM,EAAE,WAAW,GAAI,GACrC,CACX,IACA,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,qBAAqB,EAAE,+BAA+B,CAAC,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef } from 'react';\n\nimport {\n useTestIds,\n Flex,\n Text,\n Icon,\n Grid,\n NoValue,\n withTestIds,\n hasProp,\n Actions,\n Link,\n Tooltip,\n useElement\n} from '@pega/cosmos-react-core';\n\nimport type { Field, FieldReferenceDisplayProps } from './FieldReference.types';\nimport { getFieldReferenceDisplayTestIds } from './FieldReference.test-ids';\nimport {\n StyledFieldReferenceDisplay,\n StyledFieldReferenceDisplayGrid,\n StyledFieldValueList\n} from './FieldReference.styles';\n\nconst FieldReferenceDisplay = forwardRef(function FieldReferenceDisplay(\n { testId, fieldPath, link, actions, tooltipData }: PropsWithoutRef<FieldReferenceDisplayProps>,\n ref: FieldReferenceDisplayProps['ref']\n) {\n const testIds = useTestIds(testId, getFieldReferenceDisplayTestIds);\n const [displayEl, setDisplayEl] = useElement<HTMLDivElement>();\n const [linkEl, setLinkEl] = useElement<HTMLAnchorElement>();\n\n const icon =\n !!fieldPath.at(-1) && hasProp(fieldPath.at(-1)!, 'icon')\n ? (fieldPath.at(-1)! as Field).icon\n : undefined;\n const type =\n !!fieldPath.at(-1) && hasProp(fieldPath.at(-1)!, 'type')\n ? (fieldPath.at(-1)! as Field).type\n : undefined;\n\n return (\n <>\n <Flex\n as={StyledFieldReferenceDisplay}\n data-testid={testIds.root}\n ref={ref}\n container={{\n justify: 'between',\n alignItems: 'center',\n colGap: 0.5\n }}\n >\n {fieldPath.length ? (\n <>\n <Grid\n ref={setDisplayEl}\n as={StyledFieldReferenceDisplayGrid}\n container={{\n alignItems: 'center',\n gap: 1,\n cols: type ? 'auto 1fr' : 'auto',\n areas: type ? '\"primary secondary\"' : '\"primary\"'\n }}\n >\n <Flex container={{ alignItems: 'center', colGap: 1 }}>\n {icon && <Icon data-testid={testIds.icon} {...icon} size='s' />}\n {link ? (\n <Link\n data-testid={testIds.fieldPath}\n ref={setLinkEl}\n {...link}\n onClick={\n link.onClick\n ? e => {\n link.onClick?.(e);\n }\n : undefined\n }\n >\n {fieldPath.map(field => field.name).join(' . ')}\n </Link>\n ) : (\n <Text data-testid={testIds.fieldPath}>\n {fieldPath.map(field => field.name).join(' . ')}\n </Text>\n )}\n </Flex>\n {type && (\n <Flex\n container={{\n justify: 'end'\n }}\n item={{ grow: 1 }}\n >\n <Text data-testid={testIds.type} variant='secondary'>\n {type}\n </Text>\n </Flex>\n )}\n </Grid>\n {actions && <Actions items={actions} />}\n </>\n ) : (\n <NoValue />\n )}\n </Flex>\n\n {tooltipData && (\n <Tooltip target={displayEl} ignoredElements={[linkEl]} hideDelay='none' describeTarget>\n <StyledFieldValueList fields={tooltipData} />\n </Tooltip>\n )}\n </>\n );\n});\n\nexport default withTestIds(FieldReferenceDisplay, getFieldReferenceDisplayTestIds);\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-build",
|
|
3
|
-
"version": "10.0.0-build.4.
|
|
3
|
+
"version": "10.0.0-build.4.22",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"author": "Pegasystems",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@dagrejs/dagre": "^3.0.0",
|
|
18
|
-
"@pega/cosmos-react-core": "10.0.0-build.4.
|
|
19
|
-
"@pega/cosmos-react-dnd": "10.0.0-build.4.
|
|
20
|
-
"@pega/cosmos-react-rte": "10.0.0-build.4.
|
|
18
|
+
"@pega/cosmos-react-core": "10.0.0-build.4.22",
|
|
19
|
+
"@pega/cosmos-react-dnd": "10.0.0-build.4.22",
|
|
20
|
+
"@pega/cosmos-react-rte": "10.0.0-build.4.22",
|
|
21
21
|
"@types/codemirror": "^5.60.15",
|
|
22
22
|
"@types/react": "^17.0.62 || ^18.3.3",
|
|
23
23
|
"@types/react-dom": "^17.0.20 || ^18.3.0",
|