@fluidattacks/design 3.16.15-pr-07 → 3.16.15-pr-08
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/@core/index.js +1 -1
- package/dist/components/accordion/accordion-content/index.js +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/card/card-header/index.js +1 -1
- package/dist/components/card/card-with-image/index.js +1 -1
- package/dist/components/card/card-with-input/index.js +1 -1
- package/dist/components/card/card-with-options/index.js +1 -1
- package/dist/components/card/card-with-selector/index.js +1 -1
- package/dist/components/card/card-with-switch/index.js +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/cloud-image/index.js +1 -1
- package/dist/components/code-snippet/index.js +1 -1
- package/dist/components/code-snippet/location-code/index.js +1 -1
- package/dist/components/colors/index.js +1 -1
- package/dist/components/confirm-dialog/index.js +1 -1
- package/dist/components/container/index.js +1 -1
- package/dist/components/divider/index.js +1 -1
- package/dist/components/empty-state/empty-button/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/file-preview/index.js +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/form/inner-form/index.js +1 -1
- package/dist/components/grid-container/index.js +1 -1
- package/dist/components/group-selector/index.js +1 -1
- package/dist/components/group-selector/option-container/index.js +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/indicator-card/index.js +1 -1
- package/dist/components/info-sidebar/index.js +1 -1
- package/dist/components/inputs/fields/combobox/field/index.js +1 -1
- package/dist/components/inputs/fields/combobox/index.js +1 -1
- package/dist/components/inputs/fields/combobox/option/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/grid/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/header/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date/index.js +1 -1
- package/dist/components/inputs/fields/date-range/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-range/index.js +1 -1
- package/dist/components/inputs/fields/date-time/calendar/index.js +1 -1
- package/dist/components/inputs/fields/date-time/index.js +1 -1
- package/dist/components/inputs/fields/editable/index.js +1 -1
- package/dist/components/inputs/fields/input/index.js +1 -1
- package/dist/components/inputs/fields/input-array/field/index.js +1 -1
- package/dist/components/inputs/fields/input-array/index.js +1 -1
- package/dist/components/inputs/fields/input-file/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/field/index.js +1 -1
- package/dist/components/inputs/fields/input-tags/index.js +1 -1
- package/dist/components/inputs/fields/number/index.js +1 -1
- package/dist/components/inputs/fields/number-range/index.js +1 -1
- package/dist/components/inputs/fields/phone/index.js +1 -1
- package/dist/components/inputs/fields/text-area/index.js +1 -1
- package/dist/components/inputs/index.js +1 -1
- package/dist/components/inputs/label/index.js +1 -1
- package/dist/components/inputs/outline-container/index.js +1 -1
- package/dist/components/inputs/utils/action-button/index.js +1 -1
- package/dist/components/inputs/utils/calendar-button/index.js +1 -1
- package/dist/components/inputs/utils/date-selector/index.js +1 -1
- package/dist/components/inputs/utils/date-time-field/index.js +1 -1
- package/dist/components/inputs/utils/dialog/index.js +1 -1
- package/dist/components/inputs/utils/number-field/index.js +1 -1
- package/dist/components/inputs/utils/popover/index.js +1 -1
- package/dist/components/layout/categories/buttons/index.js +1 -1
- package/dist/components/layout/categories/column/index.js +1 -1
- package/dist/components/layout/categories/gap/index.js +1 -1
- package/dist/components/layout/categories/row/index.js +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list-item/index.js +1 -1
- package/dist/components/little-flag/index.js +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/logo/index.js +1 -1
- package/dist/components/lottie/index.js +1 -1
- package/dist/components/menu/index.js +1 -1
- package/dist/components/message-banner/index.js +1 -1
- package/dist/components/modal/columns-modal/index.js +1 -1
- package/dist/components/modal/columns-modal/preview-panel/index.js +1 -1
- package/dist/components/modal/columns-modal/search-panel/index.js +1 -1
- package/dist/components/modal/filters-modal/applied-filter/index.js +1 -1
- package/dist/components/modal/filters-modal/applied-filters/index.js +1 -1
- package/dist/components/modal/filters-modal/column-filters/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-control/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/form-content/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/hooks/index.js +1 -1
- package/dist/components/modal/filters-modal/filter-form/index.js +1 -1
- package/dist/components/modal/filters-modal/filters-list/index.js +1 -1
- package/dist/components/modal/filters-modal/index.js +1 -1
- package/dist/components/modal/filters-modal/types.d.ts +1 -1
- package/dist/components/modal/footer/index.js +1 -1
- package/dist/components/modal/header/index.js +1 -1
- package/dist/components/modal/index.js +1 -1
- package/dist/components/modal/modal-confirm/index.js +1 -1
- package/dist/components/notification/index.js +1 -1
- package/dist/components/notification-sign/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/oauth-selector/index.js +1 -1
- package/dist/components/oauth-selector/option-container/index.js +1 -1
- package/dist/components/plan-card/index.js +1 -1
- package/dist/components/plan-card/recommended-tag/index.js +1 -1
- package/dist/components/pop-up/description/index.js +1 -1
- package/dist/components/pop-up/index.js +1 -1
- package/dist/components/premium-feature/index.js +1 -1
- package/dist/components/priority-score/index.js +1 -1
- package/dist/components/progress-bar/index.js +1 -1
- package/dist/components/radio-button/index.js +1 -1
- package/dist/components/scroll-button/index.js +1 -1
- package/dist/components/search/index.js +1 -1
- package/dist/components/severity-badge/index.js +1 -1
- package/dist/components/severity-overview/badge/index.js +1 -1
- package/dist/components/severity-overview/index.js +1 -1
- package/dist/components/show-on-hover/index.js +1 -1
- package/dist/components/slide-out-menu/index.js +1 -1
- package/dist/components/slide-out-menu/menu-item/index.js +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/thumb/index.js +1 -1
- package/dist/components/step-lapse/index.js +1 -1
- package/dist/components/table-button/index.js +1 -1
- package/dist/components/tabs/fixed-tabs/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/tab/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/timeline/card/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/toggle/index.js +1 -1
- package/dist/components/toggle-buttons/index.js +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tour/index.js +1 -1
- package/dist/components/typography/heading/index.js +1 -1
- package/dist/components/typography/index.js +1 -1
- package/dist/components/typography/span/index.js +1 -1
- package/dist/components/typography/text/index.js +1 -1
- package/dist/{components-CyxG08RY.js → components-CKV8aB9K.js} +35 -35
- package/dist/{components-DvjswCo7.mjs → components-D8BfE-aj.mjs} +202 -201
- package/dist/hooks/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
${fe}
|
|
68
68
|
${ue}
|
|
69
69
|
${he}
|
|
70
|
-
`,
|
|
70
|
+
`,Oe=s.dt.button.withConfig(be)`
|
|
71
71
|
${de}
|
|
72
72
|
${pe}
|
|
73
73
|
${ge}
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
|
|
183
183
|
${i===void 0?"":`&::after { content: "${i}"; }`}
|
|
184
184
|
`}
|
|
185
|
-
`,
|
|
185
|
+
`,U=f.forwardRef(function({bgGradient:n,children:i,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:u,size:x,sizeMd:h,sizeSm:b,textFill:m,whiteSpace:w,wordBreak:y,...v},j){return t.jsx(Ln,{$bgGradient:n,$color:r,$display:o,$fontFamily:l,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$overflow:u,$size:x,$sizeMd:h,$sizeSm:b,$textFill:m,$whiteSpace:w,$wordBreak:y,className:a,ref:j,...v,children:i})}),se=f.forwardRef(function({children:n,color:i,content:a,display:r,fontFamily:o,fontWeight:l,letterSpacing:c,lineSpacing:d,lineSpacingSm:p,size:g,sizeMd:u,sizeSm:x,...h},b){return t.jsx(Pn,{$color:i,$content:a,$display:r,$fontFamily:o,$fontWeight:l,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:p,$size:g,$sizeMd:u,$sizeSm:x,ref:b,...h,children:n})}),S=f.forwardRef(function({bgGradient:n,children:i,className:a,color:r,display:o,fontFamily:l,fontWeight:c,letterSpacing:d,lineSpacing:p,lineSpacingSm:g,overflow:u,size:x,sizeMd:h,sizeSm:b,textFill:m,whiteSpace:w,wordBreak:y,fontStyle:v,...j},k){return t.jsx(pt,{$bgGradient:n,$color:r,$display:o,$fontFamily:l,$fontStyle:v,$fontWeight:c,$letterSpacing:d,$lineSpacing:p,$lineSpacingSm:g,$overflow:u,$size:x,$sizeMd:h,$sizeSm:b,$textFill:m,$whiteSpace:w,$wordBreak:y,className:a,ref:k,...j,children:i})}),gt=({item:e})=>{const n=e.description&&typeof e.description=="string"?t.jsx(S,{mb:e.extraElement?.5:void 0,size:"sm",children:e.description}):e.description??void 0;return t.jsxs($,{display:"block",id:`panel-${e.title}`,padding:[.75,.75,.75,.75],children:[n,e.extraElement?t.jsx($,{children:e.extraElement}):void 0]})},An={xl:"96px",lg:"64px",md:"32px",sm:"24px",xs:"16px",xxs:"12px",xxss:"10px"},Wn=s.dt(Ue)`
|
|
186
186
|
${({$clickable:e,$color:n="inherit",$disabled:i=!1,$hoverColor:a,$rotation:r,$size:o,$secondaryColor:l})=>{const c=a?"":"brightness(50%)",d=a??"";return`
|
|
187
187
|
color: ${n};
|
|
188
188
|
cursor: ${e?"pointer":"inherit"};
|
|
@@ -270,7 +270,7 @@
|
|
|
270
270
|
color: ${e.palette.warning[700]};
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
-
`})),
|
|
273
|
+
`})),_n=s.dt.div`
|
|
274
274
|
${({theme:e,$variant:n})=>`
|
|
275
275
|
background: transparent;
|
|
276
276
|
align-items: center;
|
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
|
|
293
293
|
${Hn(e,n??"error")}
|
|
294
294
|
`}
|
|
295
|
-
`,
|
|
295
|
+
`,On=s.dt.div`
|
|
296
296
|
padding-right: 4px;
|
|
297
297
|
width: 100%;
|
|
298
298
|
`,{getVariant:Vn}=K(e=>({ghost:`
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
background-color: ${e.palette.primary[500]};
|
|
370
370
|
color: ${e.palette.white};
|
|
371
371
|
}
|
|
372
|
-
`})),ut=s.dt(
|
|
372
|
+
`})),ut=s.dt(Oe)`
|
|
373
373
|
${({theme:e,justify:n,$size:i,$variant:a})=>`
|
|
374
374
|
align-items: center;
|
|
375
375
|
border-radius: var(--btn-spacing);
|
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
width: max-content;
|
|
419
419
|
z-index: 999999;
|
|
420
420
|
`}
|
|
421
|
-
`,Y=({children:e,disabled:n=!1,display:i="inline-block",height:a,icon:r,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:u="",title:x="",hide:h=u===""&&x===""&&p===void 0,width:b})=>{const m=s.nt(),[w,y]=f.useState(!1),{refs:v,floatingStyles:j,context:k}=s.useFloating({middleware:[s.flip({fallbackAxisSideDirection:"start"}),s.offset({mainAxis:10}),s.shift()],onOpenChange:y,open:w,placement:g,whileElementsMounted:s.autoUpdate}),I=s.useHover(k,{delay:{close:0,open:500},move:!1}),E=s.useFocus(k),C=s.useRole(k,{role:r?"label":"tooltip"}),{getReferenceProps:N,getFloatingProps:L}=s.useInteractions([I,E,C]);return n?t.jsx(f.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(Gn,{...N(),display:i,height:a,id:c,ref:v.setReference,width:b,children:r?t.jsx(T,{clickable:!0,disabled:n,icon:r,iconColor:o,iconSize:l??"xxs",iconType:w?"fa-solid":"fa-light"}):e}),w&&!h&&ie.createPortal(t.jsxs(Yn,{...L(),$maxWidth:d,id:`floating-${c}`,ref:v.setFloating,style:j,children:[s.lodashExports.isEmpty(x)?void 0:t.jsx(S,{color:m.palette.white,fontWeight:"bold",lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:x}),s.lodashExports.isEmpty(u)?void 0:t.jsx(S,{color:m.palette.gray[100],lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:u}),s.lodashExports.isEmpty(p)?void 0:p]}),document.getElementById("root")??document.body)]})},
|
|
421
|
+
`,Y=({children:e,disabled:n=!1,display:i="inline-block",height:a,icon:r,iconColor:o,iconSize:l,id:c,maxWidth:d,nodeTip:p,place:g="bottom",tip:u="",title:x="",hide:h=u===""&&x===""&&p===void 0,width:b})=>{const m=s.nt(),[w,y]=f.useState(!1),{refs:v,floatingStyles:j,context:k}=s.useFloating({middleware:[s.flip({fallbackAxisSideDirection:"start"}),s.offset({mainAxis:10}),s.shift()],onOpenChange:y,open:w,placement:g,whileElementsMounted:s.autoUpdate}),I=s.useHover(k,{delay:{close:0,open:500},move:!1}),E=s.useFocus(k),C=s.useRole(k,{role:r?"label":"tooltip"}),{getReferenceProps:N,getFloatingProps:L}=s.useInteractions([I,E,C]);return n?t.jsx(f.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(Gn,{...N(),display:i,height:a,id:c,ref:v.setReference,width:b,children:r?t.jsx(T,{clickable:!0,disabled:n,icon:r,iconColor:o,iconSize:l??"xxs",iconType:w?"fa-solid":"fa-light"}):e}),w&&!h&&ie.createPortal(t.jsxs(Yn,{...L(),$maxWidth:d,id:`floating-${c}`,ref:v.setFloating,style:j,children:[s.lodashExports.isEmpty(x)?void 0:t.jsx(S,{color:m.palette.white,fontWeight:"bold",lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:x}),s.lodashExports.isEmpty(u)?void 0:t.jsx(S,{color:m.palette.gray[100],lineSpacing:1.5,size:"sm",textAlign:"start",wordWrap:"break-word",children:u}),s.lodashExports.isEmpty(p)?void 0:p]}),document.getElementById("root")??document.body)]})},M=f.forwardRef(function({borderRadius:n,disabled:i,icon:a,iconColor:r,iconSize:o="xxs",iconTransform:l,iconType:c,id:d,justify:p="center",onClick:g,px:u,py:x,type:h="button",tooltip:b,tooltipPlace:m,value:w,variant:y="primary",...v},j){const k=t.jsx(Un,{$borderRadius:n,$px:u,$py:x,$variant:y,"aria-disabled":i,"aria-label":d,borderRadius:n,disabled:i,id:d,justify:p,onClick:g,ref:j,type:h,value:w,...v,children:t.jsx(T,{clickable:!1,icon:a,iconColor:r,iconSize:o,iconTransform:l,iconType:c})}),E=(h+(y??"")+(d??a)).replace(/ /u,"_");return b===void 0?k:t.jsx(Y,{id:`${E}-tooltip`,place:m,tip:b,children:k})}),qn=f.forwardRef(function({autoHide:n=!1,children:i,closable:a=!1,onTimeOut:r,show:o=!0,time:l=8,variant:c="error",id:d,...p},g){const[u,x]=f.useState(o),h=f.useCallback(()=>{x(!1)},[]);return f.useEffect(()=>{const b=setTimeout(()=>{r==null||r(!0),n&&h()},l*1e3);return()=>{clearTimeout(b)}},[n,h,l,r]),f.useEffect(()=>{x(o)},[o,x]),t.jsx($,{display:u?"block":"none",ref:g,role:"alert",...p,children:t.jsxs(_n,{$variant:c,id:d,children:[t.jsx(T,{clickable:!1,icon:Mn(c),iconSize:"xs",iconType:"fa-light"}),t.jsx(On,{children:i}),a?t.jsx(M,{height:"fit-content",icon:"close",iconSize:"xs",iconType:"fa-light",onClick:h,px:.125,py:.125,variant:"ghost"}):void 0]})})}),et=s.dt.div`
|
|
422
422
|
${({theme:e})=>`
|
|
423
423
|
align-items: center;
|
|
424
424
|
background-color: ${e.palette.gray[200]};
|
|
@@ -636,7 +636,7 @@
|
|
|
636
636
|
${xt}
|
|
637
637
|
`,ei=s.dt(De.Link)`
|
|
638
638
|
${xt}
|
|
639
|
-
`,Q=({children:e,color:n,download:i,href:a,iconPosition:r="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=a.startsWith("https://"),p=t.jsx(T,{icon:i===void 0?"arrow-up-right-from-square":"arrow-down-to-bracket",iconSize:"xxs",iconType:"fa-regular",ml:.25,mr:.25});return d?t.jsxs(Qn,{$color:n,$variant:c,download:i,href:a,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):t.jsxs(ei,{$variant:c,download:i,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:a,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},X=({disabled:e,icon:n,iconColor:i="inherit",iconType:a="fa-light",id:r="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:g="default",tagTitle:u="",tagLabel:x,variant:h="default"})=>{const b=x.length>25&&s.lodashExports.isEmpty(u+o),m=`${x.slice(0,25)}...`;return t.jsxs(se,{className:"gap-0.5",display:c===void 0?"initial":"flex",size:"sm",children:[t.jsxs(Jn,{$fontSize:l,$variant:h,className:g,children:[n&&t.jsx(T,{icon:n,iconColor:i,iconSize:"xxs",iconType:a}),t.jsxs("span",{className:"w-full",children:[t.jsx("strong",{children:u}),t.jsx("span",{children:b?m:x}),t.jsx("strong",{className:"w-full",children:o})]}),p?t.jsx(
|
|
639
|
+
`,Q=({children:e,color:n,download:i,href:a,iconPosition:r="right",onClick:o,target:l,variant:c="lowRelevance"})=>{const d=a.startsWith("https://"),p=t.jsx(T,{icon:i===void 0?"arrow-up-right-from-square":"arrow-down-to-bracket",iconSize:"xxs",iconType:"fa-regular",ml:.25,mr:.25});return d?t.jsxs(Qn,{$color:n,$variant:c,download:i,href:a,onClick:o,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):t.jsxs(ei,{$variant:c,download:i,onClick:o,rel:"nofollow noopener noreferrer",target:l,to:a,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},X=({disabled:e,icon:n,iconColor:i="inherit",iconType:a="fa-light",id:r="close-tag",filterValues:o="",fontSize:l,href:c,linkLabel:d,onClose:p,priority:g="default",tagTitle:u="",tagLabel:x,variant:h="default"})=>{const b=x.length>25&&s.lodashExports.isEmpty(u+o),m=`${x.slice(0,25)}...`;return t.jsxs(se,{className:"gap-0.5",display:c===void 0?"initial":"flex",size:"sm",children:[t.jsxs(Jn,{$fontSize:l,$variant:h,className:g,children:[n&&t.jsx(T,{icon:n,iconColor:i,iconSize:"xxs",iconType:a}),t.jsxs("span",{className:"w-full",children:[t.jsx("strong",{children:u}),t.jsx("span",{children:b?m:x}),t.jsx("strong",{className:"w-full",children:o})]}),p?t.jsx(M,{disabled:e,icon:"xmark",iconSize:"xxs",iconType:"fa-light",id:r,onClick:p,px:.125,py:.125,variant:"ghost"}):void 0]}),c===void 0?void 0:t.jsx(Q,{href:c,children:d})]})},ti=(e,n=!0)=>{const i=window.open(e,n?void 0:"_self","noopener,noreferrer,");s.lodashExports.isObject(i)&&(i.opener=null)},P=f.forwardRef(function({children:n,disabled:i=!1,external:a=!1,fontSize:r,href:o,id:l,icon:c,name:d,onClick:p,showArrow:g=!1,tag:u,type:x="button",tooltip:h,tooltipPlace:b="bottom",underline:m=!1,value:w,variant:y="primary",width:v,...j},k){const I=h!==void 0,E=`${l}-tooltip`,C=f.useCallback(()=>{o&&ti(o,a)},[a,o]),N=t.jsxs(ut,{$size:r,$variant:y,"aria-disabled":i,className:m?"underline":void 0,disabled:i,id:l,name:d,onClick:y==="link"?C:p,ref:k,type:x,value:w,width:v,...I?{"data-tooltip-id":E}:{},...j,children:[c!==void 0&&t.jsx(T,{icon:c,iconSize:"xs",iconType:"fa-light"}),n,(g||y==="link")&&t.jsx(T,{icon:"arrow-right",iconSize:"xs",iconType:"fa-light"}),u===void 0?null:t.jsx(X,{tagLabel:u,variant:"default"})]});return I?t.jsx(Y,{disabled:!I,id:E,place:b,tip:h,width:v,children:N}):N}),ni=f.forwardRef(function({children:n,onClick:i,userName:a,showIcon:r=!1,showUsername:o=!1},l){const c=!!i;return t.jsx($,{id:"navbar-user-profile",ref:l,zIndex:9999,children:t.jsxs($,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[c?t.jsxs(P,{onClick:i,pb:.5,pl:.5,pr:.5,pt:.5,variant:"ghost",children:[t.jsx(et,{children:a[0].toUpperCase()}),o?t.jsx(S,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:a.split(" ")[0]}):void 0,r?t.jsx(T,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}):t.jsxs($,{alignItems:"center",display:"flex",px:.5,py:.5,children:[t.jsx(et,{children:a[0].toUpperCase()}),o?t.jsxs(S,{color:"#1d2939",display:"inline",ml:.5,size:"sm",children:["Hi ",a.split(" ")[0],"!"]}):void 0,r?t.jsx(T,{clickable:!1,icon:"ellipsis-v",iconSize:"xxss",ml:.5}):void 0]}),t.jsx(Kn,{children:n})]})})}),Se=({authorEmail:e,date:n,description:i,descriptionColor:a,id:r,title:o,titleColor:l,textAlign:c,textSpacing:d=0,tooltip:p})=>{const g=s.nt();return t.jsxs($,{width:"100%",children:[typeof o=="string"?t.jsx(S,{color:l??g.palette.gray[800],fontWeight:"bold",mb:d,size:"sm",textAlign:c,wordBreak:"break-word",children:o}):o,t.jsxs($,{alignItems:"start",display:"flex",flexDirection:"column",gap:.25,children:[i&&t.jsx(S,{color:a??g.palette.gray[800],fontWeight:i===void 0?"bold":"regular",size:"sm",textAlign:c,wordBreak:"break-word",children:i}),n&&t.jsx(S,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Date: ${n.split(" ")[0]}`}),e&&t.jsx(S,{color:g.palette.gray[800],fontWeight:"bold",size:"sm",textAlign:c,wordBreak:"break-word",children:`Author: ${e}`}),p&&t.jsx(Y,{icon:"circle-info",id:r,tip:p})]})]})},tt=s.dt($).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
|
|
640
640
|
& img {
|
|
641
641
|
display: block;
|
|
642
642
|
}
|
|
@@ -651,7 +651,7 @@
|
|
|
651
651
|
pointer-events: none;
|
|
652
652
|
${({$opacity:e=0})=>`background-color: rgba(0, 0, 0, ${e});`}
|
|
653
653
|
}
|
|
654
|
-
`,ii=e=>{if(s._.isNil(e))return"";const n=e.split(".");return(n.length>1?s._.last(n):"").toLowerCase()},ri=(e,n)=>s._.isUndefined(n)?!1:s._.includes(e,ii(n)),ft=({alt:e,fileType:n,width:i="100%",opacity:a=0,src:r,height:o="auto",videoViewStatus:l})=>{const[c,d]=f.useState({start:!1,half:!1,end:!1}),p=f.useCallback(g=>{if(!l)return;const u=g.target,x=u.currentTime/u.duration*100;x>5&&x<50?(c.start||l("start"),d({start:!0,half:!1,end:!1})):x>=50&&x<99?(c.half||l("half"),d({start:!0,half:!0,end:!1})):x>=99?(c.end||l("end"),d({start:!0,half:!0,end:!0})):d({start:!1,half:!1,end:!1})},[l,c]);return n==="video"||ri(["webm"],r)?t.jsx(tt,{$opacity:a,children:t.jsx(Q,{href:r,iconPosition:"hidden",children:t.jsxs("video",{controls:!0,muted:!0,onTimeUpdate:p,style:{height:o,width:i},children:[t.jsx("source",{src:r,type:"video/webm"}),r]})})}):t.jsx(tt,{$opacity:a,children:t.jsx("img",{alt:e,src:r,style:{height:o,width:i}})})},ai=({alt:e,authorEmail:n,date:i,description:a,src:r,children:o,isEditing:l,onClick:c,title:d,hideDescription:p=!1,headerType:g="image",showMaximize:u=!0,videoViewStatus:x})=>{const h=s.nt(),[b,m]=f.useState(!1),w=f.useCallback(()=>{m(!0)},[]),y=f.useCallback(()=>{m(!1)},[]);return t.jsxs($,{bgColor:"transparent",border:"1px solid transparent",borderColorHover:"black",borderRadius:h.spacing[.25],display:"flex",flexDirection:"column",gap:1,onHover:w,onLeave:y,padding:[.5,.5,.5,.5],width:"100%",children:[t.jsx($,{cursor:l?"unset":"pointer",display:"inline-flex",justify:"center",onClick:c,position:"relative",width:"100%",children:o===void 0?t.jsxs(f.Fragment,{children:[t.jsx(ft,{alt:e,fileType:g,height:"147px",opacity:b?.3:0,src:r,videoViewStatus:x,width:"100%"}),u?t.jsx($,{bottom:"10px",position:"absolute",right:"10px",children:t.jsx(
|
|
654
|
+
`,ii=e=>{if(s._.isNil(e))return"";const n=e.split(".");return(n.length>1?s._.last(n):"").toLowerCase()},ri=(e,n)=>s._.isUndefined(n)?!1:s._.includes(e,ii(n)),ft=({alt:e,fileType:n,width:i="100%",opacity:a=0,src:r,height:o="auto",videoViewStatus:l})=>{const[c,d]=f.useState({start:!1,half:!1,end:!1}),p=f.useCallback(g=>{if(!l)return;const u=g.target,x=u.currentTime/u.duration*100;x>5&&x<50?(c.start||l("start"),d({start:!0,half:!1,end:!1})):x>=50&&x<99?(c.half||l("half"),d({start:!0,half:!0,end:!1})):x>=99?(c.end||l("end"),d({start:!0,half:!0,end:!0})):d({start:!1,half:!1,end:!1})},[l,c]);return n==="video"||ri(["webm"],r)?t.jsx(tt,{$opacity:a,children:t.jsx(Q,{href:r,iconPosition:"hidden",children:t.jsxs("video",{controls:!0,muted:!0,onTimeUpdate:p,style:{height:o,width:i},children:[t.jsx("source",{src:r,type:"video/webm"}),r]})})}):t.jsx(tt,{$opacity:a,children:t.jsx("img",{alt:e,src:r,style:{height:o,width:i}})})},ai=({alt:e,authorEmail:n,date:i,description:a,src:r,children:o,isEditing:l,onClick:c,title:d,hideDescription:p=!1,headerType:g="image",showMaximize:u=!0,videoViewStatus:x})=>{const h=s.nt(),[b,m]=f.useState(!1),w=f.useCallback(()=>{m(!0)},[]),y=f.useCallback(()=>{m(!1)},[]);return t.jsxs($,{bgColor:"transparent",border:"1px solid transparent",borderColorHover:"black",borderRadius:h.spacing[.25],display:"flex",flexDirection:"column",gap:1,onHover:w,onLeave:y,padding:[.5,.5,.5,.5],width:"100%",children:[t.jsx($,{cursor:l?"unset":"pointer",display:"inline-flex",justify:"center",onClick:c,position:"relative",width:"100%",children:o===void 0?t.jsxs(f.Fragment,{children:[t.jsx(ft,{alt:e,fileType:g,height:"147px",opacity:b?.3:0,src:r,videoViewStatus:x,width:"100%"}),u?t.jsx($,{bottom:"10px",position:"absolute",right:"10px",children:t.jsx(M,{color:"white",icon:"arrows-maximize",iconSize:"xxs",iconType:"fa-light",variant:"secondary"})}):void 0]}):o}),p?null:t.jsx(Se,{authorEmail:n,date:i,description:a,descriptionColor:h.palette.gray[600],id:`${e}-card-header`,title:d})]})},oi=s.dt.div`
|
|
655
655
|
${({theme:e,$align:n="center",$minWidth:i="auto",$minHeight:a="auto"})=>`
|
|
656
656
|
display: flex;
|
|
657
657
|
background-color: ${e.palette.white};
|
|
@@ -863,7 +863,7 @@
|
|
|
863
863
|
}
|
|
864
864
|
}
|
|
865
865
|
`}
|
|
866
|
-
`,ht=({item:e,state:n})=>{const i=s.nt(),a=f.useRef(null),{optionProps:r,isSelected:o,isFocused:l,isDisabled:c}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},n,a),d=[o?"selected":"",l?"focused":"",c?"disabled":""].join(" ");return t.jsxs(ci,{...r,className:d,ref:a,children:[t.jsx(S,{color:i.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),o?t.jsx(T,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0]})},Le=({field:e,disabled:n=!1,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:u,placeholder:x,required:h,tooltip:b,value:m,weight:w})=>{var Qe;const y=s.nt(),v=n?void 0:i,j=(e==null?void 0:e.value)??m,[k,I]=f.useState(((Qe=p.find(D=>D.value===j))==null?void 0:Qe.name)??""),[E,C]=f.useState(j),[N,L]=f.useState(p),[R,A]=f.useState(!1),{contains:
|
|
866
|
+
`,ht=({item:e,state:n})=>{const i=s.nt(),a=f.useRef(null),{optionProps:r,isSelected:o,isFocused:l,isDisabled:c}=s.$293f70390ea03370$export$497855f14858aa34({key:e.key},n,a),d=[o?"selected":"",l?"focused":"",c?"disabled":""].join(" ");return t.jsxs(ci,{...r,className:d,ref:a,children:[t.jsx(S,{color:i.palette.gray[800],size:"sm",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),o?t.jsx(T,{icon:"check",iconSize:"xxs",iconType:"fa-light"}):void 0]})},Le=({field:e,disabled:n=!1,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:u,placeholder:x,required:h,tooltip:b,value:m,weight:w})=>{var Qe;const y=s.nt(),v=n?void 0:i,j=(e==null?void 0:e.value)??m,[k,I]=f.useState(((Qe=p.find(D=>D.value===j))==null?void 0:Qe.name)??""),[E,C]=f.useState(j),[N,L]=f.useState(p),[R,A]=f.useState(!1),{contains:B}=s.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),G=f.useRef(null),J=f.useRef(null),W=f.useRef(null),_=f.useRef(null),H=f.useRef(null),Re=f.useMemo(()=>p.map(D=>B(D.name,k)||R?t.jsx(s.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{children:D.name},D.value):null),[B,k,p,R]),cn=f.useCallback(D=>{I(D),D===""?A(!0):(A(!1),C(V=>{const q=D===""?"":V;return e&&e.onChange(q),u&&u(D),q}),L(p.filter(V=>B(V.name,D))))},[B,p,e,u]),dn=f.useCallback(D=>{var V;I(((V=p.find(q=>q.value===D))==null?void 0:V.name)??""),C(D?String(D):""),e&&e.onChange(D),u&&u(D?String(D):""),L(p)},[p,e,u]),Ze=f.useCallback(D=>{D.key==="Enter"&&D.preventDefault(),A(!1)},[]),pn=f.useCallback(()=>{g&&g(),e&&e.onBlur()},[e,g]),Z=s.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsEmptyCollection:!0,inputValue:k,items:N,menuTrigger:"focus",shouldCloseOnBlur:!0,selectedKey:E,onBlur:pn,onInputChange:cn,onKeyDown:Ze,onKeyUp:()=>{A(!0)},onOpenChange(D,V){A(D&&(V==="manual"||V==="focus")),D&&setTimeout(()=>{var q;return(q=G.current)==null?void 0:q.focus()},50)},onSelectionChange:dn,children:Re}),{buttonProps:gn,inputProps:un,listBoxProps:xn}=s.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:k,buttonRef:J,id:d,inputRef:G,label:l??d,listBoxRef:W,name:d,placeholder:x,popoverRef:H},Z),{listBoxProps:fn}=s.$c132121280ec012d$export$50eacbbf140a3141(xn,Z,W),{buttonProps:hn}=s.$701a24aa0da5b062$export$ea18c227d4417cc3(gn,J);return f.useEffect(()=>{var D;if(c===!1||!j){const V=((D=p.find(q=>q.value===j))==null?void 0:D.name)??"";I(V),C(V)}},[j,p,c]),t.jsxs(O,{error:v,helpLink:a,helpLinkText:r,helpText:o,htmlFor:d,label:l,required:h,tooltip:b,weight:w,children:[t.jsxs(ee,{className:`${n?"disabled":""} ${v?"error":""}`,ref:_,children:[t.jsx("input",{...un,"aria-invalid":v?"true":"false","aria-label":d,disabled:n,onKeyDown:Ze,ref:G}),v?t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:y.palette.error[500],iconSize:"xs"}):void 0,t.jsx(M,{...hn,className:"action",disabled:n,icon:Z.isOpen&&!n?"chevron-up":"chevron-down",iconColor:y.palette.gray[400],iconSize:"xxs",iconType:"fa-light",px:.125,py:.125,ref:J,type:"button",variant:"ghost"})]}),Z.isOpen&&Z.collection.size>0&&!n?t.jsx(ye,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:H,state:Z,triggerRef:_,children:t.jsx(li,{...fn,ref:W,children:[...Z.collection].map(D=>t.jsx(ht,{item:D,state:Z},D.key))})}):null]})},bt=({control:e,disabled:n=!1,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,loadingItems:c,name:d,items:p,onBlur:g,onChange:u,placeholder:x,required:h,tooltip:b,value:m,weight:w})=>e?t.jsx(s.Controller,{control:e,name:d,render:({field:y,fieldState:v})=>{var j;return t.jsx(Le,{disabled:n,error:(j=v.error)==null?void 0:j.message,field:y,helpLink:a,helpLinkText:r,helpText:o,items:p,label:l,loadingItems:c,name:d,onBlur:g,onChange:u,placeholder:x,required:h,tooltip:b,value:m,weight:w})},rules:{required:h}}):t.jsx(Le,{disabled:n,error:i,helpLink:a,helpLinkText:r,helpText:o,items:p,label:l,loadingItems:c,name:d,onBlur:g,onChange:u,placeholder:x,required:h,tooltip:b,value:m,weight:w}),di=s.dt.div`
|
|
867
867
|
${({theme:e})=>`
|
|
868
868
|
align-items: center;
|
|
869
869
|
color: ${e.palette.gray[800]};
|
|
@@ -997,7 +997,7 @@
|
|
|
997
997
|
`}
|
|
998
998
|
`,yt=({state:e,date:n})=>{const i=f.useRef(null),a=s.$14e0f24ef4ac5c92$export$629b0a497aa65267(n,s.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),{cellProps:r,buttonProps:o,isSelected:l,isDisabled:c,formattedDate:d}=s.$36a0ac60f04457c5$export$136073280381448e({date:n},e,i),p="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.start):l,g="highlightedRange"in e&&!s.lodashExports.isNull(e.highlightedRange)?s.$14e0f24ef4ac5c92$export$ea39ec197993aef0(n,e.highlightedRange.end):l,u=l&&!c&&!(p||g)?"range":"";return t.jsx(ui,{id:u,...r,children:t.jsxs("div",{...o,className:`cell ${p||g?"selected":""}
|
|
999
999
|
${c?"disabled":""} ${a?"today":""}
|
|
1000
|
-
${!e.isFocused&&!a?"focused":""} ${u}`,ref:i,children:[d,a?t.jsx(xi,{children:t.jsx(T,{clickable:!1,icon:"circle",iconSize:"xxs"})}):void 0]})})},ze=({state:e,...n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{weekDays:a}=s.$e3031d1f8c9d64eb$export$cb95147730a423f5(n,e),r=s.$14e0f24ef4ac5c92$export$ccc1b2479e7dd654(e.visibleRange.start,i);return t.jsxs("table",{children:[t.jsx("thead",{children:t.jsx(nt,{children:a.map((o,l)=>{const c=`key_${l}`;return t.jsx(gi,{children:o},c)})})}),t.jsx("tbody",{children:[...new Array(r).keys()].map(o=>t.jsx(nt,{children:e.getDatesInWeek(o).map((l,c)=>{const d=`key_${c}`;return l?t.jsx(yt,{date:l,state:e},d):t.jsx("td",{},d)})},o))})]})},fi=s.dt(
|
|
1000
|
+
${!e.isFocused&&!a?"focused":""} ${u}`,ref:i,children:[d,a?t.jsx(xi,{children:t.jsx(T,{clickable:!1,icon:"circle",iconSize:"xxs"})}):void 0]})})},ze=({state:e,...n})=>{const{locale:i}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),{weekDays:a}=s.$e3031d1f8c9d64eb$export$cb95147730a423f5(n,e),r=s.$14e0f24ef4ac5c92$export$ccc1b2479e7dd654(e.visibleRange.start,i);return t.jsxs("table",{children:[t.jsx("thead",{children:t.jsx(nt,{children:a.map((o,l)=>{const c=`key_${l}`;return t.jsx(gi,{children:o},c)})})}),t.jsx("tbody",{children:[...new Array(r).keys()].map(o=>t.jsx(nt,{children:e.getDatesInWeek(o).map((l,c)=>{const d=`key_${c}`;return l?t.jsx(yt,{date:l,state:e},d):t.jsx("td",{},d)})},o))})]})},fi=s.dt(Oe)`
|
|
1001
1001
|
align-items: center;
|
|
1002
1002
|
background-color: inherit;
|
|
1003
1003
|
border-color: inherit;
|
|
@@ -1121,9 +1121,9 @@
|
|
|
1121
1121
|
gap: ${({theme:e})=>e.spacing[.5]};
|
|
1122
1122
|
justify-content: flex-end;
|
|
1123
1123
|
flex: 1 0 0;
|
|
1124
|
-
`,zt=({handleTimeChange:e,onClose:n,props:i,timeState:a})=>{const r=s.nt(),{locale:o}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:c,nextButtonProps:d,title:p}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:d,prevButtonProps:c,state:l,title:p}),t.jsx(ze,{state:l}),t.jsxs(vi,{children:[t.jsx(S,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(ji,{children:t.jsx(jt,{hourCycle:12,label:"time-field",onChange:e,value:a.timeValue})})]}),t.jsx(Ye,{children:t.jsx(P,{onClick:n,variant:"ghost",children:"Cancel"})})]})},ki=e=>{const{disabled:n=!1,error:i,required:a,label:r,name:o,tooltip:l,register:c,setValue:d,watch:p}=e,g=p==null?void 0:p(o),u=f.useRef(null),x=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:n,isRequired:a,shouldCloseOnSelect:!1,value:s._.isNil(g)||s._.isEmpty(g)||g==="-"||s.dayjs(g,"YYYY/MM/DD hh:mm A").isValid()===!1?null:s.$fae977aafc393c5c$export$588937bcd60ade55(s.dayjs(g,"YYYY/MM/DD hh:mm A").format("YYYY-MM-DDTHH:mm:ss"))}),{close:h}=x,{groupProps:b,fieldProps:m,buttonProps:w,dialogProps:y,calendarProps:v}=s.$6057a3d2a53a12fd$export$42df105a73306d51(e,x,u),j=f.useCallback(I=>{if(v.onChange&&v.onChange(I),x.timeValue){const E=ot(I,x.timeValue);d==null||d(o,E,{shouldDirty:!0})}else x.setDateValue(I)},[v,o,d,x]),k=f.useCallback(I=>{if(I){x.setTimeValue(I);const E=x.dateValue;if(E){const C=ot(E,I);d==null||d(o,C,{shouldDirty:!0})}}},[x,d,o]);return t.jsxs(O,{error:i,htmlFor:o,label:r,required:a,tooltip:l,children:[t.jsx(le,{buttonProps:w,datePickerRef:u,disabled:n,error:i,fieldProps:m,granularity:"minute",groupProps:b,name:o,register:c,setValue:d,value:g}),x.isOpen&&!n?t.jsx(ye,{offset:8,placement:"bottom start",state:x,triggerRef:u,children:t.jsx(Te,{...y,children:t.jsx(zt,{handleTimeChange:k,onClose:h,props:{...v,onChange:j},timeState:x})})}):null]})},Ci=({children:e,currentValue:n,externalLink:i,isEditing:a,label:r,name:o,tooltip:l})=>{if(a)return t.jsx("div",{children:e});const c=s.lodashExports.isNil(n)?"":n,d=String(i??c);return t.jsxs($,{children:[t.jsx(Ge,{htmlFor:o,label:r,tooltip:l,weight:"bold"}),d.startsWith("https://")?t.jsx(Q,{href:d,children:c}):t.jsx(S,{size:"md",children:c})]})},Fe=({disabled:e=!1,hasIcon:n=!1,helpLink:i,helpLinkText:a,helpText:r,error:o,id:l,indexArray:c=0,isValid:d,isTouched:p,label:g,linkPosition:u,name:x,maskValue:h=!1,onPaste:b,placeholder:m,removeItemArray:w,register:y,suggestions:v,tooltip:j,type:k="text",weight:I,...E})=>{const{required:C,onBlur:N,onChange:L}=E,R=s.nt(),A=e?void 0:o,[
|
|
1124
|
+
`,zt=({handleTimeChange:e,onClose:n,props:i,timeState:a})=>{const r=s.nt(),{locale:o}=s.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=s.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:s.$64244302c3013299$export$dd0bbc9b26defe37,locale:o}),{prevButtonProps:c,nextButtonProps:d,title:p}=s.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(Ie,{nextButtonProps:d,prevButtonProps:c,state:l,title:p}),t.jsx(ze,{state:l}),t.jsxs(vi,{children:[t.jsx(S,{color:r.palette.gray[800],fontWeight:"bold",size:"sm",children:"Time"}),t.jsx(ji,{children:t.jsx(jt,{hourCycle:12,label:"time-field",onChange:e,value:a.timeValue})})]}),t.jsx(Ye,{children:t.jsx(P,{onClick:n,variant:"ghost",children:"Cancel"})})]})},ki=e=>{const{disabled:n=!1,error:i,required:a,label:r,name:o,tooltip:l,register:c,setValue:d,watch:p}=e,g=p==null?void 0:p(o),u=f.useRef(null),x=s.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:n,isRequired:a,shouldCloseOnSelect:!1,value:s._.isNil(g)||s._.isEmpty(g)||g==="-"||s.dayjs(g,"YYYY/MM/DD hh:mm A").isValid()===!1?null:s.$fae977aafc393c5c$export$588937bcd60ade55(s.dayjs(g,"YYYY/MM/DD hh:mm A").format("YYYY-MM-DDTHH:mm:ss"))}),{close:h}=x,{groupProps:b,fieldProps:m,buttonProps:w,dialogProps:y,calendarProps:v}=s.$6057a3d2a53a12fd$export$42df105a73306d51(e,x,u),j=f.useCallback(I=>{if(v.onChange&&v.onChange(I),x.timeValue){const E=ot(I,x.timeValue);d==null||d(o,E,{shouldDirty:!0})}else x.setDateValue(I)},[v,o,d,x]),k=f.useCallback(I=>{if(I){x.setTimeValue(I);const E=x.dateValue;if(E){const C=ot(E,I);d==null||d(o,C,{shouldDirty:!0})}}},[x,d,o]);return t.jsxs(O,{error:i,htmlFor:o,label:r,required:a,tooltip:l,children:[t.jsx(le,{buttonProps:w,datePickerRef:u,disabled:n,error:i,fieldProps:m,granularity:"minute",groupProps:b,name:o,register:c,setValue:d,value:g}),x.isOpen&&!n?t.jsx(ye,{offset:8,placement:"bottom start",state:x,triggerRef:u,children:t.jsx(Te,{...y,children:t.jsx(zt,{handleTimeChange:k,onClose:h,props:{...v,onChange:j},timeState:x})})}):null]})},Ci=({children:e,currentValue:n,externalLink:i,isEditing:a,label:r,name:o,tooltip:l})=>{if(a)return t.jsx("div",{children:e});const c=s.lodashExports.isNil(n)?"":n,d=String(i??c);return t.jsxs($,{children:[t.jsx(Ge,{htmlFor:o,label:r,tooltip:l,weight:"bold"}),d.startsWith("https://")?t.jsx(Q,{href:d,children:c}):t.jsx(S,{size:"md",children:c})]})},Fe=({disabled:e=!1,hasIcon:n=!1,helpLink:i,helpLinkText:a,helpText:r,error:o,id:l,indexArray:c=0,isValid:d,isTouched:p,label:g,linkPosition:u,name:x,maskValue:h=!1,onPaste:b,placeholder:m,removeItemArray:w,register:y,suggestions:v,tooltip:j,type:k="text",weight:I,...E})=>{const{required:C,onBlur:N,onChange:L}=E,R=s.nt(),A=e?void 0:o,[B,G]=f.useState(""),J=f.useCallback(H=>{G(H.target.value),L==null||L(H)},[L]),W=d&&p&&!e&&B.trim()!=="",_=f.useCallback(H=>{H.key==="Enter"&&H.preventDefault()},[]);return t.jsxs(O,{error:A,helpLink:i,helpLinkText:a,helpText:r,htmlFor:x,label:g,linkPosition:u,required:C,tooltip:j,weight:I,children:[t.jsxs(ee,{className:`
|
|
1125
1125
|
${e?"disabled":""} ${A?"error":""} ${W?"success":""}
|
|
1126
|
-
`,children:[n?t.jsx(T,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":A?"true":"false","aria-label":x,"aria-required":C,autoComplete:"off",className:h?"sr-block":"","data-testid":`${x}-input`,disabled:e,id:x,list:v?`list_${x}`:void 0,onKeyDown:
|
|
1126
|
+
`,children:[n?t.jsx(T,{icon:"user",iconSize:"sm",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":A?"true":"false","aria-label":x,"aria-required":C,autoComplete:"off",className:h?"sr-block":"","data-testid":`${x}-input`,disabled:e,id:x,list:v?`list_${x}`:void 0,onKeyDown:_,onPaste:b,placeholder:m,type:k,...y?y(x,{required:C,onBlur:N,onChange:J}):{...E,onChange:J}}),A?t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:R.palette.error[500],iconSize:"xs"}):void 0,W?t.jsx(T,{icon:"check-circle",iconClass:"success-icon",iconColor:R.palette.success[500],iconSize:"xs"}):void 0,l==="array"&&c>0?t.jsx(M,{color:R.palette.gray[400],icon:"trash",iconSize:"xxs",iconType:"fa-light",onClick:w?w(c):void 0,variant:"ghost"}):void 0]}),v?t.jsx("datalist",{id:`list_${x}`,children:v.map(H=>t.jsx("option",{value:H},H))}):void 0]})},Si=s.dt.div.attrs({className:"flex flex-wrap justify-center pv3 w-100"})``,zi=s.dt.div.attrs({className:"flex flex-wrap items-center justify-start mb2"})`
|
|
1127
1127
|
gap: 12px;
|
|
1128
1128
|
`,Ii=s.dt.div.attrs({className:"flex flex-wrap items-center justify-end mb2"})`
|
|
1129
1129
|
gap: 8px;
|
|
@@ -1190,13 +1190,13 @@
|
|
|
1190
1190
|
position: absolute;
|
|
1191
1191
|
visibility: hidden;
|
|
1192
1192
|
width: 0;
|
|
1193
|
-
`,Tt=(e,n,i)=>{const a=new Event(e);return Object.defineProperty(a,"target",{value:{name:n,value:i}}),a},Pi=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Ai=({accept:e,disabled:n=!1,error:i,label:a,helpLink:r,helpText:o,id:l,multiple:c,name:d,onChange:p,required:g,register:u,setValue:x,tooltip:h,watch:b,weight:m})=>{const w=s.nt(),y=n?void 0:i,v=f.useRef(null),j=u==null?void 0:u(d,{required:g}),k=b==null?void 0:b(d),I=Pi(k),E=f.useCallback(()=>{const L=Tt("change",d,void 0);x&&x(d,void 0),j&&j.onChange(L)},[j,d,x]),C=f.useCallback(L=>{const{files:R}=L.currentTarget;R&&R.length>0&&(p==null||p(L),x&&x(d,R),j&&j.onChange(L))},[j,d,p,x]),N=f.useCallback(L=>{n?L.preventDefault():v.current&&v.current.click()},[n]);return t.jsxs(O,{error:y,helpLink:r,helpText:o,htmlFor:l??d,label:a,required:g,tooltip:h,weight:m,children:[t.jsxs(ee,{className:`${n?"disabled":""} ${y?"error":""}`,children:[t.jsx(Di,{$size:"xs",children:I}),t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[s.lodashExports.isEmpty(I)?void 0:t.jsx(
|
|
1193
|
+
`,Tt=(e,n,i)=>{const a=new Event(e);return Object.defineProperty(a,"target",{value:{name:n,value:i}}),a},Pi=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Ai=({accept:e,disabled:n=!1,error:i,label:a,helpLink:r,helpText:o,id:l,multiple:c,name:d,onChange:p,required:g,register:u,setValue:x,tooltip:h,watch:b,weight:m})=>{const w=s.nt(),y=n?void 0:i,v=f.useRef(null),j=u==null?void 0:u(d,{required:g}),k=b==null?void 0:b(d),I=Pi(k),E=f.useCallback(()=>{const L=Tt("change",d,void 0);x&&x(d,void 0),j&&j.onChange(L)},[j,d,x]),C=f.useCallback(L=>{const{files:R}=L.currentTarget;R&&R.length>0&&(p==null||p(L),x&&x(d,R),j&&j.onChange(L))},[j,d,p,x]),N=f.useCallback(L=>{n?L.preventDefault():v.current&&v.current.click()},[n]);return t.jsxs(O,{error:y,helpLink:r,helpText:o,htmlFor:l??d,label:a,required:g,tooltip:h,weight:m,children:[t.jsxs(ee,{className:`${n?"disabled":""} ${y?"error":""}`,children:[t.jsx(Di,{$size:"xs",children:I}),t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[s.lodashExports.isEmpty(I)?void 0:t.jsx(M,{color:w.palette.gray[400],height:"20px",icon:"xmark",iconSize:"lg",iconType:"fa-light",onClick:E,variant:"ghost",width:"20px"}),y&&t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:w.palette.error[500],iconSize:"xs"}),t.jsxs(P,{border:n?`1px solid ${w.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:n,height:"40px",onClick:N,variant:"primary",width:"96px",children:[t.jsx(T,{icon:"search",iconSize:"sm",mr:.5}),"Add file"]})]})]}),t.jsx(Li,{...j,accept:e,"aria-label":d,"data-testid":d,disabled:n,id:l??d,multiple:c,name:d,onChange:C,ref:v,type:"file"})]})},Wi=s.dt.input`
|
|
1194
1194
|
border: none;
|
|
1195
1195
|
background: transparent;
|
|
1196
1196
|
min-width: 15rem;
|
|
1197
1197
|
padding: 0;
|
|
1198
1198
|
flex: 1;
|
|
1199
|
-
`,We=({disabled:e=!1,error:n,field:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:x,value:h,weight:b})=>{const m=s.nt(),w=e?void 0:n,[y,v]=f.useState(""),j=d?h:i==null?void 0:i.value,k=f.useMemo(()=>j&&typeof j=="string"?j.split(",").filter(Boolean):[],[j]),I=f.useCallback(R=>{const
|
|
1199
|
+
`,We=({disabled:e=!1,error:n,field:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:x,value:h,weight:b})=>{const m=s.nt(),w=e?void 0:n,[y,v]=f.useState(""),j=d?h:i==null?void 0:i.value,k=f.useMemo(()=>j&&typeof j=="string"?j.split(",").filter(Boolean):[],[j]),I=f.useCallback(R=>{const B=[...new Set(R.filter(Boolean))].join(","),G=Tt("change",c,B);i&&i.onChange(G),d&&d(G)},[i,c,d]),E=f.useCallback(R=>{v(R.target.value)},[]),C=f.useCallback(R=>{const A=y.trim();A.length&&!k.includes(A)&&(R.preventDefault(),I([...k,A]),v("")),i&&i.onBlur()},[y,i,I,k]),N=f.useCallback(R=>{const A=y.trim();R.key==="Enter"&&A.length===0&&R.preventDefault(),["Enter",","].includes(R.key)&&A.length>0&&!k.includes(A)?(R.preventDefault(),I([...k,A]),v("")):R.key==="Backspace"&&!A.length&&k.length&&(R.preventDefault(),p==null||p(k[k.length-1]),I(k.slice(0,-1)))},[y,p,I,k]),L=f.useCallback(R=>()=>{p==null||p(R),I(k.filter(A=>A!==R))},[p,I,k]);return t.jsx(O,{error:w,helpLink:a,helpLinkText:r,helpText:o,htmlFor:c,label:l,required:u,tooltip:x,weight:b,children:t.jsxs(ee,{$overflowX:"auto",className:`${e?"disabled":""} ${w?"error":""}`,children:[k.map(R=>t.jsx(X,{disabled:e,onClose:L(R),tagLabel:R},R)),t.jsx(Wi,{"aria-hidden":!1,"aria-invalid":w?"true":"false","aria-label":c,"aria-required":u,autoComplete:"off",id:c,onBlur:C,onChange:E,onKeyDown:N,placeholder:k.length===0?g:void 0,ref:i==null?void 0:i.ref,type:"text",value:y}),w?t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:m.palette.error[500],iconSize:"xs"}):void 0]})})},Bi=({disabled:e=!1,control:n,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c="input-tag",onChange:d,onRemove:p,placeholder:g,required:u,tooltip:x,value:h,weight:b})=>n?t.jsx(s.Controller,{control:n,name:c,render:({field:m})=>t.jsx(We,{disabled:e,error:i,field:m,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c,onRemove:p,placeholder:g,required:u,tooltip:x,weight:b}),rules:{required:u}}):t.jsx(We,{disabled:e,error:i,helpLink:a,helpLinkText:r,helpText:o,label:l,name:c,onChange:d,onRemove:p,placeholder:g,required:u,tooltip:x,value:h,weight:b}),Be=f.forwardRef(function({disabled:n,icon:i,margin:a,onClick:r,...o},l){return t.jsx(fi,{$margin:a,"aria-label":i,className:"action-btn",disabled:n,onClick:r,ref:l,type:"button",...o,children:t.jsx(T,{icon:i,iconClass:"action",iconSize:"xs",iconType:"fa-light"})})}),Ce=({error:e,decimalPlaces:n=0,disabled:i=!1,id:a,maxLength:r,max:o=1/0,min:l=0,name:c,onChange:d,placeholder:p,register:g,required:u,setValue:x,value:h})=>{const b=s.nt(),m=i?void 0:e,w=n<0?0:n,[y,v]=f.useState(h?s._.toNumber(h):0),j=f.useCallback(()=>{const C=(y-10**-w).toFixed(w),N=Math.max(Number(l),Number(C));x&&x(c,N,{shouldDirty:!0}),v(N)},[w,y,l,c,x]),k=f.useCallback(()=>{const C=(y+10**-w).toFixed(w),N=Math.min(Number(o),Number(C)>Number(l)?Number(C):Number(l));x&&x(c,N,{shouldDirty:!0}),v(N)},[w,y,o,l,c,x]),I=f.useCallback(C=>{const{value:N}=C.target,L=/\d+/u.test(N)&&!s._.isEmpty(N);x&&x(c,L?N:void 0),d&&d(C),v(Number(N))},[c,d,x]),E=f.useCallback(C=>{C.key==="Enter"&&C.preventDefault()},[]);return t.jsxs(ee,{className:`${i?"disabled":""} ${m?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":m?"true":"false","aria-label":c,"aria-required":u,autoComplete:"off",disabled:i,id:a??c,max:o,min:l,onKeyDown:E,placeholder:p,required:u,step:10**-w,type:"number",...g==null?void 0:g(c,{maxLength:r,max:o,min:l,onChange:I,value:h,valueAsNumber:!0})}),m&&t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:b.palette.error[500],iconSize:"xs"}),t.jsx(Be,{borderLeft:"inherit",borderRight:"inherit",disabled:i,icon:"minus",margin:"0 -0.625rem 0 0",onClick:j,px:.75,py:.75}),t.jsx(Be,{borderRadius:`0 ${b.spacing[.5]} ${b.spacing[.5]} 0`,disabled:i,icon:"plus",onClick:k,px:.75,py:.75})]})},Ft=({decimalPlaces:e,disabled:n=!1,error:i,helpLink:a,helpText:r,id:o,label:l,linkPosition:c,maxLength:d,max:p,min:g,name:u,onChange:x,placeholder:h,register:b,required:m,setValue:w,tooltip:y,value:v,watch:j,weight:k})=>t.jsx(O,{error:n?void 0:i,helpLink:a,helpText:r,htmlFor:u,label:l,linkPosition:c,maxLength:d,required:m,tooltip:y,weight:k,children:t.jsx(Ce,{decimalPlaces:e,disabled:n,error:i,id:o,max:p,maxLength:d,min:g,name:u,onChange:x,placeholder:h,register:b,required:m,setValue:w,value:x?v:j==null?void 0:j(u)})}),Nt=({disabled:e=!1,error:n,name:i,label:a,propsMax:r,propsMin:o,required:l,tooltip:c,variant:d="default"})=>{const p=`${i}Max`,g=`${i}Min`;return t.jsx(O,{error:n,htmlFor:i,label:a,required:l,tooltip:c,children:t.jsxs($,{display:"flex",flexDirection:d==="filters"?"column":"row",gap:.25,width:"100%",children:[t.jsx(Ce,{...o,disabled:e,error:n,name:o.name??g}),t.jsx(Ce,{...r,disabled:e,error:n,name:r.name??p})]})})},Mi=s.dt.div`
|
|
1200
1200
|
${({theme:e})=>`
|
|
1201
1201
|
align-items: flex-start;
|
|
1202
1202
|
align-self: stretch;
|
|
@@ -1252,7 +1252,7 @@
|
|
|
1252
1252
|
cursor: not-allowed;
|
|
1253
1253
|
}
|
|
1254
1254
|
`}
|
|
1255
|
-
`,
|
|
1255
|
+
`,_i=s.dt.ul`
|
|
1256
1256
|
${({theme:e})=>`
|
|
1257
1257
|
align-items: flex-start;
|
|
1258
1258
|
box-shadow: ${e.shadows.md};
|
|
@@ -1266,7 +1266,7 @@
|
|
|
1266
1266
|
scrollbar-width: thin;
|
|
1267
1267
|
width: max-content;
|
|
1268
1268
|
`}
|
|
1269
|
-
`,
|
|
1269
|
+
`,Oi=s.dt.li`
|
|
1270
1270
|
${({theme:e})=>`
|
|
1271
1271
|
align-items: center;
|
|
1272
1272
|
background: ${e.palette.white};
|
|
@@ -1290,7 +1290,7 @@
|
|
|
1290
1290
|
overflow: hidden;
|
|
1291
1291
|
text-overflow: ellipsis;
|
|
1292
1292
|
white-space: nowrap;
|
|
1293
|
-
`,me=(e,n,i=!1)=>{f.useEffect(()=>{var r;const a=o=>{e&&!e.contains(o.target)&&n()};return i?(document.addEventListener("mousedown",a,!0),()=>{document.removeEventListener("mousedown",a,!0)}):((r=document.getElementById("root"))==null||r.addEventListener("mousedown",a,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("mousedown",a,!0)})},[i,e,n])},Ui=({disabled:e,error:n,label:i,name:a,placeholder:r,required:o,register:l,tooltip:c,value:d,watch:p,weight:g})=>{const u=s.nt(),x=f.useRef(null),h=e?void 0:n,b=(p==null?void 0:p(a))??d,[m,w]=f.useState(!1),[y,v]=f.useState(""),{refs:j,floatingStyles:k}=s.useFloating$1({placement:"bottom-start",whileElementsMounted:s.autoUpdate}),{inputRef:I,inputValue:E,handlePhoneValueChange:C,country:N,setCountry:L}=s.ee({countries:s.R,defaultCountry:"co",forceDialCode:!0,value:b?String(b):""}),R=f.useCallback(W=>{W.key==="Enter"&&W.preventDefault()},[]),A=f.useCallback(W=>{W.preventDefault(),w(
|
|
1293
|
+
`,me=(e,n,i=!1)=>{f.useEffect(()=>{var r;const a=o=>{e&&!e.contains(o.target)&&n()};return i?(document.addEventListener("mousedown",a,!0),()=>{document.removeEventListener("mousedown",a,!0)}):((r=document.getElementById("root"))==null||r.addEventListener("mousedown",a,!0),()=>{var o;(o=document.getElementById("root"))==null||o.removeEventListener("mousedown",a,!0)})},[i,e,n])},Ui=({disabled:e,error:n,label:i,name:a,placeholder:r,required:o,register:l,tooltip:c,value:d,watch:p,weight:g})=>{const u=s.nt(),x=f.useRef(null),h=e?void 0:n,b=(p==null?void 0:p(a))??d,[m,w]=f.useState(!1),[y,v]=f.useState(""),{refs:j,floatingStyles:k}=s.useFloating$1({placement:"bottom-start",whileElementsMounted:s.autoUpdate}),{inputRef:I,inputValue:E,handlePhoneValueChange:C,country:N,setCountry:L}=s.ee({countries:s.R,defaultCountry:"co",forceDialCode:!0,value:b?String(b):""}),R=f.useCallback(W=>{W.key==="Enter"&&W.preventDefault()},[]),A=f.useCallback(W=>{W.preventDefault(),w(_=>!_),m||v("")},[m]),B=f.useCallback(W=>()=>{L(W),w(!1),v("")},[L,w]),G=f.useCallback(W=>{W.key.length===1?v(_=>_+W.key):W.key==="Backspace"&&v(_=>_.slice(0,-1))},[]),J=s.R.filter(W=>{const{name:_}=s.M(W);return _.toLowerCase().includes(y.toLowerCase())});return me(j.floating.current,()=>{w(!1),v("")},!0),t.jsx(O,{error:h,htmlFor:a,label:i,required:o,tooltip:c,weight:g,children:t.jsxs(Mi,{className:`${e?"disabled":""} ${h?"error":""}`,ref:x,children:[t.jsxs(Hi,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:A,onKeyDown:G,ref:j.setReference,children:[t.jsx(s.q,{iso2:N.iso2,size:"16px"}),t.jsx(T,{icon:"angle-down",iconColor:u.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]}),t.jsxs(ee,{className:`${e?"disabled":""} ${h?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":h?"true":"false","aria-label":a,"aria-required":o,autoComplete:"off","data-testid":`${a}-input`,disabled:e,id:a,name:a,onKeyDown:R,placeholder:r,ref:I,type:"tel",value:E,...l==null?void 0:l(a,{required:o,onChange:C})}),h?t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:u.palette.error[500],iconSize:"xs"}):void 0]}),m&&ie.createPortal(t.jsx(_i,{ref:j.setFloating,style:k,children:J.map(W=>{const{dialCode:_,iso2:H,name:Re}=s.M(W);return t.jsxs(Oi,{onClick:B(H),value:H,children:[t.jsx(s.q,{iso2:H,size:"16px"}),t.jsx(Vi,{children:Re}),t.jsx(S,{color:u.palette.gray[400],size:"sm",sizeSm:"xs",textAlign:"end",children:"+"+_})]},H)})}),document.getElementById("modal-wrapper")??document.getElementById("root")??document.body)]})})},Gi=({disabled:e=!1,error:n,helpLink:i,helpText:a,isTouched:r,isValid:o,label:l,name:c="input-text",id:d,maskValue:p=!1,maxLength:g,placeholder:u,register:x,required:h,rows:b,tooltip:m,watch:w,weight:y,value:v})=>{const j=s.nt(),k=(w==null?void 0:w(c))??v,I=o&&r&&!e,E=e?void 0:n;return t.jsx(O,{error:E,helpLink:i,helpText:a,htmlFor:c,label:l,maxLength:g,required:h,tooltip:m,value:k?String(k):void 0,weight:y,children:t.jsxs(ee,{className:`
|
|
1294
1294
|
${e?"disabled":""} ${E?"error":""} ${I?"success":""}
|
|
1295
1295
|
`,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":E?"true":"false","aria-label":c,"aria-required":h,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:g,placeholder:u,rows:b,value:k,...x==null?void 0:x(c,{required:h})}),E?t.jsx(T,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:j.palette.error[500],iconSize:"xs"}):void 0,I?t.jsx(T,{icon:"check-circle",iconClass:"success-icon",iconColor:j.palette.success[500],iconSize:"xs"}):void 0]})})},Yi=({description:e,disabled:n,id:i,align:a,inputType:r="text",inputNumberProps:o,minHeight:l,minWidth:c,name:d,placeholder:p,tooltip:g,title:u})=>{const x=f.useMemo(()=>{if(r==="text")return t.jsx(Fe,{disabled:n,name:d,placeholder:p});if(r==="date")return t.jsx(kt,{disabled:n,name:d});const{decimalPlaces:h,max:b,min:m}=o??{};return t.jsx(Ft,{decimalPlaces:h,disabled:n,max:b,min:m,name:d,placeholder:p})},[n,o,r,d,p]);return t.jsxs(oi,{$align:a,$minHeight:l,$minWidth:c,children:[t.jsx(Se,{description:e,id:i,title:u,tooltip:g}),x]})},Et=(e,n)=>{const[a,r]=f.useState(0),[o,l]=f.useState(0);return f.useEffect(()=>{o===100&&(()=>{r(d=>d===n-1?0:d+1)})()},[o,n]),f.useEffect(()=>{const c=setInterval(()=>{l(d=>d===100?0:d+1)},e);return()=>{clearInterval(c)}},[e]),{cycle:a,progress:o,setCycle:r,setProgress:l}},Rt=({publicId:e,format:n="webp"})=>{const i=f.useMemo(()=>new s.Cloudinary({cloud:{cloudName:"fluid-attacks"}}),[]);return f.useMemo(()=>i.image(e).format(n),[i,e,n])},Ne=e=>{const[n,i]=f.useState(!1),a=f.useCallback(()=>{i(!0)},[]),r=f.useCallback(()=>{i(!1)},[]),o=f.useCallback(()=>{i(l=>!l)},[]);return{close:r,isOpen:n,name:e,open:a,setIsOpen:i,toggle:o}},qi=({name:e,items:n,columnOrder:i,setColumnOrder:a})=>{const r=f.useMemo(()=>[...n.filter(({locked:g})=>g).map(({locked:g,...u})=>({...u,visible:!0,locked:g})),...n.filter(({locked:g})=>!g)],[n]),[o,l]=f.useState(r),c=f.useCallback(g=>{const u=g.filter(({locked:m})=>!m),h=[...g.filter(({locked:m})=>m),...u],b=h.map(({name:m})=>m);l(m=>[...h,...m.filter(({name:w})=>!b.includes(w))]),a&&a(h.map(({id:m})=>m))},[a]),d=f.useCallback(()=>{const g=o.map(u=>{var h;const x=(i==null?void 0:i.includes(u.id))??!1;return(h=u.toggleVisibility)==null||h.call(u,x),{...u,visible:x}}).toSorted((u,x)=>{const h=(i==null?void 0:i.indexOf(u.id))??0,b=(i==null?void 0:i.indexOf(x.id))??0;return Number(x.visible)!==Number(u.visible)?Number(x.visible)-Number(u.visible):h-b});l(g),a==null||a(i)},[o,i,a]),p=f.useMemo(()=>s.some(o,g=>((i==null?void 0:i.includes(g.id))??!1)!==g.visible),[o,i]);return{setColumns:c,resetToDefault:d,columns:o,...Ne(e),hasChanged:p}},Dt=(e,n)=>f.useMemo(()=>s._.debounce(e,n),[e,n]),Ki=e=>{const[n,i]=f.useState(),a=Dt(r=>{i(r)},(e==null?void 0:e.debounceWait)??300);return[n,a]},Xi=({alt:e="img",height:n="",width:i="",plugins:a=[s.lazyload(),s.placeholder()],publicId:r})=>{const o=Rt({publicId:r});return t.jsx(s.AdvancedImage,{alt:e,cldImg:o,height:n,plugins:a,width:i})},te=f.memo(Xi),Ji=s.dt.label`
|
|
1296
1296
|
${({theme:e})=>`
|
|
@@ -1596,7 +1596,7 @@
|
|
|
1596
1596
|
`,At=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i})=>(f.useEffect(()=>{s.prismExports.highlightAll()},[]),t.jsx(Pt,{"data-private":!0,children:t.jsx("pre",{className:"line-highlight","data-line-offset":s._.isNil(n)||s._.isString(n)?0:n.offset+.7,...i!==void 0?{"data-line":String(Number(i))}:{},children:s._.isNil(n)||s._.isString(n)||s._.isEmpty(n.content)?t.jsx("div",{className:"no-data",children:t.jsx("p",{children:e})}):t.jsx("code",{className:"language-none",children:n.content})})})),pr=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i,variant:a="normal"})=>{const r=s.nt(),[o,l]=f.useState(!1),[c,d]=f.useState(!0),p=f.useCallback(()=>{l(h=>!h)},[l]),g=f.useCallback(()=>{if(s._.isNil(n)||s._.isEmpty(n)||!s._.isString(n))return d(!1),e;const h=n.split(`
|
|
1597
1597
|
`);return h.length>8&&!o?`${[...h].splice(0,7).join(`
|
|
1598
1598
|
`)}
|
|
1599
|
-
${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(async()=>{await navigator.clipboard.writeText(u)},[u]);return a==="location"?t.jsx(At,{noCodeMessage:e,snippet:n,specific:i}):t.jsxs($,{bgColor:r.palette.gray[100],borderRadius:"4px",display:"inline-flex",minWidth:"565px",position:"relative",children:[t.jsx(Pt,{"data-private":!0,children:t.jsx("pre",{children:t.jsx("code",{className:"language-none",children:u})})}),t.jsxs(dr,{children:[t.jsx(
|
|
1599
|
+
${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(async()=>{await navigator.clipboard.writeText(u)},[u]);return a==="location"?t.jsx(At,{noCodeMessage:e,snippet:n,specific:i}):t.jsxs($,{bgColor:r.palette.gray[100],borderRadius:"4px",display:"inline-flex",minWidth:"565px",position:"relative",children:[t.jsx(Pt,{"data-private":!0,children:t.jsx("pre",{children:t.jsx("code",{className:"language-none",children:u})})}),t.jsxs(dr,{children:[t.jsx(M,{height:r.spacing[2.5],icon:"copy",iconColor:r.palette.gray[700],iconSize:"xs",iconType:"fa-light",onClick:x,variant:"ghost",width:r.spacing[2.5]}),c?t.jsxs(P,{onClick:p,variant:"ghost",children:[o?"Show Less":"Show more",t.jsx(T,{icon:o?"chevron-up":"chevron-down",iconColor:r.palette.gray[700],iconSize:"xxs",iconType:"fa-light",ml:.25,onClick:x})]}):!1]})]})},{getVariant:gr}=K(e=>({fixed:`
|
|
1600
1600
|
height: auto;
|
|
1601
1601
|
min-width: 300px;
|
|
1602
1602
|
padding: ${e.spacing[1.25]};
|
|
@@ -1717,7 +1717,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1717
1717
|
margin-right: 0;
|
|
1718
1718
|
`:""}
|
|
1719
1719
|
}
|
|
1720
|
-
`,Bt=({alert:e,modalRef:n,confirmButton:i=void 0,cancelButton:a=void 0})=>{const{close:r}=n,o=f.useCallback(()=>{a!=null&&a.onClick&&a.onClick(),r()},[a,r]),l=f.useCallback(()=>{i!=null&&i.onClick&&i.onClick(),r()},[i,r]);return[i,a].some(d=>!s.lodashExports.isEmpty(d))?t.jsxs($,{display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,t.jsx(hr,{children:t.jsxs("div",{children:[a&&t.jsx(P,{id:a.id,onClick:o,variant:"tertiary",width:"100%",children:a.text}),i&&t.jsx(P,{id:i.id,onClick:l,variant:"primary",width:"100%",children:i.text})]})})]}):null},Mt=({title:e,description:n,modalRef:i,otherActions:a,onClose:r})=>{const o=s.nt(),l=f.useCallback(()=>{r==null||r(),i.close()},[i,r]);return f.useEffect(()=>{const c=d=>{d.key==="Escape"&&l()};return window.addEventListener("keydown",c),()=>{window.removeEventListener("keydown",c)}},[l]),t.jsxs(xr,{children:[t.jsxs(fr,{children:[typeof e=="string"?t.jsx(
|
|
1720
|
+
`,Bt=({alert:e,modalRef:n,confirmButton:i=void 0,cancelButton:a=void 0})=>{const{close:r}=n,o=f.useCallback(()=>{a!=null&&a.onClick&&a.onClick(),r()},[a,r]),l=f.useCallback(()=>{i!=null&&i.onClick&&i.onClick(),r()},[i,r]);return[i,a].some(d=>!s.lodashExports.isEmpty(d))?t.jsxs($,{display:"flex",flexDirection:"column",gap:.625,position:"sticky",px:1.25,py:1.25,children:[e,t.jsx(hr,{children:t.jsxs("div",{children:[a&&t.jsx(P,{id:a.id,onClick:o,variant:"tertiary",width:"100%",children:a.text}),i&&t.jsx(P,{id:i.id,onClick:l,variant:"primary",width:"100%",children:i.text})]})})]}):null},Mt=({title:e,description:n,modalRef:i,otherActions:a,onClose:r})=>{const o=s.nt(),l=f.useCallback(()=>{r==null||r(),i.close()},[i,r]);return f.useEffect(()=>{const c=d=>{d.key==="Escape"&&l()};return window.addEventListener("keydown",c),()=>{window.removeEventListener("keydown",c)}},[l]),t.jsxs(xr,{children:[t.jsxs(fr,{children:[typeof e=="string"?t.jsx(U,{fontWeight:"bold",lineSpacing:1.75,mr:1,size:"sm",wordBreak:"break-word",children:e}):e,t.jsxs("div",{className:"items-center flex gap-3",children:[a,t.jsx(M,{icon:"close",iconColor:o.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:l,px:.25,py:.25,variant:"ghost"})]})]}),n&&s.lodashExports.isString(n)&&!s.lodashExports.isEmpty(n)?t.jsx(S,{mt:.5,size:"sm",children:n}):void 0,n&&!s.lodashExports.isString(n)&&t.jsx(se,{display:"block",mt:.5,size:"sm",children:n})]})},$r=({disabled:e,id:n="modal-confirm",onCancel:i,onConfirm:a="submit",txtCancel:r,txtConfirm:o})=>{const l=a==="submit";return t.jsxs($,{display:"flex",gap:.75,maxWidth:i?"392px":"190px",mt:1.5,children:[i?t.jsx(P,{id:`${n}-cancel`,justify:"center",onClick:i,variant:"tertiary",width:"100%",children:r??"Cancel"}):void 0,t.jsx(P,{disabled:e,id:n,justify:"center",onClick:l?void 0:a,type:l?"submit":"button",variant:"primary",width:"100%",children:o??"Confirm"})]})},yr=s.dt.button`
|
|
1721
1721
|
${({theme:e})=>`
|
|
1722
1722
|
align-items: center;
|
|
1723
1723
|
color: ${e.palette.gray[500]};
|
|
@@ -1809,7 +1809,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1809
1809
|
font-size: 6px;
|
|
1810
1810
|
font-weight: ${({theme:e})=>e.typography.weight.bold};
|
|
1811
1811
|
justify-content: center;
|
|
1812
|
-
`,Ht=f.forwardRef(function({numberIndicator:n,show:i,variant:a="error",...r},o){return t.jsx(jr,{$variant:a,className:i?"flex":"hidden","data-testid":"notification-sign",ref:o,...r,children:n&&t.jsx(kr,{children:n<=9?n:9})})}),
|
|
1812
|
+
`,Ht=f.forwardRef(function({numberIndicator:n,show:i,variant:a="error",...r},o){return t.jsx(jr,{$variant:a,className:i?"flex":"hidden","data-testid":"notification-sign",ref:o,...r,children:n&&t.jsx(kr,{children:n<=9?n:9})})}),_t=({end:e=!1,label:n,id:i,isActive:a=!1,link:r,notificationSign:o,onClick:l,tooltip:c="",variant:d="primary",tag:p})=>{const{pathname:g}=De.useLocation(),u=a||(d==="primary"?g.includes(r):g.endsWith(r));return t.jsx(Y,{display:"flex",id:`${i}-tooltip`,tip:c,children:t.jsxs(vr,{$borderButton:u,$variant:d,children:[t.jsxs(De.NavLink,{end:e,id:i,onClick:l,to:r,children:[n,t.jsx(Ht,{left:o==null?void 0:o.left,numberIndicator:o==null?void 0:o.numberIndicator,show:o==null?void 0:o.show,top:o==null?void 0:o.top,variant:o==null?void 0:o.variant})]}),p===void 0?null:t.jsx(X,{tagLabel:`${p}`,variant:"default"})]})})},Xe=({items:e,borders:n=!0,box:i=!1,variant:a="primary"})=>{const r=s.nt();return t.jsx($,{alignItems:"center",bgColor:r.palette.white,border:i?"1px solid":void 0,borderBottom:n?`1px solid ${r.palette.gray[300]}`:void 0,borderColor:i?r.palette.gray[200]:void 0,borderRadius:i?r.spacing[.25]:void 0,display:"inline-flex",gap:.25,id:"tablist",padding:i?[0,0,0,0]:void 0,pl:n?1.25:void 0,pr:n?1.25:void 0,role:"tablist",width:i?"max-content":"100%",children:e.map(({end:o,id:l,isActive:c,link:d,label:p,notificationSign:g,onClick:u,tag:x,tooltip:h})=>t.jsx(_t,{end:o,id:l,isActive:c,label:p,link:d,notificationSign:g,onClick:u,tag:x,tooltip:h,variant:a},l))})},ne=f.forwardRef(function({color:n=z.palette.gray[100],mt:i=.5,mb:a=.5,width:r,...o},l){return t.jsx($,{as:"hr",borderTop:`1px solid ${n}`,mb:a,mt:i,ref:l,width:r??"100%",...o})}),Cr=s.dt.li`
|
|
1813
1813
|
${({theme:e})=>`
|
|
1814
1814
|
align-items: center;
|
|
1815
1815
|
background-color: ${e.palette.white};
|
|
@@ -1856,7 +1856,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1856
1856
|
background-color: ${e.palette.gray[100]};
|
|
1857
1857
|
}
|
|
1858
1858
|
`}
|
|
1859
|
-
`,
|
|
1859
|
+
`,Ot=s.dt.ul`
|
|
1860
1860
|
${({theme:e})=>`
|
|
1861
1861
|
background-color: ${e.palette.white};
|
|
1862
1862
|
border: 1px solid ${e.palette.gray[200]};
|
|
@@ -1885,7 +1885,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1885
1885
|
&[aria-selected="true"]:not([aria-disabled="true"]) {
|
|
1886
1886
|
background-color: unset;
|
|
1887
1887
|
}
|
|
1888
|
-
`,Vt=({items:e,onReorder:n,title:i,description:a,onClickClose:r})=>{const o=f.useCallback(l=>()=>{r(l)},[r]);return t.jsxs(s.ReorderGroup,{as:"div",axis:"y",layoutScroll:!0,onReorder:n,style:{height:"max-content",padding:"1.25rem 0",width:"45%"},values:e,children:[t.jsxs($,{display:"flex",gap:.25,children:[t.jsx(
|
|
1888
|
+
`,Vt=({items:e,onReorder:n,title:i,description:a,onClickClose:r})=>{const o=f.useCallback(l=>()=>{r(l)},[r]);return t.jsxs(s.ReorderGroup,{as:"div",axis:"y",layoutScroll:!0,onReorder:n,style:{height:"max-content",padding:"1.25rem 0",width:"45%"},values:e,children:[t.jsxs($,{display:"flex",gap:.25,children:[t.jsx(U,{display:"flex",size:"xs",children:i}),t.jsx(X,{priority:"high",tagLabel:String(e.filter(l=>l.visible).length),variant:"error"})]}),t.jsx(S,{size:"sm",children:a}),e.map(l=>l.visible?t.jsx(s.ReorderItem,{as:"div",dragListener:!l.locked,item:l.name,value:l,children:t.jsx(Sr,{disabled:l.locked,icon:"grid-2",label:l.name,onClickIcon:l.locked?void 0:o(l.id),rightIcon:l.locked?"lock":"close",selected:l.visible,value:l.name,children:l.name})},l.name):void 0)]})},zr=s.dt(we)`
|
|
1889
1889
|
padding: 7px 8px;
|
|
1890
1890
|
|
|
1891
1891
|
&[aria-selected="true"] {
|
|
@@ -1957,7 +1957,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1957
1957
|
border-radius: ${e.spacing[.5]};
|
|
1958
1958
|
width: 250px;
|
|
1959
1959
|
`}
|
|
1960
|
-
`,ce=f.forwardRef(function({name:n,smallSearch:i=!1,onClear:a,value:r,...o},l){const c=s.nt(),[d,p]=f.useState(!1),{refs:g,floatingStyles:u}=s.useFloating$1(),x=f.useCallback(()=>{p(m=>!m)},[]),h=f.useCallback(m=>{m.key==="Enter"&&m.preventDefault()},[]);me(g.floating.current,()=>{p(!1)},!0);const b=t.jsxs(Tr,{children:[t.jsx(T,{icon:"magnifying-glass",iconColor:c.palette.gray[700],iconSize:"xs",iconType:"fa-light"}),t.jsx(Ir,{...o,id:n,name:n,onKeyDown:h,ref:l,type:"search",value:r}),!s.lodashExports.isEmpty(r)&&t.jsx(
|
|
1960
|
+
`,ce=f.forwardRef(function({name:n,smallSearch:i=!1,onClear:a,value:r,...o},l){const c=s.nt(),[d,p]=f.useState(!1),{refs:g,floatingStyles:u}=s.useFloating$1(),x=f.useCallback(()=>{p(m=>!m)},[]),h=f.useCallback(m=>{m.key==="Enter"&&m.preventDefault()},[]);me(g.floating.current,()=>{p(!1)},!0);const b=t.jsxs(Tr,{children:[t.jsx(T,{icon:"magnifying-glass",iconColor:c.palette.gray[700],iconSize:"xs",iconType:"fa-light"}),t.jsx(Ir,{...o,id:n,name:n,onKeyDown:h,ref:l,type:"search",value:r}),!s.lodashExports.isEmpty(r)&&t.jsx(M,{icon:"xmark",iconColor:c.palette.gray[300],iconSize:"xs",iconType:"fa-light",onClick:a,px:.25,py:.25,type:"reset",variant:"ghost"})]});return i?t.jsxs(f.Fragment,{children:[t.jsx(M,{border:`1px solid ${c.palette.gray[300]} !important`,icon:"magnifying-glass",iconSize:"xs",iconType:"fa-light",onClick:x,ref:g.setReference,variant:"ghost"}),d?t.jsx(Fr,{ref:g.setFloating,style:u,children:b}):void 0]}):b}),Yt=({columns:e,formId:n,onChangeHandler:i,variant:a})=>{const r=f.useRef(null),[o,l]=f.useState([]),[c,d]=f.useState(""),p=f.useCallback(u=>{const{value:x}=u.target;d(x)},[]),g=f.useCallback(()=>{r.current&&(r.current.reset(),d(""))},[r]);return f.useEffect(()=>{l(e.filter(u=>{var x;return a==="grouped"?u.name.toLowerCase().includes(c.toLowerCase())||((x=u.group)==null?void 0:x.includes(c.toLowerCase())):u.name.toLowerCase().includes(c.toLowerCase())}))},[e,c,a]),a==="grouped"?t.jsxs($,{display:"flex",flexDirection:"column",gap:.625,height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:r,children:t.jsx(ce,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":n,id:n,onReset:g,style:{display:"flex",flexDirection:"column",gap:"0.625rem"},children:Object.entries(Gt(o)).map(([u,x],h)=>{const b=`li-checkbox${u}`;return t.jsx(Ut,{checkboxesName:u,defaultCollapsed:h===0,onChange:i,options:x,title:u},b)})})]}):t.jsxs($,{height:"100%",id:"columns-buttons",py:1.25,width:"55%",children:[t.jsx("form",{id:"search-form",ref:r,children:t.jsx(ce,{name:"search",onChange:p,onClear:g,value:c})}),t.jsx("form",{"data-testid":n,id:n,onReset:g,style:{paddingTop:"0.625rem"},children:o.map(u=>{const x=`li-checkbox-${u.name}`;return t.jsx(zr,{selected:u.visible,value:x,width:"content",children:t.jsx(Ee,{checked:u.visible,disabled:u.locked,label:u.name,name:u.name,onChange:i,value:u.name})},x)})})]})},Nr=({_containerId:e="portals",title:n,modalRef:i,variant:a})=>{const r=s.nt(),o=f.useRef(null),[l,c]=f.useState(void 0),d=f.useCallback(u=>{const{checked:x,value:h}=u.target,b=i.columns.map(m=>{var w;return m.name===h?((w=m.toggleVisibility)==null||w.call(m,x),{...m,visible:x}):m});i.setColumns(b)},[i]),p=f.useCallback(u=>{const x=i.columns.map(h=>{var b;return h.id===u?((b=h.toggleVisibility)==null||b.call(h,!1),{...h,visible:!1}):h});i.setColumns(x)},[i]),g=f.useCallback(()=>{var x;const u=(x=o.current)==null?void 0:x.scrollHeight;l!==u&&c(u)},[l]);return i.isOpen?ie.createPortal(t.jsx(Wt,{"aria-label":i.name,"aria-modal":"true",children:t.jsxs(Ke,{$size:"md",flexDirection:"column",children:[t.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(U,{size:"sm",children:n}),t.jsx(M,{icon:"close",iconColor:r.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"})]}),t.jsx(ne,{mb:0,mt:0}),t.jsxs($,{display:"flex",gap:1.25,onScroll:g,px:1.25,ref:o,scroll:"y",width:"100%",children:[t.jsx(Yt,{columns:i.columns,formId:"columns-visibility",onChangeHandler:d,variant:a}),t.jsx($,{borderLeft:`2px solid ${r.palette.gray[100]}`,height:l?`${l}px`:"auto"}),t.jsx(Vt,{description:"Click and drag to reorder the columns",items:i.columns,onClickClose:p,onReorder:i.setColumns,title:"Reorder columns"})]}),t.jsx(ne,{mb:0,mt:0}),t.jsxs($,{display:"flex",justify:"space-between",px:1.25,py:1.25,children:[t.jsx(P,{disabled:!i.hasChanged,form:"columns-visibility",id:"columns-modal-cancel",justify:"center",onClick:i.resetToDefault,type:"reset",variant:"tertiary",children:"Reset to default"}),t.jsx(P,{id:"columns-modal-submit",justify:"center",onClick:i.close,variant:"primary",children:"Save"})]})]})}),document.getElementById(e)??document.body):t.jsx("div",{})},Er=s.dt(we)`
|
|
1961
1961
|
padding: 8px;
|
|
1962
1962
|
min-height: 36px;
|
|
1963
1963
|
min-width: unset;
|
|
@@ -1974,7 +1974,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
1974
1974
|
svg.fa-check {
|
|
1975
1975
|
border-radius: 2px;
|
|
1976
1976
|
}
|
|
1977
|
-
`,qt=({control:e,option:n,register:i,setValue:a})=>{var r,o,l,c,d;switch(n.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=n.options)==null?void 0:r.map(g=>t.jsx(st,{value:g.value,width:"content",children:t.jsx(Ee,{...i("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(o=n.options)==null?void 0:o.map(g=>t.jsx(st,{value:g.value,width:"content",children:t.jsx(qe,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))});case"select":return t.jsx(bt,{control:e,items:((l=n.options)==null?void 0:l.map(g=>({name:g.label??"",value:g.value})))??[],label:n.label,name:`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`,placeholder:n.placeholder,value:n.value});case"text":const p=`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`;return t.jsx(Fe,{label:n.label,name:p,placeholder:n.placeholder,register:i,value:n.value});case"numberRange":return t.jsx(Nt,{label:n.label,name:String(n.key),propsMax:{placeholder:n.placeholder?`${n.placeholder} Max`:"Max",register:i,name:"maxValue",value:n.maxValue,setValue:a},propsMin:{placeholder:n.placeholder?`${n.placeholder} Min`:"Min",register:i,name:"minValue",value:n.minValue,setValue:a},variant:"filters"});case"dateRange":return t.jsx(St,{label:n.label,name:String(n.key),propsMax:{name:"maxValue",value:(c=n.maxValue)==null?void 0:c.toString()},propsMin:{name:"minValue",value:(d=n.minValue)==null?void 0:d.toString()},register:i,setValue:a,variant:"filters"});default:return t.jsx("div",{})}},Kt=({control:e,items:n,register:i,setValue:a})=>t.jsx(t.Fragment,{children:n.map((r,o)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(qt,{control:e,option:r,register:i,setValue:a}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),Xt=e=>{var c,d,p,g,u;const[n,i]=f.useState([...e]),{control:a,register:r,handleSubmit:o,setValue:l}=s.useForm({defaultValues:{checkbox:e.filter(x=>x.type==="checkboxes").flatMap(x=>{var h;return((h=x.options)==null?void 0:h.filter(b=>b.checked).map(b=>b.value))??[]}),radio:((p=(d=(c=e.find(x=>x.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:x})=>x))==null?void 0:p.value)??"",text:e.filter(x=>["text","select"].includes(x.type)).reduce((x,h)=>({...x,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:g.minValue,maxValue:(u=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:u.maxValue}});return{control:a,items:n,setItems:i,register:r,handleSubmit:o,setValue:l}},Dr=(e,n)=>{var i,a,r,o,l;n("checkbox",e.filter(c=>c.type==="checkboxes").flatMap(c=>{var d;return((d=c.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),n("radio",((r=(a=(i=e.find(c=>c.type==="radioButton"))==null?void 0:i.options)==null?void 0:a.find(({checked:c})=>c))==null?void 0:r.value)??""),n("text",e.filter(c=>["text","select"].includes(c.type)).reduce((c,d)=>({...c,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),n("minValue",(o=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:o.minValue),n("maxValue",(l=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:l.maxValue)},Lr=(e,n)=>e.map(i=>{var a;return i.type==="checkboxes"?{...i,options:(a=i.options)==null?void 0:a.filter(r=>{var o;return((o=r.label)==null?void 0:o.toLowerCase().includes(n.toLowerCase()))??r.value.toLowerCase().includes(n.toLowerCase())})}:i}),Me=({options:e,onSubmit:n,id:i})=>{const{control:a,items:r,setItems:o,register:l,handleSubmit:c,setValue:d}=Xt(e),p=e.some(x=>x.type==="checkboxes"&&x.hideSearch!==!0),g=f.useCallback(x=>{const{value:h}=x.target,b=Lr(e,h);o(b)},[e,o]),u=f.useCallback(x=>{n&&n(x)},[n]);return f.useEffect(()=>{o(e),Dr(e,d)},[e,o,d]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:i,children:[p&&t.jsx(ce,{onChange:g}),t.jsxs("form",{id:i,onSubmit:c(u),children:[t.jsx(Kt,{control:a,items:r,register:l,setValue:d}),t.jsx(P,{mt:1,type:"submit",children:"Apply"})]})]})},Jt=({options:e,variant:n,onApplyFilters:i,setDirection:a,setHandler:r})=>{const o=s.nt(),[l,c]=f.useState(e),[d,p]=f.useState([]),[g,u]=f.useState({}),[x,h]=f.useState(""),b=f.useCallback(y=>()=>{const v=l.find(k=>k.label===y),j=!(v!=null&&v.filterOptions.some(k=>k.type==="dateRange"||k.type==="select"));r==null||r(j??!0),h(y),p((v==null?void 0:v.filterOptions)??[])},[l,r]),m=f.useCallback(y=>{const v=[...y.checkbox,...Object.values(y.text??{}),...y.radio?[y.radio]:[],...y.minValue?[String(y.minValue)]:[],...y.maxValue?[String(y.maxValue)]:[]];u(C=>v.length>0?{...C,[x]:v}:C);const j=C=>{var N,L;return{...C,options:(N=C.options)==null?void 0:N.map(R=>({...R,checked:y.checkbox.includes(R.value)||y.radio===R.value})),value:["text","select"].includes(C.type)?((L=y.text)==null?void 0:L[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`])??C.value:C.value,minValue:["numberRange","dateRange"].includes(C.type)?y.minValue:C.minValue,maxValue:["numberRange","dateRange"].includes(C.type)?y.maxValue:C.maxValue}},k=C=>C.label===x?{...C,filterOptions:C.filterOptions.map(j)}:C,I=l.map(k);c(C=>C.map(k));const E=I.flatMap(({filterOptions:C})=>C);i(E),p([])},[l,i,x]),w=f.useCallback((y,v)=>{const j=`li-filter-option-${y}`;return t.jsxs(Er,{icon:v,onClick:b(y),style:{minWidth:"180px"},value:j,width:"100%",children:[y,g[y]===void 0?void 0:t.jsx(X,{tagLabel:g[y].length.toString()})]},j)},[g,b]);return f.useEffect(()=>{const y=e.reduce((v,{label:j,filterOptions:k})=>{const I=k.flatMap(({value:N,minValue:L,maxValue:R})=>[L,R,N]).filter(Boolean),E=k.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),C=[...I,...E];return C.length===0?v:{...v,[j]:C}},{});u(y),d.length>0&&a&&a("column")},[d,e,a]),n==="grouped"?t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"unset":"360px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(Me,{id:"filters-options",onSubmit:m,options:d}):Object.entries(Gt(e)).map(([y,v])=>t.jsxs($,{children:[t.jsx(S,{color:o.palette.gray[400],mb:.25,size:"sm",children:y}),v.map(({label:j,icon:k="filter-list"})=>w(j,k))]},y))}):t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"unset":"200px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(Me,{id:"filters-options",onSubmit:m,options:d}):e.map(({label:y,icon:v="filter-list"})=>w(y,v))})},Zt=({options:e,onApplyFilters:n,modalRef:i,variant:a})=>{const[r,o]=f.useState("row"),[l,c]=f.useState(!0),d=s.nt(),p=f.useRef(null),g=t.jsx(B,{icon:"close",iconColor:d.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"});return f.useEffect(()=>{const u=x=>{const h=p.current;h&&!h.contains(x.target)&&i.close()};if(l)return document.addEventListener("mousedown",u,!0),()=>{document.removeEventListener("mousedown",u,!0)}},[p,l,i]),t.jsx(Rr,{$bgColor:"transparent","aria-label":i.name,children:t.jsxs(Ke,{$size:"fixed",alignItems:r==="row"?"start":"end",display:"flex",flexDirection:r,gap:.5,id:"filters-list",position:"relative",px:1.25,py:1.25,ref:p,style:{overflow:"hidden",width:"max-content"},children:[r==="column"?g:void 0,t.jsx(Jt,{onApplyFilters:n,options:e,setDirection:o,setHandler:c,variant:a}),r==="row"?g:void 0]})})};function Pr(e){if(e)return e}function Qt(e){if(!e||e.length===0)return;const n=e.filter(a=>a.checked).map(a=>a.label??a.value);return n.length===0?void 0:n.join(", ")}function Ar(e,n,i){const a=i??"",r=s._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),o=s._.isEmpty(n)&&typeof n!="number"||Number.isNaN(n)?void 0:Number(String(n));if(!s._.isUndefined(r)&&!s._.isUndefined(o))return`${r}${a} - ${o}${a}`;if(!s._.isUndefined(r))return`Min ${r}${a}`;if(!s._.isUndefined(o))return`Max ${o}${a}`}function Wr(e,n){if(s.dayjs_minExports.extend(s.localizedFormat),!(s._.isUndefined(e)&&s._.isUndefined(n))){if(e!==""&&n!==""&&!s._.isUndefined(e)&&!s._.isUndefined(n))return`${s.dayjs(e).format("LL")} - ${s.dayjs(n).format("LL")}`;if(e!==""&&!s._.isUndefined(e))return`From ${s.dayjs(e).format("LL")}`;if(n!==""&&!s._.isUndefined(n))return`To ${s.dayjs(n).format("LL")}`}}function Br(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const ae=({filter:e,icon:n="filter-list",label:i,onClose:a,filterValue:r})=>s._.isNil(r)||s._.isEmpty(String(r))?null:t.jsx(X,{filterValues:r,icon:n,id:"remove-filter",onClose:a(e),tagLabel:`${i} `}),Mr=({options:e,onClose:n})=>{const i=e.flatMap(a=>a.filterOptions.map(r=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:u}=r;switch(c){case"numberRange":{const x=Ar(g,u,a.placeholder);return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case"dateRange":{const x=Wr(g==null?void 0:g.toString(),u==null?void 0:u.toString());return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case"radioButton":case"checkboxes":{const x=Qt(p);return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case void 0:case"select":case"text":default:{const x=Pr(d),h=Br(c,a.label,o);return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:h,onClose:n},l)}}})).filter(a=>{if(a===null)return!1;const{filterValue:r}=a.props;return!s._.isNil(r)&&!s._.isEmpty(String(r))});return i.length>0?t.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},Hr=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function a(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function r(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue:u}=c,x=s._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=s._.isEmpty(u)&&typeof u!="number"?void 0:d(String(u));return s._.isUndefined(x)&&s._.isUndefined(h)?!0:(x??-1/0)<=p&&p<=(h??1/0)}function o(l){return n.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return a(l,c);case"numberRange":return r(l,c,Number);case"dateRange":return r(l,c,d=>new Date(d));case"select":case"text":default:return i(l,c)}})}return e.filter(o)},lt=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.flatMap(i=>[i.value,i.maxValue,i.minValue]).filter(Boolean)].length,Or=e=>{var i;const n=((i=e.options)==null?void 0:i.map(a=>({...a,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},_r=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:a,onFiltersChange:r,onReset:o,variant:l="ungrouped"})=>{const c=Ne("filters-modal"),[d,p]=f.useState([]),[g,u]=f.useState(lt(d)),x=f.useMemo(()=>i.map(y=>({...y,filterOptions:y.filterOptions.map(v=>d.find(k=>k.key===v.key&&k.type===v.type&&k.filterFn===v.filterFn)??{...v})})),[i,d]),h=f.useCallback(y=>{p(v=>{const j=v.map(k=>y.find(I=>I.key===k.key)??k);return localStorage.setItem(n,JSON.stringify(j)),j})},[n]),b=f.useCallback(()=>{o&&o(),c.toggle()},[c,o]),m=f.useCallback(y=>()=>{o&&o();const v=d.map(j=>j.key===y.key&&j.type===y.type&&j.filterFn===y.filterFn?Or(j):j);p(v),localStorage.setItem(n,JSON.stringify(v))},[d,n,o]);return f.useEffect(()=>{const y=localStorage.getItem(n),v=i.flatMap(I=>I.filterOptions),k=(y?JSON.parse(y):v).map(I=>{const E=v.find(C=>C.key===I.key);return(E==null?void 0:E.value)!==void 0?{...I,value:E.value}:I});p(k),localStorage.setItem(n,JSON.stringify(k))},[n,i]),f.useEffect(()=>{a&&e!==void 0&&a(Hr(e,d)),u(lt(d)),r==null||r(d)},[e,d,a,r]),{Filters:()=>t.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx($,{pr:.25,children:t.jsx(P,{icon:"filter",id:"filterBtn",onClick:b,tag:g.toString(),variant:"ghost"})}),c.isOpen&&t.jsx(Zt,{modalRef:c,onApplyFilters:h,options:x,variant:l})]}),options:x,removeFilter:m}},en=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:a=void 0,confirmButton:r=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:u=void 0,size:x,id:h="modal-container"})=>{const b=s.nt(),m=t.jsx(Wt,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(Ke,{$size:x,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(u)&&!s._.isNil(u)&&t.jsx(Mt,{description:l,modalRef:c,onClose:p,otherActions:d,title:u}),g&&t.jsx($,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Xe,{items:g})}),(s._.isObject(o)||a)&&t.jsxs(ur,{children:[a,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(br,{$framed:o.imageFramed,children:t.jsx(te,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(S,{size:"sm",children:o.imageText})]}),t.jsx(Bt,{alert:n,cancelButton:i,confirmButton:r,modalRef:c})]})});return e&&c.isOpen?ie.createPortal(m,document.getElementById("portals")??document.body):c.isOpen?m:null},Vr=()=>{const[e,n]=f.useState(!1),[i,a]=f.useState(),r=f.useRef(null),o=Ne("confirm-dialog-modal"),l=f.useCallback(async g=>(a(g),n(!0),new Promise(u=>{r.current=u})),[]),c=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!1)},[]);return f.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>t.jsxs(en,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:c,text:"Confirm"},description:i==null?void 0:i.message,id:g,modalRef:{...o,close:d},size:"sm",title:i==null?void 0:i.title,children:[i==null?void 0:i.content,u]}),confirm:l}},He=({buttonProps:e,variant:n})=>t.jsx(P,{onClick:e.onClick,variant:n,children:e.text}),Ur=s.dt.div`
|
|
1977
|
+
`,qt=({control:e,option:n,register:i,setValue:a})=>{var r,o,l,c,d;switch(n.type){case"checkboxes":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(r=n.options)==null?void 0:r.map(g=>t.jsx(st,{value:g.value,width:"content",children:t.jsx(Ee,{...i("checkbox"),label:g.label,value:g.value})},`li-checkbox-${g.value}`))});case"radioButton":return t.jsx("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:(o=n.options)==null?void 0:o.map(g=>t.jsx(st,{value:g.value,width:"content",children:t.jsx(qe,{...i("radio"),label:g.label,value:g.value})},`li-radio-${g.value}`))});case"select":return t.jsx(bt,{control:e,items:((l=n.options)==null?void 0:l.map(g=>({name:g.label??"",value:g.value})))??[],label:n.label,name:`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`,placeholder:n.placeholder,value:n.value});case"text":const p=`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`;return t.jsx(Fe,{label:n.label,name:p,placeholder:n.placeholder,register:i,value:n.value});case"numberRange":return t.jsx(Nt,{label:n.label,name:String(n.key),propsMax:{placeholder:n.placeholder?`${n.placeholder} Max`:"Max",register:i,name:"maxValue",value:n.maxValue,setValue:a},propsMin:{placeholder:n.placeholder?`${n.placeholder} Min`:"Min",register:i,name:"minValue",value:n.minValue,setValue:a},variant:"filters"});case"dateRange":return t.jsx(St,{label:n.label,name:String(n.key),propsMax:{name:"maxValue",value:(c=n.maxValue)==null?void 0:c.toString()},propsMin:{name:"minValue",value:(d=n.minValue)==null?void 0:d.toString()},register:i,setValue:a,variant:"filters"});default:return t.jsx("div",{})}},Kt=({control:e,items:n,register:i,setValue:a})=>t.jsx(t.Fragment,{children:n.map((r,o)=>{const l=`${r.type}-${r.value}-${r.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(qt,{control:e,option:r,register:i,setValue:a}),o<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},l)})}),Xt=e=>{var c,d,p,g,u;const[n,i]=f.useState([...e]),{control:a,register:r,handleSubmit:o,setValue:l}=s.useForm({defaultValues:{checkbox:e.filter(x=>x.type==="checkboxes").flatMap(x=>{var h;return((h=x.options)==null?void 0:h.filter(b=>b.checked).map(b=>b.value))??[]}),radio:((p=(d=(c=e.find(x=>x.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:x})=>x))==null?void 0:p.value)??"",text:e.filter(x=>["text","select"].includes(x.type)).reduce((x,h)=>({...x,[`${String(h.key)}-${h.filterFn??"caseInsensitive"}`]:h.value??""}),{}),minValue:(g=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:g.minValue,maxValue:(u=e.find(x=>["numberRange","dateRange"].includes(x.type)))==null?void 0:u.maxValue}});return{control:a,items:n,setItems:i,register:r,handleSubmit:o,setValue:l}},Dr=(e,n)=>{var i,a,r,o,l;n("checkbox",e.filter(c=>c.type==="checkboxes").flatMap(c=>{var d;return((d=c.options)==null?void 0:d.filter(p=>p.checked).map(p=>p.value))??[]})),n("radio",((r=(a=(i=e.find(c=>c.type==="radioButton"))==null?void 0:i.options)==null?void 0:a.find(({checked:c})=>c))==null?void 0:r.value)??""),n("text",e.filter(c=>["text","select"].includes(c.type)).reduce((c,d)=>({...c,[`${String(d.key)}-${d.filterFn??"caseInsensitive"}`]:d.value??""}),{})),n("minValue",(o=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:o.minValue),n("maxValue",(l=e.find(c=>["numberRange","dateRange"].includes(c.type)))==null?void 0:l.maxValue)},Lr=(e,n)=>e.map(i=>{var a;return i.type==="checkboxes"?{...i,options:(a=i.options)==null?void 0:a.filter(r=>{var o;return((o=r.label)==null?void 0:o.toLowerCase().includes(n.toLowerCase()))??r.value.toLowerCase().includes(n.toLowerCase())})}:i}),Me=({options:e,onSubmit:n,id:i})=>{const{control:a,items:r,setItems:o,register:l,handleSubmit:c,setValue:d}=Xt(e),p=e.some(x=>x.type==="checkboxes"&&x.hideSearch!==!0),g=f.useCallback(x=>{const{value:h}=x.target,b=Lr(e,h);o(b)},[e,o]),u=f.useCallback(x=>{n&&n(x)},[n]);return f.useEffect(()=>{o(e),Dr(e,d)},[e,o,d]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:i,children:[p&&t.jsx(ce,{onChange:g}),t.jsxs("form",{id:i,onSubmit:c(u),children:[t.jsx(Kt,{control:a,items:r,register:l,setValue:d}),t.jsx(P,{mt:1,type:"submit",children:"Apply"})]})]})},Jt=({options:e,variant:n,onApplyFilters:i,setDirection:a,setHandler:r})=>{const o=s.nt(),[l,c]=f.useState(e),[d,p]=f.useState([]),[g,u]=f.useState({}),[x,h]=f.useState(""),b=f.useCallback(y=>()=>{const v=l.find(k=>k.label===y),j=!(v!=null&&v.filterOptions.some(k=>k.type==="dateRange"||k.type==="select"));r==null||r(j??!0),h(y),p((v==null?void 0:v.filterOptions)??[])},[l,r]),m=f.useCallback(y=>{const v=[...y.checkbox,...Object.values(y.text??{}),...y.radio?[y.radio]:[],...y.minValue?[String(y.minValue)]:[],...y.maxValue?[String(y.maxValue)]:[]];u(C=>v.length>0?{...C,[x]:v}:C);const j=C=>{var L,R,A;const N=(L=C.options)==null?void 0:L.filter(B=>B.checked).map(B=>B.value);return{...C,options:(R=C.options)==null?void 0:R.map(B=>({...B,checked:y.checkbox.includes(B.value)||y.radio===B.value})),value:["text","select"].includes(C.type)?((A=y.text)==null?void 0:A[`${String(C.key)}-${C.filterFn??"caseInsensitive"}`])??C.value:N!=null&&N.length?N:C.value,minValue:["numberRange","dateRange"].includes(C.type)?y.minValue:C.minValue,maxValue:["numberRange","dateRange"].includes(C.type)?y.maxValue:C.maxValue}},k=C=>C.label===x?{...C,filterOptions:C.filterOptions.map(j)}:C,I=l.map(k);c(C=>C.map(k));const E=I.flatMap(({filterOptions:C})=>C);i(E),p([])},[l,i,x]),w=f.useCallback((y,v)=>{const j=`li-filter-option-${y}`;return t.jsxs(Er,{icon:v,onClick:b(y),style:{minWidth:"180px"},value:j,width:"100%",children:[y,g[y]===void 0?void 0:t.jsx(X,{tagLabel:g[y].length.toString()})]},j)},[g,b]);return f.useEffect(()=>{const y=e.reduce((v,{label:j,filterOptions:k})=>{const I=k.flatMap(({value:N,minValue:L,maxValue:R})=>[L,R,N]).filter(Boolean),E=k.flatMap(({options:N})=>N??[]).filter(({checked:N=!1})=>N).map(({value:N})=>N),C=[...I,...E];return C.length===0?v:{...v,[j]:C}},{});u(y),d.length>0&&a&&a("column")},[d,e,a]),n==="grouped"?t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"unset":"360px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(Me,{id:"filters-options",onSubmit:m,options:d}):Object.entries(Gt(e)).map(([y,v])=>t.jsxs($,{children:[t.jsx(S,{color:o.palette.gray[400],mb:.25,size:"sm",children:y}),v.map(({label:j,icon:k="filter-list"})=>w(j,k))]},y))}):t.jsx($,{display:"flex",flexDirection:"column",flexGrow:1,maxHeight:d.length>0?"unset":"200px",style:{columnGap:"10px"},width:"100%",wrap:"wrap",children:d.length>0?t.jsx(Me,{id:"filters-options",onSubmit:m,options:d}):e.map(({label:y,icon:v="filter-list"})=>w(y,v))})},Zt=({options:e,onApplyFilters:n,modalRef:i,variant:a})=>{const[r,o]=f.useState("row"),[l,c]=f.useState(!0),d=s.nt(),p=f.useRef(null),g=t.jsx(M,{icon:"close",iconColor:d.palette.gray[400],iconSize:"xs",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:i.close,px:.25,py:.25,variant:"ghost"});return f.useEffect(()=>{const u=x=>{const h=p.current;h&&!h.contains(x.target)&&i.close()};if(l)return document.addEventListener("mousedown",u,!0),()=>{document.removeEventListener("mousedown",u,!0)}},[p,l,i]),t.jsx(Rr,{$bgColor:"transparent","aria-label":i.name,children:t.jsxs(Ke,{$size:"fixed",alignItems:r==="row"?"start":"end",display:"flex",flexDirection:r,gap:.5,id:"filters-list",position:"relative",px:1.25,py:1.25,ref:p,style:{overflow:"hidden",width:"max-content"},children:[r==="column"?g:void 0,t.jsx(Jt,{onApplyFilters:n,options:e,setDirection:o,setHandler:c,variant:a}),r==="row"?g:void 0]})})};function Pr(e){if(e)return e}function Qt(e){if(!e||e.length===0)return;const n=e.filter(a=>a.checked).map(a=>a.label??a.value);return n.length===0?void 0:n.join(", ")}function Ar(e,n,i){const a=i??"",r=s._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),o=s._.isEmpty(n)&&typeof n!="number"||Number.isNaN(n)?void 0:Number(String(n));if(!s._.isUndefined(r)&&!s._.isUndefined(o))return`${r}${a} - ${o}${a}`;if(!s._.isUndefined(r))return`Min ${r}${a}`;if(!s._.isUndefined(o))return`Max ${o}${a}`}function Wr(e,n){if(s.dayjs_minExports.extend(s.localizedFormat),!(s._.isUndefined(e)&&s._.isUndefined(n))){if(e!==""&&n!==""&&!s._.isUndefined(e)&&!s._.isUndefined(n))return`${s.dayjs(e).format("LL")} - ${s.dayjs(n).format("LL")}`;if(e!==""&&!s._.isUndefined(e))return`From ${s.dayjs(e).format("LL")}`;if(n!==""&&!s._.isUndefined(n))return`To ${s.dayjs(n).format("LL")}`}}function Br(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const ae=({filter:e,icon:n="filter-list",label:i,onClose:a,filterValue:r})=>s._.isNil(r)||s._.isEmpty(String(r))?null:t.jsx(X,{filterValues:r,icon:n,id:"remove-filter",onClose:a(e),tagLabel:`${i} `}),Mr=({options:e,onClose:n})=>{const i=e.flatMap(a=>a.filterOptions.map(r=>{const{filterFn:o,label:l,type:c,value:d,options:p,minValue:g,maxValue:u}=r;switch(c){case"numberRange":{const x=Ar(g,u,a.placeholder);return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case"dateRange":{const x=Wr(g==null?void 0:g.toString(),u==null?void 0:u.toString());return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case"radioButton":case"checkboxes":{const x=Qt(p);return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:a.label,onClose:n},l)}case void 0:case"select":case"text":default:{const x=Pr(d),h=Br(c,a.label,o);return t.jsx(ae,{filter:r,filterValue:x,icon:a.icon,label:h,onClose:n},l)}}})).filter(a=>{if(a===null)return!1;const{filterValue:r}=a.props;return!s._.isNil(r)&&!s._.isEmpty(String(r))});return i.length>0?t.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},Hr=(e,n)=>{function i(l,c){if(c.value===""||c.value===void 0||s._.defaultTo(c.isBackFilter,!1))return!0;switch(c.filterFn){case"includesInsensitive":return String(l[c.key]).toLowerCase().includes(c.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[c.key]).toLowerCase()===c.value.toLowerCase()}}function a(l,c){if(!c.options||c.options.length===0)return!0;const d=c.options.filter(p=>p.checked).map(p=>p.value);return d.length===0?!0:d.includes(String(l[c.key]))}function r(l,c,d){const p=d(String(l[c.key])),{minValue:g,maxValue:u}=c,x=s._.isEmpty(g)&&typeof g!="number"?void 0:d(String(g)),h=s._.isEmpty(u)&&typeof u!="number"?void 0:d(String(u));return s._.isUndefined(x)&&s._.isUndefined(h)?!0:(x??-1/0)<=p&&p<=(h??1/0)}function o(l){return n.every(c=>{if(typeof c.key=="function")return c.key(l,c.value);switch(c.type){case"radioButton":case"checkboxes":return a(l,c);case"numberRange":return r(l,c,Number);case"dateRange":return r(l,c,d=>new Date(d));case"select":case"text":default:return i(l,c)}})}return e.filter(o)},lt=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.flatMap(i=>[i.value,i.maxValue,i.minValue]).filter(Boolean)].length,_r=e=>{var i;const n=((i=e.options)==null?void 0:i.map(a=>({...a,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},Or=({dataset:e,localStorageKey:n,options:i,setFilteredDataset:a,onFiltersChange:r,onReset:o,variant:l="ungrouped"})=>{const c=Ne("filters-modal"),[d,p]=f.useState([]),[g,u]=f.useState(lt(d)),x=f.useMemo(()=>i.map(y=>({...y,filterOptions:y.filterOptions.map(v=>d.find(k=>k.key===v.key&&k.type===v.type&&k.filterFn===v.filterFn)??{...v})})),[i,d]),h=f.useCallback(y=>{p(v=>{const j=v.map(k=>y.find(I=>I.key===k.key)??k);return localStorage.setItem(n,JSON.stringify(j)),j})},[n]),b=f.useCallback(()=>{o&&o(),c.toggle()},[c,o]),m=f.useCallback(y=>()=>{o&&o();const v=d.map(j=>j.key===y.key&&j.type===y.type&&j.filterFn===y.filterFn?_r(j):j);p(v),localStorage.setItem(n,JSON.stringify(v))},[d,n,o]);return f.useEffect(()=>{const y=localStorage.getItem(n),v=i.flatMap(I=>I.filterOptions),k=(y?JSON.parse(y):v).map(I=>{const E=v.find(C=>C.key===I.key);return(E==null?void 0:E.value)!==void 0?{...I,value:E.value}:I});p(k),localStorage.setItem(n,JSON.stringify(k))},[n,i]),f.useEffect(()=>{a&&e!==void 0&&a(Hr(e,d)),u(lt(d)),r==null||r(d)},[e,d,a,r]),{Filters:()=>t.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx($,{pr:.25,children:t.jsx(P,{icon:"filter",id:"filterBtn",onClick:b,tag:g.toString(),variant:"ghost"})}),c.isOpen&&t.jsx(Zt,{modalRef:c,onApplyFilters:h,options:x,variant:l})]}),options:x,removeFilter:m}},en=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:a=void 0,confirmButton:r=void 0,content:o=void 0,description:l=void 0,modalRef:c,otherActions:d=void 0,onClose:p=void 0,tabItems:g=void 0,title:u=void 0,size:x,id:h="modal-container"})=>{const b=s.nt(),m=t.jsx(Wt,{"aria-label":c.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(Ke,{$size:x,"data-testid":h,flexDirection:"column",id:h,children:[!s._.isEmpty(u)&&!s._.isNil(u)&&t.jsx(Mt,{description:l,modalRef:c,onClose:p,otherActions:d,title:u}),g&&t.jsx($,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(Xe,{items:g})}),(s._.isObject(o)||a)&&t.jsxs(ur,{children:[a,s._.isObject(o)&&s._.isString(o.imageSrc)&&t.jsx(br,{$framed:o.imageFramed,children:t.jsx(te,{alt:"modal-img",publicId:o.imageSrc})}),s._.isObject(o)&&s._.isString(o.imageText)&&t.jsx(S,{size:"sm",children:o.imageText})]}),t.jsx(Bt,{alert:n,cancelButton:i,confirmButton:r,modalRef:c})]})});return e&&c.isOpen?ie.createPortal(m,document.getElementById("portals")??document.body):c.isOpen?m:null},Vr=()=>{const[e,n]=f.useState(!1),[i,a]=f.useState(),r=f.useRef(null),o=Ne("confirm-dialog-modal"),l=f.useCallback(async g=>(a(g),n(!0),new Promise(u=>{r.current=u})),[]),c=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!0)},[]),d=f.useCallback(()=>{var g;n(!1),a(void 0),(g=r.current)==null||g.call(r,!1)},[]);return f.useEffect(()=>{o.setIsOpen(e)},[e,o]),{ConfirmDialog:({id:g="confirm-dialog-modal",children:u})=>t.jsxs(en,{cancelButton:{onClick:d,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:c,text:"Confirm"},description:i==null?void 0:i.message,id:g,modalRef:{...o,close:d},size:"sm",title:i==null?void 0:i.title,children:[i==null?void 0:i.content,u]}),confirm:l}},He=({buttonProps:e,variant:n})=>t.jsx(P,{onClick:e.onClick,variant:n,children:e.text}),Ur=s.dt.div`
|
|
1978
1978
|
display: flex;
|
|
1979
1979
|
flex-direction: column;
|
|
1980
1980
|
align-items: center;
|
|
@@ -2008,7 +2008,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2008
2008
|
> *:last-child {
|
|
2009
2009
|
margin-right: 0;
|
|
2010
2010
|
}
|
|
2011
|
-
`,ct={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},qr=({cancelButton:e=void 0,confirmButton:n=void 0,description:i,imageSrc:a="integrates/empty/addRoot",padding:r=1.25,title:o,size:l="md"})=>{const c=(n??e)!==void 0;return t.jsxs(Ur,{$padding:r,children:[t.jsx(Gr,{children:t.jsx(te,{alt:"empty-icon",publicId:a})}),t.jsx(
|
|
2011
|
+
`,ct={md:{description:"md",title:"md"},sm:{description:"sm",title:"xs"}},qr=({cancelButton:e=void 0,confirmButton:n=void 0,description:i,imageSrc:a="integrates/empty/addRoot",padding:r=1.25,title:o,size:l="md"})=>{const c=(n??e)!==void 0;return t.jsxs(Ur,{$padding:r,children:[t.jsx(Gr,{children:t.jsx(te,{alt:"empty-icon",publicId:a})}),t.jsx(U,{fontWeight:"bold",lineSpacing:1.75,mb:.25,size:ct[l].title,textAlign:"center",children:o}),t.jsx(S,{mb:c?2:void 0,size:ct[l].description,textAlign:"center",children:i}),c?t.jsxs(Yr,{children:[e&&t.jsx(He,{buttonProps:e,variant:"tertiary"}),n&&t.jsx(He,{buttonProps:n,variant:"primary"})]}):void 0]})},Kr=({children:e})=>{const n=s.useFormContext();return e({...n})},Xr=s.dt.form`
|
|
2012
2012
|
${({theme:e})=>`
|
|
2013
2013
|
align-items: flex-start;
|
|
2014
2014
|
align-self: stretch;
|
|
@@ -2072,7 +2072,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2072
2072
|
background-color: ${e.palette.gray[100]};
|
|
2073
2073
|
}
|
|
2074
2074
|
`}
|
|
2075
|
-
`,tn=({isSelected:e=!1,label:n,onSelect:i})=>{const a=s.nt(),r=f.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(Je,{$isSelected:e,onClick:r,children:[e?t.jsx(T,{icon:"check",iconColor:a.palette.gray[800],iconSize:"xs"}):null,t.jsx(S,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},ta=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:a,onClose:r,selectedItem:o,title:l,variant:c})=>{const d=s.nt(),[p,g]=f.useState(n),[u,x]=f.useState(""),h=f.useCallback(w=>{g(y=>y.filter(v=>String(v.name).toLowerCase().includes(w.toLocaleLowerCase())))},[g]),b=f.useCallback(w=>{w.currentTarget&&(x(w.currentTarget.value),h(w.currentTarget.value))},[x,h]);f.useEffect(()=>{g(n),h(u)},[n,h,u]);const m=t.jsx($,{"aria-modal":"true",className:"comp-modal fixed inset-0 overflow-auto",zIndex:99999,children:t.jsx($,{alignItems:"center",bgColor:"rgb(52 64 84 / 70%)",display:"flex",height:"100vh",justify:"center",left:"0",top:"0",width:"100%",children:t.jsxs(ea,{$itemsLength:p.length,children:[t.jsxs($,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(S,{color:d.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),t.jsx(
|
|
2075
|
+
`,tn=({isSelected:e=!1,label:n,onSelect:i})=>{const a=s.nt(),r=f.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(Je,{$isSelected:e,onClick:r,children:[e?t.jsx(T,{icon:"check",iconColor:a.palette.gray[800],iconSize:"xs"}):null,t.jsx(S,{color:a.palette.gray[800],fontWeight:"bold",size:"sm",children:n})]})},ta=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:a,onClose:r,selectedItem:o,title:l,variant:c})=>{const d=s.nt(),[p,g]=f.useState(n),[u,x]=f.useState(""),h=f.useCallback(w=>{g(y=>y.filter(v=>String(v.name).toLowerCase().includes(w.toLocaleLowerCase())))},[g]),b=f.useCallback(w=>{w.currentTarget&&(x(w.currentTarget.value),h(w.currentTarget.value))},[x,h]);f.useEffect(()=>{g(n),h(u)},[n,h,u]);const m=t.jsx($,{"aria-modal":"true",className:"comp-modal fixed inset-0 overflow-auto",zIndex:99999,children:t.jsx($,{alignItems:"center",bgColor:"rgb(52 64 84 / 70%)",display:"flex",height:"100vh",justify:"center",left:"0",top:"0",width:"100%",children:t.jsxs(ea,{$itemsLength:p.length,children:[t.jsxs($,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(S,{color:d.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),t.jsx(M,{icon:"xmark",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:r,variant:"ghost"})]}),t.jsx($,{mt:1,children:t.jsx(ce,{onInput:b,placeholder:"Search"})}),t.jsx(ne,{mb:1,mt:1}),t.jsxs($,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[c==="organization-selector"?t.jsx(Je,{onClick:i,children:t.jsxs($,{alignItems:"center",display:"flex",children:[t.jsx(T,{icon:"square-plus",iconColor:d.palette.gray[400],iconSize:"xs",iconType:"fa-light",mr:.5}),t.jsx(S,{color:d.palette.gray[400],size:"sm",children:"New organization"})]})}):void 0,p.map(w=>t.jsx(tn,{isSelected:o.toLowerCase()===w.name,label:w.name.charAt(0).toUpperCase()+w.name.slice(1),onSelect:a},w.name))]})]})})});return e?ie.createPortal(m,document.body):t.jsx("div",{})},na=({description:e,height:n="auto",leftIconName:i,children:a,rightIconName:r,title:o,tooltipId:l,tooltipTip:c,tooltipPlace:d="bottom",variant:p="centered",width:g="318px"})=>{const u=s.nt(),x=p==="centered",h=l&&t.jsx(Y,{icon:r??i,iconColor:u.palette.gray[800],id:l,place:d,tip:c});return t.jsxs($,{alignItems:x?"center":"flex-start",bgColor:u.palette.gray[50],border:`1px solid ${u.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:x?"column":"column-reverse",gap:.5,height:n,justify:"center",padding:[1.25,1.25,1.25,1.25],width:g,children:[t.jsxs($,{alignItems:"center",display:"flex",gap:.5,children:[x||s.lodashExports.isUndefined(i)?void 0:h,t.jsx(S,{color:x?u.palette.gray[800]:u.palette.gray[400],size:"md",textAlign:x?"center":"start",children:e}),x||s.lodashExports.isUndefined(r)?void 0:h]}),t.jsxs($,{alignItems:"center",display:"flex",gap:.5,my:.5,children:[x&&!s.lodashExports.isUndefined(i)?h:void 0,t.jsxs("div",{style:{display:"flex",gap:"12px"},children:[s.lodashExports.isUndefined(o)?void 0:t.jsx(U,{fontWeight:"bold",size:"md",children:o}),a]}),x&&!s.lodashExports.isUndefined(r)?h:void 0]})]})},ia=({actions:e,children:n,header:i,title:a,tabs:r,footer:o})=>{const l=s.nt();return t.jsxs($,{alignItems:"flex-start",bgColor:l.palette.white,borderLeft:`1px solid ${l.palette.gray[300]}`,display:"flex",flexDirection:"column",maxHeight:"750px",width:"480px",children:[t.jsxs($,{alignItems:"flex-start",alignSelf:"stretch",borderBottom:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.25,justify:"space-between",px:1.25,py:1,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,children:[t.jsx(S,{color:l.palette.gray[800],fontWeight:"bold",lineSpacing:1.75,size:"xl",children:a}),i]}),e&&t.jsx($,{display:"flex",gap:.25,children:e.map(({icon:c,onClick:d},p)=>t.jsx(M,{icon:c??"paper-plane",iconColor:l.palette.gray[400],iconSize:"xxs",iconType:"fa-light",onClick:d,variant:"ghost"},`${p}-${c}`))})]}),t.jsx($,{display:"flex",pt:.25,width:"100%",children:t.jsx(Xe,{items:r})}),t.jsx($,{alignSelf:"stretch",display:"flex",flexDirection:"column",px:1.25,py:1,scroll:"y",children:n}),o&&t.jsx($,{alignSelf:"stretch",borderTop:`1px solid ${l.palette.gray[300]}`,display:"flex",gap:.5,justify:"end",px:1.25,py:1,children:o.map(({icon:c,text:d,onClick:p},g)=>t.jsx(P,{icon:c,onClick:p,variant:g===0?"primary":"tertiary",width:"100%",children:d},`${g}-${d}`))})]})},ra=s.dt.span`
|
|
2076
2076
|
${({theme:e,$bgColor:n=e.palette.secondary[500],$txtDecoration:i="none"})=>`
|
|
2077
2077
|
background-color: ${n};
|
|
2078
2078
|
border-radius: 5px;
|
|
@@ -2138,7 +2138,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2138
2138
|
height: ${e}px;
|
|
2139
2139
|
width: ${e}px;
|
|
2140
2140
|
`}
|
|
2141
|
-
`,ba=e=>{const{size:n}=e;return t.jsx(ha,{$size:n,...e})},$a=({children:e,commitSha:n,commitShortSha:i,parentElement:a,userInfo:r,setVisibility:o})=>{const l=s.nt(),{userName:c,email:d,phone:p,userRole:g}=r;return me(a,()=>{o(!1)}),t.jsxs(
|
|
2141
|
+
`,ba=e=>{const{size:n}=e;return t.jsx(ha,{$size:n,...e})},$a=({children:e,commitSha:n,commitShortSha:i,parentElement:a,userInfo:r,setVisibility:o})=>{const l=s.nt(),{userName:c,email:d,phone:p,userRole:g}=r;return me(a,()=>{o(!1)}),t.jsxs(Ot,{children:[t.jsx("li",{className:"user-info",children:t.jsxs($,{display:"inline-flex",gap:.25,width:"100%",children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,width:"100%",children:[t.jsx(S,{color:l.palette.gray[800],fontWeight:"bold",size:"sm",children:c}),t.jsx(S,{color:l.palette.gray[400],size:"sm",children:d}),s.lodashExports.isUndefined(p)?void 0:t.jsx(S,{color:l.palette.gray[400],size:"sm",children:p})]}),t.jsx($,{children:t.jsx(X,{tagLabel:g,variant:"role"})})]})}),t.jsx(ne,{}),e,t.jsx(ne,{}),t.jsx("li",{className:"commit-info",children:t.jsx(Q,{href:`https://gitlab.com/fluidattacks/universe/-/tree/${n}`,iconPosition:"hidden",children:t.jsx(S,{color:l.palette.gray[400],size:"xs",children:`commit : ${i}`})})})]})},ya=s.dt.button`
|
|
2142
2142
|
align-items: center;
|
|
2143
2143
|
background-color: transparent;
|
|
2144
2144
|
border: unset;
|
|
@@ -2205,7 +2205,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2205
2205
|
color: ${e.palette[n][500]};
|
|
2206
2206
|
}
|
|
2207
2207
|
`}
|
|
2208
|
-
`,ja=e=>e==="warning"?"triangle-exclamation":e==="info"?"circle-info":e==="success"?"circle-check":"circle-exclamation",ka=({description:e,onClose:n,title:i,variant:a})=>{const r=s.nt(),o=f.useCallback(()=>{n==null||n()},[n]);return t.jsxs(wa,{$variant:a,className:`notification notification__${a}`,role:"alertdialog",children:[t.jsxs(va,{$variant:a,children:[t.jsx(T,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(T,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(T,{icon:ja(a),iconClass:"icon",iconSize:"xs",iconType:"fa-light"})]}),t.jsxs($,{pr:1.5,children:[t.jsx(
|
|
2208
|
+
`,ja=e=>e==="warning"?"triangle-exclamation":e==="info"?"circle-info":e==="success"?"circle-check":"circle-exclamation",ka=({description:e,onClose:n,title:i,variant:a})=>{const r=s.nt(),o=f.useCallback(()=>{n==null||n()},[n]);return t.jsxs(wa,{$variant:a,className:`notification notification__${a}`,role:"alertdialog",children:[t.jsxs(va,{$variant:a,children:[t.jsx(T,{icon:"circle",iconClass:"ellipse-1",iconSize:"xs"}),t.jsx(T,{icon:"circle",iconClass:"ellipse-2",iconSize:"xs"}),t.jsx(T,{icon:ja(a),iconClass:"icon",iconSize:"xs",iconType:"fa-light"})]}),t.jsxs($,{pr:1.5,children:[t.jsx(U,{fontWeight:"bold",size:"xs",children:i}),t.jsx(S,{size:"sm",whiteSpace:"break-spaces",wordWrap:"break-word",children:e})]}),t.jsx(M,{height:"fit-content",icon:"close",iconColor:r.palette.gray[400],iconSize:"xs",iconType:"fa-light",onClick:o,px:.125,py:.125,variant:"ghost"})]})},Ca=s.dt.div`
|
|
2209
2209
|
width: fit-content;
|
|
2210
2210
|
border: ${({theme:e})=>`1px solid ${e.palette.gray[300]}`};
|
|
2211
2211
|
border-radius: 4px;
|
|
@@ -2238,7 +2238,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2238
2238
|
&::-webkit-inner-spin-button {
|
|
2239
2239
|
opacity: 1;
|
|
2240
2240
|
}
|
|
2241
|
-
`,za=f.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:a=0,max:r,min:o,name:l,onEnter:c,tooltipMessage:d,...p},g){const u=i<0?0:i,[x,h]=f.useState(Number(a).toFixed(u)),b=f.useCallback(y=>{const v=s.lodashExports.toNumber(y.target.value);y.target.value.endsWith(".")?h(y.target.value):v>=Number(o)&&v<=Number(r)&&(h(String(v)),n&&c(s.lodashExports.toNumber(v.toFixed(u)))),y.stopPropagation()},[n,u,r,o,c]),m=f.useCallback(y=>{y.currentTarget.contains(y.relatedTarget)||h(Number(a).toFixed(u)),y.stopPropagation()},[u,a]),w=f.useCallback(y=>{y.stopPropagation(),y.key==="Enter"&&!s.lodashExports.isEmpty(y.currentTarget.value)&&c(s.lodashExports.toNumber(y.currentTarget.value))},[c]);return t.jsx(Ca,{onBlur:m,tabIndex:-1,children:t.jsx(Y,{id:"numberInputTooltip",tip:d,children:t.jsx(Sa,{...p,"aria-label":l,"aria-valuemax":Number(r),"aria-valuemin":Number(o),"aria-valuenow":Number(x),max:r,min:o,name:l,onChange:b,onKeyUp:w,ref:g,step:10**-u,type:"number",value:x})})})}),Ia={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},
|
|
2241
|
+
`,za=f.forwardRef(function({autoUpdate:n=!1,decimalPlaces:i=0,defaultValue:a=0,max:r,min:o,name:l,onEnter:c,tooltipMessage:d,...p},g){const u=i<0?0:i,[x,h]=f.useState(Number(a).toFixed(u)),b=f.useCallback(y=>{const v=s.lodashExports.toNumber(y.target.value);y.target.value.endsWith(".")?h(y.target.value):v>=Number(o)&&v<=Number(r)&&(h(String(v)),n&&c(s.lodashExports.toNumber(v.toFixed(u)))),y.stopPropagation()},[n,u,r,o,c]),m=f.useCallback(y=>{y.currentTarget.contains(y.relatedTarget)||h(Number(a).toFixed(u)),y.stopPropagation()},[u,a]),w=f.useCallback(y=>{y.stopPropagation(),y.key==="Enter"&&!s.lodashExports.isEmpty(y.currentTarget.value)&&c(s.lodashExports.toNumber(y.currentTarget.value))},[c]);return t.jsx(Ca,{onBlur:m,tabIndex:-1,children:t.jsx(Y,{id:"numberInputTooltip",tip:d,children:t.jsx(Sa,{...p,"aria-label":l,"aria-valuemax":Number(r),"aria-valuemin":Number(o),"aria-valuenow":Number(x),max:r,min:o,name:l,onChange:b,onKeyUp:w,ref:g,step:10**-u,type:"number",value:x})})})}),Ia={Azure:"integrates/autoenrollment/azureIcon",Bitbucket:"integrates/autoenrollment/bitbucketLogo",GitHub:"integrates/autoenrollment/githubLogo",GitLab:"integrates/autoenrollment/gitlabIcon"},_e=({icon:e,label:n,onClick:i,onlyLabel:a=!1,provider:r="GitLab"})=>{const o=s.nt();return t.jsxs($,{alignItems:"center",bgColorHover:o.palette.gray[100],borderRadius:"4px",cursor:"pointer",display:"flex",flexDirection:"column",gap:.25,height:"62px",justify:"center",minWidth:"64px",onClick:i,pb:.5,pl:.25,pr:.25,pt:.5,children:[a?!1:t.jsx($,{height:"24px",width:"24px",children:e===void 0?t.jsx(te,{alt:`${r} Logo`,height:"100%",publicId:Ia[r],width:"100%"}):t.jsx(T,{icon:e,iconColor:"#000",iconSize:"sm",iconType:"fa-light"})}),t.jsx($,{alignItems:"center",display:"flex",minWidth:"24px",children:t.jsx(S,{color:o.palette.gray[800],display:"inline",size:"xs",textAlign:"center",whiteSpace:a?"break-spaces":"nowrap",wordWrap:"unset",children:n??r})})]})},Ta=({align:e="end",buttonLabel:n="Add Credential",children:i,id:a,manualOption:r,providers:o})=>{const l=s.nt(),[c,d]=f.useState(!1),p=f.useRef(null);me(p.current,()=>{d(!1)},!0);const g=f.useCallback(h=>{r==null||r.onClick(h),d(!1)},[r]),u=f.useCallback(()=>{d(h=>!h)},[d]),x=f.useCallback(h=>b=>{var m;(m=o[h])==null||m.onClick(b),d(!1)},[o]);return t.jsxs($,{alignItems:e,display:"flex",flexDirection:"column",position:"relative",ref:p,width:"max-content",zIndex:10,children:[t.jsx(P,{icon:"plus",onClick:u,variant:"primary",children:n}),t.jsxs($,{alignItems:"center",bgColor:"#fff",border:`1px solid ${l.palette.gray[200]}`,borderRadius:"4px",display:"flex",gap:.5,height:"78px",id:a,pb:.5,pl:.75,position:"absolute",pr:.75,pt:.5,shadow:"md",top:"40px",visibility:c?"visible":"hidden",zIndex:10,children:[Object.keys(o).map(h=>t.jsx(_e,{onClick:x(h),provider:h},h)),r===void 0?void 0:t.jsx(_e,{icon:"square-plus",label:r.label??"Add manually",onClick:g}),i]})]})},Fa=s.dt.div`
|
|
2242
2242
|
${({theme:e})=>`
|
|
2243
2243
|
height: ${e.spacing[1]};
|
|
2244
2244
|
width: ${e.spacing[1]};
|
|
@@ -2349,12 +2349,12 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2349
2349
|
border-start-end-radius: ${i&&n<100?"0":"inherit"};
|
|
2350
2350
|
background-color: ${a==="compliance"?Ra(e,n):"inherit"};
|
|
2351
2351
|
`}
|
|
2352
|
-
`,Pa=({minWidth:e=100,percentage:n,percentageLocation:i="right",showPercentage:a=!1,orientation:r="horizontal",rounded:o=!0,variant:l="default"})=>{const c=a&&i==="left",d=a?t.jsx($,{alignItems:"center",display:"flex",justify:c?"flex-end":"flex-start",width:"40px",children:t.jsx(S,{ml:.5,mr:c?.5:0,size:"sm",children:`${n}%`})}):null,p=t.jsx(Da,{$minWidth:e,$orientation:r,$rounded:o,$variant:l,className:r,children:t.jsx(La,{$percentage:n,$rounded:o,$variant:l,className:"progress-bar"})});return t.jsxs($,{alignItems:"center",display:"inline-flex",flexDirection:c?"row-reverse":"row",height:r==="horizontal"?"auto":"100%",maxWidth:c?`${e+43}px`:void 0,minWidth:c?`${e+43}px`:void 0,textAlign:"end",children:[p,d]})},rn=({description:e="",highlightDescription:n=""})=>{const i=s.nt(),a=typeof n=="string",r=a?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(S,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:a?t.jsxs(f.Fragment,{children:[t.jsx(se,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:n}),e]}):e.split(r).map((o,l)=>n.includes(o)?t.jsx(se,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:o},`${l+1}-bold`):o)}):t.jsx(S,{lineSpacing:1.5,size:"lg",textAlign:"center",children:e})},Aa=({_portal:e=!1,cancelButton:n,darkBackground:i=!1,children:a,confirmButton:r,container:o,description:l,highlightDescription:c="",image:d,maxWidth:p,title:g,titleColor:u})=>{const x=s.nt(),{alt:h,src:b,width:m="77px",height:w="77px"}=d,y=f.useCallback(()=>{n==null||n.onClick()},[n]),v=f.useCallback(()=>{r==null||r.onClick()},[r]),j=t.jsx($,{alignItems:"center","aria-label":g,"aria-modal":"true",bgColor:i?"rgba(52, 64, 84, 70%)":"",display:"flex",height:"100vh",justify:"center",left:"0",position:e?"fixed":"absolute",top:"0px",width:"100%",zIndex:99999,children:t.jsxs($,{bgColor:x.palette.white,border:`1px solid ${x.palette.gray[200]}`,borderRadius:"8px",display:"inline-flex",flexDirection:"column",maxWidth:p,pb:2.5,pl:2.5,pr:2.5,pt:2.5,shadow:"lg",width:"100%",zIndex:11,children:[t.jsxs($,{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",children:[t.jsx($,{children:t.jsx(te,{alt:h,height:w,publicId:b,width:m})}),t.jsxs($,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[t.jsx(
|
|
2352
|
+
`,Pa=({minWidth:e=100,percentage:n,percentageLocation:i="right",showPercentage:a=!1,orientation:r="horizontal",rounded:o=!0,variant:l="default"})=>{const c=a&&i==="left",d=a?t.jsx($,{alignItems:"center",display:"flex",justify:c?"flex-end":"flex-start",width:"40px",children:t.jsx(S,{ml:.5,mr:c?.5:0,size:"sm",children:`${n}%`})}):null,p=t.jsx(Da,{$minWidth:e,$orientation:r,$rounded:o,$variant:l,className:r,children:t.jsx(La,{$percentage:n,$rounded:o,$variant:l,className:"progress-bar"})});return t.jsxs($,{alignItems:"center",display:"inline-flex",flexDirection:c?"row-reverse":"row",height:r==="horizontal"?"auto":"100%",maxWidth:c?`${e+43}px`:void 0,minWidth:c?`${e+43}px`:void 0,textAlign:"end",children:[p,d]})},rn=({description:e="",highlightDescription:n=""})=>{const i=s.nt(),a=typeof n=="string",r=a?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(S,{display:"inline",lineSpacing:1.5,size:"lg",textAlign:"center",children:a?t.jsxs(f.Fragment,{children:[t.jsx(se,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:n}),e]}):e.split(r).map((o,l)=>n.includes(o)?t.jsx(se,{color:i.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:"lg",children:o},`${l+1}-bold`):o)}):t.jsx(S,{lineSpacing:1.5,size:"lg",textAlign:"center",children:e})},Aa=({_portal:e=!1,cancelButton:n,darkBackground:i=!1,children:a,confirmButton:r,container:o,description:l,highlightDescription:c="",image:d,maxWidth:p,title:g,titleColor:u})=>{const x=s.nt(),{alt:h,src:b,width:m="77px",height:w="77px"}=d,y=f.useCallback(()=>{n==null||n.onClick()},[n]),v=f.useCallback(()=>{r==null||r.onClick()},[r]),j=t.jsx($,{alignItems:"center","aria-label":g,"aria-modal":"true",bgColor:i?"rgba(52, 64, 84, 70%)":"",display:"flex",height:"100vh",justify:"center",left:"0",position:e?"fixed":"absolute",top:"0px",width:"100%",zIndex:99999,children:t.jsxs($,{bgColor:x.palette.white,border:`1px solid ${x.palette.gray[200]}`,borderRadius:"8px",display:"inline-flex",flexDirection:"column",maxWidth:p,pb:2.5,pl:2.5,pr:2.5,pt:2.5,shadow:"lg",width:"100%",zIndex:11,children:[t.jsxs($,{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",children:[t.jsx($,{children:t.jsx(te,{alt:h,height:w,publicId:b,width:m})}),t.jsxs($,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[t.jsx(U,{color:u,fontWeight:"bold",lineSpacing:2.5,size:"lg",textAlign:"center",children:g}),t.jsx(rn,{description:l,highlightDescription:c})]})]}),a&&t.jsx($,{mb:1,scroll:"y",children:t.jsx($,{height:"100%",children:a})}),t.jsxs($,{alignItems:"flex-start",display:"flex",gap:1,justify:"center",children:[s.lodashExports.isObject(r)?t.jsx(P,{onClick:v,variant:(r==null?void 0:r.variant)??"primary",children:r==null?void 0:r.text},r==null?void 0:r.key):void 0,s.lodashExports.isObject(n)?t.jsx(P,{onClick:y,variant:(n==null?void 0:n.variant)??"tertiary",children:n==null?void 0:n.text},n==null?void 0:n.key):void 0]})]})});return e?ie.createPortal(j,o??document.body):j},Wa=s.dt.div.attrs({className:"comp-scroll-up"})`
|
|
2353
2353
|
bottom: 15px;
|
|
2354
2354
|
position: fixed;
|
|
2355
2355
|
right: 140px;
|
|
2356
2356
|
z-index: 100;
|
|
2357
|
-
`,Ba=({scrollerId:e="dashboard",visibleAt:n=500})=>{const[i,a]=f.useState(!1),[r,o]=f.useState(null);f.useEffect(()=>{o(document.getElementById(e)),r==null||r.addEventListener("scroll",()=>{a(r.scrollTop>n)})},[r,e,n]);const l=f.useCallback(()=>{r==null||r.scrollTo({behavior:"smooth",top:0})},[r]);return i?t.jsx(Wa,{children:t.jsx(
|
|
2357
|
+
`,Ba=({scrollerId:e="dashboard",visibleAt:n=500})=>{const[i,a]=f.useState(!1),[r,o]=f.useState(null);f.useEffect(()=>{o(document.getElementById(e)),r==null||r.addEventListener("scroll",()=>{a(r.scrollTop>n)})},[r,e,n]);const l=f.useCallback(()=>{r==null||r.scrollTo({behavior:"smooth",top:0})},[r]);return i?t.jsx(Wa,{children:t.jsx(M,{height:"40px",icon:"arrow-up",iconSize:"sm",id:"scroll-up",onClick:l,width:"40px"})}):null},Ma={critical:{bgColor:z.palette.primary[700],colorL:z.palette.gray[800],colorR:z.palette.white},disable:{bgColor:z.palette.gray[200],colorL:z.palette.gray[400],colorR:z.palette.gray[400]},high:{bgColor:z.palette.error[500],colorL:z.palette.gray[800],colorR:z.palette.white},low:{bgColor:z.palette.warning[200],colorL:z.palette.gray[800],colorR:z.palette.gray[800]},medium:{bgColor:z.palette.warning[500],colorL:z.palette.gray[800],colorR:z.palette.gray[800]}},Ha=({textL:e,textR:n,variant:i})=>{const a=s.nt(),{bgColor:r,colorL:o,colorR:l}=Ma[i];return t.jsxs($,{alignItems:"flex-start",display:"inline-flex",children:[e?t.jsx($,{alignItems:"center",bgColor:a.palette.white,border:`1px solid ${r}`,borderRadius:"4px 0px 0px 4px",display:"flex",justify:"center",padding:[0,.25,0,.25],children:t.jsx(S,{color:o,size:"xs",children:e})}):void 0,t.jsx($,{alignItems:"center",bgColor:r,border:`1px solid ${r}`,borderRadius:e?"0px 4px 4px 0px":"4px",display:"flex",padding:e?[0,.25,0,.125]:[0,.25,0,.25],pb:.125,pl:.125,pr:.125,pt:.125,children:t.jsx(S,{color:l,size:"xs",children:n})})]})},_a=(e,n)=>{const i={critical:z.palette.primary[700],high:z.palette.error[500],low:z.palette.warning[200],medium:z.palette.warning[500],none:z.palette.gray[200]},a={disabled:z.palette.gray[400],enabled:z.palette.gray[800]},r={critical:z.palette.white,high:z.palette.white,low:z.palette.gray[800],medium:z.palette.gray[800],none:z.palette.gray[400]};return{iconColor:n<1?i.none:i[e],iconText:s.lodashExports.capitalize(e.charAt(0)),iconTextColor:n<1?r.none:r[e],textColor:n<1?a.disabled:a.enabled}},oe=({variant:e,value:n})=>{const{iconColor:i,iconText:a,iconTextColor:r,textColor:o}=_a(e,n),l=s.lodashExports.capitalize(e.charAt(0))+e.slice(1);return t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,minWidth:"43px",children:[t.jsx(Y,{id:l,place:"top",tip:l,children:t.jsx($,{alignItems:"center",bgColor:i,borderRadius:"4px",cursor:"pointer",display:"flex",height:"22px",maxWidth:"22px",minWidth:"22px",children:t.jsx(S,{color:r,size:"sm",textAlign:"center",children:a})})}),t.jsx(S,{color:o,size:"sm",children:n})]})},Oa=({critical:e,high:n,medium:i,low:a})=>t.jsxs($,{alignItems:"center",display:"inline-flex",gap:1,children:[t.jsx(oe,{value:e,variant:"critical"}),t.jsx(oe,{value:n,variant:"high"}),t.jsx(oe,{value:i,variant:"medium"}),t.jsx(oe,{value:a,variant:"low"})]}),Va=s.dt.div`
|
|
2358
2358
|
${({theme:e})=>`
|
|
2359
2359
|
border-radius: ${e.spacing[.25]};
|
|
2360
2360
|
cursor: pointer;
|
|
@@ -2395,7 +2395,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2395
2395
|
height: auto;
|
|
2396
2396
|
}
|
|
2397
2397
|
`}
|
|
2398
|
-
`,Ya=({children:e,closeIconId:n="close-menu",isOpen:i,items:a,onClose:r,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:p})=>{const g=s.nt(),u=f.useRef(null),x=f.useCallback(h=>()=>{h(),r()},[r]);return f.useEffect(()=>{const h=["mousedown","touchstart"],b=m=>{var k;const w=m.target,y=document.getElementById("helpBtn"),v=document.getElementById("filterBtn"),j=(w===y||((y==null?void 0:y.contains(w))??!1)||w===v||(v==null?void 0:v.contains(w)))??!1;i&&!j&&!(((k=u.current)==null?void 0:k.contains(w))??!1)&&r()};return h.forEach(m=>{document.addEventListener(m,b,{passive:!0})}),()=>{h.forEach(m=>{document.removeEventListener(m,b)})}},[i,r]),t.jsx(s.LazyMotion,{features:s.domAnimation,children:t.jsx(Ga,{animate:i?{display:"block",x:0}:{transitionEnd:{display:"none"},x:"100%"},initial:{display:"none",x:"100%"},ref:u,transition:{bounce:0,duration:.6,type:"spring"},children:t.jsxs($,{height:"100%",position:"relative",children:[t.jsxs($,{alignItems:"center",bgColor:g.palette.white,borderBottom:"1px solid",borderColor:g.palette.gray[200],display:"flex",gap:1.25,justify:"space-between",padding:[1.25,1.25,1.25,1.25],position:"sticky",top:"0",zIndex:40,children:[t.jsx(S,{color:g.palette.black,display:"inline",fontWeight:"bold",size:"xl",children:p}),t.jsx(
|
|
2398
|
+
`,Ya=({children:e,closeIconId:n="close-menu",isOpen:i,items:a,onClose:r,primaryButtonText:o,primaryOnClick:l,secondaryButtonText:c,secondaryOnClick:d,title:p})=>{const g=s.nt(),u=f.useRef(null),x=f.useCallback(h=>()=>{h(),r()},[r]);return f.useEffect(()=>{const h=["mousedown","touchstart"],b=m=>{var k;const w=m.target,y=document.getElementById("helpBtn"),v=document.getElementById("filterBtn"),j=(w===y||((y==null?void 0:y.contains(w))??!1)||w===v||(v==null?void 0:v.contains(w)))??!1;i&&!j&&!(((k=u.current)==null?void 0:k.contains(w))??!1)&&r()};return h.forEach(m=>{document.addEventListener(m,b,{passive:!0})}),()=>{h.forEach(m=>{document.removeEventListener(m,b)})}},[i,r]),t.jsx(s.LazyMotion,{features:s.domAnimation,children:t.jsx(Ga,{animate:i?{display:"block",x:0}:{transitionEnd:{display:"none"},x:"100%"},initial:{display:"none",x:"100%"},ref:u,transition:{bounce:0,duration:.6,type:"spring"},children:t.jsxs($,{height:"100%",position:"relative",children:[t.jsxs($,{alignItems:"center",bgColor:g.palette.white,borderBottom:"1px solid",borderColor:g.palette.gray[200],display:"flex",gap:1.25,justify:"space-between",padding:[1.25,1.25,1.25,1.25],position:"sticky",top:"0",zIndex:40,children:[t.jsx(S,{color:g.palette.black,display:"inline",fontWeight:"bold",size:"xl",children:p}),t.jsx(M,{icon:"close",iconColor:g.palette.gray[400],iconSize:"xs",iconTransform:"grow-4",iconType:"fa-light",id:n,onClick:r,px:.25,py:.25,variant:"ghost"})]}),t.jsxs($,{display:"flex",flexDirection:"column",justify:"space-between",minHeight:"100vh",children:[t.jsxs($,{py:1.25,children:[(a??[]).map(({customBadge:h,description:b,icon:m,onClick:w,requiresUpgrade:y,title:v})=>t.jsx(an,{customBadge:h,description:b,icon:m,onClick:x(w),requiresUpgrade:y,title:v},v)),e&&t.jsx($,{px:1.25,children:e})]}),o===void 0?void 0:t.jsxs($,{alignItems:"center",bgColor:g.palette.white,borderColor:g.palette.gray[200],borderTop:"1px solid",bottom:"0",display:"flex",gap:1.25,justify:"end",padding:[1.25,1.25,1.25,1.25],position:"sticky",width:"100%",zIndex:40,children:[c===void 0?void 0:t.jsx(P,{color:`${g.palette.primary[500]} !important`,onClick:d,pl:.5,pr:.5,variant:"ghost",children:c}),t.jsx(P,{onClick:l,type:"submit",children:o})]})]})]})})})},qa=(e,n)=>n>=50?`
|
|
2399
2399
|
${e.palette.gray[200]} 50%,
|
|
2400
2400
|
${e.palette.primary[500]} 50.05%,
|
|
2401
2401
|
${e.palette.primary[500]} ${n}%,
|
|
@@ -2549,7 +2549,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2549
2549
|
|
|
2550
2550
|
${eo(e,n)}
|
|
2551
2551
|
`}
|
|
2552
|
-
`,ao=({button:{disabled:e=!1,text:n,type:i="button",onClick:a},steps:r})=>{const[o,l]=f.useState(1),c=f.useCallback((d,p)=>()=>{l(g=>g+d),p==null||p()},[]);return t.jsx(to,{children:r.map((d,p)=>{const{content:g,title:u,nextAction:x,previousAction:h}=d,b=p+1,m=b===o?"current":"disabled",w=b<o?"completed":m;return t.jsxs(no,{children:[t.jsx($,{maxWidth:"40px",position:"relative",children:t.jsx(ro,{$variant:w,children:w==="completed"?t.jsx(T,{icon:"check",iconSize:"xs",iconType:"fa-solid"}):b})}),t.jsxs($,{ml:1.5,width:"100%",children:[t.jsx(
|
|
2552
|
+
`,ao=({button:{disabled:e=!1,text:n,type:i="button",onClick:a},steps:r})=>{const[o,l]=f.useState(1),c=f.useCallback((d,p)=>()=>{l(g=>g+d),p==null||p()},[]);return t.jsx(to,{children:r.map((d,p)=>{const{content:g,title:u,nextAction:x,previousAction:h}=d,b=p+1,m=b===o?"current":"disabled",w=b<o?"completed":m;return t.jsxs(no,{children:[t.jsx($,{maxWidth:"40px",position:"relative",children:t.jsx(ro,{$variant:w,children:w==="completed"?t.jsx(T,{icon:"check",iconSize:"xs",iconType:"fa-solid"}):b})}),t.jsxs($,{ml:1.5,width:"100%",children:[t.jsx(U,{fontWeight:"bold",lineSpacing:1.25,mb:1.5,size:"xs",children:u}),w==="current"&&t.jsxs($,{children:[g,t.jsxs(io,{children:[o>1&&t.jsx(P,{disabled:d.isDisabledPrevious??!1,onClick:c(-1,h),variant:"tertiary",children:"Previous"}),o<r.length?t.jsx(P,{disabled:d.isDisabledNext??!1,onClick:c(1,x),variant:"primary",children:"Next step"}):t.jsx(P,{disabled:e,onClick:a,type:i,variant:"primary",children:n})]})]})]})]},d.title)})})},oo=s.dt.button`
|
|
2553
2553
|
${({theme:e})=>`
|
|
2554
2554
|
align-items: center;
|
|
2555
2555
|
background-color: ${e.palette.white};
|
|
@@ -2723,7 +2723,7 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2723
2723
|
color: ${e.palette.white};
|
|
2724
2724
|
}
|
|
2725
2725
|
`}
|
|
2726
|
-
`,fo=({defaultSelection:e,options:n,handleClick:i})=>{const[a,r]=f.useState(e??n[0]),o=f.useCallback(l=>()=>{r(l),i(l)},[i]);return t.jsx(uo,{children:n.map((l,c)=>t.jsx(xo,{className:`${l.includes(a)&&"selected"}`,onClick:o(l),children:t.jsx(S,{color:"inherit",fontWeight:"bold",size:"md",sizeSm:"sm",textAlign:"center",children:l})},`${l}-${c}`))})},ho={content:"",disableBeacon:!0,hideCloseButton:!1,locale:{back:"Back",close:"Close",last:"Close",next:"Next",open:"Open the dialog",skip:"Skip"},showSkipButton:!0,styles:{buttonBack:{fontFamily:"roboto"},buttonNext:{fontFamily:"roboto"},buttonSkip:{fontFamily:"roboto"},options:{zIndex:9999},tooltipContainer:{fontFamily:"roboto",textAlign:"left"}},target:""},bo=({run:e,steps:n,onFinish:i})=>{const[a,r]=f.useState(e),[o,l]=f.useState(0),c=f.useCallback(d=>{const{action:p,index:g,status:u,type:x}=d;[s.EVENTS.STEP_AFTER,s.EVENTS.TARGET_NOT_FOUND].includes(x)?l(g+(p===s.ACTIONS.PREV?-1:1)):([s.STATUS.FINISHED,s.STATUS.SKIPPED].includes(u)||p==="close")&&(r(!1),s.lodashExports.isUndefined(i)||i())},[i]);return t.jsx(s.components_default,{callback:c,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:a,spotlightClicks:!0,stepIndex:o,steps:n,styles:{buttonNext:{display:o===n.length-1?"none":"block"},options:{zIndex:9999}}})},$o=({items:e})=>t.jsx(mr,{children:e.map(({isActive:n,label:i,onClick:a},r)=>t.jsx(yr,{className:n?"active":"",onClick:a,type:"button",children:t.jsx(
|
|
2726
|
+
`,fo=({defaultSelection:e,options:n,handleClick:i})=>{const[a,r]=f.useState(e??n[0]),o=f.useCallback(l=>()=>{r(l),i(l)},[i]);return t.jsx(uo,{children:n.map((l,c)=>t.jsx(xo,{className:`${l.includes(a)&&"selected"}`,onClick:o(l),children:t.jsx(S,{color:"inherit",fontWeight:"bold",size:"md",sizeSm:"sm",textAlign:"center",children:l})},`${l}-${c}`))})},ho={content:"",disableBeacon:!0,hideCloseButton:!1,locale:{back:"Back",close:"Close",last:"Close",next:"Next",open:"Open the dialog",skip:"Skip"},showSkipButton:!0,styles:{buttonBack:{fontFamily:"roboto"},buttonNext:{fontFamily:"roboto"},buttonSkip:{fontFamily:"roboto"},options:{zIndex:9999},tooltipContainer:{fontFamily:"roboto",textAlign:"left"}},target:""},bo=({run:e,steps:n,onFinish:i})=>{const[a,r]=f.useState(e),[o,l]=f.useState(0),c=f.useCallback(d=>{const{action:p,index:g,status:u,type:x}=d;[s.EVENTS.STEP_AFTER,s.EVENTS.TARGET_NOT_FOUND].includes(x)?l(g+(p===s.ACTIONS.PREV?-1:1)):([s.STATUS.FINISHED,s.STATUS.SKIPPED].includes(u)||p==="close")&&(r(!1),s.lodashExports.isUndefined(i)||i())},[i]);return t.jsx(s.components_default,{callback:c,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:a,spotlightClicks:!0,stepIndex:o,steps:n,styles:{buttonNext:{display:o===n.length-1?"none":"block"},options:{zIndex:9999}}})},$o=({items:e})=>t.jsx(mr,{children:e.map(({isActive:n,label:i,onClick:a},r)=>t.jsx(yr,{className:n?"active":"",onClick:a,type:"button",children:t.jsx(U,{color:"inherit",fontWeight:"semibold",size:"sm",sizeSm:"xs",children:i})},`${i}-${r}`))}),ln=t.jsx($,{alignItems:"center",bgColor:z.palette.primary[25],borderRadius:"8px",gap:.5,justify:"center",padding:[.125,.25,.125,.25],width:"max-content",children:t.jsx(S,{bgGradient:z.palette.gradients["01"],fontWeight:"semibold",size:"xs",textFill:"transparent",children:"Recommended"})}),yo=s.dt.div`
|
|
2727
2727
|
${({className:e,theme:n})=>`
|
|
2728
2728
|
align-items: flex-start;
|
|
2729
2729
|
border-radius: ${n.spacing[1]};
|
|
@@ -2789,4 +2789,4 @@ ${h[8]}...`:(h.length<8&&d(!1),n)},[o,n,e]),u=f.useMemo(g,[g]),x=f.useCallback(a
|
|
|
2789
2789
|
}
|
|
2790
2790
|
`}
|
|
2791
2791
|
`;const mo={advanced:{title:"Advanced plan",benefits:"Leverage vulnerability scanning + AI + expert intelligence",buttonText:"Contact sales",description:"For teams that want to discover risk exposure with speed and accuracy.",priceGroup:"$1,579"},essential:{title:"Essential plan",benefits:"Leverage vulnerability scanning",buttonText:"Start a 21-day free trial",description:`For teams that want to discover risk exposure quickly
|
|
2792
|
-
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},wo=({description:e,onClick:n,plan:i})=>{const{title:a,description:r,benefits:o,buttonText:l}=mo[i],c=e??r;return t.jsxs(yo,{className:i,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,pt:i==="essential"?1.75:0,children:[i==="advanced"&&ln,t.jsx(
|
|
2792
|
+
through our scanning tool.`,priceAuthor:"$499",priceGroup:"$1,579"}},wo=({description:e,onClick:n,plan:i})=>{const{title:a,description:r,benefits:o,buttonText:l}=mo[i],c=e??r;return t.jsxs(yo,{className:i,children:[t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,pt:i==="essential"?1.75:0,children:[i==="advanced"&&ln,t.jsx(U,{color:z.palette.gray[900],fontWeight:"semibold",size:"sm",sizeSm:"xs",children:a}),t.jsx(S,{color:z.palette.gray[400],fontWeight:"semibold",pb:i==="essential"?1.25:0,size:"sm",sizeSm:"xs",children:o})]}),t.jsx(S,{lineSpacing:1.5,lineSpacingSm:1.25,pb:i==="advanced"?1.5:0,size:"md",sizeSm:"sm",children:c}),t.jsx(P,{onClick:n,variant:"primary",children:l})]})};exports.Accordion=Bn;exports.AccordionContent=gt;exports.ActionButton=Be;exports.Alert=qn;exports.AppliedFilter=ae;exports.AppliedFilters=Mr;exports.ArrayField=Ae;exports.Avatar=ni;exports.BaseButtonComponent=Oe;exports.BaseComponent=$e;exports.BaseSpanComponent=Ue;exports.BaseTextComponent=Ve;exports.Button=P;exports.Button$1=je;exports.ButtonToolbarCenter=Si;exports.ButtonToolbarRow=Ii;exports.ButtonToolbarStartRow=zi;exports.Calendar=mt;exports.Calendar$1=Ct;exports.Calendar$2=zt;exports.CalendarCell=yt;exports.CalendarGrid=ze;exports.CardHeader=Se;exports.CardWithImage=ai;exports.CardWithInput=Yi;exports.CardWithOptions=Ut;exports.CardWithSelector=Qi;exports.CardWithSwitch=nr;exports.Carousel=lr;exports.Checkbox=Ee;exports.CodeSnippet=pr;exports.Col=Pe;exports.ColumFilters=Zt;exports.ColumnsModal=Nr;exports.ComboBox=bt;exports.ComboBoxField=Le;exports.Container=$;exports.CustomThemeProvider=Nn;exports.DateField=vt;exports.DateSelector=le;exports.Description=rn;exports.Dialog=Te;exports.Divider=ne;exports.Editable=Ci;exports.EmptyButton=He;exports.EmptyState=qr;exports.FilePreview=ft;exports.FilterControl=qt;exports.FilterForm=Me;exports.FilterFormContent=Kt;exports.FiltersList=Jt;exports.FixedTabs=$o;exports.Form=Jr;exports.Gap=Ni;exports.GridContainer=Qr;exports.GroupSelector=ta;exports.Header=Ie;exports.Header$1=Mt;exports.Heading=U;exports.Icon=T;exports.IconButton=M;exports.IndicatorCard=na;exports.InfoSidebar=ia;exports.InnerForm=Kr;exports.Input=Fe;exports.InputArray=Ri;exports.InputDate=kt;exports.InputDateRange=St;exports.InputDateTime=ki;exports.InputFile=Ai;exports.InputNumber=Ft;exports.InputNumberRange=Nt;exports.InputTags=Bi;exports.Label=Ge;exports.Link=Q;exports.ListItem=we;exports.ListItemsWrapper=Ot;exports.LittleFlag=aa;exports.Loading=ua;exports.LocationCode=At;exports.Logo=fa;exports.Lottie=ba;exports.MemoizedImage=te;exports.Menu=$a;exports.MenuItem=an;exports.MessageBanner=ma;exports.Modal=en;exports.ModalConfirm=$r;exports.ModalFooter=Bt;exports.Notification=ka;exports.NotificationSign=Ht;exports.NumberField=Ce;exports.NumberInput=za;exports.OAuthSelector=Ta;exports.Option=ht;exports.OptionBoxContainer=Je;exports.OptionContainer=_e;exports.OptionContainer$1=tn;exports.OutlineContainer=O;exports.PhoneInput=Ui;exports.PlanCard=wo;exports.PopUp=Aa;exports.Popover=ye;exports.PremiumFeature=nn;exports.PreviewPanel=Vt;exports.PriorityScore=Na;exports.ProgressBar=Pa;exports.RadioButton=qe;exports.RecommendedTag=ln;exports.Row=It;exports.ScrollUpButton=Ba;exports.Search=ce;exports.SearchPanel=Yt;exports.SeverityBadge=Ha;exports.SeverityOverview=Oa;exports.SeverityOverviewBadge=oe;exports.ShowOnHover=Ua;exports.SlideOutMenu=Ya;exports.Slider=Qa;exports.Span=se;exports.StepLapse=ao;exports.Tab=_t;exports.TableButton=lo;exports.Tabs=Xe;exports.Tag=X;exports.TagsField=We;exports.Text=S;exports.TextArea=Gi;exports.Thumb=on;exports.TimeField=jt;exports.TimeLine=go;exports.TimeLineCard=sn;exports.Toggle=Lt;exports.ToggleButton=fo;exports.Tooltip=Y;exports.Tour=bo;exports.baseStep=ho;exports.formatCheckValues=Qt;exports.getStyledConfig=be;exports.hiddenProps=dt;exports.icons=Tn;exports.setBorder=ue;exports.setDisplay=xe;exports.setInteraction=he;exports.setMargin=pe;exports.setPadding=de;exports.setPosition=ge;exports.setText=fe;exports.theme=z;exports.uniqueIcons=Fn;exports.useCarousel=Et;exports.useClickOutside=me;exports.useCloudinaryImage=Rt;exports.useColumnsModal=qi;exports.useConfirmDialog=Vr;exports.useDebouncedCallback=Dt;exports.useFilterForm=Xt;exports.useFilters=Or;exports.useModal=Ne;exports.useSearch=Ki;exports.variantBuilder=K;
|