@zeniai/web-components 4.1.47 → 4.1.48
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/{SessionTimeoutPopup-LPfBi-Mc.cjs → SessionTimeoutPopup-Bkz3D6I3.cjs} +13132 -12933
- package/dist/{SessionTimeoutPopup-BJhyGZ8L.js → SessionTimeoutPopup-NgqDPYRI.js} +68929 -67706
- package/dist/appLocale.d.ts +48 -0
- package/dist/assets/illustrative/no-search-result.svg +24 -0
- package/dist/cockpit.cjs.js +5 -5
- package/dist/cockpit.esm.js +9 -13
- package/dist/components/cockpit/common/cockpitFilters/commonTypes.d.ts +1 -1
- package/dist/components/{cockpit/common/cockpitFilters/components → common/filters}/FiltersPopover.d.ts +1 -1
- package/dist/components/common/filters/GenericFilters.d.ts +75 -0
- package/dist/components/common/filters/components/GenericFiltersSelection.d.ts +58 -0
- package/dist/components/common/filters/genericFilterTypes.d.ts +62 -0
- package/dist/components/common/listPageSearchInputBox/ListPageSearchInputBox.d.ts +3 -1
- package/dist/components/common/listPageSearchSection/ListPageSearchSection.d.ts +13 -0
- package/dist/components/expenseAutomation/ExpenseAutomationPage.d.ts +18 -1
- package/dist/components/expenseAutomation/components/EmptyTableSection.d.ts +6 -0
- package/dist/components/expenseAutomation/components/ExpenseAutomationSubTabSwitcher.d.ts +17 -0
- package/dist/components/expenseAutomation/components/NavBarWithHeader.d.ts +21 -1
- package/dist/components/expenseAutomation/components/TableSection.d.ts +2 -1
- package/dist/components/expenseAutomation/components/filters/AmountFilterValueField.d.ts +8 -0
- package/dist/components/expenseAutomation/components/filters/AmountMatchingOperatorDropdown.d.ts +8 -0
- package/dist/components/expenseAutomation/components/filters/TransactionFiltersComponent.d.ts +17 -0
- package/dist/components/expenseAutomation/components/filters/amountFilterConstants.d.ts +19 -0
- package/dist/components/expenseAutomation/components/filters/transactionFiltersHelpers.d.ts +24 -0
- package/dist/components/expenseAutomation/components/navbarHeaderData.d.ts +2 -2
- package/dist/components/expenseAutomation/sections/transactionCategorization/header/transactionCategorizationHeaderConfig.d.ts +3 -4
- package/dist/components/expenseAutomation/sections/transactionCategorization/header/transactionCategorizationHeaderItemsData.d.ts +8 -2
- package/dist/components/expenseAutomation/sections/transactionCategorization/transactionCategorizationCompletedSubTabs.d.ts +7 -0
- package/dist/components/formElements/filterValuesDropdownField/FilterValuesDropdownField.d.ts +5 -14
- package/dist/components/spendManagement/common/filters/spendManagementFiltersHelpers.d.ts +1 -1
- package/dist/components/transactionDetail/items/TransactionLineWithAccountAndClass.d.ts +3 -2
- package/dist/context/featureProvider/FeatureGateNameConstants.d.ts +2 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.js +179 -179
- package/dist/strings/strings.d.ts +48 -0
- package/dist/vendor-.pnpm-BAo5Ni_N.cjs +279 -0
- package/dist/{vendor-.pnpm-DtQs9f4A.js → vendor-.pnpm-DUwxZLYO.js} +24170 -23046
- package/package.json +12 -8
- package/dist/vendor-.pnpm-Dd2Fl0gB.cjs +0 -280
package/dist/appLocale.d.ts
CHANGED
|
@@ -87,10 +87,13 @@ declare class AppLocale {
|
|
|
87
87
|
unreview: string;
|
|
88
88
|
download: string;
|
|
89
89
|
search: string;
|
|
90
|
+
searchShortcutCmd: string;
|
|
91
|
+
searchShortcutCtrl: string;
|
|
90
92
|
delete: string;
|
|
91
93
|
reload: string;
|
|
92
94
|
goHome: string;
|
|
93
95
|
refresh: string;
|
|
96
|
+
filter: string;
|
|
94
97
|
name: string;
|
|
95
98
|
select: string;
|
|
96
99
|
goBack: string;
|
|
@@ -8499,6 +8502,11 @@ declare class AppLocale {
|
|
|
8499
8502
|
completed: string;
|
|
8500
8503
|
autoCategorized: string;
|
|
8501
8504
|
};
|
|
8505
|
+
completedSubTabs: {
|
|
8506
|
+
all: string;
|
|
8507
|
+
aiAccountant: string;
|
|
8508
|
+
manual: string;
|
|
8509
|
+
};
|
|
8502
8510
|
subTitles: {
|
|
8503
8511
|
review: {
|
|
8504
8512
|
item1: {
|
|
@@ -8533,6 +8541,46 @@ declare class AppLocale {
|
|
|
8533
8541
|
title: string;
|
|
8534
8542
|
subTitle: string;
|
|
8535
8543
|
};
|
|
8544
|
+
emptyStates: {
|
|
8545
|
+
noSearchResults: {
|
|
8546
|
+
title: string;
|
|
8547
|
+
subTitle: string;
|
|
8548
|
+
};
|
|
8549
|
+
};
|
|
8550
|
+
filters: {
|
|
8551
|
+
categoryLabels: {
|
|
8552
|
+
paymentAccountName: string;
|
|
8553
|
+
paymentAccountType: string;
|
|
8554
|
+
payee: string;
|
|
8555
|
+
category: string;
|
|
8556
|
+
class: string;
|
|
8557
|
+
amount: string;
|
|
8558
|
+
};
|
|
8559
|
+
amountOperators: {
|
|
8560
|
+
lessThan: string;
|
|
8561
|
+
greaterThan: string;
|
|
8562
|
+
isEqual: string;
|
|
8563
|
+
inBetween: string;
|
|
8564
|
+
placeholder: string;
|
|
8565
|
+
};
|
|
8566
|
+
amountInputPlaceholders: {
|
|
8567
|
+
enterAmount: string;
|
|
8568
|
+
from: string;
|
|
8569
|
+
to: string;
|
|
8570
|
+
};
|
|
8571
|
+
filterOptions: {
|
|
8572
|
+
transactionAmountOptions: {
|
|
8573
|
+
label: string;
|
|
8574
|
+
value: string;
|
|
8575
|
+
}[];
|
|
8576
|
+
transactionTypeOptions: {
|
|
8577
|
+
label: string;
|
|
8578
|
+
value: string;
|
|
8579
|
+
}[];
|
|
8580
|
+
};
|
|
8581
|
+
selectPaymentAccountNamePlaceholder: string;
|
|
8582
|
+
searchForPayeePlaceholder: string;
|
|
8583
|
+
};
|
|
8536
8584
|
addCategory: string;
|
|
8537
8585
|
addClass: string;
|
|
8538
8586
|
addProject: string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<svg width="87" height="69" viewBox="0 0 87 69" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g opacity="0.2">
|
|
3
|
+
<rect x="5.07362" y="5.97328" width="71.6165" height="16.0084" rx="0.421274" fill="#97C3B9"/>
|
|
4
|
+
<rect x="5.07362" y="5.97328" width="71.6165" height="16.0084" rx="0.421274" stroke="#97C3B9" stroke-width="0.842547"/>
|
|
5
|
+
<rect x="5.07411" y="48.5582" width="71.6165" height="16.0084" rx="0.421274" fill="#97C3B9"/>
|
|
6
|
+
<rect x="5.07411" y="48.5582" width="71.6165" height="16.0084" rx="0.421274" stroke="#97C3B9" stroke-width="0.842547"/>
|
|
7
|
+
<rect x="5.07411" y="27.2658" width="71.6165" height="16.0084" rx="0.421274" fill="#97C3B9"/>
|
|
8
|
+
<rect x="5.07411" y="27.2658" width="71.6165" height="16.0084" rx="0.421274" stroke="#97C3B9" stroke-width="0.842547"/>
|
|
9
|
+
<path d="M32.1074 33.6116C32.1074 38.8302 34.1805 43.835 37.8706 47.5251C41.5607 51.2152 46.5656 53.2883 51.7842 53.2883C57.0028 53.2883 62.0076 51.2152 65.6978 47.5251C69.3879 43.835 71.4609 38.8302 71.4609 33.6116C71.4609 28.393 69.3879 23.3881 65.6978 19.698C62.0076 16.0079 57.0028 13.9348 51.7842 13.9348C46.5656 13.9348 41.5607 16.0079 37.8706 19.698C34.1805 23.3881 32.1074 28.393 32.1074 33.6116Z" fill="#97C3B9"/>
|
|
10
|
+
</g>
|
|
11
|
+
<rect x="8.69056" y="8.82703" width="56.8595" height="0.277597" rx="0.138799" stroke="#97C3B9" stroke-width="0.277597"/>
|
|
12
|
+
<path d="M35.078 17.3912H1.60915C1.14382 17.3912 0.766602 17.014 0.766602 16.5487V1.38283C0.766602 0.917506 1.14382 0.540283 1.60915 0.540283H72.4708C72.9374 0.540283 73.3152 0.919552 73.3133 1.38619L73.2532 16.4851C73.2513 16.9491 72.8747 17.3243 72.4106 17.3243H67.0575" stroke="#97C3B9" stroke-width="0.666234" stroke-linecap="round"/>
|
|
13
|
+
<path d="M70.126 22.3201H72.471C72.9376 22.3201 73.3154 22.6993 73.3135 23.166L73.253 38.3766C73.2514 38.7789 72.9248 39.1041 72.5226 39.1041" stroke="#97C3B9" stroke-width="0.666234" stroke-linecap="round"/>
|
|
14
|
+
<rect x="8.69056" y="30.6068" width="19.2475" height="0.277597" rx="0.138799" stroke="#97C3B9" stroke-width="0.277597"/>
|
|
15
|
+
<path d="M30.8562 22.3201H1.17556C0.710229 22.3201 0.333008 22.6973 0.333008 23.1626V38.3285C0.333008 38.7938 0.710229 39.171 1.17556 39.171H29.7519" stroke="#97C3B9" stroke-width="0.666234" stroke-linecap="round"/>
|
|
16
|
+
<rect x="8.69056" y="52.6395" width="26.7253" height="0.277597" rx="0.138799" fill="#97C3B9" stroke="#97C3B9" stroke-width="0.277597"/>
|
|
17
|
+
<path d="M73.2257 58.1678V60.3613C73.2257 60.8266 72.8485 61.2039 72.3831 61.2039H1.60915C1.14382 61.2039 0.766602 60.8266 0.766602 60.3613V45.1955C0.766602 44.7301 1.14382 44.3529 1.60915 44.3529H30.6776" stroke="#97C3B9" stroke-width="0.666234" stroke-linecap="round"/>
|
|
18
|
+
<path d="M70.126 43.9727H72.4743C72.9397 43.9727 73.3169 44.3499 73.3169 44.8152V53.3979" stroke="#97C3B9" stroke-width="0.842547" stroke-linecap="round"/>
|
|
19
|
+
<path d="M31.7017 33.9263C31.7017 39.1449 33.7747 44.1497 37.4648 47.8398C41.155 51.5299 46.1598 53.603 51.3784 53.603C56.597 53.603 61.6019 51.5299 65.292 47.8398C68.9821 44.1497 71.0552 39.1449 71.0552 33.9263C71.0552 28.7077 68.9821 23.7028 65.292 20.0127C61.6019 16.3226 56.597 14.2495 51.3784 14.2495C46.1598 14.2495 41.155 16.3226 37.4648 20.0127C33.7747 23.7028 31.7017 28.7077 31.7017 33.9263Z" stroke="#EEBA7D" stroke-linecap="round" stroke-linejoin="round"/>
|
|
20
|
+
<path d="M84.3854 67.1342L65.6099 48.3586" stroke="#EEBA7D" stroke-linecap="round" stroke-linejoin="round"/>
|
|
21
|
+
<path d="M58.0977 26.9509L45.0031 40.0455" stroke="#EEBA7D" stroke-linecap="round"/>
|
|
22
|
+
<path d="M58.0977 40.0457L45.0031 26.9511" stroke="#EEBA7D" stroke-linecap="round"/>
|
|
23
|
+
<path opacity="0.2" d="M84.4455 68.4403L65.6699 49.6648" stroke="#97C3B9" stroke-width="1.11039" stroke-linecap="round" stroke-linejoin="round"/>
|
|
24
|
+
</svg>
|
package/dist/cockpit.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./SessionTimeoutPopup-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./SessionTimeoutPopup-Bkz3D6I3.cjs"),o=require("./vendor-.pnpm-BAo5Ni_N.cjs"),u=require("react"),s=require("@emotion/styled"),Xe=require("@liveblocks/react"),J=require("@zeniai/client-epic-state"),Es=require("@liveblocks/react-ui"),we=require("@emotion/react"),Lo=require("react-dom"),St=require("@liveblocks/react-ui/primitives"),xi=require("@liveblocks/react/suspense");function Ea(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const le=Ea(u),wa=({inboxNotification:e,onNotificationClick:n})=>{const r=Xe.useInboxNotificationThread(e.id),i=r.metadata.entityType.split("."),a=r.metadata.isGlobalComment&&i.length===2;return o.jsxRuntimeExports.jsx(va,{isClickable:a,isUnRead:e.readAt==null,onClick:()=>{n(r.metadata,r.id)},children:o.jsxRuntimeExports.jsx(Es.InboxNotification,{inboxNotification:e,kinds:{thread:d=>o.jsxRuntimeExports.jsx(Es.InboxNotification.Thread,{...d,showRoomName:!0})}})})},va=s.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
width: 100%;
|
|
4
4
|
cursor: ${e=>e.isClickable?"pointer":"initial"};
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
height: ${t.Space.sp3};
|
|
191
191
|
align-items: center;
|
|
192
192
|
justify-content: center;
|
|
193
|
-
`,$l=s.div``,{cockpit:yn,common:Rl}=t.appLocale.getLocalizedStrings();function El({defaultOptions:e,downloadState:n,downloadParams:r,signedInUser:i,cockpitHeader:a,analytics:d,currentTab:l,updateDownloadStateHandler:c,onZeniLogoClick:p,onLogOutClick:m,onThreadClick:x,onNotificationClick:S,onNewCustomerClick:h}){const C=t.useWindowSizeContext(),[b,f]=u.useState(!1),[g,j]=u.useState(!1),{inboxNotifications:y,isLoading:E,isFetchingMore:R,hasFetchedAll:A,fetchMore:I}=Xe.useInboxNotifications(),{threads:v,isLoading:T}=t.useFilteredThreads({application:"cockpit",isGlobalComment:!0},"both",!0),D=u.useMemo(()=>v.filter(O=>O.resolved===!1),[v]).length,{setOpenThread:K,setRequestToOpenThread:M,openThread:Y}=u.useContext(t.ThreadsContext);u.useEffect(()=>{const O=setTimeout(()=>I?.(),0);return()=>clearTimeout(O)});const G=E||R===!0||A!==!0,w=y?.filter(O=>O.readAt==null&&O.roomId?.includes("cockpit")===!0).length,P=dl(l),B=u.useCallback((O,z)=>{const{companyId:Z,entityType:ie}=O;Y===z?K(null):(f(!1),M({threadId:z,companyId:Z,entityType:ie}))},[Y,K,M]),k=u.useCallback((O,z)=>{const{companyId:Z,entityType:ie}=O;Y===z?K(null):(j(!1),M({threadId:z,companyId:Z,entityType:ie}))},[Y,K,M]);return C!=="small"?o.jsxRuntimeExports.jsxs(vs,{children:[o.jsxRuntimeExports.jsxs(ks,{children:[o.jsxRuntimeExports.jsx(fl,{children:o.jsxRuntimeExports.jsx(yl,{"data-testid":t.generateDataTestId("zeni-logo-cockpit-nav-bar"),onClick:p})}),o.jsxRuntimeExports.jsx(gl,{children:a??yn.cockpitHeader}),o.jsxRuntimeExports.jsxs(Cl,{children:[b?null:o.jsxRuntimeExports.jsxs(Ts,{isDisabled:T,onClick:T?()=>null:()=>f(!0),children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:T?void 0:D,isLoading:T,style:{left:"12px"}}),o.jsxRuntimeExports.jsx(jl,{})]}),o.jsxRuntimeExports.jsxs(Ts,{isDisabled:G,onClick:G?()=>null:()=>j(!0),children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:w,isLoading:G,style:{left:"12px"}}),o.jsxRuntimeExports.jsx(bl,{})]}),o.jsxRuntimeExports.jsx(xl,{defaultOptions:e,downloadParams:r,downloadState:n,analytics:d,currentCockpitTab:P,updateDownloadStateHandler:c}),o.jsxRuntimeExports.jsx(t.Button,{variant:"primary",size:"small",style:{whiteSpace:"nowrap"},label:yn.newCustomer,onClick:h}),o.jsxRuntimeExports.jsx(Sl,{children:o.jsxRuntimeExports.jsx(t.LogoutButton,{signedInUser:i,pageName:"Cockpit",onLogOutClick:m})})]})]}),o.jsxRuntimeExports.jsx(t.AllThreadsDrawer,{isDrawerOpen:b,filter:{application:"cockpit",isGlobalComment:!0},autoExpand:!0,autoFocus:!1,drawerTitle:Rl.headers.comments,onCloseAllThreadsDrawer:()=>f(!1),onThreadClick:(O,z)=>{x(O,z,B)},style:{cursor:"pointer"},showReactions:!0,showActions:!0,allowExpand:!0,threads:v,isLoading:T,allowComposer:!1,textOverrides:{},withRoomProvider:!0}),o.jsxRuntimeExports.jsx(La,{application:"cockpit",isDrawerOpen:g,onNotificationClick:(O,z)=>{S(O,z,k)},onCloseAllInboxNotificationsDrawer:()=>j(!1)})]}):o.jsxRuntimeExports.jsx(vs,{className:"mobileHeader",children:o.jsxRuntimeExports.jsxs(ks,{className:"mobileTitle",children:[o.jsxRuntimeExports.jsx(t.Button,{variant:"primary",size:"small",style:{whiteSpace:"nowrap"},label:yn.newCustomer,onClick:h}),o.jsxRuntimeExports.jsx($l,{children:o.jsxRuntimeExports.jsx(t.LogoutButton,{signedInUser:i,pageName:"Cockpit",onLogOutClick:m})})]})})}const gs=["management","subscription","portfolio","onboarding","audit","healthMonitor","taskManager","aiAccountant","creditAgent"],$t=e=>J.stringToUnion(e,gs),wl=e=>J.stringToUnionStrict(e,gs),vl=(e,n)=>e in n,ji=e=>{switch(e){case"management":return hi;case"subscription":return gi;case"portfolio":return Si;case"healthMonitor":return yi;case"aiAccountant":return ul;default:return[]}},rs=(e,n)=>{const{cockpit:{filters:{filterCategories:r}}}=t.appLocale.getLocalizedStrings();switch(e){case"management":return r.management[n];case"portfolio":return r.portfolio[n];case"subscription":return r.subscription[n];case"aiAccountant":return r.aiAccountant[n];
|
|
193
|
+
`,$l=s.div``,{cockpit:yn,common:Rl}=t.appLocale.getLocalizedStrings();function El({defaultOptions:e,downloadState:n,downloadParams:r,signedInUser:i,cockpitHeader:a,analytics:d,currentTab:l,updateDownloadStateHandler:c,onZeniLogoClick:p,onLogOutClick:m,onThreadClick:x,onNotificationClick:S,onNewCustomerClick:h}){const C=t.useWindowSizeContext(),[b,f]=u.useState(!1),[g,j]=u.useState(!1),{inboxNotifications:y,isLoading:E,isFetchingMore:R,hasFetchedAll:A,fetchMore:I}=Xe.useInboxNotifications(),{threads:v,isLoading:T}=t.useFilteredThreads({application:"cockpit",isGlobalComment:!0},"both",!0),D=u.useMemo(()=>v.filter(O=>O.resolved===!1),[v]).length,{setOpenThread:K,setRequestToOpenThread:M,openThread:Y}=u.useContext(t.ThreadsContext);u.useEffect(()=>{const O=setTimeout(()=>I?.(),0);return()=>clearTimeout(O)});const G=E||R===!0||A!==!0,w=y?.filter(O=>O.readAt==null&&O.roomId?.includes("cockpit")===!0).length,P=dl(l),B=u.useCallback((O,z)=>{const{companyId:Z,entityType:ie}=O;Y===z?K(null):(f(!1),M({threadId:z,companyId:Z,entityType:ie}))},[Y,K,M]),k=u.useCallback((O,z)=>{const{companyId:Z,entityType:ie}=O;Y===z?K(null):(j(!1),M({threadId:z,companyId:Z,entityType:ie}))},[Y,K,M]);return C!=="small"?o.jsxRuntimeExports.jsxs(vs,{children:[o.jsxRuntimeExports.jsxs(ks,{children:[o.jsxRuntimeExports.jsx(fl,{children:o.jsxRuntimeExports.jsx(yl,{"data-testid":t.generateDataTestId("zeni-logo-cockpit-nav-bar"),onClick:p})}),o.jsxRuntimeExports.jsx(gl,{children:a??yn.cockpitHeader}),o.jsxRuntimeExports.jsxs(Cl,{children:[b?null:o.jsxRuntimeExports.jsxs(Ts,{isDisabled:T,onClick:T?()=>null:()=>f(!0),children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:T?void 0:D,isLoading:T,style:{left:"12px"}}),o.jsxRuntimeExports.jsx(jl,{})]}),o.jsxRuntimeExports.jsxs(Ts,{isDisabled:G,onClick:G?()=>null:()=>j(!0),children:[o.jsxRuntimeExports.jsx(t.CommentsAndNotesCount,{count:w,isLoading:G,style:{left:"12px"}}),o.jsxRuntimeExports.jsx(bl,{})]}),o.jsxRuntimeExports.jsx(xl,{defaultOptions:e,downloadParams:r,downloadState:n,analytics:d,currentCockpitTab:P,updateDownloadStateHandler:c}),o.jsxRuntimeExports.jsx(t.Button,{variant:"primary",size:"small",style:{whiteSpace:"nowrap"},label:yn.newCustomer,onClick:h}),o.jsxRuntimeExports.jsx(Sl,{children:o.jsxRuntimeExports.jsx(t.LogoutButton,{signedInUser:i,pageName:"Cockpit",onLogOutClick:m})})]})]}),o.jsxRuntimeExports.jsx(t.AllThreadsDrawer,{isDrawerOpen:b,filter:{application:"cockpit",isGlobalComment:!0},autoExpand:!0,autoFocus:!1,drawerTitle:Rl.headers.comments,onCloseAllThreadsDrawer:()=>f(!1),onThreadClick:(O,z)=>{x(O,z,B)},style:{cursor:"pointer"},showReactions:!0,showActions:!0,allowExpand:!0,threads:v,isLoading:T,allowComposer:!1,textOverrides:{},withRoomProvider:!0}),o.jsxRuntimeExports.jsx(La,{application:"cockpit",isDrawerOpen:g,onNotificationClick:(O,z)=>{S(O,z,k)},onCloseAllInboxNotificationsDrawer:()=>j(!1)})]}):o.jsxRuntimeExports.jsx(vs,{className:"mobileHeader",children:o.jsxRuntimeExports.jsxs(ks,{className:"mobileTitle",children:[o.jsxRuntimeExports.jsx(t.Button,{variant:"primary",size:"small",style:{whiteSpace:"nowrap"},label:yn.newCustomer,onClick:h}),o.jsxRuntimeExports.jsx($l,{children:o.jsxRuntimeExports.jsx(t.LogoutButton,{signedInUser:i,pageName:"Cockpit",onLogOutClick:m})})]})})}const gs=["management","subscription","portfolio","onboarding","audit","healthMonitor","taskManager","aiAccountant","creditAgent"],$t=e=>J.stringToUnion(e,gs),wl=e=>J.stringToUnionStrict(e,gs),vl=(e,n)=>e in n,ji=e=>{switch(e){case"management":return hi;case"subscription":return gi;case"portfolio":return Si;case"healthMonitor":return yi;case"aiAccountant":return ul;default:return[]}},rs=(e,n)=>{const{cockpit:{filters:{filterCategories:r}}}=t.appLocale.getLocalizedStrings();switch(e){case"management":return r.management[n];case"portfolio":return r.portfolio[n];case"subscription":return r.subscription[n];case"aiAccountant":return r.aiAccountant[n];default:return r.healthMonitor[n]}},kl=s.div`
|
|
194
194
|
display: flex;
|
|
195
195
|
justify-content: space-between;
|
|
196
196
|
align-items: center;
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
`,Kl=s(t.StandardRegularSp)`
|
|
263
263
|
overflow: hidden;
|
|
264
264
|
text-overflow: ellipsis;
|
|
265
|
-
`,Gl=({options:e,categoryIndex:n,value:r,categoryType:i,categoryLabel:a,valuesCombinationOperator:d,showAnyAll:l,onChange:c,onValuesCombinationOperatorChange:p})=>{const m=o.useTheme(),x=t.getMultiSelectDropdownStyles(m),{common:{filters:S,texts:h},cockpit:{userProfileAltText:C}}=t.appLocale.getLocalizedStrings(),b=r.map(T=>e.find(F=>F.value===T)),f=(T,F,D,K)=>i!=="user"?null:T==null?o.jsxRuntimeExports.jsx(t.EntityAvatarWithInitials,{firstName:F,lastName:D,index:K}):o.jsxRuntimeExports.jsx(_l,{src:T.href,alt:C,onError:({currentTarget:M})=>{M.onerror=null,M.src=t.AvatarSVG},loading:"lazy"}),g=T=>i!=="rating"?null:Object.keys(eo).includes(T)?o.jsxRuntimeExports.jsx(ln,{iconName:eo[T].iconName,width:18,height:18,stopAnimation:!0,style:{margin:0}}):o.jsxRuntimeExports.jsx(ln,{iconName:To[T].iconName,stopAnimation:!0,width:18,height:18,style:{margin:0}}),j=T=>i!=="runway"?null:o.jsxRuntimeExports.jsx(Nl,{color:T}),y=T=>{const F=e.findIndex(D=>D.value===T.data.value);return o.jsxRuntimeExports.jsx(o.components.MultiValueLabel,{...T,children:o.jsxRuntimeExports.jsxs(Fl,{children:[f(T.data.photo,T.data.label.split(" ")[0],T.data.label.split(" ")[1]!=null?T.data.label.split(" ")[1]:"",F),g(T.data.value),j(T.data.iconColor),o.jsxRuntimeExports.jsx(Kl,{children:T.children})]})})},E=T=>o.jsxRuntimeExports.jsx(o.components.MultiValueRemove,{...T,children:o.jsxRuntimeExports.jsx(Hl,{})}),R=T=>{const{onMouseMove:F,onMouseOver:D,isSelected:K,...M}=T.innerProps,Y=e.findIndex(w=>w.value===T.data.value),G={...T,innerProps:M};return o.jsxRuntimeExports.jsx(o.components.Option,{...G,children:o.jsxRuntimeExports.jsxs(Wl,{children:[o.jsxRuntimeExports.jsxs(Bl,{children:[f(T.data.photo,T.data.label.split(" ")[0],T.data.label.split(" ")[1]!=null?T.data.label.split(" ")[1]:"",Y),g(T.data.value),j(T.data.iconColor),o.jsxRuntimeExports.jsx(t.StandardRegular,{children:T.label})]}),T.isSelected&&o.jsxRuntimeExports.jsx(Vl,{})]})})},A=(T,F)=>i==="user"&&T.data.email!=null?T.data.label.toLowerCase().includes(F.toLowerCase())||T.data.email.toLowerCase().includes(F.toLowerCase()):T.data.label.toLowerCase().includes(F.toLowerCase()),I=l&&b.length>1,v=()=>{switch(i){case"dateRange":return o.jsxRuntimeExports.jsx(Zl,{"data-testid":t.generateDataTestId("cockpit-filters-values-daterange"),children:o.jsxRuntimeExports.jsx(t.DateRangeFilterField,{onDateRangeChange:T=>{T.startDate!=null&&T.endDate!=null&&c([{label:S.startDate,value:T.startDate},{label:S.endDate,value:T.endDate}],n)},selectedDates:r})});case"dropdownRange":return o.jsxRuntimeExports.jsx(Xl,{"data-testid":t.generateDataTestId("cockpit-filters-values-numrange"),children:o.jsxRuntimeExports.jsx(Pl,{options:e.map(T=>parseInt(T.label)),onNumericRangeChange:T=>{T.start!=null&&T.end!=null&&c([{label:S.startDate,value:T.start.toString()},{label:S.endDate,value:T.end.toString()}],n)},selectedRanges:r!=null&&r.length>0?{start:parseInt(r[0].toString()),end:parseInt(r[1].toString())}:{start:void 0,end:void 0}})});
|
|
265
|
+
`,Gl=({options:e,categoryIndex:n,value:r,categoryType:i,categoryLabel:a,valuesCombinationOperator:d,showAnyAll:l,onChange:c,onValuesCombinationOperatorChange:p})=>{const m=o.useTheme(),x=t.getMultiSelectDropdownStyles(m),{common:{filters:S,texts:h},cockpit:{userProfileAltText:C}}=t.appLocale.getLocalizedStrings(),b=r.map(T=>e.find(F=>F.value===T)),f=(T,F,D,K)=>i!=="user"?null:T==null?o.jsxRuntimeExports.jsx(t.EntityAvatarWithInitials,{firstName:F,lastName:D,index:K}):o.jsxRuntimeExports.jsx(_l,{src:T.href,alt:C,onError:({currentTarget:M})=>{M.onerror=null,M.src=t.AvatarSVG},loading:"lazy"}),g=T=>i!=="rating"?null:Object.keys(eo).includes(T)?o.jsxRuntimeExports.jsx(ln,{iconName:eo[T].iconName,width:18,height:18,stopAnimation:!0,style:{margin:0}}):o.jsxRuntimeExports.jsx(ln,{iconName:To[T].iconName,stopAnimation:!0,width:18,height:18,style:{margin:0}}),j=T=>i!=="runway"?null:o.jsxRuntimeExports.jsx(Nl,{color:T}),y=T=>{const F=e.findIndex(D=>D.value===T.data.value);return o.jsxRuntimeExports.jsx(o.components.MultiValueLabel,{...T,children:o.jsxRuntimeExports.jsxs(Fl,{children:[f(T.data.photo,T.data.label.split(" ")[0],T.data.label.split(" ")[1]!=null?T.data.label.split(" ")[1]:"",F),g(T.data.value),j(T.data.iconColor),o.jsxRuntimeExports.jsx(Kl,{children:T.children})]})})},E=T=>o.jsxRuntimeExports.jsx(o.components.MultiValueRemove,{...T,children:o.jsxRuntimeExports.jsx(Hl,{})}),R=T=>{const{onMouseMove:F,onMouseOver:D,isSelected:K,...M}=T.innerProps,Y=e.findIndex(w=>w.value===T.data.value),G={...T,innerProps:M};return o.jsxRuntimeExports.jsx(o.components.Option,{...G,children:o.jsxRuntimeExports.jsxs(Wl,{children:[o.jsxRuntimeExports.jsxs(Bl,{children:[f(T.data.photo,T.data.label.split(" ")[0],T.data.label.split(" ")[1]!=null?T.data.label.split(" ")[1]:"",Y),g(T.data.value),j(T.data.iconColor),o.jsxRuntimeExports.jsx(t.StandardRegular,{children:T.label})]}),T.isSelected&&o.jsxRuntimeExports.jsx(Vl,{})]})})},A=(T,F)=>i==="user"&&T.data.email!=null?T.data.label.toLowerCase().includes(F.toLowerCase())||T.data.email.toLowerCase().includes(F.toLowerCase()):T.data.label.toLowerCase().includes(F.toLowerCase()),I=l&&b.length>1,v=()=>{switch(i){case"dateRange":return o.jsxRuntimeExports.jsx(Zl,{"data-testid":t.generateDataTestId("cockpit-filters-values-daterange"),children:o.jsxRuntimeExports.jsx(t.DateRangeFilterField,{onDateRangeChange:T=>{T.startDate!=null&&T.endDate!=null&&c([{label:S.startDate,value:T.startDate},{label:S.endDate,value:T.endDate}],n)},selectedDates:r})});case"dropdownRange":return o.jsxRuntimeExports.jsx(Xl,{"data-testid":t.generateDataTestId("cockpit-filters-values-numrange"),children:o.jsxRuntimeExports.jsx(Pl,{options:e.map(T=>parseInt(T.label)),onNumericRangeChange:T=>{T.start!=null&&T.end!=null&&c([{label:S.startDate,value:T.start.toString()},{label:S.endDate,value:T.end.toString()}],n)},selectedRanges:r!=null&&r.length>0?{start:parseInt(r[0].toString()),end:parseInt(r[1].toString())}:{start:void 0,end:void 0}})});default:return o.jsxRuntimeExports.jsxs(zl,{"data-testid":t.generateDataTestId("cockpit-filters-values-select-container"),children:[b.length===0&&i==="user"?o.jsxRuntimeExports.jsx(Ul,{}):null,o.jsxRuntimeExports.jsx(o.StateManagedSelect$1,{isMulti:!0,hideSelectedOptions:!1,value:b,onChange:T=>{Array.isArray(T)===!0&&c(T,n)},placeholder:`${h.select} ${a}`,options:e,styles:x,menuPosition:"fixed",components:{Option:R,MultiValueLabel:y,MultiValueRemove:E},filterOption:A})]})}};return o.jsxRuntimeExports.jsxs(Ml,{categoryType:i,"data-testid":t.generateDataTestId("cockpit-filters-values-wrapper"),children:[v(),I&&o.jsxRuntimeExports.jsx(Yl,{"data-testid":t.generateDataTestId("cockpit-filters-values-any-all"),children:o.jsxRuntimeExports.jsx(Dl,{categoryIndex:n,value:d,onChange:p})})]})},Yl=s.div``,Zl=s.div``,Xl=s.div``,As=s.div`
|
|
266
266
|
display: flex;
|
|
267
267
|
flex-direction: column;
|
|
268
268
|
row-gap: ${t.Space.sp4};
|
|
@@ -930,7 +930,7 @@ ${e}`,Id=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
930
930
|
width: 12px;
|
|
931
931
|
height: 12px;
|
|
932
932
|
color: ${e=>e.theme.colors.grey5};
|
|
933
|
-
`,Vp=e=>{const n=[];return e.subscriptions.forEach(r=>{r.plan&&n.push(r.plan.plan.zeniSku)}),n},Up=e=>{const n=[];return e.subscriptions.forEach(r=>{r.addOns.forEach(i=>{i.addOn.zeniSku!=null&&n.push(i.addOn.zeniSku)})}),n};function Hp(e,n){return{companyName:e.company.company.companyInfo.name,companyId:e.company.company.companyInfo.companyId,parentSubsidiaryInfo:e.company.company.parentSubsidiaryInfo,status:{allStatuses:e.company.schema.status,selectedValue:e.company.schema.status.find(r=>r.code===e.company.company.managementInfo.statusCode)},group:{allGroups:e.company.schema.companyGroup,selectedValue:e.company.schema.companyGroup.find(r=>r.id===e.company.company.managementInfo.companyGroupId)},plansAndAddons:bd([...new Set(Vp(e).concat(Up(e)))]),controller:{allUsers:n,selectedUsers:e.controllers.map(r=>r.user)},customerSuccessManager:{allUsers:n,selectedUsers:e.customerSuccessManagers.map(r=>r.user)},preparer:{allUsers:n,selectedUsers:e.preparers.map(r=>r.user)},reviewer:{allUsers:n,selectedUsers:e.reviewers.map(r=>r.user)},apAnalyst:{allUsers:n,selectedUsers:e.apAnalysts.map(r=>r.user)},reportSent:{showBusinessDay:!0,maxDate:J.dateNow(),date:e.company.company.managementInfo.lastReportSentDate,businessDay:e.company.company.managementInfo.lastReportSentBusinessDay},taxStatus:{allTaxStatuses:e.company.schema.taxStatus,selectedValue:e.company.schema.taxStatus.find(r=>r.code===e.company.company.managementInfo.taxStatusCode)},taxLead:{allUsers:n,selectedUsers:e.taxLeads.map(r=>r.user)},monthlyRecurringRevenue:e.primarySubscription?.summary?.summary.monthlyRecurringRevenue,annualRecurringRevenue:e.primarySubscription?.summary?.summary.annualRecurringRevenue,customerSatisfaction:e.company.company.managementInfo.customerSatisfaction??{customerNote:"",teamNote:""}}}function Kp(e,n){const r={};r.users=[];const i=n.split(".")[1];if(Gp(i))return{[i]:e[i]};{const{selectedUsers:a,deSelectedUsers:d}=e[i];return d==null||d?.length==0?a.forEach(l=>{l.isUserSelectionUpdated===!0&&r.users?.push(Hs(i,l.userId,l.isRoleSelected))}):d.forEach(l=>{r.users?.push(Hs(i,l.userId,l.isRoleSelected))}),{users:r.users}}}const Gp=e=>wp.includes(e);function Hs(e,n,r){switch(e){case"apAnalyst":return{isZeni:!0,role:J.toUserRoleType("ap_analyst"),userId:n,isSelected:r};case"taxLead":return{isZeni:!0,role:J.toUserRoleType("tax_lead"),userId:n,isSelected:r};case"customerSuccessManager":return{isZeni:!0,role:J.toUserRoleType("customer_success_manager"),userId:n,isSelected:r};
|
|
933
|
+
`,Vp=e=>{const n=[];return e.subscriptions.forEach(r=>{r.plan&&n.push(r.plan.plan.zeniSku)}),n},Up=e=>{const n=[];return e.subscriptions.forEach(r=>{r.addOns.forEach(i=>{i.addOn.zeniSku!=null&&n.push(i.addOn.zeniSku)})}),n};function Hp(e,n){return{companyName:e.company.company.companyInfo.name,companyId:e.company.company.companyInfo.companyId,parentSubsidiaryInfo:e.company.company.parentSubsidiaryInfo,status:{allStatuses:e.company.schema.status,selectedValue:e.company.schema.status.find(r=>r.code===e.company.company.managementInfo.statusCode)},group:{allGroups:e.company.schema.companyGroup,selectedValue:e.company.schema.companyGroup.find(r=>r.id===e.company.company.managementInfo.companyGroupId)},plansAndAddons:bd([...new Set(Vp(e).concat(Up(e)))]),controller:{allUsers:n,selectedUsers:e.controllers.map(r=>r.user)},customerSuccessManager:{allUsers:n,selectedUsers:e.customerSuccessManagers.map(r=>r.user)},preparer:{allUsers:n,selectedUsers:e.preparers.map(r=>r.user)},reviewer:{allUsers:n,selectedUsers:e.reviewers.map(r=>r.user)},apAnalyst:{allUsers:n,selectedUsers:e.apAnalysts.map(r=>r.user)},reportSent:{showBusinessDay:!0,maxDate:J.dateNow(),date:e.company.company.managementInfo.lastReportSentDate,businessDay:e.company.company.managementInfo.lastReportSentBusinessDay},taxStatus:{allTaxStatuses:e.company.schema.taxStatus,selectedValue:e.company.schema.taxStatus.find(r=>r.code===e.company.company.managementInfo.taxStatusCode)},taxLead:{allUsers:n,selectedUsers:e.taxLeads.map(r=>r.user)},monthlyRecurringRevenue:e.primarySubscription?.summary?.summary.monthlyRecurringRevenue,annualRecurringRevenue:e.primarySubscription?.summary?.summary.annualRecurringRevenue,customerSatisfaction:e.company.company.managementInfo.customerSatisfaction??{customerNote:"",teamNote:""}}}function Kp(e,n){const r={};r.users=[];const i=n.split(".")[1];if(Gp(i))return{[i]:e[i]};{const{selectedUsers:a,deSelectedUsers:d}=e[i];return d==null||d?.length==0?a.forEach(l=>{l.isUserSelectionUpdated===!0&&r.users?.push(Hs(i,l.userId,l.isRoleSelected))}):d.forEach(l=>{r.users?.push(Hs(i,l.userId,l.isRoleSelected))}),{users:r.users}}}const Gp=e=>wp.includes(e);function Hs(e,n,r){switch(e){case"apAnalyst":return{isZeni:!0,role:J.toUserRoleType("ap_analyst"),userId:n,isSelected:r};case"taxLead":return{isZeni:!0,role:J.toUserRoleType("tax_lead"),userId:n,isSelected:r};case"customerSuccessManager":return{isZeni:!0,role:J.toUserRoleType("customer_success_manager"),userId:n,isSelected:r};default:return{isZeni:!0,role:e,userId:n,isSelected:r}}}const Yp=(e,n,r,i)=>{const a=t.appLocale.getLocalizedStrings().dateFormat.visual.MMMMFormat,d=J.dateNow().subtract(1,"month").format(a),l=J.dateNow().startOf("month").subtract(1,"day"),c=r?.isSame(l)===!0&&i?.isAfter(r);return e?n?yp.replace("__month__",d):fp.replace("__month__",d):c===!0?Cp.replace("__month__",d):jp.replace("__month__",d)},Zp=({enableCompanyMonthEndReportBtn:e,isMonthEndReportInDraft:n,bookCloseDate:r,lastReportSentDate:i,handleMonthEndReportPageClick:a})=>{const d=J.dateNow().startOf("month").subtract(1,"day"),l=r?.isSame(d)===!0&&i?.isAfter(r),c=e?n?Rp:bp:l===!0?null:$p;return c!=null?o.jsxRuntimeExports.jsx(t.Tooltip,{display:"block",placement:"bottom",maxWidth:"250",title:c,enterDelay:600,children:o.jsxRuntimeExports.jsx(ls,{isMonthEndReportInDraft:n,bookCloseDate:r,lastReportSentDate:i,enableCompanyMonthEndReportBtn:e,isExpenseAutomationEnabledForUser:!0,handleMonthEndReportPageClick:a})}):o.jsxRuntimeExports.jsx(ls,{isMonthEndReportInDraft:n,bookCloseDate:r,lastReportSentDate:i,enableCompanyMonthEndReportBtn:e,isExpenseAutomationEnabledForUser:!0,handleMonthEndReportPageClick:a})};function Xp({companyNameSticky:e,sortConfig:n,onColumnSortConfigChanged:r}){const i=t.useWindowSizeContext(),[a,d]=u.useState(o.cloneDeep(Ct));u.useEffect(()=>{const c=[...a];for(const p of c)p.key===n.sortKey?p.sortOrder=n.sortOrder:p.sortOrder="ascending";d(c)},[n.sortKey,n.sortOrder]);const l=(c,p)=>{let m=p;n.sortKey===c&&(m=p==="ascending"?"descending":"ascending"),r(c,m)};return o.jsxRuntimeExports.jsx(Jp,{height:Ft,children:a.map(c=>o.jsxRuntimeExports.jsxs(eu,{companyNameSticky:e&&c.key==="companyName",sortDataValue:n.sortKey,actualDataValue:c.key,wrapperWidth:c.width,windowSize:i,children:[o.jsxRuntimeExports.jsxs(nu,{onClick:()=>l(J.toManagementSortKeyType(c.key),c.sortOrder),children:[o.jsxRuntimeExports.jsx(t.ExtraSmallRegular,{children:c.value}),o.jsxRuntimeExports.jsx(Qp,{sortDataValue:n.sortKey,headerdata:c,children:o.jsxRuntimeExports.jsx(t.SvgArrowTailTop,{width:12,height:12})})]}),o.jsxRuntimeExports.jsx(ou,{isVisible:n.sortKey===c.key&&c.key!=="status",children:o.jsxRuntimeExports.jsx(tu,{onClick:()=>l("status","ascending")})})]},c.key))})}const qp=u.memo(Xp),Qp=s.div`
|
|
934
934
|
display: flex;
|
|
935
935
|
align-items: center;
|
|
936
936
|
transform: ${e=>e.sortDataValue===e.headerdata.key&&e.headerdata.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
|
|
@@ -1236,7 +1236,7 @@ ${e}`,Id=e=>le.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
1236
1236
|
color: ${e=>e.theme.colors.grey2};
|
|
1237
1237
|
`,zo=s(t.H5Regular)`
|
|
1238
1238
|
color: ${e=>e.theme.colors.hero};
|
|
1239
|
-
`,tm={},om={width:"auto",outline:"none",background:"transparent"},{common:{texts:{anonymousUser:fs},strings:{atTheRate:nm}}}=t.appLocale.getLocalizedStrings(),sm=({roomId:e,threadMetadata:n,composerPlaceholder:r,isSubmitComment:i=!1,createThreadCallback:a,composerFormStyle:d={},composerEditorStyle:l={}})=>{const c=Xe.useCreateThread(),p=o.useTheme(),m=u.useCallback(({body:x},
|
|
1239
|
+
`,tm={},om={width:"auto",outline:"none",background:"transparent"},{common:{texts:{anonymousUser:fs},strings:{atTheRate:nm}}}=t.appLocale.getLocalizedStrings(),sm=({roomId:e,threadMetadata:n,composerPlaceholder:r,isSubmitComment:i=!1,createThreadCallback:a,composerFormStyle:d={},composerEditorStyle:l={}})=>{const c=Xe.useCreateThread(),p=o.useTheme(),m=u.useCallback(({body:x,attachments:S},h)=>{h.preventDefault(),h.stopPropagation();try{c({body:x,attachments:S,metadata:n}),a()}catch(C){console.log(C)}},[c,a,n]);return o.jsxRuntimeExports.jsx(Xe.RoomProvider,{id:e,children:o.jsxRuntimeExports.jsx(pm,{children:o.jsxRuntimeExports.jsxs(St.Composer.Form,{onComposerSubmit:m,style:{...tm,...d},className:"customThreadComposer",children:[o.jsxRuntimeExports.jsx(St.Composer.Editor,{placeholder:r,style:{...t.textStyles.standardRegular,...om,color:p.colors.primary,...l},components:{Mention:rm,MentionSuggestions:im,Link:cm}}),o.jsxRuntimeExports.jsx(St.Composer.Submit,{asChild:!0,children:o.jsxRuntimeExports.jsx(dm,{isSubmitComment:i})})]})})})};function rm({userId:e}){const{user:n}=xi.useUser(e);return o.jsxRuntimeExports.jsx(St.Composer.Mention,{asChild:!0,children:o.jsxRuntimeExports.jsxs(xm,{children:[nm,n?.name||fs]})})}function im({userIds:e,selectedUserId:n}){return e.length===0?null:o.jsxRuntimeExports.jsx(St.Composer.Suggestions,{asChild:!0,children:o.jsxRuntimeExports.jsx(um,{children:o.jsxRuntimeExports.jsx(St.Composer.SuggestionsList,{asChild:!0,children:o.jsxRuntimeExports.jsx(mm,{children:e.map(r=>o.jsxRuntimeExports.jsx(u.Suspense,{fallback:o.jsxRuntimeExports.jsx(am,{}),children:o.jsxRuntimeExports.jsx(lm,{userId:r},r)},r))})})})})}function am(){return o.jsxRuntimeExports.jsxs(Ai,{children:[o.jsxRuntimeExports.jsx(Di,{}),o.jsxRuntimeExports.jsx("span",{children:fs})]})}function lm({userId:e}){const{user:n}=xi.useUser(e);return o.jsxRuntimeExports.jsx(St.Composer.SuggestionsListItem,{asChild:!0,value:n.userId,children:o.jsxRuntimeExports.jsxs(Ai,{children:[n.avatar?o.jsxRuntimeExports.jsx(gm,{src:n.avatar,alt:""}):o.jsxRuntimeExports.jsx(Di,{}),o.jsxRuntimeExports.jsx("span",{children:n.name||n.email||fs})]})},n.userId)}function cm({href:e,children:n}){return o.jsxRuntimeExports.jsx(St.Composer.Link,{href:e,asChild:!0,children:o.jsxRuntimeExports.jsx(hm,{children:n})})}const dm=({isSubmitComment:e=!1})=>{const{isEmpty:n,submit:r}=St.useComposer();return u.useEffect(()=>{e&&!n&&r()},[e,n,r]),o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{})},pm=s.div`
|
|
1240
1240
|
.customThreadComposer span[data-slate-placeholder="true"] {
|
|
1241
1241
|
color: ${e=>e.theme.colors.grey1};
|
|
1242
1242
|
}
|
package/dist/cockpit.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as ck, a as dk, b as pk, c as uk,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { dA as o, gx as Ne, i as $t, fz as O, e7 as It, bt as Qr, X as We, ec as Qd, fK as Jd, fU as Xd, aj as I, fM as U, dj as qd, g_ as ge, gL as lo, eH as lt, al as Ft, cb as Bs, v as wo, ez as ps, c6 as So, e9 as us, eo as ep, dM as Jt, dJ as De, fT as Fl, ev as Co, dk as Fs, c1 as Be, gF as tp, aR as op, bb as Wt, aO as np, e5 as Wl, g0 as rp, a$ as hs, J as ms, gb as ip, gc as sp, gd as ap, ak as lp, cm as cp, b$ as xt, eb as _l, cw as dp, dX as Jr, et as gs, gv as M, de as pp, bm as up, dr as be, e1 as hp, d5 as z, cx as Fe, gy as pt, dT as xs, bp as Nr, ds as mp, e2 as ys, bc as Xr, gj as Pe, bu as qr, e3 as Vl, el as Ul, eg as Xn, fH as zt, eJ as dt, dF as gn, c3 as gp, c5 as Kl, e6 as Hl, fV as Pt, fx as qe, f2 as Mr, ft as xp, eF as xn, eG as yn, l as fn, dQ as Fo, c0 as ei, ea as fs, c4 as yp, ed as Gl, e4 as co, e8 as Wo, aZ as Qt, fs as Ws, g8 as fp, f_ as bp, g3 as $p, ef as Cp, ey as wp, ex as qn, dG as Sp, dH as bs, fW as vp, ee as Yl, ek as Zl, ej as Ql, b8 as Jl, gr as jp, bV as _s, bW as $s, bQ as kp, bU as Tp, bq as er, b9 as bn, ei as Cs, an as Lp, dn as ti, fP as bt, dx as Xl, bT as zr, bZ as Pp, b7 as ws, bN as Ip, d6 as pn, e0 as Ap, d$ as Op, dY as Dp, bO as oi, dl as Vs, bR as ql, gR as Br, cy as ec, dV as tc, fL as Ss, bP as Ep, au as un, as as Zn, at as Qn, g$ as oc, aT as Rp, gN as Np, bd as Yt, av as Lt, es as vs, en as nc, dN as Mp, c9 as rc, ep as zp, dL as Bp, aw as Ut, gi as sr, bh as Fp, bY as Kt, aG as ic, K as cn, cI as sc, cJ as Fr, cH as ac, bw as Wp, cc as _p, dS as Vp, bx as Wr, bz as Xi, cM as Us, cK as Up, cL as Kp, by as li, bv as ci, bA as Hp, dm as Ks, bS as Gp, bX as Yp, cX as Hs, aF as Zp, d as Qp, cA as Jp, dZ as Xp, dw as tr, gJ as lc, gM as cc, bg as Zt, Z as ni, _ as hn, gO as dc, g4 as pc, aU as qp, cd as eu, cr as uc, cq as tu, g9 as ou, ch as _r, af as hc, cg as nu, cf as ru, aY as iu, ce as js, fX as mc, bk as gc, fA as xc, k as yc, eD as fc, bl as su, w as bc, bo as $c, f3 as au, dE as lu, gI as cu, co as du, f$ as pu, fY as uu, W as hu, d2 as Gs, g2 as mu, ew as Cc, ga as Ys, cs as gu, c2 as xu, dK as yu, eh as fu, em as bu, d_ as $u, fC as Zs, er as Cu, dy as wc, dt as wu, fG as Sc, a_ as Su, dO as vu, ba as ju, be as ku, du as vc, eq as Tu, b_ as Lu, eu as Pu, dq as Iu, dv as jc, dI as Au, bf as Ou, dp as Du } from "./SessionTimeoutPopup-NgqDPYRI.js";
|
|
2
|
+
import { A as ck, a as dk, b as pk, c as uk, e as hk, f as mk, g as gk, h as xk, j as yk, m as fk, n as bk, o as $k, p as Ck, q as wk, r as Sk, s as vk, t as jk, u as kk, x as Tk, y as Lk, z as Pk, B as Ik, C as Ak, D as Ok, E as Dk, F as Ek, G as Rk, H as Nk, I as Mk, L as zk, M as Bk, N as Fk, O as Wk, P as _k, Q as Vk, R as Uk, dD as Kk, S as Hk, T as Gk, U as Yk, V as Zk, Y as Qk, $ as Jk, a0 as Xk, a1 as qk, a2 as eT, a3 as tT, a4 as oT, a5 as nT, a6 as rT, a7 as iT, a8 as sT, a9 as aT, dD as lT, aa as cT, ab as dT, ac as pT, ad as uT, ae as hT, ag as mT, ah as gT, ai as xT, am as yT, ao as fT, ap as bT, aq as $T, ar as CT, ax as wT, ay as ST, az as vT, aA as jT, aB as kT, aC as TT, aD as LT, aE as PT, aH as IT, aI as AT, aJ as OT, aK as DT, aL as ET, aM as RT, aN as NT, aP as MT, aS as zT, aV as BT, aW as FT, aX as WT, b0 as _T, b1 as VT, b2 as UT, b3 as KT, b4 as HT, b5 as GT, b6 as YT, bi as ZT, bj as QT, bn as JT, br as XT, bs as qT, bB as eL, bC as tL, bD as oL, bE as nL, bF as rL, bG as iL, bH as sL, bI as aL, bJ as lL, bK as cL, bL as dL, bM as pL, c7 as uL, c8 as hL, ca as mL, ci as gL, cj as xL, ck as yL, cl as fL, cn as bL, cp as $L, ct as CL, cu as wL, cv as SL, cz as vL, cB as jL, cC as kL, cD as TL, cE as LL, cF as PL, cG as IL, cN as AL, cO as OL, cP as DL, cQ as EL, cR as RL, cS as NL, cT as ML, cU as zL, cV as BL, cW as FL, aQ as WL, cY as _L, cZ as VL, c_ as UL, c$ as KL, d0 as HL, dD as GL, d3 as YL, d1 as ZL, d4 as QL, d7 as JL, d8 as XL, d9 as qL, da as eP, db as tP, dc as oP, dd as nP, df as rP, dg as iP, dh as sP, di as aP, dz as lP, dB as cP, dC as dP, dP as pP, dR as uP, dU as hP, dW as mP, eA as gP, eB as xP, eC as yP, eE as fP, eI as bP, eK as $P, eL as CP, eM as wP, eN as SP, eO as vP, eP as jP, eQ as kP, eR as TP, eS as LP, eT as PP, eU as IP, eV as AP, eW as OP, eX as DP, eY as EP, eZ as RP, e_ as NP, e$ as MP, f0 as zP, f1 as BP, f4 as FP, f5 as WP, f6 as _P, f7 as VP, f8 as UP, f9 as KP, fa as HP, fb as GP, fc as YP, fd as ZP, fe as QP, ff as JP, fg as XP, fh as qP, fi as eI, fj as tI, fk as oI, fl as nI, fm as rI, fn as iI, fo as sI, fp as aI, fq as lI, fr as cI, fu as dI, fv as pI, fw as uI, fy as hI, fB as mI, fD as gI, fE as xI, fF as yI, fI, fJ as bI, fN as $I, fO as CI, fQ as wI, fR as SI, fS as vI, fZ as jI, g1 as kI, g5 as TI, g6 as LI, g7 as PI, ge as II, gf as AI, gg as OI, gh as DI, gk as EI, gl as RI, gm as NI, gn as MI, go as zI, gp as BI, gq as FI, gs as WI, gt as _I, gu as VI, gw as UI, gz as KI, gA as HI, gB as GI, gC as YI, gD as ZI, gE as QI, gG as JI, gH as XI, gK as qI, gP as eA, gQ as tA, gS as oA, gT as nA, gU as rA, gV as iA, gW as sA, gX as aA, gY as lA, gZ as cA, h0 as dA, h1 as pA } from "./SessionTimeoutPopup-NgqDPYRI.js";
|
|
3
|
+
import { ai as t, D as Eu, a1 as Ru, aH as Ve, q as $n, O as rt, L as Nu, s as Mu, T as zu, o as ri, f as Xt, h as ye, aD as po, i as Cn, aC as uo, Y as _o, m as ho, J as Vo, b as qt, V as Uo, ae as nt, I as kc, X as Bu, al as Mt, aa as Bo, aB as Fu, k as ks, C as Tc, n as Wu, d as _u, e as Ts, B as Ls, aq as Qs } from "./vendor-.pnpm-DUwxZLYO.js";
|
|
4
|
+
import { aw as hA } from "./vendor-.pnpm-DUwxZLYO.js";
|
|
5
5
|
import * as me from "react";
|
|
6
6
|
import or, { useEffect as te, useState as Y, useMemo as Ze, useCallback as oe, useContext as Qe, useRef as $e, forwardRef as kt, Fragment as Lc, memo as nr, createContext as Ko, Suspense as Vu, createElement as Pc } from "react";
|
|
7
7
|
import r from "@emotion/styled";
|
|
@@ -1199,7 +1199,6 @@ const Is = [
|
|
|
1199
1199
|
return i.subscription[n];
|
|
1200
1200
|
case "aiAccountant":
|
|
1201
1201
|
return i.aiAccountant[n];
|
|
1202
|
-
case "healthMonitor":
|
|
1203
1202
|
default:
|
|
1204
1203
|
return i.healthMonitor[n];
|
|
1205
1204
|
}
|
|
@@ -1700,7 +1699,6 @@ const Is = [
|
|
|
1700
1699
|
)
|
|
1701
1700
|
}
|
|
1702
1701
|
);
|
|
1703
|
-
case "user":
|
|
1704
1702
|
default:
|
|
1705
1703
|
return /* @__PURE__ */ t.jsxs(
|
|
1706
1704
|
wm,
|
|
@@ -5249,9 +5247,6 @@ function ya(e, n, i) {
|
|
|
5249
5247
|
userId: n,
|
|
5250
5248
|
isSelected: i
|
|
5251
5249
|
};
|
|
5252
|
-
case "controller":
|
|
5253
|
-
case "reviewer":
|
|
5254
|
-
case "preparer":
|
|
5255
5250
|
default:
|
|
5256
5251
|
return {
|
|
5257
5252
|
isZeni: !0,
|
|
@@ -7287,15 +7282,16 @@ const k0 = ({
|
|
|
7287
7282
|
composerEditorStyle: l = {}
|
|
7288
7283
|
}) => {
|
|
7289
7284
|
const c = Hu(), p = Ve(), u = oe(
|
|
7290
|
-
({ body: h },
|
|
7291
|
-
|
|
7285
|
+
({ body: h, attachments: x }, m) => {
|
|
7286
|
+
m.preventDefault(), m.stopPropagation();
|
|
7292
7287
|
try {
|
|
7293
7288
|
c({
|
|
7294
7289
|
body: h,
|
|
7290
|
+
attachments: x,
|
|
7295
7291
|
metadata: n
|
|
7296
7292
|
}), a();
|
|
7297
|
-
} catch (
|
|
7298
|
-
console.log(
|
|
7293
|
+
} catch (b) {
|
|
7294
|
+
console.log(b);
|
|
7299
7295
|
}
|
|
7300
7296
|
},
|
|
7301
7297
|
[c, a, n]
|
|
@@ -24,7 +24,7 @@ export interface HealthMonitorFilterCategoryDropdownOption extends CategoryDropd
|
|
|
24
24
|
export interface AiAccountantFilterCategoryDropdownOption extends CategoryDropdownOption {
|
|
25
25
|
value: AiAccountantFilterCategoryField;
|
|
26
26
|
}
|
|
27
|
-
export type MatchingOperatorDropdownValue = "equal" | "
|
|
27
|
+
export type MatchingOperatorDropdownValue = "equal" | "not_equal";
|
|
28
28
|
export type ValuesCombinationOperatorDropdownValue = "ANY" | "ALL";
|
|
29
29
|
export interface MatchingOperatorDropdownOption {
|
|
30
30
|
label: "is" | "is not";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { MatchingOperatorDropdownOption, SpendManagementFilterEntityType, TransactionFilterEntityType, UserRoleType } from '@zeniai/client-epic-state';
|
|
2
|
+
import { AutoCompleteActions, AutoCompleteData } from '../../common/autoComplete/autoCompleteProps';
|
|
3
|
+
import { GenericFilterCategory, GenericFilterCategoryDropdownOption, GenericFiltersType, ValuesDropdownOption } from './genericFilterTypes';
|
|
4
|
+
export type SupportedFilterEntityType = TransactionFilterEntityType | SpendManagementFilterEntityType;
|
|
5
|
+
export interface GroupByFiltersComponentProps {
|
|
6
|
+
component: React.ReactElement;
|
|
7
|
+
height: number;
|
|
8
|
+
}
|
|
9
|
+
export interface GenericFiltersProps<TEntity extends SupportedFilterEntityType, TField extends string, TCategoryDropdownOption extends GenericFilterCategoryDropdownOption<TField>, TFiltersType extends GenericFiltersType<TField>> {
|
|
10
|
+
entity: TEntity;
|
|
11
|
+
filters: TFiltersType;
|
|
12
|
+
filterStrings: {
|
|
13
|
+
addFilterBtnText: string;
|
|
14
|
+
categoryPlaceholder: string;
|
|
15
|
+
clearAllBtnText: string;
|
|
16
|
+
empty: string;
|
|
17
|
+
filterByLabel: string;
|
|
18
|
+
searchPlaceholder: string;
|
|
19
|
+
select: string;
|
|
20
|
+
/** Optional: return custom placeholder for the value dropdown by category field */
|
|
21
|
+
getValuePlaceholder?: (categoryField: string, categoryLabel: string) => string | undefined;
|
|
22
|
+
};
|
|
23
|
+
helpers: {
|
|
24
|
+
getAppliedFiltersCount: (filters: TFiltersType) => number;
|
|
25
|
+
getDefaultEmptyFilters: () => TFiltersType;
|
|
26
|
+
getFilterCategories: (entity: TEntity, userRole?: UserRoleType[]) => TCategoryDropdownOption[];
|
|
27
|
+
getFilterCategoryLabel: (entity: TEntity, key: string) => string;
|
|
28
|
+
getUpdatedFiltersOnCategoryChange: (props: {
|
|
29
|
+
currentFilters: TFiltersType;
|
|
30
|
+
selectedOption: TCategoryDropdownOption;
|
|
31
|
+
categoryIndex?: number;
|
|
32
|
+
}) => TFiltersType;
|
|
33
|
+
getUpdatedFiltersOnMatchingOperatorChange: (props: {
|
|
34
|
+
currentFilters: TFiltersType;
|
|
35
|
+
selectedOption: MatchingOperatorDropdownOption;
|
|
36
|
+
categoryIndex?: number;
|
|
37
|
+
}) => TFiltersType;
|
|
38
|
+
getUpdatedFiltersOnValueChange: (props: {
|
|
39
|
+
categoryIndex: number;
|
|
40
|
+
currentFilters: TFiltersType;
|
|
41
|
+
selectedOptions: ValuesDropdownOption[];
|
|
42
|
+
}) => TFiltersType;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Memoized dropdown options keyed by category field. The cache inside
|
|
46
|
+
* GenericFilters mirrors this value, so when source data lands after
|
|
47
|
+
* first render the dropdowns refresh automatically. Callers MUST
|
|
48
|
+
* memoize this (e.g. with `useMemo`) — passing a new object reference
|
|
49
|
+
* on every parent render will churn the internal cache state.
|
|
50
|
+
*/
|
|
51
|
+
categoryWiseOptions?: Record<string, ValuesDropdownOption[]>;
|
|
52
|
+
createdByUserListLoaded?: boolean;
|
|
53
|
+
disableFilters?: boolean;
|
|
54
|
+
groupByFiltersComponent?: GroupByFiltersComponentProps;
|
|
55
|
+
transactionsLoaded?: boolean;
|
|
56
|
+
vendorSearchAutoCompleteActions?: AutoCompleteActions;
|
|
57
|
+
vendorSearchAutoCompleteData?: AutoCompleteData;
|
|
58
|
+
onFiltersChange: (filters: TFiltersType) => void;
|
|
59
|
+
onFilterClick?: (entity: TEntity) => void;
|
|
60
|
+
/** When provided and returns non-null for a field, renders custom operator + value UI (e.g. transaction amount filter with From/To inputs). */
|
|
61
|
+
renderCustomCategoryValueSection?: (field: string, props: {
|
|
62
|
+
categoryIndex: number;
|
|
63
|
+
filter: GenericFilterCategory<TField>;
|
|
64
|
+
onMatchingOperatorChange: (option: {
|
|
65
|
+
label: string;
|
|
66
|
+
value: string;
|
|
67
|
+
}, categoryIndex?: number) => void;
|
|
68
|
+
onValueChange: (value: ValuesDropdownOption[], categoryIndex: number) => void;
|
|
69
|
+
}) => {
|
|
70
|
+
operatorDropdown: React.ReactNode;
|
|
71
|
+
valueField: React.ReactNode;
|
|
72
|
+
} | null;
|
|
73
|
+
}
|
|
74
|
+
declare function GenericFilters<TEntity extends SupportedFilterEntityType, TField extends string, TCategoryDropdownOption extends GenericFilterCategoryDropdownOption<TField>, TFiltersType extends GenericFiltersType<TField>>({ entity: selectedEntity, filters, filterStrings, helpers, onFiltersChange, createdByUserListLoaded, disableFilters, groupByFiltersComponent, transactionsLoaded, vendorSearchAutoCompleteActions, vendorSearchAutoCompleteData, categoryWiseOptions, onFilterClick, renderCustomCategoryValueSection, }: GenericFiltersProps<TEntity, TField, TCategoryDropdownOption, TFiltersType>): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
export default GenericFilters;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { MatchingOperatorDropdownOption, UserRoleType } from '@zeniai/client-epic-state';
|
|
2
|
+
import { AutoCompleteActions, AutoCompleteData } from '../../../common/autoComplete/autoCompleteProps';
|
|
3
|
+
import { SupportedFilterEntityType } from '../GenericFilters';
|
|
4
|
+
import { GenericFilterCategory, GenericFilterCategoryDropdownOption, GenericFiltersType, ValuesDropdownOption } from '../genericFilterTypes';
|
|
5
|
+
export interface GenericFiltersSelectionProps<TEntity extends SupportedFilterEntityType, TField extends string, TCategoryDropdownOption extends GenericFilterCategoryDropdownOption<TField>, TFiltersType extends GenericFiltersType<TField>> {
|
|
6
|
+
filters: TFiltersType;
|
|
7
|
+
filterStrings: {
|
|
8
|
+
addFilterBtnText: string;
|
|
9
|
+
categoryPlaceholder: string;
|
|
10
|
+
clearAllBtnText: string;
|
|
11
|
+
filterByLabel: string;
|
|
12
|
+
searchPlaceholder: string;
|
|
13
|
+
select: string;
|
|
14
|
+
getValuePlaceholder?: (categoryField: string, categoryLabel: string) => string | undefined;
|
|
15
|
+
};
|
|
16
|
+
filterValues: Record<string, ValuesDropdownOption[]>;
|
|
17
|
+
helpers: {
|
|
18
|
+
getAppliedFiltersCount: (filters: TFiltersType) => number;
|
|
19
|
+
getDefaultEmptyFilters: () => TFiltersType;
|
|
20
|
+
getFilterCategories: (entity: TEntity, userRole?: UserRoleType[]) => TCategoryDropdownOption[];
|
|
21
|
+
getFilterCategoryLabel: (entity: TEntity, key: string) => string;
|
|
22
|
+
getUpdatedFiltersOnCategoryChange: (props: {
|
|
23
|
+
currentFilters: TFiltersType;
|
|
24
|
+
selectedOption: TCategoryDropdownOption;
|
|
25
|
+
categoryIndex?: number;
|
|
26
|
+
}) => TFiltersType;
|
|
27
|
+
getUpdatedFiltersOnMatchingOperatorChange: (props: {
|
|
28
|
+
currentFilters: TFiltersType;
|
|
29
|
+
selectedOption: MatchingOperatorDropdownOption;
|
|
30
|
+
categoryIndex?: number;
|
|
31
|
+
}) => TFiltersType;
|
|
32
|
+
getUpdatedFiltersOnValueChange: (props: {
|
|
33
|
+
categoryIndex: number;
|
|
34
|
+
currentFilters: TFiltersType;
|
|
35
|
+
selectedOptions: ValuesDropdownOption[];
|
|
36
|
+
}) => TFiltersType;
|
|
37
|
+
};
|
|
38
|
+
selectedEntity: TEntity;
|
|
39
|
+
vendorSearchAutoCompleteActions?: AutoCompleteActions;
|
|
40
|
+
vendorSearchAutoCompleteData?: AutoCompleteData;
|
|
41
|
+
onFiltersChange: (filters: TFiltersType) => void;
|
|
42
|
+
renderCustomCategoryValueSection?: (field: string, props: {
|
|
43
|
+
categoryIndex: number;
|
|
44
|
+
filter: GenericFilterCategory<TField>;
|
|
45
|
+
onMatchingOperatorChange: (option: {
|
|
46
|
+
label: string;
|
|
47
|
+
value: string;
|
|
48
|
+
}, categoryIndex?: number) => void;
|
|
49
|
+
onValueChange: (value: ValuesDropdownOption[], categoryIndex: number) => void;
|
|
50
|
+
}) => {
|
|
51
|
+
operatorDropdown: React.ReactNode;
|
|
52
|
+
valueField: React.ReactNode;
|
|
53
|
+
} | null;
|
|
54
|
+
}
|
|
55
|
+
declare const _default: <TEntity extends SupportedFilterEntityType, TField extends string, TCategoryDropdownOption extends GenericFilterCategoryDropdownOption<TField>, TFiltersType extends GenericFiltersType<TField>>(props: GenericFiltersSelectionProps<TEntity, TField, TCategoryDropdownOption, TFiltersType> & {
|
|
56
|
+
ref?: React.ForwardedRef<HTMLDivElement>;
|
|
57
|
+
}) => React.ReactElement;
|
|
58
|
+
export default _default;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { CategoryCombinationOperator, ZeniDate, ZeniUrl } from '@zeniai/client-epic-state';
|
|
2
|
+
type DropdownOptionTypeBase = {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
};
|
|
5
|
+
export type ValuesDropdownOption = DropdownOptionTypeBase & {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string | number | ZeniDate;
|
|
8
|
+
email?: string;
|
|
9
|
+
iconColor?: string;
|
|
10
|
+
iconType?: string;
|
|
11
|
+
photo?: ZeniUrl;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* How a category's selected values combine when matching:
|
|
15
|
+
* - `"ANY"` — match a row if any value in `values[]` matches (OR semantics).
|
|
16
|
+
* - `"ALL"` — match a row only if every value in `values[]` matches (AND).
|
|
17
|
+
*
|
|
18
|
+
* Exposed as a named type so callsites that store or narrow this field
|
|
19
|
+
* (e.g. TC's `TransactionFilterCategory`, which pins it to literal `"ANY"`)
|
|
20
|
+
* reference one source of truth rather than redeclaring the union.
|
|
21
|
+
*/
|
|
22
|
+
export type ValuesCombinationOperator = "ANY" | "ALL";
|
|
23
|
+
export type GenericFilterCategory<TField extends string = string> = {
|
|
24
|
+
values: Array<string | number | ZeniDate>;
|
|
25
|
+
field?: TField;
|
|
26
|
+
matchingOperator?: string;
|
|
27
|
+
valuesCombinationOperator?: ValuesCombinationOperator;
|
|
28
|
+
};
|
|
29
|
+
export type GenericFiltersType<TField extends string = string> = {
|
|
30
|
+
categories: GenericFilterCategory<TField>[];
|
|
31
|
+
categoryCombinationOperator: CategoryCombinationOperator;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Type shape for `NEW_CATEGORY_BODY` below. Carries three deliberate
|
|
35
|
+
* narrowing choices:
|
|
36
|
+
*
|
|
37
|
+
* - `valuesCombinationOperator: "ANY"` — the literal type, not the wider
|
|
38
|
+
* `ValuesCombinationOperator` union, because TC's
|
|
39
|
+
* `TransactionFilterCategory` narrows the field further to exactly
|
|
40
|
+
* `"ANY"`. Without the literal here, the `...NEW_CATEGORY_BODY` spread
|
|
41
|
+
* would produce `string` and fail the downstream assignment.
|
|
42
|
+
* - `values: never[]` — narrowest possible array type, so the spread is
|
|
43
|
+
* assignable to any concrete `values` (e.g. TC's `(string | number)[]`,
|
|
44
|
+
* SM's `Array<string | number | ZeniDate>`).
|
|
45
|
+
* - `matchingOperator: string` — widely usable placeholder; every caller
|
|
46
|
+
* overrides this field after the spread.
|
|
47
|
+
*
|
|
48
|
+
* Using an explicit type annotation rather than `as const` keeps the
|
|
49
|
+
* narrowing without scattering `as const` through callsites.
|
|
50
|
+
*/
|
|
51
|
+
type NewCategoryBody = {
|
|
52
|
+
matchingOperator: string;
|
|
53
|
+
values: never[];
|
|
54
|
+
valuesCombinationOperator: "ANY";
|
|
55
|
+
};
|
|
56
|
+
export declare const NEW_CATEGORY_BODY: NewCategoryBody;
|
|
57
|
+
export type GenericFilterCategoryDropdownOption<TField extends string = string> = {
|
|
58
|
+
value: TField;
|
|
59
|
+
multiple?: boolean;
|
|
60
|
+
type?: string;
|
|
61
|
+
};
|
|
62
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export interface Props {
|
|
2
2
|
disabled?: boolean;
|
|
3
|
+
enableSearchHotkey?: boolean;
|
|
3
4
|
inputWrapperStyle?: React.CSSProperties;
|
|
4
5
|
keepSearchBoxOpen?: boolean;
|
|
5
6
|
placeholder?: string;
|
|
@@ -8,9 +9,10 @@ export interface Props {
|
|
|
8
9
|
searchIconMarginRight?: string;
|
|
9
10
|
searchText?: string;
|
|
10
11
|
style?: React.CSSProperties;
|
|
12
|
+
styledSearchCancelIconWrapperStyle?: React.CSSProperties;
|
|
11
13
|
styledSearchIconContainerStyle?: React.CSSProperties;
|
|
12
14
|
styledSearchIconWrapperStyle?: React.CSSProperties;
|
|
13
15
|
onSearchOpen?: (isOpen: boolean) => void;
|
|
14
16
|
onSearchTextChanged?: (text: string) => void;
|
|
15
17
|
}
|
|
16
|
-
export declare function ListPageSearchInputBox({ disabled, inputWrapperStyle, keepSearchBoxOpen, placeholder, searchBarDataTestId, searchIconMarginRight, searchText, style, styledSearchIconContainerStyle, styledSearchIconWrapperStyle, onSearchOpen, onSearchTextChanged, }: Readonly<Props>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function ListPageSearchInputBox({ enableSearchHotkey, disabled, inputWrapperStyle, keepSearchBoxOpen, placeholder, searchBarDataTestId, searchIconMarginRight, searchText, style, styledSearchCancelIconWrapperStyle, styledSearchIconContainerStyle, styledSearchIconWrapperStyle, onSearchOpen, onSearchTextChanged, }: Readonly<Props>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,13 +2,26 @@ export interface ListPageSearchSectionProps {
|
|
|
2
2
|
isSearchOpen: boolean;
|
|
3
3
|
searchPlaceHolder: string;
|
|
4
4
|
searchText: string;
|
|
5
|
+
/** Tab-within-feature scope — see `selectedEntity` above. */
|
|
6
|
+
currentTab?: string;
|
|
5
7
|
downloadPresent?: boolean;
|
|
8
|
+
enableSearchHotkey?: boolean;
|
|
6
9
|
hideSearchBtn?: boolean;
|
|
7
10
|
inputWrapperStyle?: React.CSSProperties;
|
|
8
11
|
/** When set, applied to each search bar container (icon + input). */
|
|
9
12
|
searchBarDataTestId?: string;
|
|
10
13
|
searchIconMarginRight?: string;
|
|
11
14
|
searchTextBoxStyle?: React.CSSProperties;
|
|
15
|
+
/**
|
|
16
|
+
* Optional page/feature scope — paired with `currentTab` to derive a
|
|
17
|
+
* specific `data-testid` on the outer container (e.g.
|
|
18
|
+
* `search-transaction_categorization-review`). Both must be supplied for
|
|
19
|
+
* the attribute to render; either missing falls back to no `data-testid`
|
|
20
|
+
* so consumers without this context (vendor pages, aging reports, etc.)
|
|
21
|
+
* stay un-tagged and continue to rely on their own scoping mechanisms.
|
|
22
|
+
*/
|
|
23
|
+
selectedEntity?: string;
|
|
24
|
+
styledSearchCancelIconWrapperStyle?: React.CSSProperties;
|
|
12
25
|
styledSearchIconContainerStyle?: React.CSSProperties;
|
|
13
26
|
styledSearchIconWrapperStyle?: React.CSSProperties;
|
|
14
27
|
onSearchTextChanged?: (searchText: string) => void;
|