@lax-wp/design-system 0.14.39 → 0.14.40
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/dist/components/data-display/infinite-table/body/cell/DataCell.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/DataCell.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/DataCell.es.js +149 -166
- package/dist/components/data-display/infinite-table/body/cell/DataCell.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/constants.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/constants.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/constants.d.ts +0 -8
- package/dist/components/data-display/infinite-table/constants.es.js +20 -24
- package/dist/components/data-display/infinite-table/constants.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/context.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/context.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/context.d.ts +1 -5
- package/dist/components/data-display/infinite-table/context.es.js +2 -5
- package/dist/components/data-display/infinite-table/context.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/cell/index.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/head/cell/index.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/cell/index.es.js +39 -39
- package/dist/components/data-display/infinite-table/head/cell/index.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/index.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/index.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/index.d.ts +1 -1
- package/dist/components/data-display/infinite-table/index.es.js +526 -547
- package/dist/components/data-display/infinite-table/index.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/types.d.ts +4 -75
- package/dist/components/data-display/label-value/LabelValue.cjs.js +1 -1
- package/dist/components/data-display/label-value/LabelValue.cjs.js.map +1 -1
- package/dist/components/data-display/label-value/LabelValue.es.js +1 -1
- package/dist/components/data-display/label-value/LabelValue.es.js.map +1 -1
- package/dist/components/floating-bar/FloatingBar.cjs.js +1 -1
- package/dist/components/floating-bar/FloatingBar.cjs.js.map +1 -1
- package/dist/components/floating-bar/FloatingBar.es.js +29 -32
- package/dist/components/floating-bar/FloatingBar.es.js.map +1 -1
- package/dist/components/forms/currency-input/CurrencyInputField.cjs.js +1 -1
- package/dist/components/forms/currency-input/CurrencyInputField.cjs.js.map +1 -1
- package/dist/components/forms/currency-input/CurrencyInputField.es.js +24 -24
- package/dist/components/forms/currency-input/CurrencyInputField.es.js.map +1 -1
- package/dist/components/forms/icon-picker/IconPicker.cjs.js +1 -1
- package/dist/components/forms/icon-picker/IconPicker.cjs.js.map +1 -1
- package/dist/components/forms/icon-picker/IconPicker.es.js +65 -79
- package/dist/components/forms/icon-picker/IconPicker.es.js.map +1 -1
- package/dist/components/forms/master-data-input/MasterDataInputField.cjs.js +1 -1
- package/dist/components/forms/master-data-input/MasterDataInputField.cjs.js.map +1 -1
- package/dist/components/forms/master-data-input/MasterDataInputField.es.js +2 -2
- package/dist/components/forms/master-data-input/MasterDataInputField.es.js.map +1 -1
- package/dist/components/forms/md-input/RichMarkdownInput.cjs.js +1 -1
- package/dist/components/forms/md-input/RichMarkdownInput.cjs.js.map +1 -1
- package/dist/components/forms/md-input/RichMarkdownInput.es.js +38 -39
- package/dist/components/forms/md-input/RichMarkdownInput.es.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/providers/design-system-provider/types.d.ts +0 -1
- package/package.json +1 -1
- package/dist/components/data-display/infinite-table/CellContextMenuPortal.cjs.js +0 -2
- package/dist/components/data-display/infinite-table/CellContextMenuPortal.cjs.js.map +0 -1
- package/dist/components/data-display/infinite-table/CellContextMenuPortal.d.ts +0 -30
- package/dist/components/data-display/infinite-table/CellContextMenuPortal.es.js +0 -248
- package/dist/components/data-display/infinite-table/CellContextMenuPortal.es.js.map +0 -1
- package/dist/components/data-display/infinite-table/copy-text.cjs.js +0 -2
- package/dist/components/data-display/infinite-table/copy-text.cjs.js.map +0 -1
- package/dist/components/data-display/infinite-table/copy-text.d.ts +0 -13
- package/dist/components/data-display/infinite-table/copy-text.es.js +0 -56
- package/dist/components/data-display/infinite-table/copy-text.es.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),p=require("../../../_virtual/index.cjs.js"),Ce=require("../../icons/HelpIcon.cjs.js"),Se=require("../../icons/SearchIcon.cjs.js"),L=require("../typography/Typography.cjs.js"),i=require("../../../utils/formatters.cjs.js"),Ne=require("../../forms/currency-input/currency.constant.cjs.js"),ke=require("../label/Label.cjs.js"),Le=require("framer-motion"),j=require("@mui/icons-material"),C=require("../../tooltip/Tooltip.cjs.js"),Ie=require("../../icons/AIExtractedIndicator.cjs.js"),Te=require("../../icons/AIStarIcon.cjs.js"),S=require("../../../utils/confidenceScoreUtils.cjs.js"),F=require("dayjs"),K=require("../../icon/icons.generated.cjs.js"),P=u.forwardRef(({id:Y,label:l,value:r,className:G,type:s="string",tags:J,tooltip:I,items:n,isModified:Q=!1,isChanged:W=!1,size:X="medium",isHighlighted:v=!1,deletedValue:a,highlightColor:V="warning",isSearchActive:ee=!1,originalValue:T=!1,showDiff:q=!1,isLiveField:re=!1,isAiExtracted:te=!1,confidenceScore:se,confidenceType:g="high",confidenceTooltip:oe,sourceMeta:ae=[],onConfidenceScoreClick:ne,deltaChange:m,theme:qe="light",onUpload:z,acceptsUpload:ie=!1,MasterDataModal:$,riskDetails:f,isRiskAnalysisOpen:M=!1,RiskDetailsCard:_,"aria-label":ce,decodeEntities:le=!0,onAiExtractedIndicatorClick:de,copyOnHover:ue=!1,urlAlias:D},pe)=>{const[c,me]=u.useState(!0),[fe,E]=u.useState(!1),[xe,R]=u.useState(null),[H,N]=u.useState(!1),[w,A]=u.useState(!1),y=u.useRef(null);u.useEffect(()=>()=>{y.current&&clearTimeout(y.current)},[]);const d=t=>le?i.decodeHTMLEntities(t):t,x=100,O=()=>{me(!c)},k=()=>e.jsx("button",{id:`btn-label-value-${c?"Show more":"Show less"}`,className:"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap",onClick:O,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),O())},"aria-label":c?"Show more content":"Show less content",type:"button",children:c?"Show more":"Show less"}),Z=t=>{if(D)return e.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 font-semibold text-neutral-900 dark:text-white hover:text-primary-600 dark:hover:text-primary-400 transition-colors",children:[D,e.jsx(j.OpenInNew,{sx:{fontSize:16},className:"text-primary-600 dark:text-primary-400"})]});const o=d(t);return o.length<=x?e.jsx("a",{href:t,className:"text-primary-600 truncate",children:o}):e.jsxs("p",{children:[e.jsx("a",{href:t,className:"text-primary-600 break-all",children:o.slice(0,c?x:o.length)}),c?"... ":" ",k()]})},B=t=>{E(!0),R({...t,value:r})},he=()=>{E(!1),R(null)},ye=()=>{const t=r==null||typeof r=="object"?"":String(r);t&&navigator.clipboard?.writeText(t).then(()=>{A(!0),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>A(!1),1500)}).catch(()=>{})},ge=t=>{const o=t.target.files?.[0];o&&z&&z(o),t.target.value=""},b=()=>{const t=typeof r=="string"&&i.isISODateString(r);if(ee&&typeof r=="object")return r;if(r||s?.toLowerCase()==="boolean"&&r===0||s?.toLowerCase()==="currency"&&Number(r)>=0){if((r===!0||r==="True")&&!T&&s?.toLowerCase()!=="choice")return"Yes";if((r===!1||r==="False")&&!T&&s?.toLowerCase()!=="choice")return"No";if(s?.toLowerCase()==="url")return Z(r);if(s?.toLowerCase()==="boolean")return i.formatBooleanValue(r);if(s?.toLowerCase()==="currency"){const o=i.formatCurrency(r,n?.currency_code)||"-",h=n?.currency_code?Ne.CURRENCIES.find(je=>je.value===n.currency_code)?.label:void 0,be=h?`${n.currency_code} — ${h}`:n?.currency_code??"";return h?e.jsx(C,{title:be,placement:"top",children:e.jsx("span",{children:o})}):o}else if(s?.toLowerCase()==="datetime"){const o=typeof r=="string"&&r.includes("Z")?r.replace(/\.000Z$/,"Z"):r;return i.formatDate(o,{skipTimezone:!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),p=require("../../../_virtual/index.cjs.js"),Ce=require("../../icons/HelpIcon.cjs.js"),Se=require("../../icons/SearchIcon.cjs.js"),L=require("../typography/Typography.cjs.js"),i=require("../../../utils/formatters.cjs.js"),Ne=require("../../forms/currency-input/currency.constant.cjs.js"),ke=require("../label/Label.cjs.js"),Le=require("framer-motion"),j=require("@mui/icons-material"),C=require("../../tooltip/Tooltip.cjs.js"),Ie=require("../../icons/AIExtractedIndicator.cjs.js"),Te=require("../../icons/AIStarIcon.cjs.js"),S=require("../../../utils/confidenceScoreUtils.cjs.js"),F=require("dayjs"),K=require("../../icon/icons.generated.cjs.js"),P=u.forwardRef(({id:Y,label:l,value:r,className:G,type:s="string",tags:J,tooltip:I,items:n,isModified:Q=!1,isChanged:W=!1,size:X="medium",isHighlighted:v=!1,deletedValue:a,highlightColor:V="warning",isSearchActive:ee=!1,originalValue:T=!1,showDiff:q=!1,isLiveField:re=!1,isAiExtracted:te=!1,confidenceScore:se,confidenceType:g="high",confidenceTooltip:oe,sourceMeta:ae=[],onConfidenceScoreClick:ne,deltaChange:m,theme:qe="light",onUpload:z,acceptsUpload:ie=!1,MasterDataModal:$,riskDetails:f,isRiskAnalysisOpen:M=!1,RiskDetailsCard:_,"aria-label":ce,decodeEntities:le=!0,onAiExtractedIndicatorClick:de,copyOnHover:ue=!1,urlAlias:D},pe)=>{const[c,me]=u.useState(!0),[fe,E]=u.useState(!1),[xe,R]=u.useState(null),[H,N]=u.useState(!1),[w,A]=u.useState(!1),y=u.useRef(null);u.useEffect(()=>()=>{y.current&&clearTimeout(y.current)},[]);const d=t=>le?i.decodeHTMLEntities(t):t,x=100,O=()=>{me(!c)},k=()=>e.jsx("button",{id:`btn-label-value-${c?"Show more":"Show less"}`,className:"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap",onClick:O,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),O())},"aria-label":c?"Show more content":"Show less content",type:"button",children:c?"Show more":"Show less"}),Z=t=>{if(D)return e.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 font-semibold text-neutral-900 dark:text-white hover:text-primary-600 dark:hover:text-primary-400 transition-colors",children:[D,e.jsx(j.OpenInNew,{sx:{fontSize:16},className:"text-primary-600 dark:text-primary-400"})]});const o=d(t);return o.length<=x?e.jsx("a",{href:t,className:"text-primary-600 truncate",children:o}):e.jsxs("p",{children:[e.jsx("a",{href:t,className:"text-primary-600 break-all",children:o.slice(0,c?x:o.length)}),c?"... ":" ",k()]})},B=t=>{E(!0),R({...t,value:r})},he=()=>{E(!1),R(null)},ye=()=>{const t=r==null||typeof r=="object"?"":String(r);t&&navigator.clipboard?.writeText(t).then(()=>{A(!0),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>A(!1),1500)}).catch(()=>{})},ge=t=>{const o=t.target.files?.[0];o&&z&&z(o),t.target.value=""},b=()=>{const t=typeof r=="string"&&i.isISODateString(r);if(ee&&typeof r=="object")return r;if(r||s?.toLowerCase()==="boolean"&&r===0||s?.toLowerCase()==="currency"&&Number(r)>=0){if((r===!0||r==="True")&&!T&&s?.toLowerCase()!=="choice")return"Yes";if((r===!1||r==="False")&&!T&&s?.toLowerCase()!=="choice")return"No";if(s?.toLowerCase()==="url")return Z(r);if(s?.toLowerCase()==="boolean")return i.formatBooleanValue(r);if(s?.toLowerCase()==="currency"){const o=i.formatCurrency(r,n?.currency_code)||"-",h=n?.currency_code?Ne.CURRENCIES.find(je=>je.value===n.currency_code)?.label:void 0,be=h?`${n.currency_code} — ${h}`:n?.currency_code??"";return h?e.jsx(C,{title:be,placement:"top",children:e.jsx("span",{children:o})}):o}else if(s?.toLowerCase()==="datetime"){const o=typeof r=="string"&&r.includes("Z")?r.replace(/\.000Z$/,"Z"):r;return i.formatDate(o,{skipTimezone:!0,withTime:!0})}else if(s?.toLowerCase()==="date"||t){let o=r;if(typeof r=="string"&&r.includes("Z"))o=r.replace(/\.000Z$/,"Z");else if(typeof r=="string"&&!r.includes("Z")){const h=F(r);o=F(h).isValid()?h.toString():r}return i.formatDate(o,{skipTimezone:!0,withTime:!1})}else{if(s?.toLowerCase()==="percentage")return`${r}%`;if(typeof r=="string"&&r.length>x){const o=d(r);return e.jsxs("p",{children:[o.slice(0,c?x:o.length),c?"... ":" ",k()]})}else return typeof r=="string"?d(r):r}}return"-"},U=()=>{switch(X){case"small":return"extra-small";case"large":return"large";default:return"small"}},we=()=>{switch(V){case"success":return"bg-success-100";case"warning":return"bg-warning-100";case"error":return"bg-error-100";case"info":return"bg-info-100";default:return"bg-warning-100"}};return e.jsxs("div",{id:Y||"",ref:pe,className:p("font-medium relative",G),onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),"aria-label":ce||`Label: ${l}, Value: ${r}`,children:[e.jsxs(L.Typography,{variant:"medium",size:U(),className:"flex gap-1 items-center flex-wrap",appearance:"subtitle",children:[typeof l=="string"?d(l):l," ",e.jsx(ke.Label,{labels:J?.map(t=>({...t,color:t.color||"primary"}))}),re&&e.jsx(j.BoltOutlined,{sx:{fontSize:16,color:"var(--color-primary-600)",rotate:"15deg"}}),te&&(S.shouldShowConfidenceScore(se)&&g?e.jsx(C,{placement:"top",title:oe||"",className:"cursor-pointer",children:e.jsx("div",{className:p("cursor-pointer w-3 h-3 flex items-center justify-center rounded-full",S.getConfidenceScoreBadgeHoverClass(g)),onClick:()=>ne?.(ae),children:e.jsx(Te.AIStarIcon,{size:12,fill:S.getConfidenceScoreBadgeColor(g),fillSecondary:S.getConfidenceScoreBadgeFill(g)})})}):e.jsx(Ie.AIExtractedIndicator,{onClick:()=>de?.(b())})),I&&e.jsx(C,{placement:"top",title:I,whiteSpace:"pre-wrap",children:e.jsx("div",{className:"cursor-pointer",role:"button",tabIndex:0,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&t.preventDefault()},children:e.jsx(Ce.HelpIcon,{size:14})})}),ue&&H&&e.jsx(C,{title:w?"Copied":`Copy ${l??"value"}`,placement:"top",whiteSpace:"pre-wrap",children:e.jsx("button",{type:"button",onClick:ye,"aria-label":w?`Copied ${l??"value"}`:`Copy ${l??"value"}`,className:"p-1 flex items-center justify-center rounded text-neutral-500 hover:!text-primary-600 hover:bg-neutral-100 dark:text-primary-400 dark:hover:!text-primary-600 dark:hover:bg-neutral-800 cursor-pointer",children:e.jsxs("span",{className:"relative inline-flex h-4 w-4 items-center justify-center",children:[e.jsx(K.ContentCopyIcon,{size:16,className:p("absolute inset-0 text-primary-600 dark:text-primary-500 transition-all duration-200 ease-out",w?"opacity-0 scale-50 rotate-[-90deg]":"opacity-100 scale-100 rotate-0")}),e.jsx(K.CheckFilledIcon,{size:16,className:p("absolute inset-0 text-primary-600 dark:text-primary-500 transition-all duration-200 ease-out",w?"opacity-100 scale-100 rotate-0":"opacity-0 scale-50 rotate-90")})]})})})]}),e.jsxs(L.Typography,{variant:"medium",size:U(),className:p("text-- whitespace-normal break-all flex gap-1 pt-0.5",Q&&"bg-neutral-50 dark:bg-black-700 p-1 rounded",M&&f?.color&&`bg-${f.color}-50 border-${f.color}-300 px-0.5 rounded-lg`),appearance:"body",children:[q&&a&&r?e.jsxs("div",{className:"flex gap-2",children:[e.jsx("span",{className:"line-through",children:d(a)}),e.jsx("span",{children:b()})]}):W||v?e.jsx("mark",{className:p("rounded-md py-0.5 px-1",we()),children:b()}):b(),s?.toLowerCase()==="currency"&&m!==0&&m!==void 0&&m!==null&&e.jsxs(Le.motion.span,{initial:{opacity:0,y:2},animate:{opacity:1,y:0},transition:{duration:.25},className:p("inline-flex items-center gap-1 ml-1.5 text-xs font-medium",m>0?"text-emerald-600 dark:text-emerald-400":"text-red-600 dark:text-red-400"),children:[e.jsx("span",{className:"flex items-center justify-center w-4 h-4",children:m>0?e.jsx(j.ArrowUpwardRounded,{sx:{fontSize:16},className:"text-emerald-600 dark:text-emerald-400"}):e.jsx(j.ArrowDownwardRounded,{sx:{fontSize:16},className:"text-red-600 dark:text-red-400"})}),e.jsx("span",{children:i.formatCurrency(Math.abs(m),n?.currency_code||"USD")})]}),n?.is_master_data&&n?.reference&&r&&e.jsx("button",{onClick:()=>B(n),onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),B(n))},"aria-label":`Search master data for ${l}`,type:"button",className:"cursor-pointer",children:e.jsx(Se.SearchIcon,{width:20,height:20})}),ie&&e.jsx("input",{type:"file",onChange:ge,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer","aria-label":`Upload file for ${l}`})]}),a&&!q&&e.jsx(L.Typography,{variant:"medium",size:"extra-small",className:"pt-0.5",appearance:"body",children:e.jsx("mark",{className:"rounded-md py-0.5 px-1 bg-error-100",children:e.jsx("del",{children:a||s?.toLowerCase()==="boolean"&&a==="0"?a==="True"&&s?.toLowerCase()!=="choice"?"Yes":a==="False"&&s?.toLowerCase()!=="choice"?"No":s?.toLowerCase()==="boolean"?i.formatBooleanValue(a):s?.toLowerCase()==="currency"?i.formatCurrency(a,n?.currency_code):s?.toLowerCase()==="date"?i.formatDate(a,{skipTimezone:!0,withTime:!1}):s?.toLowerCase()==="datetime"?i.formatDate(a,{skipTimezone:!0,withTime:!0}):s?.toLowerCase()==="percentage"?`${a}%`:s?.toLowerCase()==="url"?Z(a):a.length>x?e.jsxs("p",{children:[d(a).slice(0,c?x:d(a).length),c?"... ":" ",k()]}):d(a):"-"})})}),$&&e.jsx($,{isVisible:fe,onClose:he,masterdataInfo:xe}),H&&f&&M&&e.jsx("div",{className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:t=>t.stopPropagation(),onMouseDown:t=>t.preventDefault(),onKeyDown:t=>{t.key==="Escape"&&N(!1)},role:"tooltip","aria-label":"Risk analysis details",tabIndex:0,children:_?e.jsx(_,{riskDetails:f}):e.jsx("div",{className:"shadow-lg p-4",children:e.jsxs("div",{className:"text-sm",children:[e.jsx("h4",{className:"font-semibold mb-2",children:"Risk Details"}),e.jsx("p",{className:"text-neutral-600 dark:text-neutral-300",children:f.description||"Risk analysis information"})]})})})]})});P.displayName="LabelValue";exports.LabelValue=P;
|
|
2
2
|
//# sourceMappingURL=LabelValue.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelValue.cjs.js","sources":["../../../../src/components/data-display/label-value/LabelValue.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState, forwardRef, type ReactNode } from 'react';\nimport cn from 'classnames';\nimport { HelpIcon } from '../../icons/HelpIcon';\nimport { SearchIcon } from '../../icons/SearchIcon';\nimport { Typography } from '../typography/Typography';\nimport { formatCurrency, formatDate, formatBooleanValue, isISODateString, decodeHTMLEntities } from '../../../utils/formatters';\nimport { CURRENCIES } from '../../forms/currency-input/currency.constant';\nimport { Label } from '../label/Label';\nimport { motion } from 'framer-motion';\nimport { ArrowUpwardRounded, ArrowDownwardRounded, BoltOutlined, OpenInNew } from '@mui/icons-material';\nimport Tooltip from '../../tooltip/Tooltip';\nimport { AIExtractedIndicator } from '../../icons/AIExtractedIndicator';\nimport { AIStarIcon } from '../../icons/AIStarIcon';\nimport { CheckFilledIcon, ContentCopyIcon } from '../../icon';\nimport { getConfidenceScoreBadgeColor, getConfidenceScoreBadgeFill, getConfidenceScoreBadgeHoverClass, shouldShowConfidenceScore } from '../../../utils/confidenceScoreUtils';\nimport dayjs from 'dayjs';\n\n/**\n * Source meta bounding box\n */\nexport type SourceMetaBBox = {\n b: number;\n l: number;\n r: number;\n t: number;\n};\n\n/**\n * Source meta item\n */\nexport type SourceMetaItem = {\n bbox: SourceMetaBBox;\n confidence_score?: number;\n is_primary?: boolean;\n match_score?: number;\n match_type?: string;\n page_height: number;\n page_width: number;\n source_page: number;\n source_text?: string;\n};\n\n/**\n * Confidence score type\n */\nexport type ConfidenceScoreType = \"low\" | \"medium\" | \"high\";\n\n/**\n * Available label value size options\n */\nexport type LabelValueSize = 'small' | 'medium' | 'large';\n\n/**\n * Available highlight color options\n */\nexport type HighlightColor = 'success' | 'warning' | 'error' | 'info';\n\n/**\n * Theme mode for styling\n */\nexport type ThemeMode = 'light' | 'dark';\n\n/**\n * Upload handler function type\n */\nexport type UploadHandler = (file: File) => void | Promise<void>;\n\n/**\n * Master data item interface\n */\nexport interface MasterDataItem {\n is_master_data?: boolean;\n reference?: string;\n group_technical_name?: string;\n currency_code?: string;\n}\n\n/**\n * Risk details interface\n */\nexport interface RiskDetails {\n color?: string;\n description?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n\n/**\n * Master data modal component props\n */\nexport interface MasterDataModalProps {\n isVisible: boolean;\n onClose: () => void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n masterdataInfo: any;\n}\n\n/**\n * Risk details card component props\n * Using generic to allow custom risk detail types from consumers\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface RiskDetailsCardProps<TRisk = any> {\n riskDetails: TRisk;\n maxWidth?: string;\n showAllRisksSuggestions?: boolean;\n}\n\n/**\n * Props for the LabelValue component\n */\nexport interface LabelValueProps {\n /** The id of the label value */\n id?: string;\n /** The label text to display */\n label?: string;\n /** The value to display */\n value?: string | number | boolean | ReactNode;\n /** Additional CSS classes */\n className?: string;\n /** Data type for formatting */\n type?: 'string' | 'number' | 'boolean' | 'currency' | 'date' | 'datetime' | 'percentage' | 'url';\n /** Tags to display with the label */\n tags?: Array<{ label: string; color?: string; value?: string }>;\n /** Tooltip text for the help icon */\n tooltip?: string;\n /** Master data item information */\n items?: MasterDataItem;\n /** Whether the value has been modified */\n isModified?: boolean;\n /** Whether the value has been changed */\n isChanged?: boolean;\n /** Size variant */\n size?: LabelValueSize;\n /** Whether the value is highlighted */\n isHighlighted?: boolean;\n /** Deleted value for diff display */\n deletedValue?: string;\n /** Highlight color for changes */\n highlightColor?: HighlightColor;\n /** Whether search is active */\n isSearchActive?: boolean;\n /** Whether to show original boolean value */\n originalValue?: boolean;\n /** Whether to show diff between old and new values */\n showDiff?: boolean;\n /** Whether this is a live field (shows bolt icon) */\n isLiveField?: boolean;\n /** Whether this is an AI extracted field (shows AI extracted icon) */\n isAiExtracted?: boolean;\n /** Confidence percentage shown as a badge */\n confidenceScore?: number;\n /** Confidence classification for badge styling */\n confidenceType?: ConfidenceScoreType;\n /** Optional tooltip content for confidence badge */\n confidenceTooltip?: ReactNode;\n /** Source meta for confidence score */\n sourceMeta?: SourceMetaItem[];\n /** Handler fired when confidence score badge is clicked */\n onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;\n /** Delta change value for currency fields */\n deltaChange?: number;\n /** Theme mode */\n theme?: ThemeMode;\n /** Upload handler function */\n onUpload?: UploadHandler;\n /** Whether the component accepts file uploads */\n acceptsUpload?: boolean;\n /** Master data modal component */\n MasterDataModal?: React.ComponentType<MasterDataModalProps>;\n /** Risk analysis data - accepts any risk object extending RiskDetails */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n riskDetails?: RiskDetails | any;\n /** Whether risk analysis is open */\n isRiskAnalysisOpen?: boolean;\n /** Custom risk details card component - accepts components with custom risk types */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps<any>>;\n /** Custom aria-label for accessibility */\n 'aria-label'?: string;\n /** Whether to decode HTML character entities in string values (default: true) */\n decodeEntities?: boolean;\n /** Function to handle AI extracted indicator click */\n onAiExtractedIndicatorClick?: (value: string) => void;\n /** Whether to show a copy-to-clipboard icon in the top-right corner on hover */\n copyOnHover?: boolean;\n /** Display alias text for URL type — shown instead of the raw URL, with an external link icon */\n urlAlias?: string;\n}\n\n/**\n * LabelValue component displays a label-value pair with various formatting options\n *\n * @example\n * ```tsx\n * <LabelValue \n * label=\"Status\" \n * value=\"Active\" \n * type=\"string\" \n * size=\"medium\" \n * />\n * <LabelValue \n * label=\"Price\" \n * value={99.99} \n * type=\"currency\" \n * items={{ currency_code: 'USD' }}\n * />\n * <LabelValue \n * label=\"Upload File\" \n * acceptsUpload \n * onUpload={handleUpload}\n * />\n * ```\n */\nexport const LabelValue = forwardRef<HTMLDivElement, LabelValueProps>(\n (\n {\n id,\n label,\n value,\n className,\n type = 'string',\n tags,\n tooltip,\n items,\n isModified = false,\n isChanged = false,\n size = 'medium',\n isHighlighted = false,\n deletedValue,\n highlightColor = 'warning',\n isSearchActive = false,\n originalValue = false,\n showDiff = false,\n isLiveField = false,\n isAiExtracted = false,\n confidenceScore,\n confidenceType = \"high\",\n confidenceTooltip,\n sourceMeta = [],\n onConfidenceScoreClick,\n deltaChange,\n theme: _theme = 'light',\n onUpload,\n acceptsUpload = false,\n MasterDataModal,\n riskDetails,\n isRiskAnalysisOpen = false,\n RiskDetailsCard,\n 'aria-label': ariaLabel,\n decodeEntities = true,\n onAiExtractedIndicatorClick,\n copyOnHover = false,\n urlAlias,\n },\n ref\n ) => {\n const [collapseValue, setCollapseValue] = useState(true);\n const [isOpenMasterDataModal, setIsOpenMasterDataModal] = useState(false);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const [masterdataModalInfo, setMasterdataModalInfo] = useState<any>(null);\n const [isHovered, setIsHovered] = useState(false);\n const [isCopied, setIsCopied] = useState(false);\n const copyResetTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(() => {\n return () => {\n if (copyResetTimer.current) clearTimeout(copyResetTimer.current);\n };\n }, []);\n\n // Theme is passed as prop but not used in current implementation\n\n /**\n * Conditionally decode HTML entities based on the decodeEntities prop\n */\n const decode = (text: string): string => decodeEntities ? decodeHTMLEntities(text) : text;\n\n const COLLAPSE_CHAR_LIMIT = 100;\n\n /**\n * Handle collapse toggle for long text\n */\n const handleCollapse = () => {\n setCollapseValue(!collapseValue);\n };\n\n /**\n * Show more / Show less toggle for long text and URLs\n */\n const renderCollapseToggle = () => (\n <button\n id={`btn-label-value-${collapseValue ? 'Show more' : 'Show less'}`}\n className=\"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap\"\n onClick={handleCollapse}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleCollapse();\n }\n }}\n aria-label={collapseValue ? 'Show more content' : 'Show less content'}\n type=\"button\"\n >\n {collapseValue ? 'Show more' : 'Show less'}\n </button>\n );\n\n /**\n * Render a URL with optional collapse for long href/display text\n */\n const renderUrlValue = (href: string) => {\n if (urlAlias) {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 font-semibold text-neutral-900 dark:text-white hover:text-primary-600 dark:hover:text-primary-400 transition-colors\"\n >\n {urlAlias}\n <OpenInNew sx={{ fontSize: 16 }} className=\"text-primary-600 dark:text-primary-400\" />\n </a>\n );\n }\n const decoded = decode(href);\n if (decoded.length <= COLLAPSE_CHAR_LIMIT) {\n return (\n <a href={href} className=\"text-primary-600 truncate\">\n {decoded}\n </a>\n );\n }\n return (\n <p>\n <a href={href} className=\"text-primary-600 break-all\">\n {decoded.slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decoded.length)}\n </a>\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n );\n };\n\n /**\n * Handle master data click\n */\n const handleMasterDataClick = (item: MasterDataItem) => {\n setIsOpenMasterDataModal(true);\n setMasterdataModalInfo({ ...item, value });\n };\n\n /**\n * Handle master data modal close\n */\n const handleMasterDataClose = () => {\n setIsOpenMasterDataModal(false);\n setMasterdataModalInfo(null);\n };\n\n /**\n * Copy the current value to the clipboard\n */\n const handleCopyValue = () => {\n const textToCopy =\n value === null || value === undefined || typeof value === 'object'\n ? ''\n : String(value);\n if (!textToCopy) return;\n navigator.clipboard?.writeText(textToCopy)\n .then(() => {\n setIsCopied(true);\n if (copyResetTimer.current) clearTimeout(copyResetTimer.current);\n copyResetTimer.current = setTimeout(() => setIsCopied(false), 1500);\n })\n .catch(() => { });\n };\n\n /**\n * Handle file upload\n */\n const handleFileUpload = (event: React.ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (file && onUpload) {\n onUpload(file);\n }\n // Reset input value to allow same file selection\n event.target.value = '';\n };\n\n /**\n * Format and display the value based on type\n */\n const displayValue = () => {\n const isISODate = typeof value === 'string' && isISODateString(value);\n\n if (isSearchActive && typeof value === 'object') {\n return value;\n }\n\n if (value || (type?.toLowerCase() === 'boolean' && value === 0) || (type?.toLowerCase() === 'currency' && Number(value) >= 0)) {\n if ((value === true || value === 'True') && !originalValue && (type?.toLowerCase() !== 'choice')) {\n return 'Yes';\n } else if ((value === false || value === 'False') && !originalValue && (type?.toLowerCase() !== 'choice')) {\n return 'No';\n } else if (type?.toLowerCase() === 'url') {\n return renderUrlValue(value as string);\n } else if (type?.toLowerCase() === 'boolean') {\n return formatBooleanValue(value);\n } else if (type?.toLowerCase() === 'currency') {\n const formatted = formatCurrency(value, items?.currency_code) || '-';\n const currencyName = items?.currency_code\n ? CURRENCIES.find(c => c.value === items.currency_code)?.label\n : undefined;\n const tooltipTitle = currencyName\n ? `${items!.currency_code} — ${currencyName}`\n : items?.currency_code ?? '';\n return currencyName ? (\n <Tooltip title={tooltipTitle} placement=\"top\">\n <span>{formatted}</span>\n </Tooltip>\n ) : formatted;\n } else if (type?.toLowerCase() === 'datetime') {\n const dateValue = typeof value === 'string' && value.includes('Z') ? value.replace(/\\.000Z$/, 'Z') : value;\n return formatDate(dateValue as string, {\n skipTimezone: false,\n withTime: true,\n });\n } else if (type?.toLowerCase() === 'date' || isISODate) {\n let dateValue = value;\n\n if (typeof value === 'string' && value.includes('Z')) {\n dateValue = value.replace(/\\.000Z$/, 'Z')\n } else if (typeof value === 'string' && !value.includes('Z')) {\n const parsed = dayjs(value);\n dateValue = dayjs(parsed).isValid() ? parsed.toString() : value;\n }\n\n return formatDate(dateValue as string, {\n skipTimezone: true,\n withTime: false,\n });\n } else if (type?.toLowerCase() === 'percentage') {\n return `${value}%`;\n } else if (typeof value === 'string' && value.length > COLLAPSE_CHAR_LIMIT) {\n const decoded = decode(value);\n return (\n <p>\n {decoded.slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decoded.length)}\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n );\n } else {\n return typeof value === 'string' ? decode(value) : value;\n }\n }\n return '-';\n };\n\n /**\n * Get Typography size based on LabelValue size\n */\n const getTypographySize = () => {\n switch (size) {\n case 'small':\n return 'extra-small' as const;\n case 'large':\n return 'large' as const;\n default: // medium\n return 'small' as const;\n }\n };\n\n /**\n * Get highlight color classes\n */\n const getHighlightClasses = (): string => {\n switch (highlightColor) {\n case 'success':\n return 'bg-success-100';\n case 'warning':\n return 'bg-warning-100';\n case 'error':\n return 'bg-error-100';\n case 'info':\n return 'bg-info-100';\n default:\n return 'bg-warning-100';\n }\n };\n\n return (\n <div\n id={id || ''}\n ref={ref}\n className={cn(\n 'font-medium relative',\n className\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n aria-label={ariaLabel || `Label: ${label}, Value: ${value}`}\n >\n {/* Label section */}\n <Typography\n variant=\"medium\"\n size={getTypographySize()}\n className=\"flex gap-1 items-center flex-wrap\"\n appearance=\"subtitle\"\n >\n\n {/* Live field indicator */}\n {typeof label === 'string' ? decode(label) : label} {<Label labels={tags?.map(tag => ({ ...tag, color: tag.color || 'primary' }))} />}\n\n {isLiveField && <BoltOutlined sx={{ fontSize: 16, color: 'var(--color-primary-600)', rotate: '15deg' }} />}\n {isAiExtracted &&\n (shouldShowConfidenceScore(confidenceScore) && confidenceType ? (\n <Tooltip\n placement=\"top\"\n title={confidenceTooltip || \"\"}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\"cursor-pointer w-3 h-3 flex items-center justify-center rounded-full\", getConfidenceScoreBadgeHoverClass(confidenceType))}\n onClick={() => onConfidenceScoreClick?.(sourceMeta)}\n >\n <AIStarIcon\n size={12}\n fill={getConfidenceScoreBadgeColor(confidenceType)}\n fillSecondary={getConfidenceScoreBadgeFill(confidenceType)}\n />\n </div>\n </Tooltip>\n ) : (\n <AIExtractedIndicator onClick={() => onAiExtractedIndicatorClick?.(displayValue() as string)} />\n ))}\n\n {/* Tooltip */}\n {tooltip && (\n <Tooltip\n placement=\"top\"\n title={tooltip}\n whiteSpace=\"pre-wrap\"\n >\n <div\n className=\"cursor-pointer\"\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n // Tooltip will show on focus\n }\n }}\n >\n <HelpIcon size={14} />\n </div>\n </Tooltip>\n )}\n {copyOnHover && isHovered && (\n <Tooltip title={isCopied ? 'Copied' : `Copy ${label ?? 'value'}`} placement=\"top\" whiteSpace=\"pre-wrap\">\n <button\n type=\"button\"\n onClick={handleCopyValue}\n aria-label={isCopied ? `Copied ${label ?? 'value'}` : `Copy ${label ?? 'value'}`}\n className=\"p-1 flex items-center justify-center rounded text-neutral-500 hover:!text-primary-600 hover:bg-neutral-100 dark:text-primary-400 dark:hover:!text-primary-600 dark:hover:bg-neutral-800 cursor-pointer\"\n >\n <span className=\"relative inline-flex h-4 w-4 items-center justify-center\">\n <ContentCopyIcon\n size={16}\n className={cn(\n 'absolute inset-0 text-primary-600 dark:text-primary-500 transition-all duration-200 ease-out',\n isCopied ? 'opacity-0 scale-50 rotate-[-90deg]' : 'opacity-100 scale-100 rotate-0'\n )}\n />\n <CheckFilledIcon\n size={16}\n className={cn(\n 'absolute inset-0 text-primary-600 dark:text-primary-500 transition-all duration-200 ease-out',\n isCopied ? 'opacity-100 scale-100 rotate-0' : 'opacity-0 scale-50 rotate-90'\n )}\n />\n </span>\n </button>\n </Tooltip>\n )}\n </Typography>\n\n {/* Value section */}\n <Typography\n variant=\"medium\"\n size={getTypographySize()}\n className={cn(\n 'text-- whitespace-normal break-all flex gap-1 pt-0.5',\n isModified && 'bg-neutral-50 dark:bg-black-700 p-1 rounded',\n isRiskAnalysisOpen && riskDetails?.color &&\n `bg-${riskDetails.color}-50 border-${riskDetails.color}-300 px-0.5 rounded-lg`\n )}\n appearance=\"body\"\n >\n {/* Value display */}\n {showDiff && deletedValue && value ? (\n <div className=\"flex gap-2\">\n <span className=\"line-through\">{decode(deletedValue)}</span>\n <span>{displayValue()}</span>\n </div>\n ) : isChanged || isHighlighted ? (\n <mark className={cn('rounded-md py-0.5 px-1', getHighlightClasses())}>\n {displayValue()}\n </mark>\n ) : (\n displayValue()\n )}\n\n {/* Delta change indicator for currency fields */}\n {type?.toLowerCase() === 'currency' && deltaChange !== 0 && deltaChange !== undefined && deltaChange !== null && (\n <motion.span\n initial={{ opacity: 0, y: 2 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.25 }}\n className={cn(\n 'inline-flex items-center gap-1 ml-1.5 text-xs font-medium',\n deltaChange > 0 ? 'text-emerald-600 dark:text-emerald-400' : 'text-red-600 dark:text-red-400'\n )}\n >\n <span className=\"flex items-center justify-center w-4 h-4\">\n {deltaChange > 0 ? (\n <ArrowUpwardRounded sx={{ fontSize: 16 }} className=\"text-emerald-600 dark:text-emerald-400\" />\n ) : (\n <ArrowDownwardRounded sx={{ fontSize: 16 }} className=\"text-red-600 dark:text-red-400\" />\n )}\n </span>\n <span>{formatCurrency(Math.abs(deltaChange), items?.currency_code || 'USD')}</span>\n </motion.span>\n )}\n\n {/* Master data search icon */}\n {items?.is_master_data && items?.reference && value && (\n <button\n onClick={() => handleMasterDataClick(items)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleMasterDataClick(items);\n }\n }}\n aria-label={`Search master data for ${label}`}\n type=\"button\"\n className=\"cursor-pointer\"\n >\n <SearchIcon width={20} height={20} />\n </button>\n )}\n\n {/* File upload input */}\n {acceptsUpload && (\n <input\n type=\"file\"\n onChange={handleFileUpload}\n className=\"absolute inset-0 w-full h-full opacity-0 cursor-pointer\"\n aria-label={`Upload file for ${label}`}\n />\n )}\n </Typography>\n\n {/* Deleted value display */}\n {deletedValue && !showDiff && (\n <Typography\n variant=\"medium\"\n size=\"extra-small\"\n className=\"pt-0.5\"\n appearance=\"body\"\n >\n <mark className=\"rounded-md py-0.5 px-1 bg-error-100\">\n <del>\n {deletedValue || (type?.toLowerCase() === 'boolean' && deletedValue === '0') ? (\n deletedValue === 'True' && (type?.toLowerCase() !== 'choice') ? (\n 'Yes'\n ) : deletedValue === 'False' && (type?.toLowerCase() !== 'choice') ? (\n 'No'\n ) : type?.toLowerCase() === 'boolean' ? (\n formatBooleanValue(deletedValue)\n ) : type?.toLowerCase() === 'currency' ? (\n formatCurrency(deletedValue, items?.currency_code)\n ) : type?.toLowerCase() === 'date' ? (\n formatDate(deletedValue, {\n skipTimezone: true,\n withTime: false,\n })\n ) : type?.toLowerCase() === 'datetime' ? (\n formatDate(deletedValue, {\n skipTimezone: true,\n withTime: true,\n })\n ) : type?.toLowerCase() === 'percentage' ? (\n `${deletedValue}%`\n ) : type?.toLowerCase() === 'url' ? (\n renderUrlValue(deletedValue)\n ) : deletedValue.length > COLLAPSE_CHAR_LIMIT ? (\n <p>\n {decode(deletedValue).slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decode(deletedValue).length)}\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n ) : (\n decode(deletedValue)\n )\n ) : (\n '-'\n )}\n </del>\n </mark>\n </Typography>\n )}\n\n {/* Master data modal */}\n {MasterDataModal && (\n <MasterDataModal\n isVisible={isOpenMasterDataModal}\n onClose={handleMasterDataClose}\n masterdataInfo={masterdataModalInfo}\n />\n )}\n\n {/* Risk details tooltip */}\n {isHovered && riskDetails && isRiskAnalysisOpen && (\n <div\n className=\"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl\"\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.preventDefault()}\n onKeyDown={(e) => {\n if (e.key === 'Escape') {\n setIsHovered(false);\n }\n }}\n role=\"tooltip\"\n aria-label=\"Risk analysis details\"\n tabIndex={0}\n >\n {RiskDetailsCard ? (\n <RiskDetailsCard riskDetails={riskDetails} />\n ) : (\n <div className=\"shadow-lg p-4\">\n <div className=\"text-sm\">\n <h4 className=\"font-semibold mb-2\">Risk Details</h4>\n <p className=\"text-neutral-600 dark:text-neutral-300\">\n {riskDetails.description || 'Risk analysis information'}\n </p>\n </div>\n </div>\n )}\n </div>\n )}\n </div>\n );\n }\n);\n\nLabelValue.displayName = 'LabelValue';\n"],"names":["LabelValue","forwardRef","id","label","value","className","type","tags","tooltip","items","isModified","isChanged","size","isHighlighted","deletedValue","highlightColor","isSearchActive","originalValue","showDiff","isLiveField","isAiExtracted","confidenceScore","confidenceType","confidenceTooltip","sourceMeta","onConfidenceScoreClick","deltaChange","_theme","onUpload","acceptsUpload","MasterDataModal","riskDetails","isRiskAnalysisOpen","RiskDetailsCard","ariaLabel","decodeEntities","onAiExtractedIndicatorClick","copyOnHover","urlAlias","ref","collapseValue","setCollapseValue","useState","isOpenMasterDataModal","setIsOpenMasterDataModal","masterdataModalInfo","setMasterdataModalInfo","isHovered","setIsHovered","isCopied","setIsCopied","copyResetTimer","useRef","useEffect","decode","text","decodeHTMLEntities","COLLAPSE_CHAR_LIMIT","handleCollapse","renderCollapseToggle","jsx","e","renderUrlValue","href","jsxs","OpenInNew","decoded","handleMasterDataClick","item","handleMasterDataClose","handleCopyValue","textToCopy","handleFileUpload","event","file","displayValue","isISODate","isISODateString","formatBooleanValue","formatted","formatCurrency","currencyName","CURRENCIES","c","tooltipTitle","Tooltip","dateValue","formatDate","parsed","dayjs","getTypographySize","getHighlightClasses","cn","Typography","Label","tag","BoltOutlined","shouldShowConfidenceScore","getConfidenceScoreBadgeHoverClass","AIStarIcon","getConfidenceScoreBadgeColor","getConfidenceScoreBadgeFill","AIExtractedIndicator","HelpIcon","ContentCopyIcon","CheckFilledIcon","motion","ArrowUpwardRounded","ArrowDownwardRounded","SearchIcon"],"mappings":"8wBAsNaA,EAAaC,EAAAA,WACxB,CACE,CACE,GAAAC,EACA,MAAAC,EACA,MAAAC,EACA,UAAAC,EACA,KAAAC,EAAO,SACP,KAAAC,EACA,QAAAC,EACA,MAAAC,EACA,WAAAC,EAAa,GACb,UAAAC,EAAY,GACZ,KAAAC,EAAO,SACP,cAAAC,EAAgB,GAChB,aAAAC,EACA,eAAAC,EAAiB,UACjB,eAAAC,GAAiB,GACjB,cAAAC,EAAgB,GAChB,SAAAC,EAAW,GACX,YAAAC,GAAc,GACd,cAAAC,GAAgB,GAChB,gBAAAC,GACA,eAAAC,EAAiB,OACjB,kBAAAC,GACA,WAAAC,GAAa,CAAA,EACb,uBAAAC,GACA,YAAAC,EACA,MAAOC,GAAS,QAChB,SAAAC,EACA,cAAAC,GAAgB,GAChB,gBAAAC,EACA,YAAAC,EACA,mBAAAC,EAAqB,GACrB,gBAAAC,EACA,aAAcC,GACd,eAAAC,GAAiB,GACjB,4BAAAC,GACA,YAAAC,GAAc,GACd,SAAAC,CAAA,EAEFC,KACG,CACH,KAAM,CAACC,EAAeC,EAAgB,EAAIC,EAAAA,SAAS,EAAI,EACjD,CAACC,GAAuBC,CAAwB,EAAIF,EAAAA,SAAS,EAAK,EAElE,CAACG,GAAqBC,CAAsB,EAAIJ,EAAAA,SAAc,IAAI,EAClE,CAACK,EAAWC,CAAY,EAAIN,EAAAA,SAAS,EAAK,EAC1C,CAACO,EAAUC,CAAW,EAAIR,EAAAA,SAAS,EAAK,EACxCS,EAAiBC,EAAAA,OAA6C,IAAI,EAExEC,EAAAA,UAAU,IACD,IAAM,CACPF,EAAe,SAAS,aAAaA,EAAe,OAAO,CACjE,EACC,CAAA,CAAE,EAOL,MAAMG,EAAUC,GAAyBpB,GAAiBqB,EAAAA,mBAAmBD,CAAI,EAAIA,EAE/E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CACZA,EAAE,MAAQ,UACZb,EAAa,EAAK,CAEtB,EACA,KAAK,UACL,aAAW,wBACX,SAAU,EAET,SAAAf,EACC2B,MAAC3B,EAAA,CAAgB,YAAAF,CAAA,CAA0B,EAE3C6B,EAAAA,IAAC,MAAA,CAAI,UAAU,gBACb,SAAAI,EAAAA,KAAC,MAAA,CAAI,UAAU,UACb,SAAA,CAAAJ,EAAAA,IAAC,KAAA,CAAG,UAAU,qBAAqB,SAAA,eAAY,QAC9C,IAAA,CAAE,UAAU,yCACV,SAAA7B,EAAY,aAAe,2BAAA,CAC9B,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAAA,CAEJ,CAAA,CAAA,CAIR,CACF,EAEA/B,EAAW,YAAc"}
|
|
1
|
+
{"version":3,"file":"LabelValue.cjs.js","sources":["../../../../src/components/data-display/label-value/LabelValue.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState, forwardRef, type ReactNode } from 'react';\nimport cn from 'classnames';\nimport { HelpIcon } from '../../icons/HelpIcon';\nimport { SearchIcon } from '../../icons/SearchIcon';\nimport { Typography } from '../typography/Typography';\nimport { formatCurrency, formatDate, formatBooleanValue, isISODateString, decodeHTMLEntities } from '../../../utils/formatters';\nimport { CURRENCIES } from '../../forms/currency-input/currency.constant';\nimport { Label } from '../label/Label';\nimport { motion } from 'framer-motion';\nimport { ArrowUpwardRounded, ArrowDownwardRounded, BoltOutlined, OpenInNew } from '@mui/icons-material';\nimport Tooltip from '../../tooltip/Tooltip';\nimport { AIExtractedIndicator } from '../../icons/AIExtractedIndicator';\nimport { AIStarIcon } from '../../icons/AIStarIcon';\nimport { CheckFilledIcon, ContentCopyIcon } from '../../icon';\nimport { getConfidenceScoreBadgeColor, getConfidenceScoreBadgeFill, getConfidenceScoreBadgeHoverClass, shouldShowConfidenceScore } from '../../../utils/confidenceScoreUtils';\nimport dayjs from 'dayjs';\n\n/**\n * Source meta bounding box\n */\nexport type SourceMetaBBox = {\n b: number;\n l: number;\n r: number;\n t: number;\n};\n\n/**\n * Source meta item\n */\nexport type SourceMetaItem = {\n bbox: SourceMetaBBox;\n confidence_score?: number;\n is_primary?: boolean;\n match_score?: number;\n match_type?: string;\n page_height: number;\n page_width: number;\n source_page: number;\n source_text?: string;\n};\n\n/**\n * Confidence score type\n */\nexport type ConfidenceScoreType = \"low\" | \"medium\" | \"high\";\n\n/**\n * Available label value size options\n */\nexport type LabelValueSize = 'small' | 'medium' | 'large';\n\n/**\n * Available highlight color options\n */\nexport type HighlightColor = 'success' | 'warning' | 'error' | 'info';\n\n/**\n * Theme mode for styling\n */\nexport type ThemeMode = 'light' | 'dark';\n\n/**\n * Upload handler function type\n */\nexport type UploadHandler = (file: File) => void | Promise<void>;\n\n/**\n * Master data item interface\n */\nexport interface MasterDataItem {\n is_master_data?: boolean;\n reference?: string;\n group_technical_name?: string;\n currency_code?: string;\n}\n\n/**\n * Risk details interface\n */\nexport interface RiskDetails {\n color?: string;\n description?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n\n/**\n * Master data modal component props\n */\nexport interface MasterDataModalProps {\n isVisible: boolean;\n onClose: () => void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n masterdataInfo: any;\n}\n\n/**\n * Risk details card component props\n * Using generic to allow custom risk detail types from consumers\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface RiskDetailsCardProps<TRisk = any> {\n riskDetails: TRisk;\n maxWidth?: string;\n showAllRisksSuggestions?: boolean;\n}\n\n/**\n * Props for the LabelValue component\n */\nexport interface LabelValueProps {\n /** The id of the label value */\n id?: string;\n /** The label text to display */\n label?: string;\n /** The value to display */\n value?: string | number | boolean | ReactNode;\n /** Additional CSS classes */\n className?: string;\n /** Data type for formatting */\n type?: 'string' | 'number' | 'boolean' | 'currency' | 'date' | 'datetime' | 'percentage' | 'url';\n /** Tags to display with the label */\n tags?: Array<{ label: string; color?: string; value?: string }>;\n /** Tooltip text for the help icon */\n tooltip?: string;\n /** Master data item information */\n items?: MasterDataItem;\n /** Whether the value has been modified */\n isModified?: boolean;\n /** Whether the value has been changed */\n isChanged?: boolean;\n /** Size variant */\n size?: LabelValueSize;\n /** Whether the value is highlighted */\n isHighlighted?: boolean;\n /** Deleted value for diff display */\n deletedValue?: string;\n /** Highlight color for changes */\n highlightColor?: HighlightColor;\n /** Whether search is active */\n isSearchActive?: boolean;\n /** Whether to show original boolean value */\n originalValue?: boolean;\n /** Whether to show diff between old and new values */\n showDiff?: boolean;\n /** Whether this is a live field (shows bolt icon) */\n isLiveField?: boolean;\n /** Whether this is an AI extracted field (shows AI extracted icon) */\n isAiExtracted?: boolean;\n /** Confidence percentage shown as a badge */\n confidenceScore?: number;\n /** Confidence classification for badge styling */\n confidenceType?: ConfidenceScoreType;\n /** Optional tooltip content for confidence badge */\n confidenceTooltip?: ReactNode;\n /** Source meta for confidence score */\n sourceMeta?: SourceMetaItem[];\n /** Handler fired when confidence score badge is clicked */\n onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;\n /** Delta change value for currency fields */\n deltaChange?: number;\n /** Theme mode */\n theme?: ThemeMode;\n /** Upload handler function */\n onUpload?: UploadHandler;\n /** Whether the component accepts file uploads */\n acceptsUpload?: boolean;\n /** Master data modal component */\n MasterDataModal?: React.ComponentType<MasterDataModalProps>;\n /** Risk analysis data - accepts any risk object extending RiskDetails */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n riskDetails?: RiskDetails | any;\n /** Whether risk analysis is open */\n isRiskAnalysisOpen?: boolean;\n /** Custom risk details card component - accepts components with custom risk types */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps<any>>;\n /** Custom aria-label for accessibility */\n 'aria-label'?: string;\n /** Whether to decode HTML character entities in string values (default: true) */\n decodeEntities?: boolean;\n /** Function to handle AI extracted indicator click */\n onAiExtractedIndicatorClick?: (value: string) => void;\n /** Whether to show a copy-to-clipboard icon in the top-right corner on hover */\n copyOnHover?: boolean;\n /** Display alias text for URL type — shown instead of the raw URL, with an external link icon */\n urlAlias?: string;\n}\n\n/**\n * LabelValue component displays a label-value pair with various formatting options\n *\n * @example\n * ```tsx\n * <LabelValue \n * label=\"Status\" \n * value=\"Active\" \n * type=\"string\" \n * size=\"medium\" \n * />\n * <LabelValue \n * label=\"Price\" \n * value={99.99} \n * type=\"currency\" \n * items={{ currency_code: 'USD' }}\n * />\n * <LabelValue \n * label=\"Upload File\" \n * acceptsUpload \n * onUpload={handleUpload}\n * />\n * ```\n */\nexport const LabelValue = forwardRef<HTMLDivElement, LabelValueProps>(\n (\n {\n id,\n label,\n value,\n className,\n type = 'string',\n tags,\n tooltip,\n items,\n isModified = false,\n isChanged = false,\n size = 'medium',\n isHighlighted = false,\n deletedValue,\n highlightColor = 'warning',\n isSearchActive = false,\n originalValue = false,\n showDiff = false,\n isLiveField = false,\n isAiExtracted = false,\n confidenceScore,\n confidenceType = \"high\",\n confidenceTooltip,\n sourceMeta = [],\n onConfidenceScoreClick,\n deltaChange,\n theme: _theme = 'light',\n onUpload,\n acceptsUpload = false,\n MasterDataModal,\n riskDetails,\n isRiskAnalysisOpen = false,\n RiskDetailsCard,\n 'aria-label': ariaLabel,\n decodeEntities = true,\n onAiExtractedIndicatorClick,\n copyOnHover = false,\n urlAlias,\n },\n ref\n ) => {\n const [collapseValue, setCollapseValue] = useState(true);\n const [isOpenMasterDataModal, setIsOpenMasterDataModal] = useState(false);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const [masterdataModalInfo, setMasterdataModalInfo] = useState<any>(null);\n const [isHovered, setIsHovered] = useState(false);\n const [isCopied, setIsCopied] = useState(false);\n const copyResetTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(() => {\n return () => {\n if (copyResetTimer.current) clearTimeout(copyResetTimer.current);\n };\n }, []);\n\n // Theme is passed as prop but not used in current implementation\n\n /**\n * Conditionally decode HTML entities based on the decodeEntities prop\n */\n const decode = (text: string): string => decodeEntities ? decodeHTMLEntities(text) : text;\n\n const COLLAPSE_CHAR_LIMIT = 100;\n\n /**\n * Handle collapse toggle for long text\n */\n const handleCollapse = () => {\n setCollapseValue(!collapseValue);\n };\n\n /**\n * Show more / Show less toggle for long text and URLs\n */\n const renderCollapseToggle = () => (\n <button\n id={`btn-label-value-${collapseValue ? 'Show more' : 'Show less'}`}\n className=\"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap\"\n onClick={handleCollapse}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleCollapse();\n }\n }}\n aria-label={collapseValue ? 'Show more content' : 'Show less content'}\n type=\"button\"\n >\n {collapseValue ? 'Show more' : 'Show less'}\n </button>\n );\n\n /**\n * Render a URL with optional collapse for long href/display text\n */\n const renderUrlValue = (href: string) => {\n if (urlAlias) {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 font-semibold text-neutral-900 dark:text-white hover:text-primary-600 dark:hover:text-primary-400 transition-colors\"\n >\n {urlAlias}\n <OpenInNew sx={{ fontSize: 16 }} className=\"text-primary-600 dark:text-primary-400\" />\n </a>\n );\n }\n const decoded = decode(href);\n if (decoded.length <= COLLAPSE_CHAR_LIMIT) {\n return (\n <a href={href} className=\"text-primary-600 truncate\">\n {decoded}\n </a>\n );\n }\n return (\n <p>\n <a href={href} className=\"text-primary-600 break-all\">\n {decoded.slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decoded.length)}\n </a>\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n );\n };\n\n /**\n * Handle master data click\n */\n const handleMasterDataClick = (item: MasterDataItem) => {\n setIsOpenMasterDataModal(true);\n setMasterdataModalInfo({ ...item, value });\n };\n\n /**\n * Handle master data modal close\n */\n const handleMasterDataClose = () => {\n setIsOpenMasterDataModal(false);\n setMasterdataModalInfo(null);\n };\n\n /**\n * Copy the current value to the clipboard\n */\n const handleCopyValue = () => {\n const textToCopy =\n value === null || value === undefined || typeof value === 'object'\n ? ''\n : String(value);\n if (!textToCopy) return;\n navigator.clipboard?.writeText(textToCopy)\n .then(() => {\n setIsCopied(true);\n if (copyResetTimer.current) clearTimeout(copyResetTimer.current);\n copyResetTimer.current = setTimeout(() => setIsCopied(false), 1500);\n })\n .catch(() => { });\n };\n\n /**\n * Handle file upload\n */\n const handleFileUpload = (event: React.ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (file && onUpload) {\n onUpload(file);\n }\n // Reset input value to allow same file selection\n event.target.value = '';\n };\n\n /**\n * Format and display the value based on type\n */\n const displayValue = () => {\n const isISODate = typeof value === 'string' && isISODateString(value);\n\n if (isSearchActive && typeof value === 'object') {\n return value;\n }\n\n if (value || (type?.toLowerCase() === 'boolean' && value === 0) || (type?.toLowerCase() === 'currency' && Number(value) >= 0)) {\n if ((value === true || value === 'True') && !originalValue && (type?.toLowerCase() !== 'choice')) {\n return 'Yes';\n } else if ((value === false || value === 'False') && !originalValue && (type?.toLowerCase() !== 'choice')) {\n return 'No';\n } else if (type?.toLowerCase() === 'url') {\n return renderUrlValue(value as string);\n } else if (type?.toLowerCase() === 'boolean') {\n return formatBooleanValue(value);\n } else if (type?.toLowerCase() === 'currency') {\n const formatted = formatCurrency(value, items?.currency_code) || '-';\n const currencyName = items?.currency_code\n ? CURRENCIES.find(c => c.value === items.currency_code)?.label\n : undefined;\n const tooltipTitle = currencyName\n ? `${items!.currency_code} — ${currencyName}`\n : items?.currency_code ?? '';\n return currencyName ? (\n <Tooltip title={tooltipTitle} placement=\"top\">\n <span>{formatted}</span>\n </Tooltip>\n ) : formatted;\n } else if (type?.toLowerCase() === 'datetime') {\n const dateValue = typeof value === 'string' && value.includes('Z') ? value.replace(/\\.000Z$/, 'Z') : value;\n return formatDate(dateValue as string, {\n skipTimezone: true,\n withTime: true,\n });\n } else if (type?.toLowerCase() === 'date' || isISODate) {\n let dateValue = value;\n\n if (typeof value === 'string' && value.includes('Z')) {\n dateValue = value.replace(/\\.000Z$/, 'Z')\n } else if (typeof value === 'string' && !value.includes('Z')) {\n const parsed = dayjs(value);\n dateValue = dayjs(parsed).isValid() ? parsed.toString() : value;\n }\n\n return formatDate(dateValue as string, {\n skipTimezone: true,\n withTime: false,\n });\n } else if (type?.toLowerCase() === 'percentage') {\n return `${value}%`;\n } else if (typeof value === 'string' && value.length > COLLAPSE_CHAR_LIMIT) {\n const decoded = decode(value);\n return (\n <p>\n {decoded.slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decoded.length)}\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n );\n } else {\n return typeof value === 'string' ? decode(value) : value;\n }\n }\n return '-';\n };\n\n /**\n * Get Typography size based on LabelValue size\n */\n const getTypographySize = () => {\n switch (size) {\n case 'small':\n return 'extra-small' as const;\n case 'large':\n return 'large' as const;\n default: // medium\n return 'small' as const;\n }\n };\n\n /**\n * Get highlight color classes\n */\n const getHighlightClasses = (): string => {\n switch (highlightColor) {\n case 'success':\n return 'bg-success-100';\n case 'warning':\n return 'bg-warning-100';\n case 'error':\n return 'bg-error-100';\n case 'info':\n return 'bg-info-100';\n default:\n return 'bg-warning-100';\n }\n };\n\n return (\n <div\n id={id || ''}\n ref={ref}\n className={cn(\n 'font-medium relative',\n className\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n aria-label={ariaLabel || `Label: ${label}, Value: ${value}`}\n >\n {/* Label section */}\n <Typography\n variant=\"medium\"\n size={getTypographySize()}\n className=\"flex gap-1 items-center flex-wrap\"\n appearance=\"subtitle\"\n >\n\n {/* Live field indicator */}\n {typeof label === 'string' ? decode(label) : label} {<Label labels={tags?.map(tag => ({ ...tag, color: tag.color || 'primary' }))} />}\n\n {isLiveField && <BoltOutlined sx={{ fontSize: 16, color: 'var(--color-primary-600)', rotate: '15deg' }} />}\n {isAiExtracted &&\n (shouldShowConfidenceScore(confidenceScore) && confidenceType ? (\n <Tooltip\n placement=\"top\"\n title={confidenceTooltip || \"\"}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\"cursor-pointer w-3 h-3 flex items-center justify-center rounded-full\", getConfidenceScoreBadgeHoverClass(confidenceType))}\n onClick={() => onConfidenceScoreClick?.(sourceMeta)}\n >\n <AIStarIcon\n size={12}\n fill={getConfidenceScoreBadgeColor(confidenceType)}\n fillSecondary={getConfidenceScoreBadgeFill(confidenceType)}\n />\n </div>\n </Tooltip>\n ) : (\n <AIExtractedIndicator onClick={() => onAiExtractedIndicatorClick?.(displayValue() as string)} />\n ))}\n\n {/* Tooltip */}\n {tooltip && (\n <Tooltip\n placement=\"top\"\n title={tooltip}\n whiteSpace=\"pre-wrap\"\n >\n <div\n className=\"cursor-pointer\"\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n // Tooltip will show on focus\n }\n }}\n >\n <HelpIcon size={14} />\n </div>\n </Tooltip>\n )}\n {copyOnHover && isHovered && (\n <Tooltip title={isCopied ? 'Copied' : `Copy ${label ?? 'value'}`} placement=\"top\" whiteSpace=\"pre-wrap\">\n <button\n type=\"button\"\n onClick={handleCopyValue}\n aria-label={isCopied ? `Copied ${label ?? 'value'}` : `Copy ${label ?? 'value'}`}\n className=\"p-1 flex items-center justify-center rounded text-neutral-500 hover:!text-primary-600 hover:bg-neutral-100 dark:text-primary-400 dark:hover:!text-primary-600 dark:hover:bg-neutral-800 cursor-pointer\"\n >\n <span className=\"relative inline-flex h-4 w-4 items-center justify-center\">\n <ContentCopyIcon\n size={16}\n className={cn(\n 'absolute inset-0 text-primary-600 dark:text-primary-500 transition-all duration-200 ease-out',\n isCopied ? 'opacity-0 scale-50 rotate-[-90deg]' : 'opacity-100 scale-100 rotate-0'\n )}\n />\n <CheckFilledIcon\n size={16}\n className={cn(\n 'absolute inset-0 text-primary-600 dark:text-primary-500 transition-all duration-200 ease-out',\n isCopied ? 'opacity-100 scale-100 rotate-0' : 'opacity-0 scale-50 rotate-90'\n )}\n />\n </span>\n </button>\n </Tooltip>\n )}\n </Typography>\n\n {/* Value section */}\n <Typography\n variant=\"medium\"\n size={getTypographySize()}\n className={cn(\n 'text-- whitespace-normal break-all flex gap-1 pt-0.5',\n isModified && 'bg-neutral-50 dark:bg-black-700 p-1 rounded',\n isRiskAnalysisOpen && riskDetails?.color &&\n `bg-${riskDetails.color}-50 border-${riskDetails.color}-300 px-0.5 rounded-lg`\n )}\n appearance=\"body\"\n >\n {/* Value display */}\n {showDiff && deletedValue && value ? (\n <div className=\"flex gap-2\">\n <span className=\"line-through\">{decode(deletedValue)}</span>\n <span>{displayValue()}</span>\n </div>\n ) : isChanged || isHighlighted ? (\n <mark className={cn('rounded-md py-0.5 px-1', getHighlightClasses())}>\n {displayValue()}\n </mark>\n ) : (\n displayValue()\n )}\n\n {/* Delta change indicator for currency fields */}\n {type?.toLowerCase() === 'currency' && deltaChange !== 0 && deltaChange !== undefined && deltaChange !== null && (\n <motion.span\n initial={{ opacity: 0, y: 2 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.25 }}\n className={cn(\n 'inline-flex items-center gap-1 ml-1.5 text-xs font-medium',\n deltaChange > 0 ? 'text-emerald-600 dark:text-emerald-400' : 'text-red-600 dark:text-red-400'\n )}\n >\n <span className=\"flex items-center justify-center w-4 h-4\">\n {deltaChange > 0 ? (\n <ArrowUpwardRounded sx={{ fontSize: 16 }} className=\"text-emerald-600 dark:text-emerald-400\" />\n ) : (\n <ArrowDownwardRounded sx={{ fontSize: 16 }} className=\"text-red-600 dark:text-red-400\" />\n )}\n </span>\n <span>{formatCurrency(Math.abs(deltaChange), items?.currency_code || 'USD')}</span>\n </motion.span>\n )}\n\n {/* Master data search icon */}\n {items?.is_master_data && items?.reference && value && (\n <button\n onClick={() => handleMasterDataClick(items)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleMasterDataClick(items);\n }\n }}\n aria-label={`Search master data for ${label}`}\n type=\"button\"\n className=\"cursor-pointer\"\n >\n <SearchIcon width={20} height={20} />\n </button>\n )}\n\n {/* File upload input */}\n {acceptsUpload && (\n <input\n type=\"file\"\n onChange={handleFileUpload}\n className=\"absolute inset-0 w-full h-full opacity-0 cursor-pointer\"\n aria-label={`Upload file for ${label}`}\n />\n )}\n </Typography>\n\n {/* Deleted value display */}\n {deletedValue && !showDiff && (\n <Typography\n variant=\"medium\"\n size=\"extra-small\"\n className=\"pt-0.5\"\n appearance=\"body\"\n >\n <mark className=\"rounded-md py-0.5 px-1 bg-error-100\">\n <del>\n {deletedValue || (type?.toLowerCase() === 'boolean' && deletedValue === '0') ? (\n deletedValue === 'True' && (type?.toLowerCase() !== 'choice') ? (\n 'Yes'\n ) : deletedValue === 'False' && (type?.toLowerCase() !== 'choice') ? (\n 'No'\n ) : type?.toLowerCase() === 'boolean' ? (\n formatBooleanValue(deletedValue)\n ) : type?.toLowerCase() === 'currency' ? (\n formatCurrency(deletedValue, items?.currency_code)\n ) : type?.toLowerCase() === 'date' ? (\n formatDate(deletedValue, {\n skipTimezone: true,\n withTime: false,\n })\n ) : type?.toLowerCase() === 'datetime' ? (\n formatDate(deletedValue, {\n skipTimezone: true,\n withTime: true,\n })\n ) : type?.toLowerCase() === 'percentage' ? (\n `${deletedValue}%`\n ) : type?.toLowerCase() === 'url' ? (\n renderUrlValue(deletedValue)\n ) : deletedValue.length > COLLAPSE_CHAR_LIMIT ? (\n <p>\n {decode(deletedValue).slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decode(deletedValue).length)}\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n ) : (\n decode(deletedValue)\n )\n ) : (\n '-'\n )}\n </del>\n </mark>\n </Typography>\n )}\n\n {/* Master data modal */}\n {MasterDataModal && (\n <MasterDataModal\n isVisible={isOpenMasterDataModal}\n onClose={handleMasterDataClose}\n masterdataInfo={masterdataModalInfo}\n />\n )}\n\n {/* Risk details tooltip */}\n {isHovered && riskDetails && isRiskAnalysisOpen && (\n <div\n className=\"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl\"\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.preventDefault()}\n onKeyDown={(e) => {\n if (e.key === 'Escape') {\n setIsHovered(false);\n }\n }}\n role=\"tooltip\"\n aria-label=\"Risk analysis details\"\n tabIndex={0}\n >\n {RiskDetailsCard ? (\n <RiskDetailsCard riskDetails={riskDetails} />\n ) : (\n <div className=\"shadow-lg p-4\">\n <div className=\"text-sm\">\n <h4 className=\"font-semibold mb-2\">Risk Details</h4>\n <p className=\"text-neutral-600 dark:text-neutral-300\">\n {riskDetails.description || 'Risk analysis information'}\n </p>\n </div>\n </div>\n )}\n </div>\n )}\n </div>\n );\n }\n);\n\nLabelValue.displayName = 'LabelValue';\n"],"names":["LabelValue","forwardRef","id","label","value","className","type","tags","tooltip","items","isModified","isChanged","size","isHighlighted","deletedValue","highlightColor","isSearchActive","originalValue","showDiff","isLiveField","isAiExtracted","confidenceScore","confidenceType","confidenceTooltip","sourceMeta","onConfidenceScoreClick","deltaChange","_theme","onUpload","acceptsUpload","MasterDataModal","riskDetails","isRiskAnalysisOpen","RiskDetailsCard","ariaLabel","decodeEntities","onAiExtractedIndicatorClick","copyOnHover","urlAlias","ref","collapseValue","setCollapseValue","useState","isOpenMasterDataModal","setIsOpenMasterDataModal","masterdataModalInfo","setMasterdataModalInfo","isHovered","setIsHovered","isCopied","setIsCopied","copyResetTimer","useRef","useEffect","decode","text","decodeHTMLEntities","COLLAPSE_CHAR_LIMIT","handleCollapse","renderCollapseToggle","jsx","e","renderUrlValue","href","jsxs","OpenInNew","decoded","handleMasterDataClick","item","handleMasterDataClose","handleCopyValue","textToCopy","handleFileUpload","event","file","displayValue","isISODate","isISODateString","formatBooleanValue","formatted","formatCurrency","currencyName","CURRENCIES","c","tooltipTitle","Tooltip","dateValue","formatDate","parsed","dayjs","getTypographySize","getHighlightClasses","cn","Typography","Label","tag","BoltOutlined","shouldShowConfidenceScore","getConfidenceScoreBadgeHoverClass","AIStarIcon","getConfidenceScoreBadgeColor","getConfidenceScoreBadgeFill","AIExtractedIndicator","HelpIcon","ContentCopyIcon","CheckFilledIcon","motion","ArrowUpwardRounded","ArrowDownwardRounded","SearchIcon"],"mappings":"8wBAsNaA,EAAaC,EAAAA,WACxB,CACE,CACE,GAAAC,EACA,MAAAC,EACA,MAAAC,EACA,UAAAC,EACA,KAAAC,EAAO,SACP,KAAAC,EACA,QAAAC,EACA,MAAAC,EACA,WAAAC,EAAa,GACb,UAAAC,EAAY,GACZ,KAAAC,EAAO,SACP,cAAAC,EAAgB,GAChB,aAAAC,EACA,eAAAC,EAAiB,UACjB,eAAAC,GAAiB,GACjB,cAAAC,EAAgB,GAChB,SAAAC,EAAW,GACX,YAAAC,GAAc,GACd,cAAAC,GAAgB,GAChB,gBAAAC,GACA,eAAAC,EAAiB,OACjB,kBAAAC,GACA,WAAAC,GAAa,CAAA,EACb,uBAAAC,GACA,YAAAC,EACA,MAAOC,GAAS,QAChB,SAAAC,EACA,cAAAC,GAAgB,GAChB,gBAAAC,EACA,YAAAC,EACA,mBAAAC,EAAqB,GACrB,gBAAAC,EACA,aAAcC,GACd,eAAAC,GAAiB,GACjB,4BAAAC,GACA,YAAAC,GAAc,GACd,SAAAC,CAAA,EAEFC,KACG,CACH,KAAM,CAACC,EAAeC,EAAgB,EAAIC,EAAAA,SAAS,EAAI,EACjD,CAACC,GAAuBC,CAAwB,EAAIF,EAAAA,SAAS,EAAK,EAElE,CAACG,GAAqBC,CAAsB,EAAIJ,EAAAA,SAAc,IAAI,EAClE,CAACK,EAAWC,CAAY,EAAIN,EAAAA,SAAS,EAAK,EAC1C,CAACO,EAAUC,CAAW,EAAIR,EAAAA,SAAS,EAAK,EACxCS,EAAiBC,EAAAA,OAA6C,IAAI,EAExEC,EAAAA,UAAU,IACD,IAAM,CACPF,EAAe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GAC3B4B,EAAAA,IAAC,MAAA,CACC,UAAU,oFACV,QAAUC,GAAMA,EAAE,gBAAA,EAClB,YAAcA,GAAMA,EAAE,eAAA,EACtB,UAAYA,GAAM,CACZA,EAAE,MAAQ,UACZb,EAAa,EAAK,CAEtB,EACA,KAAK,UACL,aAAW,wBACX,SAAU,EAET,SAAAf,EACC2B,MAAC3B,EAAA,CAAgB,YAAAF,CAAA,CAA0B,EAE3C6B,EAAAA,IAAC,MAAA,CAAI,UAAU,gBACb,SAAAI,EAAAA,KAAC,MAAA,CAAI,UAAU,UACb,SAAA,CAAAJ,EAAAA,IAAC,KAAA,CAAG,UAAU,qBAAqB,SAAA,eAAY,QAC9C,IAAA,CAAE,UAAU,yCACV,SAAA7B,EAAY,aAAe,2BAAA,CAC9B,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAAA,CAEJ,CAAA,CAAA,CAIR,CACF,EAEA/B,EAAW,YAAc"}
|
|
@@ -127,7 +127,7 @@ const Ke = Ce(
|
|
|
127
127
|
} else if (o?.toLowerCase() === "datetime") {
|
|
128
128
|
const a = typeof e == "string" && e.includes("Z") ? e.replace(/\.000Z$/, "Z") : e;
|
|
129
129
|
return C(a, {
|
|
130
|
-
skipTimezone: !
|
|
130
|
+
skipTimezone: !0,
|
|
131
131
|
withTime: !0
|
|
132
132
|
});
|
|
133
133
|
} else if (o?.toLowerCase() === "date" || r) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelValue.es.js","sources":["../../../../src/components/data-display/label-value/LabelValue.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState, forwardRef, type ReactNode } from 'react';\nimport cn from 'classnames';\nimport { HelpIcon } from '../../icons/HelpIcon';\nimport { SearchIcon } from '../../icons/SearchIcon';\nimport { Typography } from '../typography/Typography';\nimport { formatCurrency, formatDate, formatBooleanValue, isISODateString, decodeHTMLEntities } from '../../../utils/formatters';\nimport { CURRENCIES } from '../../forms/currency-input/currency.constant';\nimport { Label } from '../label/Label';\nimport { motion } from 'framer-motion';\nimport { ArrowUpwardRounded, ArrowDownwardRounded, BoltOutlined, OpenInNew } from '@mui/icons-material';\nimport Tooltip from '../../tooltip/Tooltip';\nimport { AIExtractedIndicator } from '../../icons/AIExtractedIndicator';\nimport { AIStarIcon } from '../../icons/AIStarIcon';\nimport { CheckFilledIcon, ContentCopyIcon } from '../../icon';\nimport { getConfidenceScoreBadgeColor, getConfidenceScoreBadgeFill, getConfidenceScoreBadgeHoverClass, shouldShowConfidenceScore } from '../../../utils/confidenceScoreUtils';\nimport dayjs from 'dayjs';\n\n/**\n * Source meta bounding box\n */\nexport type SourceMetaBBox = {\n b: number;\n l: number;\n r: number;\n t: number;\n};\n\n/**\n * Source meta item\n */\nexport type SourceMetaItem = {\n bbox: SourceMetaBBox;\n confidence_score?: number;\n is_primary?: boolean;\n match_score?: number;\n match_type?: string;\n page_height: number;\n page_width: number;\n source_page: number;\n source_text?: string;\n};\n\n/**\n * Confidence score type\n */\nexport type ConfidenceScoreType = \"low\" | \"medium\" | \"high\";\n\n/**\n * Available label value size options\n */\nexport type LabelValueSize = 'small' | 'medium' | 'large';\n\n/**\n * Available highlight color options\n */\nexport type HighlightColor = 'success' | 'warning' | 'error' | 'info';\n\n/**\n * Theme mode for styling\n */\nexport type ThemeMode = 'light' | 'dark';\n\n/**\n * Upload handler function type\n */\nexport type UploadHandler = (file: File) => void | Promise<void>;\n\n/**\n * Master data item interface\n */\nexport interface MasterDataItem {\n is_master_data?: boolean;\n reference?: string;\n group_technical_name?: string;\n currency_code?: string;\n}\n\n/**\n * Risk details interface\n */\nexport interface RiskDetails {\n color?: string;\n description?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n\n/**\n * Master data modal component props\n */\nexport interface MasterDataModalProps {\n isVisible: boolean;\n onClose: () => void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n masterdataInfo: any;\n}\n\n/**\n * Risk details card component props\n * Using generic to allow custom risk detail types from consumers\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface RiskDetailsCardProps<TRisk = any> {\n riskDetails: TRisk;\n maxWidth?: string;\n showAllRisksSuggestions?: boolean;\n}\n\n/**\n * Props for the LabelValue component\n */\nexport interface LabelValueProps {\n /** The id of the label value */\n id?: string;\n /** The label text to display */\n label?: string;\n /** The value to display */\n value?: string | number | boolean | ReactNode;\n /** Additional CSS classes */\n className?: string;\n /** Data type for formatting */\n type?: 'string' | 'number' | 'boolean' | 'currency' | 'date' | 'datetime' | 'percentage' | 'url';\n /** Tags to display with the label */\n tags?: Array<{ label: string; color?: string; value?: string }>;\n /** Tooltip text for the help icon */\n tooltip?: string;\n /** Master data item information */\n items?: MasterDataItem;\n /** Whether the value has been modified */\n isModified?: boolean;\n /** Whether the value has been changed */\n isChanged?: boolean;\n /** Size variant */\n size?: LabelValueSize;\n /** Whether the value is highlighted */\n isHighlighted?: boolean;\n /** Deleted value for diff display */\n deletedValue?: string;\n /** Highlight color for changes */\n highlightColor?: HighlightColor;\n /** Whether search is active */\n isSearchActive?: boolean;\n /** Whether to show original boolean value */\n originalValue?: boolean;\n /** Whether to show diff between old and new values */\n showDiff?: boolean;\n /** Whether this is a live field (shows bolt icon) */\n isLiveField?: boolean;\n /** Whether this is an AI extracted field (shows AI extracted icon) */\n isAiExtracted?: boolean;\n /** Confidence percentage shown as a badge */\n confidenceScore?: number;\n /** Confidence classification for badge styling */\n confidenceType?: ConfidenceScoreType;\n /** Optional tooltip content for confidence badge */\n confidenceTooltip?: ReactNode;\n /** Source meta for confidence score */\n sourceMeta?: SourceMetaItem[];\n /** Handler fired when confidence score badge is clicked */\n onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;\n /** Delta change value for currency fields */\n deltaChange?: number;\n /** Theme mode */\n theme?: ThemeMode;\n /** Upload handler function */\n onUpload?: UploadHandler;\n /** Whether the component accepts file uploads */\n acceptsUpload?: boolean;\n /** Master data modal component */\n MasterDataModal?: React.ComponentType<MasterDataModalProps>;\n /** Risk analysis data - accepts any risk object extending RiskDetails */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n riskDetails?: RiskDetails | any;\n /** Whether risk analysis is open */\n isRiskAnalysisOpen?: boolean;\n /** Custom risk details card component - accepts components with custom risk types */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps<any>>;\n /** Custom aria-label for accessibility */\n 'aria-label'?: string;\n /** Whether to decode HTML character entities in string values (default: true) */\n decodeEntities?: boolean;\n /** Function to handle AI extracted indicator click */\n onAiExtractedIndicatorClick?: (value: string) => void;\n /** Whether to show a copy-to-clipboard icon in the top-right corner on hover */\n copyOnHover?: boolean;\n /** Display alias text for URL type — shown instead of the raw URL, with an external link icon */\n urlAlias?: string;\n}\n\n/**\n * LabelValue component displays a label-value pair with various formatting options\n *\n * @example\n * ```tsx\n * <LabelValue \n * label=\"Status\" \n * value=\"Active\" \n * type=\"string\" \n * size=\"medium\" \n * />\n * <LabelValue \n * label=\"Price\" \n * value={99.99} \n * type=\"currency\" \n * items={{ currency_code: 'USD' }}\n * />\n * <LabelValue \n * label=\"Upload File\" \n * acceptsUpload \n * onUpload={handleUpload}\n * />\n * ```\n */\nexport const LabelValue = forwardRef<HTMLDivElement, LabelValueProps>(\n (\n {\n id,\n label,\n value,\n className,\n type = 'string',\n tags,\n tooltip,\n items,\n isModified = false,\n isChanged = false,\n size = 'medium',\n isHighlighted = false,\n deletedValue,\n highlightColor = 'warning',\n isSearchActive = false,\n originalValue = false,\n showDiff = false,\n isLiveField = false,\n isAiExtracted = false,\n confidenceScore,\n confidenceType = \"high\",\n confidenceTooltip,\n sourceMeta = [],\n onConfidenceScoreClick,\n deltaChange,\n theme: _theme = 'light',\n onUpload,\n acceptsUpload = false,\n MasterDataModal,\n riskDetails,\n isRiskAnalysisOpen = false,\n RiskDetailsCard,\n 'aria-label': ariaLabel,\n decodeEntities = true,\n onAiExtractedIndicatorClick,\n copyOnHover = false,\n urlAlias,\n },\n ref\n ) => {\n const [collapseValue, setCollapseValue] = useState(true);\n const [isOpenMasterDataModal, setIsOpenMasterDataModal] = useState(false);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const [masterdataModalInfo, setMasterdataModalInfo] = useState<any>(null);\n const [isHovered, setIsHovered] = useState(false);\n const [isCopied, setIsCopied] = useState(false);\n const copyResetTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(() => {\n return () => {\n if (copyResetTimer.current) clearTimeout(copyResetTimer.current);\n };\n }, []);\n\n // Theme is passed as prop but not used in current implementation\n\n /**\n * Conditionally decode HTML entities based on the decodeEntities prop\n */\n const decode = (text: string): string => decodeEntities ? decodeHTMLEntities(text) : text;\n\n const COLLAPSE_CHAR_LIMIT = 100;\n\n /**\n * Handle collapse toggle for long text\n */\n const handleCollapse = () => {\n setCollapseValue(!collapseValue);\n };\n\n /**\n * Show more / Show less toggle for long text and URLs\n */\n const renderCollapseToggle = () => (\n <button\n id={`btn-label-value-${collapseValue ? 'Show more' : 'Show less'}`}\n className=\"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap\"\n onClick={handleCollapse}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleCollapse();\n }\n }}\n aria-label={collapseValue ? 'Show more content' : 'Show less content'}\n type=\"button\"\n >\n {collapseValue ? 'Show more' : 'Show less'}\n </button>\n );\n\n /**\n * Render a URL with optional collapse for long href/display text\n */\n const renderUrlValue = (href: string) => {\n if (urlAlias) {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 font-semibold text-neutral-900 dark:text-white hover:text-primary-600 dark:hover:text-primary-400 transition-colors\"\n >\n {urlAlias}\n <OpenInNew sx={{ fontSize: 16 }} className=\"text-primary-600 dark:text-primary-400\" />\n </a>\n );\n }\n const decoded = decode(href);\n if (decoded.length <= COLLAPSE_CHAR_LIMIT) {\n return (\n <a href={href} className=\"text-primary-600 truncate\">\n {decoded}\n </a>\n );\n }\n return (\n <p>\n <a href={href} className=\"text-primary-600 break-all\">\n {decoded.slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decoded.length)}\n </a>\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n );\n };\n\n /**\n * Handle master data click\n */\n const handleMasterDataClick = (item: MasterDataItem) => {\n setIsOpenMasterDataModal(true);\n setMasterdataModalInfo({ ...item, value });\n };\n\n /**\n * Handle master data modal close\n */\n const handleMasterDataClose = () => {\n setIsOpenMasterDataModal(false);\n setMasterdataModalInfo(null);\n };\n\n /**\n * Copy the current value to the clipboard\n */\n const handleCopyValue = () => {\n const textToCopy =\n value === null || value === undefined || typeof value === 'object'\n ? ''\n : String(value);\n if (!textToCopy) return;\n navigator.clipboard?.writeText(textToCopy)\n .then(() => {\n setIsCopied(true);\n if (copyResetTimer.current) clearTimeout(copyResetTimer.current);\n copyResetTimer.current = setTimeout(() => setIsCopied(false), 1500);\n })\n .catch(() => { });\n };\n\n /**\n * Handle file upload\n */\n const handleFileUpload = (event: React.ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (file && onUpload) {\n onUpload(file);\n }\n // Reset input value to allow same file selection\n event.target.value = '';\n };\n\n /**\n * Format and display the value based on type\n */\n const displayValue = () => {\n const isISODate = typeof value === 'string' && isISODateString(value);\n\n if (isSearchActive && typeof value === 'object') {\n return value;\n }\n\n if (value || (type?.toLowerCase() === 'boolean' && value === 0) || (type?.toLowerCase() === 'currency' && Number(value) >= 0)) {\n if ((value === true || value === 'True') && !originalValue && (type?.toLowerCase() !== 'choice')) {\n return 'Yes';\n } else if ((value === false || value === 'False') && !originalValue && (type?.toLowerCase() !== 'choice')) {\n return 'No';\n } else if (type?.toLowerCase() === 'url') {\n return renderUrlValue(value as string);\n } else if (type?.toLowerCase() === 'boolean') {\n return formatBooleanValue(value);\n } else if (type?.toLowerCase() === 'currency') {\n const formatted = formatCurrency(value, items?.currency_code) || '-';\n const currencyName = items?.currency_code\n ? CURRENCIES.find(c => c.value === items.currency_code)?.label\n : undefined;\n const tooltipTitle = currencyName\n ? `${items!.currency_code} — ${currencyName}`\n : items?.currency_code ?? '';\n return currencyName ? (\n <Tooltip title={tooltipTitle} placement=\"top\">\n <span>{formatted}</span>\n </Tooltip>\n ) : formatted;\n } else if (type?.toLowerCase() === 'datetime') {\n const dateValue = typeof value === 'string' && value.includes('Z') ? value.replace(/\\.000Z$/, 'Z') : value;\n return formatDate(dateValue as string, {\n skipTimezone: false,\n withTime: true,\n });\n } else if (type?.toLowerCase() === 'date' || isISODate) {\n let dateValue = value;\n\n if (typeof value === 'string' && value.includes('Z')) {\n dateValue = value.replace(/\\.000Z$/, 'Z')\n } else if (typeof value === 'string' && !value.includes('Z')) {\n const parsed = dayjs(value);\n dateValue = dayjs(parsed).isValid() ? parsed.toString() : value;\n }\n\n return formatDate(dateValue as string, {\n skipTimezone: true,\n withTime: false,\n });\n } else if (type?.toLowerCase() === 'percentage') {\n return `${value}%`;\n } else if (typeof value === 'string' && value.length > COLLAPSE_CHAR_LIMIT) {\n const decoded = decode(value);\n return (\n <p>\n {decoded.slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decoded.length)}\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n );\n } else {\n return typeof value === 'string' ? decode(value) : value;\n }\n }\n return '-';\n };\n\n /**\n * Get Typography size based on LabelValue size\n */\n const getTypographySize = () => {\n switch (size) {\n case 'small':\n return 'extra-small' as const;\n case 'large':\n return 'large' as const;\n default: // medium\n return 'small' as const;\n }\n };\n\n /**\n * Get highlight color classes\n */\n const getHighlightClasses = (): string => {\n switch (highlightColor) {\n case 'success':\n return 'bg-success-100';\n case 'warning':\n return 'bg-warning-100';\n case 'error':\n return 'bg-error-100';\n case 'info':\n return 'bg-info-100';\n default:\n return 'bg-warning-100';\n }\n };\n\n return (\n <div\n id={id || ''}\n ref={ref}\n className={cn(\n 'font-medium relative',\n className\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n aria-label={ariaLabel || `Label: ${label}, Value: ${value}`}\n >\n {/* Label section */}\n <Typography\n variant=\"medium\"\n size={getTypographySize()}\n className=\"flex gap-1 items-center flex-wrap\"\n appearance=\"subtitle\"\n >\n\n {/* Live field indicator */}\n {typeof label === 'string' ? decode(label) : label} {<Label labels={tags?.map(tag => ({ ...tag, color: tag.color || 'primary' }))} />}\n\n {isLiveField && <BoltOutlined sx={{ fontSize: 16, color: 'var(--color-primary-600)', rotate: '15deg' }} />}\n {isAiExtracted &&\n (shouldShowConfidenceScore(confidenceScore) && confidenceType ? (\n <Tooltip\n placement=\"top\"\n title={confidenceTooltip || \"\"}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\"cursor-pointer w-3 h-3 flex items-center justify-center rounded-full\", getConfidenceScoreBadgeHoverClass(confidenceType))}\n onClick={() => onConfidenceScoreClick?.(sourceMeta)}\n >\n <AIStarIcon\n size={12}\n fill={getConfidenceScoreBadgeColor(confidenceType)}\n fillSecondary={getConfidenceScoreBadgeFill(confidenceType)}\n />\n </div>\n </Tooltip>\n ) : (\n <AIExtractedIndicator onClick={() => onAiExtractedIndicatorClick?.(displayValue() as string)} />\n ))}\n\n {/* Tooltip */}\n {tooltip && (\n <Tooltip\n placement=\"top\"\n title={tooltip}\n whiteSpace=\"pre-wrap\"\n >\n <div\n className=\"cursor-pointer\"\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n // Tooltip will show on focus\n }\n }}\n >\n <HelpIcon size={14} />\n </div>\n </Tooltip>\n )}\n {copyOnHover && isHovered && (\n <Tooltip title={isCopied ? 'Copied' : `Copy ${label ?? 'value'}`} placement=\"top\" whiteSpace=\"pre-wrap\">\n <button\n type=\"button\"\n onClick={handleCopyValue}\n aria-label={isCopied ? `Copied ${label ?? 'value'}` : `Copy ${label ?? 'value'}`}\n className=\"p-1 flex items-center justify-center rounded text-neutral-500 hover:!text-primary-600 hover:bg-neutral-100 dark:text-primary-400 dark:hover:!text-primary-600 dark:hover:bg-neutral-800 cursor-pointer\"\n >\n <span className=\"relative inline-flex h-4 w-4 items-center justify-center\">\n <ContentCopyIcon\n size={16}\n className={cn(\n 'absolute inset-0 text-primary-600 dark:text-primary-500 transition-all duration-200 ease-out',\n isCopied ? 'opacity-0 scale-50 rotate-[-90deg]' : 'opacity-100 scale-100 rotate-0'\n )}\n />\n <CheckFilledIcon\n size={16}\n className={cn(\n 'absolute inset-0 text-primary-600 dark:text-primary-500 transition-all duration-200 ease-out',\n isCopied ? 'opacity-100 scale-100 rotate-0' : 'opacity-0 scale-50 rotate-90'\n )}\n />\n </span>\n </button>\n </Tooltip>\n )}\n </Typography>\n\n {/* Value section */}\n <Typography\n variant=\"medium\"\n size={getTypographySize()}\n className={cn(\n 'text-- whitespace-normal break-all flex gap-1 pt-0.5',\n isModified && 'bg-neutral-50 dark:bg-black-700 p-1 rounded',\n isRiskAnalysisOpen && riskDetails?.color &&\n `bg-${riskDetails.color}-50 border-${riskDetails.color}-300 px-0.5 rounded-lg`\n )}\n appearance=\"body\"\n >\n {/* Value display */}\n {showDiff && deletedValue && value ? (\n <div className=\"flex gap-2\">\n <span className=\"line-through\">{decode(deletedValue)}</span>\n <span>{displayValue()}</span>\n </div>\n ) : isChanged || isHighlighted ? (\n <mark className={cn('rounded-md py-0.5 px-1', getHighlightClasses())}>\n {displayValue()}\n </mark>\n ) : (\n displayValue()\n )}\n\n {/* Delta change indicator for currency fields */}\n {type?.toLowerCase() === 'currency' && deltaChange !== 0 && deltaChange !== undefined && deltaChange !== null && (\n <motion.span\n initial={{ opacity: 0, y: 2 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.25 }}\n className={cn(\n 'inline-flex items-center gap-1 ml-1.5 text-xs font-medium',\n deltaChange > 0 ? 'text-emerald-600 dark:text-emerald-400' : 'text-red-600 dark:text-red-400'\n )}\n >\n <span className=\"flex items-center justify-center w-4 h-4\">\n {deltaChange > 0 ? (\n <ArrowUpwardRounded sx={{ fontSize: 16 }} className=\"text-emerald-600 dark:text-emerald-400\" />\n ) : (\n <ArrowDownwardRounded sx={{ fontSize: 16 }} className=\"text-red-600 dark:text-red-400\" />\n )}\n </span>\n <span>{formatCurrency(Math.abs(deltaChange), items?.currency_code || 'USD')}</span>\n </motion.span>\n )}\n\n {/* Master data search icon */}\n {items?.is_master_data && items?.reference && value && (\n <button\n onClick={() => handleMasterDataClick(items)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleMasterDataClick(items);\n }\n }}\n aria-label={`Search master data for ${label}`}\n type=\"button\"\n className=\"cursor-pointer\"\n >\n <SearchIcon width={20} height={20} />\n </button>\n )}\n\n {/* File upload input */}\n {acceptsUpload && (\n <input\n type=\"file\"\n onChange={handleFileUpload}\n className=\"absolute inset-0 w-full h-full opacity-0 cursor-pointer\"\n aria-label={`Upload file for ${label}`}\n />\n )}\n </Typography>\n\n {/* Deleted value display */}\n {deletedValue && !showDiff && (\n <Typography\n variant=\"medium\"\n size=\"extra-small\"\n className=\"pt-0.5\"\n appearance=\"body\"\n >\n <mark className=\"rounded-md py-0.5 px-1 bg-error-100\">\n <del>\n {deletedValue || (type?.toLowerCase() === 'boolean' && deletedValue === '0') ? (\n deletedValue === 'True' && (type?.toLowerCase() !== 'choice') ? (\n 'Yes'\n ) : deletedValue === 'False' && (type?.toLowerCase() !== 'choice') ? (\n 'No'\n ) : type?.toLowerCase() === 'boolean' ? (\n formatBooleanValue(deletedValue)\n ) : type?.toLowerCase() === 'currency' ? (\n formatCurrency(deletedValue, items?.currency_code)\n ) : type?.toLowerCase() === 'date' ? (\n formatDate(deletedValue, {\n skipTimezone: true,\n withTime: false,\n })\n ) : type?.toLowerCase() === 'datetime' ? (\n formatDate(deletedValue, {\n skipTimezone: true,\n withTime: true,\n })\n ) : type?.toLowerCase() === 'percentage' ? (\n `${deletedValue}%`\n ) : type?.toLowerCase() === 'url' ? (\n renderUrlValue(deletedValue)\n ) : deletedValue.length > COLLAPSE_CHAR_LIMIT ? (\n <p>\n {decode(deletedValue).slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decode(deletedValue).length)}\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n ) : (\n decode(deletedValue)\n )\n ) : (\n '-'\n )}\n </del>\n </mark>\n </Typography>\n )}\n\n {/* Master data modal */}\n {MasterDataModal && (\n <MasterDataModal\n isVisible={isOpenMasterDataModal}\n onClose={handleMasterDataClose}\n masterdataInfo={masterdataModalInfo}\n />\n )}\n\n {/* Risk details tooltip */}\n {isHovered && riskDetails && isRiskAnalysisOpen && (\n <div\n className=\"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl\"\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.preventDefault()}\n onKeyDown={(e) => {\n if (e.key === 'Escape') {\n setIsHovered(false);\n }\n }}\n role=\"tooltip\"\n aria-label=\"Risk analysis details\"\n tabIndex={0}\n >\n {RiskDetailsCard ? (\n <RiskDetailsCard riskDetails={riskDetails} />\n ) : (\n <div className=\"shadow-lg p-4\">\n <div className=\"text-sm\">\n <h4 className=\"font-semibold mb-2\">Risk Details</h4>\n <p className=\"text-neutral-600 dark:text-neutral-300\">\n {riskDetails.description || 'Risk analysis information'}\n </p>\n </div>\n </div>\n )}\n </div>\n )}\n </div>\n );\n }\n);\n\nLabelValue.displayName = 'LabelValue';\n"],"names":["LabelValue","forwardRef","id","label","value","className","type","tags","tooltip","items","isModified","isChanged","size","isHighlighted","deletedValue","highlightColor","isSearchActive","originalValue","showDiff","isLiveField","isAiExtracted","confidenceScore","confidenceType","confidenceTooltip","sourceMeta","onConfidenceScoreClick","deltaChange","_theme","onUpload","acceptsUpload","MasterDataModal","riskDetails","isRiskAnalysisOpen","RiskDetailsCard","ariaLabel","decodeEntities","onAiExtractedIndicatorClick","copyOnHover","urlAlias","ref","collapseValue","setCollapseValue","useState","isOpenMasterDataModal","setIsOpenMasterDataModal","masterdataModalInfo","setMasterdataModalInfo","isHovered","setIsHovered","isCopied","setIsCopied","copyResetTimer","useRef","useEffect","decode","text","decodeHTMLEntities","COLLAPSE_CHAR_LIMIT","handleCollapse","renderCollapseToggle","jsx","e","renderUrlValue","href","jsxs","OpenInNew","decoded","handleMasterDataClick","item","handleMasterDataClose","handleCopyValue","textToCopy","handleFileUpload","event","file","displayValue","isISODate","isISODateString","formatBooleanValue","formatted","formatCurrency","currencyName","CURRENCIES","c","tooltipTitle","Tooltip","dateValue","formatDate","parsed","dayjs","getTypographySize","getHighlightClasses","cn","Typography","Label","tag","BoltOutlined","shouldShowConfidenceScore","getConfidenceScoreBadgeHoverClass","AIStarIcon","getConfidenceScoreBadgeColor","getConfidenceScoreBadgeFill","AIExtractedIndicator","HelpIcon","ContentCopyIcon","CheckFilledIcon","motion","ArrowUpwardRounded","ArrowDownwardRounded","SearchIcon"],"mappings":";;;;;;;;;;;;;;;;;AAsNO,MAAMA,KAAaC;AAAA,EACxB,CACE;AAAA,IACE,IAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,MAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,WAAAC,IAAY;AAAA,IACZ,MAAAC,IAAO;AAAA,IACP,eAAAC,IAAgB;AAAA,IAChB,cAAAC;AAAA,IACA,gBAAAC,IAAiB;AAAA,IACjB,gBAAAC,IAAiB;AAAA,IACjB,eAAAC,IAAgB;AAAA,IAChB,UAAAC,IAAW;AAAA,IACX,aAAAC,KAAc;AAAA,IACd,eAAAC,KAAgB;AAAA,IAChB,iBAAAC;AAAA,IACA,gBAAAC,IAAiB;AAAA,IACjB,mBAAAC;AAAA,IACA,YAAAC,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YACZb,EAAa,EAAK;AAAA,cAEtB;AAAA,cACA,MAAK;AAAA,cACL,cAAW;AAAA,cACX,UAAU;AAAA,cAET,UAAAf,IACC,gBAAA2B,EAAC3B,GAAA,EAAgB,aAAAF,EAAA,CAA0B,IAE3C,gBAAA6B,EAAC,OAAA,EAAI,WAAU,iBACb,UAAA,gBAAAI,EAAC,OAAA,EAAI,WAAU,WACb,UAAA;AAAA,gBAAA,gBAAAJ,EAAC,MAAA,EAAG,WAAU,sBAAqB,UAAA,gBAAY;AAAA,kCAC9C,KAAA,EAAE,WAAU,0CACV,UAAA7B,EAAY,eAAe,4BAAA,CAC9B;AAAA,cAAA,EAAA,CACF,EAAA,CACF;AAAA,YAAA;AAAA,UAAA;AAAA,QAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA/B,GAAW,cAAc;"}
|
|
1
|
+
{"version":3,"file":"LabelValue.es.js","sources":["../../../../src/components/data-display/label-value/LabelValue.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState, forwardRef, type ReactNode } from 'react';\nimport cn from 'classnames';\nimport { HelpIcon } from '../../icons/HelpIcon';\nimport { SearchIcon } from '../../icons/SearchIcon';\nimport { Typography } from '../typography/Typography';\nimport { formatCurrency, formatDate, formatBooleanValue, isISODateString, decodeHTMLEntities } from '../../../utils/formatters';\nimport { CURRENCIES } from '../../forms/currency-input/currency.constant';\nimport { Label } from '../label/Label';\nimport { motion } from 'framer-motion';\nimport { ArrowUpwardRounded, ArrowDownwardRounded, BoltOutlined, OpenInNew } from '@mui/icons-material';\nimport Tooltip from '../../tooltip/Tooltip';\nimport { AIExtractedIndicator } from '../../icons/AIExtractedIndicator';\nimport { AIStarIcon } from '../../icons/AIStarIcon';\nimport { CheckFilledIcon, ContentCopyIcon } from '../../icon';\nimport { getConfidenceScoreBadgeColor, getConfidenceScoreBadgeFill, getConfidenceScoreBadgeHoverClass, shouldShowConfidenceScore } from '../../../utils/confidenceScoreUtils';\nimport dayjs from 'dayjs';\n\n/**\n * Source meta bounding box\n */\nexport type SourceMetaBBox = {\n b: number;\n l: number;\n r: number;\n t: number;\n};\n\n/**\n * Source meta item\n */\nexport type SourceMetaItem = {\n bbox: SourceMetaBBox;\n confidence_score?: number;\n is_primary?: boolean;\n match_score?: number;\n match_type?: string;\n page_height: number;\n page_width: number;\n source_page: number;\n source_text?: string;\n};\n\n/**\n * Confidence score type\n */\nexport type ConfidenceScoreType = \"low\" | \"medium\" | \"high\";\n\n/**\n * Available label value size options\n */\nexport type LabelValueSize = 'small' | 'medium' | 'large';\n\n/**\n * Available highlight color options\n */\nexport type HighlightColor = 'success' | 'warning' | 'error' | 'info';\n\n/**\n * Theme mode for styling\n */\nexport type ThemeMode = 'light' | 'dark';\n\n/**\n * Upload handler function type\n */\nexport type UploadHandler = (file: File) => void | Promise<void>;\n\n/**\n * Master data item interface\n */\nexport interface MasterDataItem {\n is_master_data?: boolean;\n reference?: string;\n group_technical_name?: string;\n currency_code?: string;\n}\n\n/**\n * Risk details interface\n */\nexport interface RiskDetails {\n color?: string;\n description?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n\n/**\n * Master data modal component props\n */\nexport interface MasterDataModalProps {\n isVisible: boolean;\n onClose: () => void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n masterdataInfo: any;\n}\n\n/**\n * Risk details card component props\n * Using generic to allow custom risk detail types from consumers\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface RiskDetailsCardProps<TRisk = any> {\n riskDetails: TRisk;\n maxWidth?: string;\n showAllRisksSuggestions?: boolean;\n}\n\n/**\n * Props for the LabelValue component\n */\nexport interface LabelValueProps {\n /** The id of the label value */\n id?: string;\n /** The label text to display */\n label?: string;\n /** The value to display */\n value?: string | number | boolean | ReactNode;\n /** Additional CSS classes */\n className?: string;\n /** Data type for formatting */\n type?: 'string' | 'number' | 'boolean' | 'currency' | 'date' | 'datetime' | 'percentage' | 'url';\n /** Tags to display with the label */\n tags?: Array<{ label: string; color?: string; value?: string }>;\n /** Tooltip text for the help icon */\n tooltip?: string;\n /** Master data item information */\n items?: MasterDataItem;\n /** Whether the value has been modified */\n isModified?: boolean;\n /** Whether the value has been changed */\n isChanged?: boolean;\n /** Size variant */\n size?: LabelValueSize;\n /** Whether the value is highlighted */\n isHighlighted?: boolean;\n /** Deleted value for diff display */\n deletedValue?: string;\n /** Highlight color for changes */\n highlightColor?: HighlightColor;\n /** Whether search is active */\n isSearchActive?: boolean;\n /** Whether to show original boolean value */\n originalValue?: boolean;\n /** Whether to show diff between old and new values */\n showDiff?: boolean;\n /** Whether this is a live field (shows bolt icon) */\n isLiveField?: boolean;\n /** Whether this is an AI extracted field (shows AI extracted icon) */\n isAiExtracted?: boolean;\n /** Confidence percentage shown as a badge */\n confidenceScore?: number;\n /** Confidence classification for badge styling */\n confidenceType?: ConfidenceScoreType;\n /** Optional tooltip content for confidence badge */\n confidenceTooltip?: ReactNode;\n /** Source meta for confidence score */\n sourceMeta?: SourceMetaItem[];\n /** Handler fired when confidence score badge is clicked */\n onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;\n /** Delta change value for currency fields */\n deltaChange?: number;\n /** Theme mode */\n theme?: ThemeMode;\n /** Upload handler function */\n onUpload?: UploadHandler;\n /** Whether the component accepts file uploads */\n acceptsUpload?: boolean;\n /** Master data modal component */\n MasterDataModal?: React.ComponentType<MasterDataModalProps>;\n /** Risk analysis data - accepts any risk object extending RiskDetails */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n riskDetails?: RiskDetails | any;\n /** Whether risk analysis is open */\n isRiskAnalysisOpen?: boolean;\n /** Custom risk details card component - accepts components with custom risk types */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps<any>>;\n /** Custom aria-label for accessibility */\n 'aria-label'?: string;\n /** Whether to decode HTML character entities in string values (default: true) */\n decodeEntities?: boolean;\n /** Function to handle AI extracted indicator click */\n onAiExtractedIndicatorClick?: (value: string) => void;\n /** Whether to show a copy-to-clipboard icon in the top-right corner on hover */\n copyOnHover?: boolean;\n /** Display alias text for URL type — shown instead of the raw URL, with an external link icon */\n urlAlias?: string;\n}\n\n/**\n * LabelValue component displays a label-value pair with various formatting options\n *\n * @example\n * ```tsx\n * <LabelValue \n * label=\"Status\" \n * value=\"Active\" \n * type=\"string\" \n * size=\"medium\" \n * />\n * <LabelValue \n * label=\"Price\" \n * value={99.99} \n * type=\"currency\" \n * items={{ currency_code: 'USD' }}\n * />\n * <LabelValue \n * label=\"Upload File\" \n * acceptsUpload \n * onUpload={handleUpload}\n * />\n * ```\n */\nexport const LabelValue = forwardRef<HTMLDivElement, LabelValueProps>(\n (\n {\n id,\n label,\n value,\n className,\n type = 'string',\n tags,\n tooltip,\n items,\n isModified = false,\n isChanged = false,\n size = 'medium',\n isHighlighted = false,\n deletedValue,\n highlightColor = 'warning',\n isSearchActive = false,\n originalValue = false,\n showDiff = false,\n isLiveField = false,\n isAiExtracted = false,\n confidenceScore,\n confidenceType = \"high\",\n confidenceTooltip,\n sourceMeta = [],\n onConfidenceScoreClick,\n deltaChange,\n theme: _theme = 'light',\n onUpload,\n acceptsUpload = false,\n MasterDataModal,\n riskDetails,\n isRiskAnalysisOpen = false,\n RiskDetailsCard,\n 'aria-label': ariaLabel,\n decodeEntities = true,\n onAiExtractedIndicatorClick,\n copyOnHover = false,\n urlAlias,\n },\n ref\n ) => {\n const [collapseValue, setCollapseValue] = useState(true);\n const [isOpenMasterDataModal, setIsOpenMasterDataModal] = useState(false);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const [masterdataModalInfo, setMasterdataModalInfo] = useState<any>(null);\n const [isHovered, setIsHovered] = useState(false);\n const [isCopied, setIsCopied] = useState(false);\n const copyResetTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(() => {\n return () => {\n if (copyResetTimer.current) clearTimeout(copyResetTimer.current);\n };\n }, []);\n\n // Theme is passed as prop but not used in current implementation\n\n /**\n * Conditionally decode HTML entities based on the decodeEntities prop\n */\n const decode = (text: string): string => decodeEntities ? decodeHTMLEntities(text) : text;\n\n const COLLAPSE_CHAR_LIMIT = 100;\n\n /**\n * Handle collapse toggle for long text\n */\n const handleCollapse = () => {\n setCollapseValue(!collapseValue);\n };\n\n /**\n * Show more / Show less toggle for long text and URLs\n */\n const renderCollapseToggle = () => (\n <button\n id={`btn-label-value-${collapseValue ? 'Show more' : 'Show less'}`}\n className=\"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap\"\n onClick={handleCollapse}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleCollapse();\n }\n }}\n aria-label={collapseValue ? 'Show more content' : 'Show less content'}\n type=\"button\"\n >\n {collapseValue ? 'Show more' : 'Show less'}\n </button>\n );\n\n /**\n * Render a URL with optional collapse for long href/display text\n */\n const renderUrlValue = (href: string) => {\n if (urlAlias) {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 font-semibold text-neutral-900 dark:text-white hover:text-primary-600 dark:hover:text-primary-400 transition-colors\"\n >\n {urlAlias}\n <OpenInNew sx={{ fontSize: 16 }} className=\"text-primary-600 dark:text-primary-400\" />\n </a>\n );\n }\n const decoded = decode(href);\n if (decoded.length <= COLLAPSE_CHAR_LIMIT) {\n return (\n <a href={href} className=\"text-primary-600 truncate\">\n {decoded}\n </a>\n );\n }\n return (\n <p>\n <a href={href} className=\"text-primary-600 break-all\">\n {decoded.slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decoded.length)}\n </a>\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n );\n };\n\n /**\n * Handle master data click\n */\n const handleMasterDataClick = (item: MasterDataItem) => {\n setIsOpenMasterDataModal(true);\n setMasterdataModalInfo({ ...item, value });\n };\n\n /**\n * Handle master data modal close\n */\n const handleMasterDataClose = () => {\n setIsOpenMasterDataModal(false);\n setMasterdataModalInfo(null);\n };\n\n /**\n * Copy the current value to the clipboard\n */\n const handleCopyValue = () => {\n const textToCopy =\n value === null || value === undefined || typeof value === 'object'\n ? ''\n : String(value);\n if (!textToCopy) return;\n navigator.clipboard?.writeText(textToCopy)\n .then(() => {\n setIsCopied(true);\n if (copyResetTimer.current) clearTimeout(copyResetTimer.current);\n copyResetTimer.current = setTimeout(() => setIsCopied(false), 1500);\n })\n .catch(() => { });\n };\n\n /**\n * Handle file upload\n */\n const handleFileUpload = (event: React.ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (file && onUpload) {\n onUpload(file);\n }\n // Reset input value to allow same file selection\n event.target.value = '';\n };\n\n /**\n * Format and display the value based on type\n */\n const displayValue = () => {\n const isISODate = typeof value === 'string' && isISODateString(value);\n\n if (isSearchActive && typeof value === 'object') {\n return value;\n }\n\n if (value || (type?.toLowerCase() === 'boolean' && value === 0) || (type?.toLowerCase() === 'currency' && Number(value) >= 0)) {\n if ((value === true || value === 'True') && !originalValue && (type?.toLowerCase() !== 'choice')) {\n return 'Yes';\n } else if ((value === false || value === 'False') && !originalValue && (type?.toLowerCase() !== 'choice')) {\n return 'No';\n } else if (type?.toLowerCase() === 'url') {\n return renderUrlValue(value as string);\n } else if (type?.toLowerCase() === 'boolean') {\n return formatBooleanValue(value);\n } else if (type?.toLowerCase() === 'currency') {\n const formatted = formatCurrency(value, items?.currency_code) || '-';\n const currencyName = items?.currency_code\n ? CURRENCIES.find(c => c.value === items.currency_code)?.label\n : undefined;\n const tooltipTitle = currencyName\n ? `${items!.currency_code} — ${currencyName}`\n : items?.currency_code ?? '';\n return currencyName ? (\n <Tooltip title={tooltipTitle} placement=\"top\">\n <span>{formatted}</span>\n </Tooltip>\n ) : formatted;\n } else if (type?.toLowerCase() === 'datetime') {\n const dateValue = typeof value === 'string' && value.includes('Z') ? value.replace(/\\.000Z$/, 'Z') : value;\n return formatDate(dateValue as string, {\n skipTimezone: true,\n withTime: true,\n });\n } else if (type?.toLowerCase() === 'date' || isISODate) {\n let dateValue = value;\n\n if (typeof value === 'string' && value.includes('Z')) {\n dateValue = value.replace(/\\.000Z$/, 'Z')\n } else if (typeof value === 'string' && !value.includes('Z')) {\n const parsed = dayjs(value);\n dateValue = dayjs(parsed).isValid() ? parsed.toString() : value;\n }\n\n return formatDate(dateValue as string, {\n skipTimezone: true,\n withTime: false,\n });\n } else if (type?.toLowerCase() === 'percentage') {\n return `${value}%`;\n } else if (typeof value === 'string' && value.length > COLLAPSE_CHAR_LIMIT) {\n const decoded = decode(value);\n return (\n <p>\n {decoded.slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decoded.length)}\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n );\n } else {\n return typeof value === 'string' ? decode(value) : value;\n }\n }\n return '-';\n };\n\n /**\n * Get Typography size based on LabelValue size\n */\n const getTypographySize = () => {\n switch (size) {\n case 'small':\n return 'extra-small' as const;\n case 'large':\n return 'large' as const;\n default: // medium\n return 'small' as const;\n }\n };\n\n /**\n * Get highlight color classes\n */\n const getHighlightClasses = (): string => {\n switch (highlightColor) {\n case 'success':\n return 'bg-success-100';\n case 'warning':\n return 'bg-warning-100';\n case 'error':\n return 'bg-error-100';\n case 'info':\n return 'bg-info-100';\n default:\n return 'bg-warning-100';\n }\n };\n\n return (\n <div\n id={id || ''}\n ref={ref}\n className={cn(\n 'font-medium relative',\n className\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n aria-label={ariaLabel || `Label: ${label}, Value: ${value}`}\n >\n {/* Label section */}\n <Typography\n variant=\"medium\"\n size={getTypographySize()}\n className=\"flex gap-1 items-center flex-wrap\"\n appearance=\"subtitle\"\n >\n\n {/* Live field indicator */}\n {typeof label === 'string' ? decode(label) : label} {<Label labels={tags?.map(tag => ({ ...tag, color: tag.color || 'primary' }))} />}\n\n {isLiveField && <BoltOutlined sx={{ fontSize: 16, color: 'var(--color-primary-600)', rotate: '15deg' }} />}\n {isAiExtracted &&\n (shouldShowConfidenceScore(confidenceScore) && confidenceType ? (\n <Tooltip\n placement=\"top\"\n title={confidenceTooltip || \"\"}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\"cursor-pointer w-3 h-3 flex items-center justify-center rounded-full\", getConfidenceScoreBadgeHoverClass(confidenceType))}\n onClick={() => onConfidenceScoreClick?.(sourceMeta)}\n >\n <AIStarIcon\n size={12}\n fill={getConfidenceScoreBadgeColor(confidenceType)}\n fillSecondary={getConfidenceScoreBadgeFill(confidenceType)}\n />\n </div>\n </Tooltip>\n ) : (\n <AIExtractedIndicator onClick={() => onAiExtractedIndicatorClick?.(displayValue() as string)} />\n ))}\n\n {/* Tooltip */}\n {tooltip && (\n <Tooltip\n placement=\"top\"\n title={tooltip}\n whiteSpace=\"pre-wrap\"\n >\n <div\n className=\"cursor-pointer\"\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n // Tooltip will show on focus\n }\n }}\n >\n <HelpIcon size={14} />\n </div>\n </Tooltip>\n )}\n {copyOnHover && isHovered && (\n <Tooltip title={isCopied ? 'Copied' : `Copy ${label ?? 'value'}`} placement=\"top\" whiteSpace=\"pre-wrap\">\n <button\n type=\"button\"\n onClick={handleCopyValue}\n aria-label={isCopied ? `Copied ${label ?? 'value'}` : `Copy ${label ?? 'value'}`}\n className=\"p-1 flex items-center justify-center rounded text-neutral-500 hover:!text-primary-600 hover:bg-neutral-100 dark:text-primary-400 dark:hover:!text-primary-600 dark:hover:bg-neutral-800 cursor-pointer\"\n >\n <span className=\"relative inline-flex h-4 w-4 items-center justify-center\">\n <ContentCopyIcon\n size={16}\n className={cn(\n 'absolute inset-0 text-primary-600 dark:text-primary-500 transition-all duration-200 ease-out',\n isCopied ? 'opacity-0 scale-50 rotate-[-90deg]' : 'opacity-100 scale-100 rotate-0'\n )}\n />\n <CheckFilledIcon\n size={16}\n className={cn(\n 'absolute inset-0 text-primary-600 dark:text-primary-500 transition-all duration-200 ease-out',\n isCopied ? 'opacity-100 scale-100 rotate-0' : 'opacity-0 scale-50 rotate-90'\n )}\n />\n </span>\n </button>\n </Tooltip>\n )}\n </Typography>\n\n {/* Value section */}\n <Typography\n variant=\"medium\"\n size={getTypographySize()}\n className={cn(\n 'text-- whitespace-normal break-all flex gap-1 pt-0.5',\n isModified && 'bg-neutral-50 dark:bg-black-700 p-1 rounded',\n isRiskAnalysisOpen && riskDetails?.color &&\n `bg-${riskDetails.color}-50 border-${riskDetails.color}-300 px-0.5 rounded-lg`\n )}\n appearance=\"body\"\n >\n {/* Value display */}\n {showDiff && deletedValue && value ? (\n <div className=\"flex gap-2\">\n <span className=\"line-through\">{decode(deletedValue)}</span>\n <span>{displayValue()}</span>\n </div>\n ) : isChanged || isHighlighted ? (\n <mark className={cn('rounded-md py-0.5 px-1', getHighlightClasses())}>\n {displayValue()}\n </mark>\n ) : (\n displayValue()\n )}\n\n {/* Delta change indicator for currency fields */}\n {type?.toLowerCase() === 'currency' && deltaChange !== 0 && deltaChange !== undefined && deltaChange !== null && (\n <motion.span\n initial={{ opacity: 0, y: 2 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.25 }}\n className={cn(\n 'inline-flex items-center gap-1 ml-1.5 text-xs font-medium',\n deltaChange > 0 ? 'text-emerald-600 dark:text-emerald-400' : 'text-red-600 dark:text-red-400'\n )}\n >\n <span className=\"flex items-center justify-center w-4 h-4\">\n {deltaChange > 0 ? (\n <ArrowUpwardRounded sx={{ fontSize: 16 }} className=\"text-emerald-600 dark:text-emerald-400\" />\n ) : (\n <ArrowDownwardRounded sx={{ fontSize: 16 }} className=\"text-red-600 dark:text-red-400\" />\n )}\n </span>\n <span>{formatCurrency(Math.abs(deltaChange), items?.currency_code || 'USD')}</span>\n </motion.span>\n )}\n\n {/* Master data search icon */}\n {items?.is_master_data && items?.reference && value && (\n <button\n onClick={() => handleMasterDataClick(items)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleMasterDataClick(items);\n }\n }}\n aria-label={`Search master data for ${label}`}\n type=\"button\"\n className=\"cursor-pointer\"\n >\n <SearchIcon width={20} height={20} />\n </button>\n )}\n\n {/* File upload input */}\n {acceptsUpload && (\n <input\n type=\"file\"\n onChange={handleFileUpload}\n className=\"absolute inset-0 w-full h-full opacity-0 cursor-pointer\"\n aria-label={`Upload file for ${label}`}\n />\n )}\n </Typography>\n\n {/* Deleted value display */}\n {deletedValue && !showDiff && (\n <Typography\n variant=\"medium\"\n size=\"extra-small\"\n className=\"pt-0.5\"\n appearance=\"body\"\n >\n <mark className=\"rounded-md py-0.5 px-1 bg-error-100\">\n <del>\n {deletedValue || (type?.toLowerCase() === 'boolean' && deletedValue === '0') ? (\n deletedValue === 'True' && (type?.toLowerCase() !== 'choice') ? (\n 'Yes'\n ) : deletedValue === 'False' && (type?.toLowerCase() !== 'choice') ? (\n 'No'\n ) : type?.toLowerCase() === 'boolean' ? (\n formatBooleanValue(deletedValue)\n ) : type?.toLowerCase() === 'currency' ? (\n formatCurrency(deletedValue, items?.currency_code)\n ) : type?.toLowerCase() === 'date' ? (\n formatDate(deletedValue, {\n skipTimezone: true,\n withTime: false,\n })\n ) : type?.toLowerCase() === 'datetime' ? (\n formatDate(deletedValue, {\n skipTimezone: true,\n withTime: true,\n })\n ) : type?.toLowerCase() === 'percentage' ? (\n `${deletedValue}%`\n ) : type?.toLowerCase() === 'url' ? (\n renderUrlValue(deletedValue)\n ) : deletedValue.length > COLLAPSE_CHAR_LIMIT ? (\n <p>\n {decode(deletedValue).slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decode(deletedValue).length)}\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n ) : (\n decode(deletedValue)\n )\n ) : (\n '-'\n )}\n </del>\n </mark>\n </Typography>\n )}\n\n {/* Master data modal */}\n {MasterDataModal && (\n <MasterDataModal\n isVisible={isOpenMasterDataModal}\n onClose={handleMasterDataClose}\n masterdataInfo={masterdataModalInfo}\n />\n )}\n\n {/* Risk details tooltip */}\n {isHovered && riskDetails && isRiskAnalysisOpen && (\n <div\n className=\"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl\"\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.preventDefault()}\n onKeyDown={(e) => {\n if (e.key === 'Escape') {\n setIsHovered(false);\n }\n }}\n role=\"tooltip\"\n aria-label=\"Risk analysis details\"\n tabIndex={0}\n >\n {RiskDetailsCard ? (\n <RiskDetailsCard riskDetails={riskDetails} />\n ) : (\n <div className=\"shadow-lg p-4\">\n <div className=\"text-sm\">\n <h4 className=\"font-semibold mb-2\">Risk Details</h4>\n <p className=\"text-neutral-600 dark:text-neutral-300\">\n {riskDetails.description || 'Risk analysis information'}\n </p>\n </div>\n </div>\n )}\n </div>\n )}\n </div>\n );\n }\n);\n\nLabelValue.displayName = 'LabelValue';\n"],"names":["LabelValue","forwardRef","id","label","value","className","type","tags","tooltip","items","isModified","isChanged","size","isHighlighted","deletedValue","highlightColor","isSearchActive","originalValue","showDiff","isLiveField","isAiExtracted","confidenceScore","confidenceType","confidenceTooltip","sourceMeta","onConfidenceScoreClick","deltaChange","_theme","onUpload","acceptsUpload","MasterDataModal","riskDetails","isRiskAnalysisOpen","RiskDetailsCard","ariaLabel","decodeEntities","onAiExtractedIndicatorClick","copyOnHover","urlAlias","ref","collapseValue","setCollapseValue","useState","isOpenMasterDataModal","setIsOpenMasterDataModal","masterdataModalInfo","setMasterdataModalInfo","isHovered","setIsHovered","isCopied","setIsCopied","copyResetTimer","useRef","useEffect","decode","text","decodeHTMLEntities","COLLAPSE_CHAR_LIMIT","handleCollapse","renderCollapseToggle","jsx","e","renderUrlValue","href","jsxs","OpenInNew","decoded","handleMasterDataClick","item","handleMasterDataClose","handleCopyValue","textToCopy","handleFileUpload","event","file","displayValue","isISODate","isISODateString","formatBooleanValue","formatted","formatCurrency","currencyName","CURRENCIES","c","tooltipTitle","Tooltip","dateValue","formatDate","parsed","dayjs","getTypographySize","getHighlightClasses","cn","Typography","Label","tag","BoltOutlined","shouldShowConfidenceScore","getConfidenceScoreBadgeHoverClass","AIStarIcon","getConfidenceScoreBadgeColor","getConfidenceScoreBadgeFill","AIExtractedIndicator","HelpIcon","ContentCopyIcon","CheckFilledIcon","motion","ArrowUpwardRounded","ArrowDownwardRounded","SearchIcon"],"mappings":";;;;;;;;;;;;;;;;;AAsNO,MAAMA,KAAaC;AAAA,EACxB,CACE;AAAA,IACE,IAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,MAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,WAAAC,IAAY;AAAA,IACZ,MAAAC,IAAO;AAAA,IACP,eAAAC,IAAgB;AAAA,IAChB,cAAAC;AAAA,IACA,gBAAAC,IAAiB;AAAA,IACjB,gBAAAC,IAAiB;AAAA,IACjB,eAAAC,IAAgB;AAAA,IAChB,UAAAC,IAAW;AAAA,IACX,aAAAC,KAAc;AAAA,IACd,eAAAC,KAAgB;AAAA,IAChB,iBAAAC;AAAA,IACA,gBAAAC,IAAiB;AAAA,IACjB,mBAAAC;AAAA,IACA,YAAAC,KAAa,CAAA;AAAA,IACb,wBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAOC,KAAS;AAAA,IAChB,UAAAC;AAAA,IACA,eAAAC,KAAgB;AAAA,IAChB,iBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,oBAAAC,IAAqB;AAAA,IACrB,iBAAAC;AAAA,IACA,cAAcC;AAAA,IACd,gBAAAC,KAAiB;AAAA,IACjB,6BAAAC;AAAA,IACA,aAAAC,KAAc;AAAA,IACd,UAAAC;AAAA,EAAA,GAEFC,OACG;AACH,UAAM,CAACC,GAAe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ACV,UAAA7B,EAAY,eAAe,4BAAA,CAC9B;AAAA,cAAA,EAAA,CACF,EAAA,CACF;AAAA,YAAA;AAAA,UAAA;AAAA,QAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA/B,GAAW,cAAc;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),C=require("antd"),r=require("../../_virtual/index.cjs.js"),g=require("framer-motion"),p=require("react"),q=require("react-i18next"),s=require("../data-display/typography/Typography.cjs.js"),D=require("../buttons/option-button/OptionButton.cjs.js"),F=require("../button/IconButton.cjs.js"),j=require("../tooltip/Tooltip.cjs.js"),R=require("../icon/icons.generated.cjs.js"),z=({size:n=24,fill:o="currentColor",className:m})=>a.jsx("svg",{className:m,width:n,height:n,viewBox:"0 0 20 20",fill:o,xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M10.0002 11.1666L5.91683 15.2499C5.76405 15.4027 5.56961 15.4791 5.3335 15.4791C5.09739 15.4791 4.90294 15.4027 4.75016 15.2499C4.59738 15.0971 4.521 14.9027 4.521 14.6666C4.521 14.4305 4.59738 14.236 4.75016 14.0833L8.8335 9.99992L4.75016 5.91659C4.59738 5.76381 4.521 5.56936 4.521 5.33325C4.521 5.09714 4.59738 4.9027 4.75016 4.74992C4.90294 4.59714 5.09739 4.52075 5.3335 4.52075C5.56961 4.52075 5.76405 4.59714 5.91683 4.74992L10.0002 8.83325L14.0835 4.74992C14.2363 4.59714 14.4307 4.52075 14.6668 4.52075C14.9029 4.52075 15.0974 4.59714 15.2502 4.74992C15.4029 4.9027 15.4793 5.09714 15.4793 5.33325C15.4793 5.56936 15.4029 5.76381 15.2502 5.91659L11.1668 9.99992L15.2502 14.0833C15.4029 14.236 15.4793 14.4305 15.4793 14.6666C15.4793 14.9027 15.4029 15.0971 15.2502 15.2499C15.0974 15.4027 14.9029 15.4791 14.6668 15.4791C14.4307 15.4791 14.2363 15.4027 14.0835 15.2499L10.0002 11.1666Z"})}),A=({fill:n="#cccccc",className:o})=>a.jsx("svg",{height:"20",width:"20",viewBox:"0 0 20 20",focusable:"false",className:o,children:a.jsx("path",{fill:n,d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})}),k=n=>{const{show:o,isFlowDashboard:m,onClose:N,actionItems:d,selectedItemsCount:I,deleteConfig:c,showActionBg:S}=n,{t:h}=q.useTranslation(),[b,y]=p.useState(!1),[B,f]=p.useState(!0),l=p.useRef(null),v=p.useRef(null);p.useEffect(()=>{const e=new ResizeObserver(()=>{if(l.current&&v.current){const i=l.current.scrollWidth-100;d.length*180+100>i?f(!1):f(!0)}});return l.current&&e.observe(l.current),()=>{l.current&&e.unobserve(l.current)}});const t={label:h("Delete"),icon:a.jsx(R.DeleteIcon,{className:"text-error-700 w-icon h-icon"}),onClick:c?.onClick,...c},x=e=>{const i=e.label?.toLowerCase()??"";return i.includes("delete")||i==="remove"||i==="move to trash"},L=[...d].sort((e,i)=>Number(x(e))-Number(x(i))),T=d.some(e=>e.visible!==!1)||!!c,u=d.filter(e=>e.visible!==!1).map((e,i)=>({key:i,label:a.jsx(D.OptionButton,{icon:e.dropdownIcon,text:e?.label||"",onClick:e.onClick,className:"font-inter text-base font-medium text-black-900 dark:text-black-200 gap-1.5"}),children:e.dropdownItems,disabled:!1}));return o?a.jsx(g.motion.div,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},exit:{y:20,opacity:0},transition:{duration:.2,ease:[.4,0,.2,1],opacity:{duration:.15}},ref:l,className:r("h-[36px] mb-4",m?"ml-60 w-1/2":"w-full"),children:a.jsxs("div",{className:r("border-y border-neutral-900 dark:border-[#0d1014 px-[12px] text-white bg-neutral-900 dark:bg-black-900 flex justify-between items-center"),children:[a.jsxs("div",{className:"flex items-center gap-[12px]",children:[a.jsxs("div",{className:"flex items-center gap-[8px]",children:[a.jsx(F,{tooltip:"Close",variant:"ghost",onClick:N,className:"!p-0 text-white hover:opacity-80 hover:rotate-90 transition-all duration-200",children:a.jsx(z,{size:16})}),a.jsx("div",{className:"w-px h-[14px] rounded-[1px] bg-neutral-700 dark:bg-[#1d242c]"})]}),a.jsxs("div",{className:"flex items-center gap-[6px]",children:[a.jsx("span",{className:"inline-flex items-center justify-center min-w-[20px] h-[16px] px-[8px] rounded-[9px] border text-[12px] leading-[18px] font-normal text-primary-600 dark:text-primary-400 bg-primary-50 dark:bg-[rgba(0,50,95,0.3)] border-primary-200 dark:border-primary-800",children:I||0}),a.jsx(s.Typography,{size:"extra-small",appearance:"custom",className:"text-white dark:text-neutral-50",children:h("Selected")})]})]}),T?a.jsx("div",{ref:v,className:r("h-[36px] flex items-center font-inter bg-neutral-800 dark:bg-black-800 pl-[10px] rounded-[43px]"),children:B?a.jsxs(g.motion.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},className:"flex items-center h-[36px] bg-neutral-800 dark:bg-black-800 px-[10px] rounded-[43px]",children:[L.map((e,i)=>e.visible!==!1&&a.jsx("div",{children:e.type==="dropdown"?a.jsx(C.Dropdown,{menu:{items:e.dropdownItems},trigger:[e.dropdownTrigger||"click"],overlayClassName:"!min-w-[148px]",placement:"bottomRight",getPopupContainer:w=>w.parentElement,open:b,onOpenChange:y,children:a.jsx("button",{id:`btn-floating-bar-${e.label}`,onClick:e.onClick,disabled:e.disabled,className:r(e?.label?"flex items-center gap-[6px] pl-[8px] pr-[12px] py-[4px] rounded-[6px] text-white dark:text-neutral-50 hover:opacity-80 hover:scale-105 transition-all duration-200 bg-transparent":"bg-transparent p-1.5 rounded-xl transition-all duration-200 hover:scale-105 hover:opacity-80",e?.hideLabel&&"!p-1.5",x(e)&&"!text-error-700",e.disabled&&"opacity-70"),children:a.jsxs(j,{hideTooltip:!e.tooltip,title:e.tooltip,className:"flex items-center gap-1.5",children:[e.icon,!e?.hideLabel&&e.label&&a.jsx(s.Typography,{size:"small",variant:"medium",className:"text-inherit",appearance:"custom",children:e.label})]})},i)}):a.jsx("button",{id:`btn-floating-bar-${e.label}`,onClick:e.onClick,disabled:e.disabled,className:r(e?.label?"flex items-center gap-[6px] pl-[8px] pr-[12px] py-[4px] rounded-[6px] text-white dark:text-neutral-50 hover:opacity-80 hover:scale-105 transition-all duration-200 bg-transparent":"bg-transparent p-1.5 rounded-xl transition-all duration-200 hover:scale-105 hover:opacity-80",e?.hideLabel&&"!p-1.5",x(e)&&"!text-error-700",e.disabled&&"opacity-70"),children:a.jsxs(j,{hideTooltip:!e.tooltip,title:e.tooltip,className:"flex items-center gap-1.5",children:[e.icon,!e?.hideLabel&&e.label&&a.jsx(s.Typography,{size:"small",variant:"medium",className:"text-inherit",appearance:"custom",children:e.label})]})})},i)),c?a.jsxs("button",{id:`btn-floating-bar-${t.label}`,onClick:t.onClick,disabled:t.disabled,className:r("flex items-center gap-[6px] pl-[8px] pr-[12px] py-[4px] rounded-[6px] hover:scale-105 hover:opacity-80 transition-all duration-200",t.disabled&&"opacity-70"),children:[t.icon,a.jsx(s.Typography,{size:"small",variant:"medium",className:"text-error-700",appearance:"custom",children:t.label})]}):null]}):a.jsxs(g.motion.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},className:"minw-[150px] p-1.5 flex items-center",children:[a.jsx(C.Dropdown,{menu:{items:u},trigger:["click"],overlayClassName:"!min-w-[148px]",placement:"bottomRight",getPopupContainer:e=>e.parentElement,open:b,onOpenChange:y,children:a.jsxs("button",{id:"btn-floating-bar-actions",disabled:u.length===0,className:r("flex items-center gap-1.5 px-2 py-1 w-22 h-7 rounded-full bg-[#34405473]/45 dark:bg-black-700 hover:scale-105 hover:opacity-80 transition-all duration-200",u.length===0&&"opacity-60 hover:scale-100 hover:opacity-60"),type:"button",children:[a.jsx(s.Typography,{size:"small",variant:"medium",className:"text-white",children:h("Actions")}),a.jsx(A,{fill:"#FFFFFF",className:"w-[16px] h-[16px]"})]})}),c?a.jsxs("button",{id:`btn-floating-bar-${t.label}`,onClick:t.onClick,disabled:t.disabled,className:r("flex items-center gap-[6px] pl-[8px] pr-[12px] py-[4px] rounded-[6px] hover:scale-105 hover:opacity-80 transition-all duration-200",t.disabled&&"opacity-70"),type:"button",children:[t.icon,a.jsx(s.Typography,{size:"small",variant:"medium",className:"text-error-700",appearance:"custom",children:t.label})]}):null]})}):null]})}):null};k.displayName="FloatingBar";exports.FloatingBar=k;
|
|
2
2
|
//# sourceMappingURL=FloatingBar.cjs.js.map
|