@proounce/shared-common 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +16 -0
- package/README.md +430 -2
- package/dist/charts/fusion.cjs +252 -0
- package/dist/charts/fusion.cjs.map +1 -0
- package/dist/charts/fusion.d.cts +78 -0
- package/dist/charts/fusion.d.ts +78 -0
- package/dist/charts/fusion.js +220 -0
- package/dist/charts/fusion.js.map +1 -0
- package/dist/grids/ag-grid.cjs +167 -0
- package/dist/grids/ag-grid.cjs.map +1 -0
- package/dist/grids/ag-grid.d.cts +45 -0
- package/dist/grids/ag-grid.d.ts +45 -0
- package/dist/grids/ag-grid.js +152 -0
- package/dist/grids/ag-grid.js.map +1 -0
- package/dist/icons/lucide.cjs +104 -0
- package/dist/icons/lucide.cjs.map +1 -0
- package/dist/icons/lucide.d.cts +1 -0
- package/dist/icons/lucide.d.ts +1 -0
- package/dist/icons/lucide.js +3 -0
- package/dist/icons/lucide.js.map +1 -0
- package/dist/icons/mui.cjs +1106 -0
- package/dist/icons/mui.cjs.map +1 -0
- package/dist/icons/mui.d.cts +150 -0
- package/dist/icons/mui.d.ts +150 -0
- package/dist/icons/mui.js +152 -0
- package/dist/icons/mui.js.map +1 -0
- package/dist/index.cjs +4468 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1779 -0
- package/dist/index.d.ts +1779 -0
- package/dist/index.js +3371 -0
- package/dist/index.js.map +1 -0
- package/dist/mui-b9ldbP0Q.d.cts +306 -0
- package/dist/mui-b9ldbP0Q.d.ts +306 -0
- package/docs/COMPONENT_AUDIT.md +158 -0
- package/package.json +124 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,3371 @@
|
|
|
1
|
+
import Button from '@mui/material/Button';
|
|
2
|
+
import { forwardRef, useId, useRef, useEffect, useMemo, createElement, useState, Children, isValidElement } from 'react';
|
|
3
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
|
+
import IconButton from '@mui/material/IconButton';
|
|
5
|
+
import default2 from '@mui/icons-material/AccessibilityNew';
|
|
6
|
+
export { default as AccessibilityNew } from '@mui/icons-material/AccessibilityNew';
|
|
7
|
+
import default3 from '@mui/icons-material/AccountTree';
|
|
8
|
+
export { default as AccountTree, default as AccountTreeIcon } from '@mui/icons-material/AccountTree';
|
|
9
|
+
import default5 from '@mui/icons-material/AccountTreeOutlined';
|
|
10
|
+
export { default as AccountTreeOutlined, default as AccountTreeOutlinedIcon } from '@mui/icons-material/AccountTreeOutlined';
|
|
11
|
+
import default7 from '@mui/icons-material/Add';
|
|
12
|
+
export { default as Add, default as AddIcon } from '@mui/icons-material/Add';
|
|
13
|
+
import default9 from '@mui/icons-material/AddCircleOutline';
|
|
14
|
+
export { default as AddCircleOutline, default as AddCircleOutlineIcon } from '@mui/icons-material/AddCircleOutline';
|
|
15
|
+
import default11 from '@mui/icons-material/AdminPanelSettings';
|
|
16
|
+
export { default as AdminPanelSettings, default as AdminPanelSettingsIcon } from '@mui/icons-material/AdminPanelSettings';
|
|
17
|
+
import default13 from '@mui/icons-material/Archive';
|
|
18
|
+
export { default as Archive } from '@mui/icons-material/Archive';
|
|
19
|
+
import default14 from '@mui/icons-material/ArrowBack';
|
|
20
|
+
export { default as ArrowBack, default as ArrowBackIcon } from '@mui/icons-material/ArrowBack';
|
|
21
|
+
import default16 from '@mui/icons-material/ArrowForwardIosSharp';
|
|
22
|
+
export { default as ArrowForwardIosSharp, default as ArrowForwardIosSharpIcon } from '@mui/icons-material/ArrowForwardIosSharp';
|
|
23
|
+
import default18 from '@mui/icons-material/ArticleOutlined';
|
|
24
|
+
export { default as ArticleOutlined, default as ArticleOutlinedIcon } from '@mui/icons-material/ArticleOutlined';
|
|
25
|
+
import default20 from '@mui/icons-material/AssessmentOutlined';
|
|
26
|
+
export { default as AssessmentOutlined } from '@mui/icons-material/AssessmentOutlined';
|
|
27
|
+
import default21 from '@mui/icons-material/AssignmentOutlined';
|
|
28
|
+
export { default as AssignmentOutlined, default as AssignmentOutlinedIcon } from '@mui/icons-material/AssignmentOutlined';
|
|
29
|
+
import default23 from '@mui/icons-material/AssignmentTurnedIn';
|
|
30
|
+
export { default as AssignmentTurnedIn } from '@mui/icons-material/AssignmentTurnedIn';
|
|
31
|
+
import default24 from '@mui/icons-material/AttachMoney';
|
|
32
|
+
export { default as AttachMoney } from '@mui/icons-material/AttachMoney';
|
|
33
|
+
import default25 from '@mui/icons-material/Attachment';
|
|
34
|
+
export { default as Attachment, default as AttachmentIcon } from '@mui/icons-material/Attachment';
|
|
35
|
+
import default27 from '@mui/icons-material/AutoModeOutlined';
|
|
36
|
+
export { default as AutoModeOutlined } from '@mui/icons-material/AutoModeOutlined';
|
|
37
|
+
import default28 from '@mui/icons-material/BackupTable';
|
|
38
|
+
export { default as BackupTable, default as BackupTableIcon } from '@mui/icons-material/BackupTable';
|
|
39
|
+
import default30 from '@mui/icons-material/BookmarkAdded';
|
|
40
|
+
export { default as BookmarkAdded } from '@mui/icons-material/BookmarkAdded';
|
|
41
|
+
import default31 from '@mui/icons-material/BrightnessAuto';
|
|
42
|
+
export { default as BrightnessAuto } from '@mui/icons-material/BrightnessAuto';
|
|
43
|
+
import default32 from '@mui/icons-material/Business';
|
|
44
|
+
export { default as Business } from '@mui/icons-material/Business';
|
|
45
|
+
import default33 from '@mui/icons-material/BusinessCenterOutlined';
|
|
46
|
+
export { default as BusinessCenterOutlined } from '@mui/icons-material/BusinessCenterOutlined';
|
|
47
|
+
import default34 from '@mui/icons-material/CableOutlined';
|
|
48
|
+
export { default as CableOutlined } from '@mui/icons-material/CableOutlined';
|
|
49
|
+
import default35 from '@mui/icons-material/Cached';
|
|
50
|
+
export { default as Cached } from '@mui/icons-material/Cached';
|
|
51
|
+
import default36 from '@mui/icons-material/Cancel';
|
|
52
|
+
export { default as Cancel, default as CancelIcon } from '@mui/icons-material/Cancel';
|
|
53
|
+
import default38 from '@mui/icons-material/Check';
|
|
54
|
+
export { default as Check, default as CheckIcon } from '@mui/icons-material/Check';
|
|
55
|
+
import default40 from '@mui/icons-material/CheckCircle';
|
|
56
|
+
export { default as CheckCircle, default as CheckCircleIcon } from '@mui/icons-material/CheckCircle';
|
|
57
|
+
import default42 from '@mui/icons-material/CheckCircleOutline';
|
|
58
|
+
export { default as CheckCircleOutline } from '@mui/icons-material/CheckCircleOutline';
|
|
59
|
+
import default43 from '@mui/icons-material/Close';
|
|
60
|
+
export { default as Close, default as CloseIcon } from '@mui/icons-material/Close';
|
|
61
|
+
import default45 from '@mui/icons-material/Comment';
|
|
62
|
+
export { default as Comment, default as CommentIcon } from '@mui/icons-material/Comment';
|
|
63
|
+
import default47 from '@mui/icons-material/Compare';
|
|
64
|
+
export { default as Compare, default as CompareIcon } from '@mui/icons-material/Compare';
|
|
65
|
+
import default49 from '@mui/icons-material/CompareArrows';
|
|
66
|
+
export { default as CompareArrows } from '@mui/icons-material/CompareArrows';
|
|
67
|
+
import default50 from '@mui/icons-material/ContactEmergency';
|
|
68
|
+
export { default as ContactEmergency } from '@mui/icons-material/ContactEmergency';
|
|
69
|
+
import default51 from '@mui/icons-material/ContentCopy';
|
|
70
|
+
export { default as ContentCopy, default as ContentCopyIcon } from '@mui/icons-material/ContentCopy';
|
|
71
|
+
import default53 from '@mui/icons-material/ContentCopyOutlined';
|
|
72
|
+
export { default as ContentCopyOutlined } from '@mui/icons-material/ContentCopyOutlined';
|
|
73
|
+
import default54 from '@mui/icons-material/CorporateFare';
|
|
74
|
+
export { default as CorporateFare, default as CorporateFareIcon } from '@mui/icons-material/CorporateFare';
|
|
75
|
+
import default56 from '@mui/icons-material/CurrencyExchange';
|
|
76
|
+
export { default as CurrencyExchange } from '@mui/icons-material/CurrencyExchange';
|
|
77
|
+
import default57 from '@mui/icons-material/DeleteForever';
|
|
78
|
+
export { default as DeleteForever } from '@mui/icons-material/DeleteForever';
|
|
79
|
+
import default58 from '@mui/icons-material/DeleteForeverOutlined';
|
|
80
|
+
export { default as DeleteForeverOutlined } from '@mui/icons-material/DeleteForeverOutlined';
|
|
81
|
+
import default59 from '@mui/icons-material/DeleteOutline';
|
|
82
|
+
export { default as DeleteOutline, default as DeleteOutlineIcon } from '@mui/icons-material/DeleteOutline';
|
|
83
|
+
import default61 from '@mui/icons-material/DeleteOutlined';
|
|
84
|
+
export { default as DeleteOutlined } from '@mui/icons-material/DeleteOutlined';
|
|
85
|
+
import default62 from '@mui/icons-material/DescriptionOutlined';
|
|
86
|
+
export { default as DescriptionOutlined } from '@mui/icons-material/DescriptionOutlined';
|
|
87
|
+
import default63 from '@mui/icons-material/Difference';
|
|
88
|
+
export { default as Difference } from '@mui/icons-material/Difference';
|
|
89
|
+
import default64 from '@mui/icons-material/DoneAllOutlined';
|
|
90
|
+
export { default as DoneAllOutlined } from '@mui/icons-material/DoneAllOutlined';
|
|
91
|
+
import default65 from '@mui/icons-material/DoneOutline';
|
|
92
|
+
export { default as DoneOutline } from '@mui/icons-material/DoneOutline';
|
|
93
|
+
import default66 from '@mui/icons-material/Download';
|
|
94
|
+
export { default as Download, default as DownloadIcon } from '@mui/icons-material/Download';
|
|
95
|
+
import default68 from '@mui/icons-material/EditOutlined';
|
|
96
|
+
export { default as EditOutlined, default as EditOutlinedIcon } from '@mui/icons-material/EditOutlined';
|
|
97
|
+
import default70 from '@mui/icons-material/Email';
|
|
98
|
+
export { default as Email, default as EmailIcon } from '@mui/icons-material/Email';
|
|
99
|
+
import default72 from '@mui/icons-material/Equalizer';
|
|
100
|
+
export { default as Equalizer } from '@mui/icons-material/Equalizer';
|
|
101
|
+
import default74 from '@mui/icons-material/ErrorOutlineOutlined';
|
|
102
|
+
export { default as ErrorIcon, default as ErrorOutlineOutlined } from '@mui/icons-material/ErrorOutlineOutlined';
|
|
103
|
+
import default75 from '@mui/icons-material/EventSeat';
|
|
104
|
+
export { default as EventSeat } from '@mui/icons-material/EventSeat';
|
|
105
|
+
import default76 from '@mui/icons-material/FileCopy';
|
|
106
|
+
export { default as FileCopy } from '@mui/icons-material/FileCopy';
|
|
107
|
+
import default77 from '@mui/icons-material/FileCopyOutlined';
|
|
108
|
+
export { default as FileCopyOutlined } from '@mui/icons-material/FileCopyOutlined';
|
|
109
|
+
import default78 from '@mui/icons-material/FileUpload';
|
|
110
|
+
export { default as FileUpload } from '@mui/icons-material/FileUpload';
|
|
111
|
+
import default79 from '@mui/icons-material/FileUploadOutlined';
|
|
112
|
+
export { default as FileUploadOutlined, default as FileUploadOutlinedIcon } from '@mui/icons-material/FileUploadOutlined';
|
|
113
|
+
import default81 from '@mui/icons-material/FilterAlt';
|
|
114
|
+
export { default as FilterAlt, default as FilterAltIcon } from '@mui/icons-material/FilterAlt';
|
|
115
|
+
import default83 from '@mui/icons-material/FilterList';
|
|
116
|
+
export { default as FilterList, default as FilterListIcon } from '@mui/icons-material/FilterList';
|
|
117
|
+
import default85 from '@mui/icons-material/FilterListOff';
|
|
118
|
+
export { default as FilterListOff } from '@mui/icons-material/FilterListOff';
|
|
119
|
+
import default86 from '@mui/icons-material/Flag';
|
|
120
|
+
export { default as Flag } from '@mui/icons-material/Flag';
|
|
121
|
+
import default87 from '@mui/icons-material/FlagOutlined';
|
|
122
|
+
export { default as FlagOutlined } from '@mui/icons-material/FlagOutlined';
|
|
123
|
+
import default88 from '@mui/icons-material/FolderOpen';
|
|
124
|
+
export { default as FolderOpen } from '@mui/icons-material/FolderOpen';
|
|
125
|
+
import default89 from '@mui/icons-material/Functions';
|
|
126
|
+
export { default as Functions, default as FunctionsIcon } from '@mui/icons-material/Functions';
|
|
127
|
+
import default91 from '@mui/icons-material/GetApp';
|
|
128
|
+
export { default as GetApp } from '@mui/icons-material/GetApp';
|
|
129
|
+
import default92 from '@mui/icons-material/Group';
|
|
130
|
+
export { default as Group, default as GroupIcon } from '@mui/icons-material/Group';
|
|
131
|
+
import default94 from '@mui/icons-material/GroupAdd';
|
|
132
|
+
export { default as GroupAdd } from '@mui/icons-material/GroupAdd';
|
|
133
|
+
import default95 from '@mui/icons-material/GroupAddOutlined';
|
|
134
|
+
export { default as GroupAddOutlined } from '@mui/icons-material/GroupAddOutlined';
|
|
135
|
+
import default96 from '@mui/icons-material/GroupWorkOutlined';
|
|
136
|
+
export { default as GroupWorkOutlined } from '@mui/icons-material/GroupWorkOutlined';
|
|
137
|
+
import default97 from '@mui/icons-material/Handshake';
|
|
138
|
+
export { default as Handshake } from '@mui/icons-material/Handshake';
|
|
139
|
+
import default98 from '@mui/icons-material/HelpOutline';
|
|
140
|
+
export { default as HelpOutline, default as HelpOutlineIcon } from '@mui/icons-material/HelpOutline';
|
|
141
|
+
import default100 from '@mui/icons-material/History';
|
|
142
|
+
export { default as History, default as HistoryIcon } from '@mui/icons-material/History';
|
|
143
|
+
import default102 from '@mui/icons-material/HistoryOutlined';
|
|
144
|
+
export { default as HistoryOutlined } from '@mui/icons-material/HistoryOutlined';
|
|
145
|
+
import default103 from '@mui/icons-material/HorizontalSplitOutlined';
|
|
146
|
+
export { default as HorizontalSplitOutlined } from '@mui/icons-material/HorizontalSplitOutlined';
|
|
147
|
+
import default104 from '@mui/icons-material/HourglassEmpty';
|
|
148
|
+
export { default as HourglassEmpty } from '@mui/icons-material/HourglassEmpty';
|
|
149
|
+
import default105 from '@mui/icons-material/HowToVote';
|
|
150
|
+
export { default as HowToVote } from '@mui/icons-material/HowToVote';
|
|
151
|
+
import default106 from '@mui/icons-material/HttpOutlined';
|
|
152
|
+
export { default as HttpOutlined } from '@mui/icons-material/HttpOutlined';
|
|
153
|
+
import default107 from '@mui/icons-material/ImportContacts';
|
|
154
|
+
export { default as ImportContacts } from '@mui/icons-material/ImportContacts';
|
|
155
|
+
import default108 from '@mui/icons-material/ImportExport';
|
|
156
|
+
export { default as ImportExport } from '@mui/icons-material/ImportExport';
|
|
157
|
+
import InfoOutlined from '@mui/icons-material/InfoOutlined';
|
|
158
|
+
export { default as InfoOutlined, default as InfoOutlinedIcon } from '@mui/icons-material/InfoOutlined';
|
|
159
|
+
import default111 from '@mui/icons-material/InsertChartOutlined';
|
|
160
|
+
export { default as InsertChartOutlined } from '@mui/icons-material/InsertChartOutlined';
|
|
161
|
+
import default112 from '@mui/icons-material/IosShareOutlined';
|
|
162
|
+
export { default as IosShareOutlined } from '@mui/icons-material/IosShareOutlined';
|
|
163
|
+
import default113 from '@mui/icons-material/Link';
|
|
164
|
+
export { default as Link } from '@mui/icons-material/Link';
|
|
165
|
+
import default114 from '@mui/icons-material/List';
|
|
166
|
+
export { default as List } from '@mui/icons-material/List';
|
|
167
|
+
import default115 from '@mui/icons-material/MailOutline';
|
|
168
|
+
export { default as MailOutline } from '@mui/icons-material/MailOutline';
|
|
169
|
+
import default116 from '@mui/icons-material/ManageAccounts';
|
|
170
|
+
export { default as ManageAccounts, default as ManageAccountsIcon } from '@mui/icons-material/ManageAccounts';
|
|
171
|
+
import default118 from '@mui/icons-material/Menu';
|
|
172
|
+
export { default as Menu, default as MenuIcon } from '@mui/icons-material/Menu';
|
|
173
|
+
import default120 from '@mui/icons-material/MenuBook';
|
|
174
|
+
export { default as MenuBook } from '@mui/icons-material/MenuBook';
|
|
175
|
+
import default121 from '@mui/icons-material/MonetizationOn';
|
|
176
|
+
export { default as MonetizationOn } from '@mui/icons-material/MonetizationOn';
|
|
177
|
+
import default122 from '@mui/icons-material/MoreVert';
|
|
178
|
+
export { default as MoreVert, default as MoreVertIcon } from '@mui/icons-material/MoreVert';
|
|
179
|
+
import default124 from '@mui/icons-material/NextWeek';
|
|
180
|
+
export { default as NextWeek } from '@mui/icons-material/NextWeek';
|
|
181
|
+
import default125 from '@mui/icons-material/Nfc';
|
|
182
|
+
export { default as Nfc } from '@mui/icons-material/Nfc';
|
|
183
|
+
import default126 from '@mui/icons-material/OpenInNew';
|
|
184
|
+
export { default as OpenInNew, default as OpenInNewIcon } from '@mui/icons-material/OpenInNew';
|
|
185
|
+
import default128 from '@mui/icons-material/PanToolOutlined';
|
|
186
|
+
export { default as PanToolOutlined } from '@mui/icons-material/PanToolOutlined';
|
|
187
|
+
import default129 from '@mui/icons-material/PauseCircleOutline';
|
|
188
|
+
export { default as PauseCircleOutline } from '@mui/icons-material/PauseCircleOutline';
|
|
189
|
+
import default130 from '@mui/icons-material/PeopleAltOutlined';
|
|
190
|
+
export { default as PeopleAltOutlined, default as PeopleAltOutlinedIcon } from '@mui/icons-material/PeopleAltOutlined';
|
|
191
|
+
import default132 from '@mui/icons-material/Person';
|
|
192
|
+
export { default as Person } from '@mui/icons-material/Person';
|
|
193
|
+
import default133 from '@mui/icons-material/PersonOutlineOutlined';
|
|
194
|
+
export { default as PersonOutlineOutlined } from '@mui/icons-material/PersonOutlineOutlined';
|
|
195
|
+
import default134 from '@mui/icons-material/PlayCircle';
|
|
196
|
+
export { default as PlayCircle } from '@mui/icons-material/PlayCircle';
|
|
197
|
+
import default135 from '@mui/icons-material/PlayCircleOutlined';
|
|
198
|
+
export { default as PlayCircleOutlined } from '@mui/icons-material/PlayCircleOutlined';
|
|
199
|
+
import default136 from '@mui/icons-material/PlaylistAddCheck';
|
|
200
|
+
export { default as PlaylistAddCheck } from '@mui/icons-material/PlaylistAddCheck';
|
|
201
|
+
import default137 from '@mui/icons-material/PostAddOutlined';
|
|
202
|
+
export { default as PostAddOutlined } from '@mui/icons-material/PostAddOutlined';
|
|
203
|
+
import default138 from '@mui/icons-material/PreviewRounded';
|
|
204
|
+
export { default as PreviewRounded, default as PreviewRoundedIcon } from '@mui/icons-material/PreviewRounded';
|
|
205
|
+
import default140 from '@mui/icons-material/PriceChangeOutlined';
|
|
206
|
+
export { default as PriceChangeOutlined } from '@mui/icons-material/PriceChangeOutlined';
|
|
207
|
+
import default141 from '@mui/icons-material/Print';
|
|
208
|
+
export { default as Print } from '@mui/icons-material/Print';
|
|
209
|
+
import default142 from '@mui/icons-material/Publish';
|
|
210
|
+
export { default as Publish, default as PublishIcon } from '@mui/icons-material/Publish';
|
|
211
|
+
import default144 from '@mui/icons-material/PublishedWithChanges';
|
|
212
|
+
export { default as PublishedWithChanges } from '@mui/icons-material/PublishedWithChanges';
|
|
213
|
+
import default145 from '@mui/icons-material/RecentActorsOutlined';
|
|
214
|
+
export { default as RecentActorsOutlined } from '@mui/icons-material/RecentActorsOutlined';
|
|
215
|
+
import default146 from '@mui/icons-material/RecommendOutlined';
|
|
216
|
+
export { default as RecommendOutlined } from '@mui/icons-material/RecommendOutlined';
|
|
217
|
+
import default147 from '@mui/icons-material/Refresh';
|
|
218
|
+
export { default as Refresh, default as RefreshIcon } from '@mui/icons-material/Refresh';
|
|
219
|
+
import default149 from '@mui/icons-material/ReorderOutlined';
|
|
220
|
+
export { default as ReorderOutlined } from '@mui/icons-material/ReorderOutlined';
|
|
221
|
+
import default150 from '@mui/icons-material/Repeat';
|
|
222
|
+
export { default as Repeat, default as RepeatIcon } from '@mui/icons-material/Repeat';
|
|
223
|
+
import default152 from '@mui/icons-material/RequestQuoteOutlined';
|
|
224
|
+
export { default as RequestQuoteOutlined } from '@mui/icons-material/RequestQuoteOutlined';
|
|
225
|
+
import default153 from '@mui/icons-material/RestartAlt';
|
|
226
|
+
export { default as RestartAlt } from '@mui/icons-material/RestartAlt';
|
|
227
|
+
import default154 from '@mui/icons-material/Rule';
|
|
228
|
+
export { default as Rule } from '@mui/icons-material/Rule';
|
|
229
|
+
import default155 from '@mui/icons-material/RuleOutlined';
|
|
230
|
+
export { default as RuleOutlined } from '@mui/icons-material/RuleOutlined';
|
|
231
|
+
import default156 from '@mui/icons-material/SafetyDivider';
|
|
232
|
+
export { default as SafetyDivider } from '@mui/icons-material/SafetyDivider';
|
|
233
|
+
import default157 from '@mui/icons-material/Search';
|
|
234
|
+
export { default as Search, default as SearchIcon } from '@mui/icons-material/Search';
|
|
235
|
+
import default159 from '@mui/icons-material/Security';
|
|
236
|
+
export { default as Security } from '@mui/icons-material/Security';
|
|
237
|
+
import default160 from '@mui/icons-material/Send';
|
|
238
|
+
export { default as Send, default as SendIcon } from '@mui/icons-material/Send';
|
|
239
|
+
import default162 from '@mui/icons-material/Settings';
|
|
240
|
+
export { default as Settings, default as SettingsIcon } from '@mui/icons-material/Settings';
|
|
241
|
+
import default164 from '@mui/icons-material/SettingsEthernet';
|
|
242
|
+
export { default as SettingsEthernet } from '@mui/icons-material/SettingsEthernet';
|
|
243
|
+
import default165 from '@mui/icons-material/Share';
|
|
244
|
+
export { default as Share } from '@mui/icons-material/Share';
|
|
245
|
+
import default166 from '@mui/icons-material/SimCardDownload';
|
|
246
|
+
export { default as SimCardDownload } from '@mui/icons-material/SimCardDownload';
|
|
247
|
+
import default167 from '@mui/icons-material/SlowMotionVideoOutlined';
|
|
248
|
+
export { default as SlowMotionVideoOutlined } from '@mui/icons-material/SlowMotionVideoOutlined';
|
|
249
|
+
import default168 from '@mui/icons-material/Sort';
|
|
250
|
+
export { default as Sort } from '@mui/icons-material/Sort';
|
|
251
|
+
import default169 from '@mui/icons-material/SpaceDashboardOutlined';
|
|
252
|
+
export { default as SpaceDashboardOutlined } from '@mui/icons-material/SpaceDashboardOutlined';
|
|
253
|
+
import default170 from '@mui/icons-material/Speed';
|
|
254
|
+
export { default as Speed } from '@mui/icons-material/Speed';
|
|
255
|
+
import default171 from '@mui/icons-material/Star';
|
|
256
|
+
export { default as Star, default as StarIcon } from '@mui/icons-material/Star';
|
|
257
|
+
import default173 from '@mui/icons-material/StarBorder';
|
|
258
|
+
export { default as StarBorder, default as StarBorderIcon } from '@mui/icons-material/StarBorder';
|
|
259
|
+
import default175 from '@mui/icons-material/Stop';
|
|
260
|
+
export { default as Stop } from '@mui/icons-material/Stop';
|
|
261
|
+
import default176 from '@mui/icons-material/SupervisedUserCircleOutlined';
|
|
262
|
+
export { default as SupervisedUserCircleOutlined } from '@mui/icons-material/SupervisedUserCircleOutlined';
|
|
263
|
+
import default177 from '@mui/icons-material/SupervisorAccountOutlined';
|
|
264
|
+
export { default as SupervisorAccountOutlined } from '@mui/icons-material/SupervisorAccountOutlined';
|
|
265
|
+
import default178 from '@mui/icons-material/SwapCalls';
|
|
266
|
+
export { default as SwapCalls } from '@mui/icons-material/SwapCalls';
|
|
267
|
+
import default179 from '@mui/icons-material/Sync';
|
|
268
|
+
export { default as Sync } from '@mui/icons-material/Sync';
|
|
269
|
+
import default180 from '@mui/icons-material/SyncAlt';
|
|
270
|
+
export { default as SyncAlt } from '@mui/icons-material/SyncAlt';
|
|
271
|
+
import default181 from '@mui/icons-material/TableChartOutlined';
|
|
272
|
+
export { default as TableChartOutlined } from '@mui/icons-material/TableChartOutlined';
|
|
273
|
+
import default182 from '@mui/icons-material/Tag';
|
|
274
|
+
export { default as Tag } from '@mui/icons-material/Tag';
|
|
275
|
+
import default183 from '@mui/icons-material/TaskAlt';
|
|
276
|
+
export { default as TaskAlt } from '@mui/icons-material/TaskAlt';
|
|
277
|
+
import default184 from '@mui/icons-material/ThumbDownOutlined';
|
|
278
|
+
export { default as ThumbDownOutlined } from '@mui/icons-material/ThumbDownOutlined';
|
|
279
|
+
import default185 from '@mui/icons-material/ThumbUpOutlined';
|
|
280
|
+
export { default as ThumbUpOutlined } from '@mui/icons-material/ThumbUpOutlined';
|
|
281
|
+
import default186 from '@mui/icons-material/TimerOutlined';
|
|
282
|
+
export { default as TimerOutlined } from '@mui/icons-material/TimerOutlined';
|
|
283
|
+
import default187 from '@mui/icons-material/Toc';
|
|
284
|
+
export { default as Toc } from '@mui/icons-material/Toc';
|
|
285
|
+
import default188 from '@mui/icons-material/TornadoOutlined';
|
|
286
|
+
export { default as TornadoOutlined } from '@mui/icons-material/TornadoOutlined';
|
|
287
|
+
import default189 from '@mui/icons-material/TrackChanges';
|
|
288
|
+
export { default as TrackChanges } from '@mui/icons-material/TrackChanges';
|
|
289
|
+
import default190 from '@mui/icons-material/UploadFileOutlined';
|
|
290
|
+
export { default as UploadFileOutlined, default as UploadFileOutlinedIcon } from '@mui/icons-material/UploadFileOutlined';
|
|
291
|
+
import default192 from '@mui/icons-material/VerifiedUser';
|
|
292
|
+
export { default as VerifiedUser } from '@mui/icons-material/VerifiedUser';
|
|
293
|
+
import default193 from '@mui/icons-material/VerifiedUserOutlined';
|
|
294
|
+
export { default as VerifiedUserOutlined } from '@mui/icons-material/VerifiedUserOutlined';
|
|
295
|
+
import default194 from '@mui/icons-material/VerticalSplit';
|
|
296
|
+
export { default as VerticalSplit } from '@mui/icons-material/VerticalSplit';
|
|
297
|
+
import default195 from '@mui/icons-material/ViewComfy';
|
|
298
|
+
export { default as ViewComfy } from '@mui/icons-material/ViewComfy';
|
|
299
|
+
import default196 from '@mui/icons-material/ViewHeadline';
|
|
300
|
+
export { default as ViewHeadline } from '@mui/icons-material/ViewHeadline';
|
|
301
|
+
import default197 from '@mui/icons-material/Visibility';
|
|
302
|
+
export { default as Visibility, default as VisibilityIcon } from '@mui/icons-material/Visibility';
|
|
303
|
+
import default199 from '@mui/icons-material/WarningOutlined';
|
|
304
|
+
export { default as WarningOutlined, default as WarningOutlinedIcon } from '@mui/icons-material/WarningOutlined';
|
|
305
|
+
import Badge from '@mui/material/Badge';
|
|
306
|
+
import CircularProgress from '@mui/material/CircularProgress';
|
|
307
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
308
|
+
import Stack6 from '@mui/material/Stack';
|
|
309
|
+
import TextField from '@mui/material/TextField';
|
|
310
|
+
import InputAdornment2 from '@mui/material/InputAdornment';
|
|
311
|
+
import FormControl from '@mui/material/FormControl';
|
|
312
|
+
import FormHelperText from '@mui/material/FormHelperText';
|
|
313
|
+
import InputLabel from '@mui/material/InputLabel';
|
|
314
|
+
import MenuItem2 from '@mui/material/MenuItem';
|
|
315
|
+
import Select from '@mui/material/Select';
|
|
316
|
+
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
317
|
+
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
|
|
318
|
+
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
|
319
|
+
import { DateTimePicker as DateTimePicker$1 } from '@mui/x-date-pickers/DateTimePicker';
|
|
320
|
+
import Autocomplete from '@mui/material/Autocomplete';
|
|
321
|
+
import Chip from '@mui/material/Chip';
|
|
322
|
+
import UploadFileIcon from '@mui/icons-material/UploadFile';
|
|
323
|
+
import Typography20 from '@mui/material/Typography';
|
|
324
|
+
import Avatar from '@mui/material/Avatar';
|
|
325
|
+
import AttachFileIcon from '@mui/icons-material/AttachFile';
|
|
326
|
+
import Box14 from '@mui/material/Box';
|
|
327
|
+
import List from '@mui/material/List';
|
|
328
|
+
import ListItem from '@mui/material/ListItem';
|
|
329
|
+
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
330
|
+
import ListItemText from '@mui/material/ListItemText';
|
|
331
|
+
import Checkbox from '@mui/material/Checkbox';
|
|
332
|
+
import Paper from '@mui/material/Paper';
|
|
333
|
+
import Skeleton from '@mui/material/Skeleton';
|
|
334
|
+
import Table from '@mui/material/Table';
|
|
335
|
+
import TableBody from '@mui/material/TableBody';
|
|
336
|
+
import TableCell, { tableCellClasses } from '@mui/material/TableCell';
|
|
337
|
+
import TableContainer from '@mui/material/TableContainer';
|
|
338
|
+
import TableHead from '@mui/material/TableHead';
|
|
339
|
+
import TablePagination from '@mui/material/TablePagination';
|
|
340
|
+
import TableRow from '@mui/material/TableRow';
|
|
341
|
+
import TableSortLabel from '@mui/material/TableSortLabel';
|
|
342
|
+
import { styled } from '@mui/material/styles';
|
|
343
|
+
import Alert from '@mui/material/Alert';
|
|
344
|
+
import ConfirmationNumberOutlinedIcon from '@mui/icons-material/ConfirmationNumberOutlined';
|
|
345
|
+
import Popover2 from '@mui/material/Popover';
|
|
346
|
+
import FormControlLabel2 from '@mui/material/FormControlLabel';
|
|
347
|
+
import ToggleButton from '@mui/material/ToggleButton';
|
|
348
|
+
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
|
|
349
|
+
import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline';
|
|
350
|
+
import Switch from '@mui/material/Switch';
|
|
351
|
+
import Tab from '@mui/material/Tab';
|
|
352
|
+
import Tabs from '@mui/material/Tabs';
|
|
353
|
+
import Dialog from '@mui/material/Dialog';
|
|
354
|
+
import DialogActions from '@mui/material/DialogActions';
|
|
355
|
+
import DialogContent from '@mui/material/DialogContent';
|
|
356
|
+
import DialogContentText from '@mui/material/DialogContentText';
|
|
357
|
+
import DialogTitle from '@mui/material/DialogTitle';
|
|
358
|
+
import WarningAmberIcon from '@mui/icons-material/WarningAmber';
|
|
359
|
+
import Slide from '@mui/material/Slide';
|
|
360
|
+
import Container from '@mui/material/Container';
|
|
361
|
+
import Accordion from '@mui/material/Accordion';
|
|
362
|
+
import AccordionDetails from '@mui/material/AccordionDetails';
|
|
363
|
+
import AccordionSummary from '@mui/material/AccordionSummary';
|
|
364
|
+
import Card2 from '@mui/material/Card';
|
|
365
|
+
import CardContent2 from '@mui/material/CardContent';
|
|
366
|
+
import Divider from '@mui/material/Divider';
|
|
367
|
+
import CallMadeIcon from '@mui/icons-material/CallMade';
|
|
368
|
+
import CardActions from '@mui/material/CardActions';
|
|
369
|
+
import Breadcrumbs from '@mui/material/Breadcrumbs';
|
|
370
|
+
import Link from '@mui/material/Link';
|
|
371
|
+
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
|
|
372
|
+
import Menu from '@mui/material/Menu';
|
|
373
|
+
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
|
374
|
+
import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
|
|
375
|
+
import Slider from '@mui/material/Slider';
|
|
376
|
+
import Radio from '@mui/material/Radio';
|
|
377
|
+
import OpenInFullOutlinedIcon from '@mui/icons-material/OpenInFullOutlined';
|
|
378
|
+
import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';
|
|
379
|
+
import CardHeader from '@mui/material/CardHeader';
|
|
380
|
+
import CardActionArea from '@mui/material/CardActionArea';
|
|
381
|
+
import Grid from '@mui/material/Grid';
|
|
382
|
+
import CheckCircleOutlinedIcon from '@mui/icons-material/CheckCircleOutlined';
|
|
383
|
+
import SkipNextIcon from '@mui/icons-material/SkipNext';
|
|
384
|
+
|
|
385
|
+
var __defProp = Object.defineProperty;
|
|
386
|
+
var __export = (target, all) => {
|
|
387
|
+
for (var name in all)
|
|
388
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
389
|
+
};
|
|
390
|
+
function accessibleText(children) {
|
|
391
|
+
let text = "";
|
|
392
|
+
Children.forEach(children, (child) => {
|
|
393
|
+
if (typeof child === "string" || typeof child === "number") {
|
|
394
|
+
text += String(child);
|
|
395
|
+
} else if (isValidElement(child)) {
|
|
396
|
+
text += accessibleText(child.props.children);
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
return text.trim() || "Button";
|
|
400
|
+
}
|
|
401
|
+
function SharedButton({
|
|
402
|
+
children,
|
|
403
|
+
sx,
|
|
404
|
+
...props
|
|
405
|
+
}) {
|
|
406
|
+
return /* @__PURE__ */ jsx(
|
|
407
|
+
Button,
|
|
408
|
+
{
|
|
409
|
+
"aria-label": props["aria-label"] ?? accessibleText(children),
|
|
410
|
+
sx: {
|
|
411
|
+
minWidth: 40,
|
|
412
|
+
minHeight: 40,
|
|
413
|
+
borderRadius: 1,
|
|
414
|
+
px: 1.5,
|
|
415
|
+
textTransform: "none",
|
|
416
|
+
...sx
|
|
417
|
+
},
|
|
418
|
+
...props,
|
|
419
|
+
children
|
|
420
|
+
}
|
|
421
|
+
);
|
|
422
|
+
}
|
|
423
|
+
function SharedIconButton({ sx, ...props }) {
|
|
424
|
+
return /* @__PURE__ */ jsx(
|
|
425
|
+
IconButton,
|
|
426
|
+
{
|
|
427
|
+
sx: { width: 40, height: 40, borderRadius: 1, ...sx },
|
|
428
|
+
...props
|
|
429
|
+
}
|
|
430
|
+
);
|
|
431
|
+
}
|
|
432
|
+
function CustomButton({ icon, title, handle, align = "left", ...props }) {
|
|
433
|
+
return /* @__PURE__ */ jsx(
|
|
434
|
+
SharedButton,
|
|
435
|
+
{
|
|
436
|
+
onClick: handle,
|
|
437
|
+
...align === "left" ? { startIcon: icon } : { endIcon: icon },
|
|
438
|
+
...props,
|
|
439
|
+
children: title
|
|
440
|
+
}
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
// src/icons/mui.ts
|
|
445
|
+
var mui_exports = {};
|
|
446
|
+
__export(mui_exports, {
|
|
447
|
+
AccessibilityNew: () => default2,
|
|
448
|
+
AccountTree: () => default3,
|
|
449
|
+
AccountTreeIcon: () => default3,
|
|
450
|
+
AccountTreeOutlined: () => default5,
|
|
451
|
+
AccountTreeOutlinedIcon: () => default5,
|
|
452
|
+
Add: () => default7,
|
|
453
|
+
AddCircleOutline: () => default9,
|
|
454
|
+
AddCircleOutlineIcon: () => default9,
|
|
455
|
+
AddIcon: () => default7,
|
|
456
|
+
AdminPanelSettings: () => default11,
|
|
457
|
+
AdminPanelSettingsIcon: () => default11,
|
|
458
|
+
Archive: () => default13,
|
|
459
|
+
ArrowBack: () => default14,
|
|
460
|
+
ArrowBackIcon: () => default14,
|
|
461
|
+
ArrowForwardIosSharp: () => default16,
|
|
462
|
+
ArrowForwardIosSharpIcon: () => default16,
|
|
463
|
+
ArticleOutlined: () => default18,
|
|
464
|
+
ArticleOutlinedIcon: () => default18,
|
|
465
|
+
AssessmentOutlined: () => default20,
|
|
466
|
+
AssignmentOutlined: () => default21,
|
|
467
|
+
AssignmentOutlinedIcon: () => default21,
|
|
468
|
+
AssignmentTurnedIn: () => default23,
|
|
469
|
+
AttachMoney: () => default24,
|
|
470
|
+
Attachment: () => default25,
|
|
471
|
+
AttachmentIcon: () => default25,
|
|
472
|
+
AutoModeOutlined: () => default27,
|
|
473
|
+
BackupTable: () => default28,
|
|
474
|
+
BackupTableIcon: () => default28,
|
|
475
|
+
BookmarkAdded: () => default30,
|
|
476
|
+
BrightnessAuto: () => default31,
|
|
477
|
+
Business: () => default32,
|
|
478
|
+
BusinessCenterOutlined: () => default33,
|
|
479
|
+
CableOutlined: () => default34,
|
|
480
|
+
Cached: () => default35,
|
|
481
|
+
Cancel: () => default36,
|
|
482
|
+
CancelIcon: () => default36,
|
|
483
|
+
Check: () => default38,
|
|
484
|
+
CheckCircle: () => default40,
|
|
485
|
+
CheckCircleIcon: () => default40,
|
|
486
|
+
CheckCircleOutline: () => default42,
|
|
487
|
+
CheckIcon: () => default38,
|
|
488
|
+
Close: () => default43,
|
|
489
|
+
CloseIcon: () => default43,
|
|
490
|
+
Comment: () => default45,
|
|
491
|
+
CommentIcon: () => default45,
|
|
492
|
+
Compare: () => default47,
|
|
493
|
+
CompareArrows: () => default49,
|
|
494
|
+
CompareIcon: () => default47,
|
|
495
|
+
ContactEmergency: () => default50,
|
|
496
|
+
ContentCopy: () => default51,
|
|
497
|
+
ContentCopyIcon: () => default51,
|
|
498
|
+
ContentCopyOutlined: () => default53,
|
|
499
|
+
CorporateFare: () => default54,
|
|
500
|
+
CorporateFareIcon: () => default54,
|
|
501
|
+
CurrencyExchange: () => default56,
|
|
502
|
+
DeleteForever: () => default57,
|
|
503
|
+
DeleteForeverOutlined: () => default58,
|
|
504
|
+
DeleteOutline: () => default59,
|
|
505
|
+
DeleteOutlineIcon: () => default59,
|
|
506
|
+
DeleteOutlined: () => default61,
|
|
507
|
+
DescriptionOutlined: () => default62,
|
|
508
|
+
Difference: () => default63,
|
|
509
|
+
DoneAllOutlined: () => default64,
|
|
510
|
+
DoneOutline: () => default65,
|
|
511
|
+
Download: () => default66,
|
|
512
|
+
DownloadIcon: () => default66,
|
|
513
|
+
EditOutlined: () => default68,
|
|
514
|
+
EditOutlinedIcon: () => default68,
|
|
515
|
+
Email: () => default70,
|
|
516
|
+
EmailIcon: () => default70,
|
|
517
|
+
Equalizer: () => default72,
|
|
518
|
+
ErrorIcon: () => default74,
|
|
519
|
+
ErrorOutlineOutlined: () => default74,
|
|
520
|
+
EventSeat: () => default75,
|
|
521
|
+
FileCopy: () => default76,
|
|
522
|
+
FileCopyOutlined: () => default77,
|
|
523
|
+
FileUpload: () => default78,
|
|
524
|
+
FileUploadOutlined: () => default79,
|
|
525
|
+
FileUploadOutlinedIcon: () => default79,
|
|
526
|
+
FilterAlt: () => default81,
|
|
527
|
+
FilterAltIcon: () => default81,
|
|
528
|
+
FilterList: () => default83,
|
|
529
|
+
FilterListIcon: () => default83,
|
|
530
|
+
FilterListOff: () => default85,
|
|
531
|
+
Flag: () => default86,
|
|
532
|
+
FlagOutlined: () => default87,
|
|
533
|
+
FolderOpen: () => default88,
|
|
534
|
+
Functions: () => default89,
|
|
535
|
+
FunctionsIcon: () => default89,
|
|
536
|
+
GetApp: () => default91,
|
|
537
|
+
Group: () => default92,
|
|
538
|
+
GroupAdd: () => default94,
|
|
539
|
+
GroupAddOutlined: () => default95,
|
|
540
|
+
GroupIcon: () => default92,
|
|
541
|
+
GroupWorkOutlined: () => default96,
|
|
542
|
+
Handshake: () => default97,
|
|
543
|
+
HelpOutline: () => default98,
|
|
544
|
+
HelpOutlineIcon: () => default98,
|
|
545
|
+
History: () => default100,
|
|
546
|
+
HistoryIcon: () => default100,
|
|
547
|
+
HistoryOutlined: () => default102,
|
|
548
|
+
HorizontalSplitOutlined: () => default103,
|
|
549
|
+
HourglassEmpty: () => default104,
|
|
550
|
+
HowToVote: () => default105,
|
|
551
|
+
HttpOutlined: () => default106,
|
|
552
|
+
ImportContacts: () => default107,
|
|
553
|
+
ImportExport: () => default108,
|
|
554
|
+
InfoOutlined: () => InfoOutlined,
|
|
555
|
+
InfoOutlinedIcon: () => InfoOutlined,
|
|
556
|
+
InsertChartOutlined: () => default111,
|
|
557
|
+
IosShareOutlined: () => default112,
|
|
558
|
+
Link: () => default113,
|
|
559
|
+
List: () => default114,
|
|
560
|
+
MailOutline: () => default115,
|
|
561
|
+
ManageAccounts: () => default116,
|
|
562
|
+
ManageAccountsIcon: () => default116,
|
|
563
|
+
Menu: () => default118,
|
|
564
|
+
MenuBook: () => default120,
|
|
565
|
+
MenuIcon: () => default118,
|
|
566
|
+
MonetizationOn: () => default121,
|
|
567
|
+
MoreVert: () => default122,
|
|
568
|
+
MoreVertIcon: () => default122,
|
|
569
|
+
NextWeek: () => default124,
|
|
570
|
+
Nfc: () => default125,
|
|
571
|
+
OpenInNew: () => default126,
|
|
572
|
+
OpenInNewIcon: () => default126,
|
|
573
|
+
PanToolOutlined: () => default128,
|
|
574
|
+
PauseCircleOutline: () => default129,
|
|
575
|
+
PeopleAltOutlined: () => default130,
|
|
576
|
+
PeopleAltOutlinedIcon: () => default130,
|
|
577
|
+
Person: () => default132,
|
|
578
|
+
PersonOutlineOutlined: () => default133,
|
|
579
|
+
PlayCircle: () => default134,
|
|
580
|
+
PlayCircleOutlined: () => default135,
|
|
581
|
+
PlaylistAddCheck: () => default136,
|
|
582
|
+
PostAddOutlined: () => default137,
|
|
583
|
+
PreviewRounded: () => default138,
|
|
584
|
+
PreviewRoundedIcon: () => default138,
|
|
585
|
+
PriceChangeOutlined: () => default140,
|
|
586
|
+
Print: () => default141,
|
|
587
|
+
Publish: () => default142,
|
|
588
|
+
PublishIcon: () => default142,
|
|
589
|
+
PublishedWithChanges: () => default144,
|
|
590
|
+
RecentActorsOutlined: () => default145,
|
|
591
|
+
RecommendOutlined: () => default146,
|
|
592
|
+
Refresh: () => default147,
|
|
593
|
+
RefreshIcon: () => default147,
|
|
594
|
+
ReorderOutlined: () => default149,
|
|
595
|
+
Repeat: () => default150,
|
|
596
|
+
RepeatIcon: () => default150,
|
|
597
|
+
RequestQuoteOutlined: () => default152,
|
|
598
|
+
RestartAlt: () => default153,
|
|
599
|
+
Rule: () => default154,
|
|
600
|
+
RuleOutlined: () => default155,
|
|
601
|
+
SafetyDivider: () => default156,
|
|
602
|
+
Search: () => default157,
|
|
603
|
+
SearchIcon: () => default157,
|
|
604
|
+
Security: () => default159,
|
|
605
|
+
Send: () => default160,
|
|
606
|
+
SendIcon: () => default160,
|
|
607
|
+
Settings: () => default162,
|
|
608
|
+
SettingsEthernet: () => default164,
|
|
609
|
+
SettingsIcon: () => default162,
|
|
610
|
+
Share: () => default165,
|
|
611
|
+
SimCardDownload: () => default166,
|
|
612
|
+
SlowMotionVideoOutlined: () => default167,
|
|
613
|
+
Sort: () => default168,
|
|
614
|
+
SpaceDashboardOutlined: () => default169,
|
|
615
|
+
Speed: () => default170,
|
|
616
|
+
Star: () => default171,
|
|
617
|
+
StarBorder: () => default173,
|
|
618
|
+
StarBorderIcon: () => default173,
|
|
619
|
+
StarIcon: () => default171,
|
|
620
|
+
Stop: () => default175,
|
|
621
|
+
SupervisedUserCircleOutlined: () => default176,
|
|
622
|
+
SupervisorAccountOutlined: () => default177,
|
|
623
|
+
SwapCalls: () => default178,
|
|
624
|
+
Sync: () => default179,
|
|
625
|
+
SyncAlt: () => default180,
|
|
626
|
+
TableChartOutlined: () => default181,
|
|
627
|
+
Tag: () => default182,
|
|
628
|
+
TaskAlt: () => default183,
|
|
629
|
+
ThumbDownOutlined: () => default184,
|
|
630
|
+
ThumbUpOutlined: () => default185,
|
|
631
|
+
TimerOutlined: () => default186,
|
|
632
|
+
Toc: () => default187,
|
|
633
|
+
TornadoOutlined: () => default188,
|
|
634
|
+
TrackChanges: () => default189,
|
|
635
|
+
UploadFileOutlined: () => default190,
|
|
636
|
+
UploadFileOutlinedIcon: () => default190,
|
|
637
|
+
VerifiedUser: () => default192,
|
|
638
|
+
VerifiedUserOutlined: () => default193,
|
|
639
|
+
VerticalSplit: () => default194,
|
|
640
|
+
ViewComfy: () => default195,
|
|
641
|
+
ViewHeadline: () => default196,
|
|
642
|
+
Visibility: () => default197,
|
|
643
|
+
VisibilityIcon: () => default197,
|
|
644
|
+
WarningOutlined: () => default199,
|
|
645
|
+
WarningOutlinedIcon: () => default199
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
// src/actions/actionIconData.ts
|
|
649
|
+
var item = (icon, defaultColor = "primary") => ({ icon, defaultColor });
|
|
650
|
+
var ActionIconData = {
|
|
651
|
+
default: item("HelpOutline", "secondary"),
|
|
652
|
+
add: item("AddCircleOutline"),
|
|
653
|
+
copy: item("ContentCopy", "error"),
|
|
654
|
+
download: item("Download", "warning"),
|
|
655
|
+
fileupload: item("UploadFileOutlined", "secondary"),
|
|
656
|
+
upload: item("FileUploadOutlined", "success"),
|
|
657
|
+
import: item("ImportContacts", "warning"),
|
|
658
|
+
export: item("ImportExport", "secondary"),
|
|
659
|
+
edit: item("EditOutlined"),
|
|
660
|
+
delete: item("DeleteOutline", "error"),
|
|
661
|
+
withdraw: item("DeleteForeverOutlined", "secondary"),
|
|
662
|
+
view: item("Visibility"),
|
|
663
|
+
viewDetails: item("Visibility"),
|
|
664
|
+
preview: item("PreviewRounded"),
|
|
665
|
+
info: item("InfoOutlined"),
|
|
666
|
+
search: item("Search"),
|
|
667
|
+
save: item("AssignmentTurnedIn", "success"),
|
|
668
|
+
send: item("Send"),
|
|
669
|
+
email: item("Email", "success"),
|
|
670
|
+
refresh: item("Refresh", "error"),
|
|
671
|
+
close: item("Close", "error"),
|
|
672
|
+
cancel: item("Cancel", "error"),
|
|
673
|
+
history: item("History", "warning"),
|
|
674
|
+
reschedule: item("HistoryOutlined", "secondary"),
|
|
675
|
+
attachment: item("Attachment"),
|
|
676
|
+
comment: item("Comment", "secondary"),
|
|
677
|
+
mom: item("Comment", "success"),
|
|
678
|
+
favourite: item("Star", "warning"),
|
|
679
|
+
unFavourite: item("StarBorder", "warning"),
|
|
680
|
+
success: item("ThumbUpOutlined", "success"),
|
|
681
|
+
error: item("ThumbDownOutlined", "error"),
|
|
682
|
+
warning: item("ErrorOutlineOutlined", "warning"),
|
|
683
|
+
compare: item("Compare", "secondary"),
|
|
684
|
+
compareArrows: item("CompareArrows", "secondary"),
|
|
685
|
+
showChanges: item("Difference", "secondary"),
|
|
686
|
+
validate: item("PublishedWithChanges", "warning"),
|
|
687
|
+
validateUser: item("VerifiedUser", "secondary"),
|
|
688
|
+
protect: item("VerifiedUser", "success"),
|
|
689
|
+
unProtect: item("VerifiedUserOutlined"),
|
|
690
|
+
resend: item("Repeat", "secondary"),
|
|
691
|
+
restart: item("RestartAlt", "warning"),
|
|
692
|
+
cached: item("Cached", "secondary"),
|
|
693
|
+
regenerate: item("Cached", "secondary"),
|
|
694
|
+
sync: item("Sync", "secondary"),
|
|
695
|
+
modifyAccounting: item("SyncAlt", "warning"),
|
|
696
|
+
config: item("Settings"),
|
|
697
|
+
details: item("ArticleOutlined"),
|
|
698
|
+
list: item("AssignmentOutlined"),
|
|
699
|
+
folder: item("FolderOpen"),
|
|
700
|
+
more: item("MoreVert", "inherit"),
|
|
701
|
+
share: item("IosShareOutlined", "warning"),
|
|
702
|
+
shareFilters: item("Share", "success"),
|
|
703
|
+
filterLists: item("List"),
|
|
704
|
+
filterOptions: item("Sort"),
|
|
705
|
+
addToFilterList: item("FilterList"),
|
|
706
|
+
removeFromFilterList: item("FilterListOff", "error"),
|
|
707
|
+
advanceFilter: item("FilterList"),
|
|
708
|
+
run: item("PlayCircleOutlined"),
|
|
709
|
+
play: item("PlayCircle"),
|
|
710
|
+
pause: item("PauseCircleOutline", "secondary"),
|
|
711
|
+
stop: item("Stop", "error"),
|
|
712
|
+
publish: item("Publish", "warning"),
|
|
713
|
+
generate: item("PostAddOutlined"),
|
|
714
|
+
generateTemplate: item("SimCardDownload", "secondary"),
|
|
715
|
+
viewTable: item("BackupTable"),
|
|
716
|
+
viewLogs: item("BackupTable"),
|
|
717
|
+
dashboard: item("SpaceDashboardOutlined", "secondary"),
|
|
718
|
+
chart: item("AssessmentOutlined", "secondary"),
|
|
719
|
+
viewDashboard: item("InsertChartOutlined", "secondary"),
|
|
720
|
+
rule: item("Rule"),
|
|
721
|
+
businessRuleGroups: item("RuleOutlined"),
|
|
722
|
+
ruleParameters: item("Menu"),
|
|
723
|
+
accounttree: item("AccountTree"),
|
|
724
|
+
collapse: item("AccountTree"),
|
|
725
|
+
expand: item("AccountTreeOutlined"),
|
|
726
|
+
user: item("Group"),
|
|
727
|
+
attendees: item("PeopleAltOutlined"),
|
|
728
|
+
goToUsers: item("GroupAdd"),
|
|
729
|
+
planningUsers: item("GroupAddOutlined"),
|
|
730
|
+
inquiryUsers: item("ManageAccounts"),
|
|
731
|
+
roles: item("AccessibilityNew", "secondary"),
|
|
732
|
+
administrator: item("AdminPanelSettings"),
|
|
733
|
+
divisions: item("CorporateFare"),
|
|
734
|
+
organization: item("NextWeek"),
|
|
735
|
+
businessOwner: item("BusinessCenterOutlined"),
|
|
736
|
+
pointOfContact: item("ContactEmergency"),
|
|
737
|
+
goToDivision: item("SafetyDivider"),
|
|
738
|
+
goToFunding: item("AttachMoney"),
|
|
739
|
+
goToTarget: item("Speed"),
|
|
740
|
+
goToRequest: item("HowToVote"),
|
|
741
|
+
goToBusiness: item("PlaylistAddCheck"),
|
|
742
|
+
goToDistribution: item("MailOutline"),
|
|
743
|
+
fund: item("Settings", "info"),
|
|
744
|
+
funds: item("Tag", "secondary"),
|
|
745
|
+
fundCodes: item("AssignmentOutlined"),
|
|
746
|
+
fundType: item("AssignmentOutlined"),
|
|
747
|
+
budgetApprover: item("CurrencyExchange", "error"),
|
|
748
|
+
budgetFacilitators: item("MonetizationOn"),
|
|
749
|
+
fmdDivisionDirector: item("SupervisedUserCircleOutlined", "secondary"),
|
|
750
|
+
cfo: item("SupervisorAccountOutlined"),
|
|
751
|
+
dcfo: item("SupervisorAccountOutlined", "secondary"),
|
|
752
|
+
submitPrism: item("TornadoOutlined", "secondary"),
|
|
753
|
+
showCostElement: item("RequestQuoteOutlined"),
|
|
754
|
+
connect: item("CableOutlined", "secondary"),
|
|
755
|
+
httpRequests: item("HttpOutlined"),
|
|
756
|
+
handshakeView: item("Handshake", "secondary"),
|
|
757
|
+
copyTemplate: item("FileCopyOutlined"),
|
|
758
|
+
fileCopy: item("FileCopy"),
|
|
759
|
+
templateMapping: item("Link", "secondary"),
|
|
760
|
+
template: item("Nfc"),
|
|
761
|
+
templateSection: item("EventSeat"),
|
|
762
|
+
sectionField: item("Toc"),
|
|
763
|
+
value: item("SettingsEthernet"),
|
|
764
|
+
processSuccess: item("CheckCircleOutline", "success"),
|
|
765
|
+
processError: item("ErrorOutlineOutlined", "error"),
|
|
766
|
+
processProcessing: item("HourglassEmpty", "secondary"),
|
|
767
|
+
terminated: item("WarningOutlined", "warning"),
|
|
768
|
+
terminate: item("PanToolOutlined"),
|
|
769
|
+
recommend: item("RecommendOutlined", "success"),
|
|
770
|
+
checkStatus: item("CheckCircle", "success"),
|
|
771
|
+
archive: item("Archive", "warning"),
|
|
772
|
+
acquisition: item("AssignmentOutlined"),
|
|
773
|
+
acquisitionUser: item("Group"),
|
|
774
|
+
acquisitionVehicles: item("CorporateFare"),
|
|
775
|
+
addAdvancedFilter: item("Add"),
|
|
776
|
+
addFavorite: item("PostAddOutlined", "secondary"),
|
|
777
|
+
additionalDetails: item("ViewComfy"),
|
|
778
|
+
addReminder: item("AddCircleOutline", "warning"),
|
|
779
|
+
addToFavorites: item("FlagOutlined", "warning"),
|
|
780
|
+
adminpanelsettings: item("AdminPanelSettings", "success"),
|
|
781
|
+
allocations: item("TrackChanges", "secondary"),
|
|
782
|
+
articleoutlined: item("ArticleOutlined"),
|
|
783
|
+
assignFundTypes: item("AutoModeOutlined", "secondary"),
|
|
784
|
+
assignmentoutlined: item("AssignmentOutlined"),
|
|
785
|
+
assingFundTypes: item("AutoModeOutlined", "secondary"),
|
|
786
|
+
automode: item("AutoModeOutlined", "secondary"),
|
|
787
|
+
backuptable: item("BackupTable"),
|
|
788
|
+
baselineChanges: item("Compare", "secondary"),
|
|
789
|
+
bmsCompPlan: item("DescriptionOutlined", "secondary"),
|
|
790
|
+
budgetAdministrator: item("AdminPanelSettings", "success"),
|
|
791
|
+
budgetLiaisons: item("Person"),
|
|
792
|
+
budgetReview: item("CurrencyExchange", "error"),
|
|
793
|
+
businessLines: item("AssignmentOutlined"),
|
|
794
|
+
BusinessRule: item("SwapCalls"),
|
|
795
|
+
businessRules: item("AssignmentOutlined"),
|
|
796
|
+
calColumn: item("Functions"),
|
|
797
|
+
changeOwner: item("PersonOutlineOutlined", "secondary"),
|
|
798
|
+
completeGovernce: item("AssignmentTurnedIn", "success"),
|
|
799
|
+
configDetails: item("Settings", "secondary"),
|
|
800
|
+
configRequestType: item("Settings", "secondary"),
|
|
801
|
+
copyFundType: item("FileCopyOutlined"),
|
|
802
|
+
copyRequestDetails: item("ContentCopy", "secondary"),
|
|
803
|
+
copySettings: item("Print"),
|
|
804
|
+
corporatefare: item("CorporateFare"),
|
|
805
|
+
currencyexchange: item("CurrencyExchange", "error"),
|
|
806
|
+
defer: item("ThumbDownOutlined", "error"),
|
|
807
|
+
deleteforever: item("DeleteForever", "secondary"),
|
|
808
|
+
deleteforeveroutlined: item("DeleteForeverOutlined", "secondary"),
|
|
809
|
+
deleteoutline: item("DeleteOutline", "error"),
|
|
810
|
+
descriptionoutlined: item("DescriptionOutlined", "secondary"),
|
|
811
|
+
difference: item("Difference", "secondary"),
|
|
812
|
+
distributionGroup: item("SwapCalls"),
|
|
813
|
+
downloadBaseline: item("DescriptionOutlined", "secondary"),
|
|
814
|
+
downloadBaselineMonthly: item("SimCardDownload"),
|
|
815
|
+
downloadDocument: item("Download", "secondary"),
|
|
816
|
+
downloadLogs: item("DescriptionOutlined"),
|
|
817
|
+
downloadMonthlyDetails: item("TableChartOutlined"),
|
|
818
|
+
downloadSpendLines: item("SimCardDownload"),
|
|
819
|
+
editoutlined: item("EditOutlined"),
|
|
820
|
+
equalizer: item("Equalizer"),
|
|
821
|
+
executive: item("Group"),
|
|
822
|
+
executivesApprover: item("Group"),
|
|
823
|
+
executiveUser: item("ManageAccounts", "secondary"),
|
|
824
|
+
executiveUsers: item("ManageAccounts", "secondary"),
|
|
825
|
+
filecopyoutlined: item("FileCopyOutlined"),
|
|
826
|
+
filter: item("FilterAlt"),
|
|
827
|
+
filterlist: item("FilterList"),
|
|
828
|
+
filterListValue: item("List"),
|
|
829
|
+
finalize: item("DoneAllOutlined", "success"),
|
|
830
|
+
finalizePublish: item("Publish", "success"),
|
|
831
|
+
financialAgents: item("Group"),
|
|
832
|
+
fundDetail: item("AssignmentOutlined"),
|
|
833
|
+
fundGroup: item("Group"),
|
|
834
|
+
getapp: item("GetApp"),
|
|
835
|
+
goToAttendess: item("PeopleAltOutlined"),
|
|
836
|
+
goToReminders: item("TimerOutlined"),
|
|
837
|
+
goToTag: item("AssignmentOutlined"),
|
|
838
|
+
goToUser: item("BrightnessAuto", "info"),
|
|
839
|
+
group: item("Group"),
|
|
840
|
+
groupadd: item("GroupAdd"),
|
|
841
|
+
groupaddoutlined: item("GroupAddOutlined"),
|
|
842
|
+
groupDetails: item("RecentActorsOutlined"),
|
|
843
|
+
groupEntities: item("List"),
|
|
844
|
+
infooutlined: item("InfoOutlined"),
|
|
845
|
+
initiateReview: item("BookmarkAdded"),
|
|
846
|
+
keyProjects: item("AssignmentOutlined"),
|
|
847
|
+
lookUps: item("AssignmentOutlined"),
|
|
848
|
+
manageaccounts: item("ManageAccounts", "secondary"),
|
|
849
|
+
menu: item("Menu"),
|
|
850
|
+
message: item("SwapCalls"),
|
|
851
|
+
monetizationon: item("MonetizationOn"),
|
|
852
|
+
moreDetails: item("GroupWorkOutlined"),
|
|
853
|
+
notificationEvent: item("SwapCalls"),
|
|
854
|
+
outYearsForecast: item("PriceChangeOutlined"),
|
|
855
|
+
pastSubmissions: item("ReorderOutlined"),
|
|
856
|
+
peoplealtoutlined: item("PeopleAltOutlined"),
|
|
857
|
+
pinDocument: item("FlagOutlined", "warning"),
|
|
858
|
+
planningApprovers: item("TaskAlt"),
|
|
859
|
+
planningFacilitators: item("PeopleAltOutlined"),
|
|
860
|
+
planningLiaisons: item("Group"),
|
|
861
|
+
playcircle: item("PlayCircle"),
|
|
862
|
+
previousLog: item("Archive", "warning"),
|
|
863
|
+
price: item("PriceChangeOutlined"),
|
|
864
|
+
privilege: item("PeopleAltOutlined"),
|
|
865
|
+
profileValue: item("Group"),
|
|
866
|
+
programs: item("AssignmentOutlined"),
|
|
867
|
+
publishedwithchanges: item("PublishedWithChanges", "warning"),
|
|
868
|
+
publishReview: item("Publish"),
|
|
869
|
+
recallDivision: item("AssignmentTurnedIn", "warning"),
|
|
870
|
+
recommendoutlined: item("RecommendOutlined", "success"),
|
|
871
|
+
removeFromFavorites: item("Flag", "warning"),
|
|
872
|
+
repeat: item("Repeat", "secondary"),
|
|
873
|
+
report: item("DescriptionOutlined"),
|
|
874
|
+
reportSet: item("HorizontalSplitOutlined"),
|
|
875
|
+
requestType: item("AssignmentOutlined"),
|
|
876
|
+
resendReview: item("Repeat", "secondary"),
|
|
877
|
+
resubmit: item("SlowMotionVideoOutlined"),
|
|
878
|
+
reviewApprove: item("AssignmentTurnedIn", "success"),
|
|
879
|
+
reviewComplete: item("AssignmentTurnedIn"),
|
|
880
|
+
reviewResend: item("AssignmentTurnedIn", "error"),
|
|
881
|
+
ruleoutlined: item("RuleOutlined"),
|
|
882
|
+
RuleOutlinedIcon: item("Group"),
|
|
883
|
+
saveDetail: item("Check", "success"),
|
|
884
|
+
scheduleApproval: item("RecommendOutlined", "success"),
|
|
885
|
+
selectDivisions: item("Business", "secondary"),
|
|
886
|
+
selectProgramOffice: item("Business", "secondary"),
|
|
887
|
+
settings: item("Settings"),
|
|
888
|
+
sharedRequest: item("VerticalSplit"),
|
|
889
|
+
shareSecurity: item("Security", "secondary"),
|
|
890
|
+
simcarddownload: item("SimCardDownload", "secondary"),
|
|
891
|
+
star: item("Star", "warning"),
|
|
892
|
+
starborder: item("StarBorder", "warning"),
|
|
893
|
+
subActivities: item("Group"),
|
|
894
|
+
tablechartoutlined: item("TableChartOutlined"),
|
|
895
|
+
tag: item("Tag", "secondary"),
|
|
896
|
+
target: item("TrackChanges", "secondary"),
|
|
897
|
+
taskalt: item("TaskAlt"),
|
|
898
|
+
terminateSession: item("Settings"),
|
|
899
|
+
thumbdownoutlined: item("ThumbDownOutlined", "error"),
|
|
900
|
+
thumbupoutlined: item("ThumbUpOutlined", "success"),
|
|
901
|
+
timeroutlined: item("TimerOutlined"),
|
|
902
|
+
tornadooutlined: item("TornadoOutlined", "secondary"),
|
|
903
|
+
unpinDocument: item("Flag", "warning"),
|
|
904
|
+
updateLog: item("Check", "success"),
|
|
905
|
+
uploadFile: item("FileUpload"),
|
|
906
|
+
userApplication: item("Settings", "success"),
|
|
907
|
+
usersAC: item("Business", "info"),
|
|
908
|
+
usersProgramOffices: item("Business"),
|
|
909
|
+
usersRoles: item("BrightnessAuto"),
|
|
910
|
+
validateConnection: item("DoneOutline"),
|
|
911
|
+
validationGroups: item("PlaylistAddCheck"),
|
|
912
|
+
validationRule: item("SwapCalls"),
|
|
913
|
+
validationRules: item("AssignmentOutlined"),
|
|
914
|
+
viewAdjustments: item("Equalizer"),
|
|
915
|
+
viewBudgetFacilitator: item("Group"),
|
|
916
|
+
viewBudgetLiaisons: item("Group"),
|
|
917
|
+
viewcomfy: item("ViewComfy"),
|
|
918
|
+
viewDocument: item("MenuBook", "disabled"),
|
|
919
|
+
viewheadline: item("ViewHeadline", "secondary"),
|
|
920
|
+
viewPrism: item("BackupTable"),
|
|
921
|
+
ViewSuppliers: item("DescriptionOutlined", "secondary"),
|
|
922
|
+
visibility: item("Visibility")
|
|
923
|
+
};
|
|
924
|
+
var actionIconRegistry = mui_exports;
|
|
925
|
+
var ActionIconButtonData = ActionIconData;
|
|
926
|
+
function ActionIcon({
|
|
927
|
+
purpose = "default",
|
|
928
|
+
type,
|
|
929
|
+
title,
|
|
930
|
+
icon,
|
|
931
|
+
iconSize = 18,
|
|
932
|
+
color,
|
|
933
|
+
loading = false,
|
|
934
|
+
count,
|
|
935
|
+
showBadge = false,
|
|
936
|
+
countColor = "secondary",
|
|
937
|
+
...props
|
|
938
|
+
}) {
|
|
939
|
+
const action = ActionIconData[type ?? purpose] ?? ActionIconData.default;
|
|
940
|
+
const Icon = icon ?? actionIconRegistry[action.icon];
|
|
941
|
+
const label = title || `${type ?? purpose} action`;
|
|
942
|
+
const renderedIcon = /* @__PURE__ */ jsx(Icon, { color: color ?? action.defaultColor, sx: { fontSize: iconSize } });
|
|
943
|
+
return /* @__PURE__ */ jsx(Tooltip, { title: label, children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsxs(
|
|
944
|
+
IconButton,
|
|
945
|
+
{
|
|
946
|
+
"aria-label": label,
|
|
947
|
+
disabled: loading || props.disabled,
|
|
948
|
+
...props,
|
|
949
|
+
children: [
|
|
950
|
+
showBadge ? /* @__PURE__ */ jsx(Badge, { badgeContent: count, color: countColor, showZero: true, children: renderedIcon }) : renderedIcon,
|
|
951
|
+
loading ? /* @__PURE__ */ jsx(
|
|
952
|
+
CircularProgress,
|
|
953
|
+
{
|
|
954
|
+
color: "inherit",
|
|
955
|
+
size: 20,
|
|
956
|
+
sx: { position: "absolute" }
|
|
957
|
+
}
|
|
958
|
+
) : null
|
|
959
|
+
]
|
|
960
|
+
}
|
|
961
|
+
) }) });
|
|
962
|
+
}
|
|
963
|
+
function ActionIconButton({
|
|
964
|
+
purpose = "default",
|
|
965
|
+
type,
|
|
966
|
+
title,
|
|
967
|
+
icon,
|
|
968
|
+
loading = false,
|
|
969
|
+
children,
|
|
970
|
+
...props
|
|
971
|
+
}) {
|
|
972
|
+
const action = ActionIconData[type ?? purpose] ?? ActionIconData.default;
|
|
973
|
+
const Icon = actionIconRegistry[action.icon];
|
|
974
|
+
const label = title || `${type ?? purpose} action`;
|
|
975
|
+
const buttonColor = action.defaultColor === "action" || action.defaultColor === "disabled" ? "inherit" : action.defaultColor;
|
|
976
|
+
return /* @__PURE__ */ jsx(Tooltip, { title: label, placement: "bottom", children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsxs(
|
|
977
|
+
SharedButton,
|
|
978
|
+
{
|
|
979
|
+
"aria-label": label,
|
|
980
|
+
color: buttonColor,
|
|
981
|
+
variant: "outlined",
|
|
982
|
+
disabled: loading || props.disabled,
|
|
983
|
+
...props,
|
|
984
|
+
children: [
|
|
985
|
+
loading ? /* @__PURE__ */ jsx(CircularProgress, { color: "inherit", size: 20 }) : null,
|
|
986
|
+
icon ?? /* @__PURE__ */ jsx(Icon, { sx: { fontSize: 20 } }),
|
|
987
|
+
children
|
|
988
|
+
]
|
|
989
|
+
}
|
|
990
|
+
) }) });
|
|
991
|
+
}
|
|
992
|
+
function ActionsContainer(props) {
|
|
993
|
+
return /* @__PURE__ */ jsx(Stack6, { direction: "row", spacing: 0.5, alignItems: "center", ...props });
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
// src/accessibility/controlNames.ts
|
|
997
|
+
function humanizeControlName(value) {
|
|
998
|
+
const normalized = value?.replace(/[_-]+/g, " ").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/\s+/g, " ").trim();
|
|
999
|
+
return normalized ? normalized.charAt(0).toUpperCase() + normalized.slice(1) : void 0;
|
|
1000
|
+
}
|
|
1001
|
+
function resolveControlName({
|
|
1002
|
+
label,
|
|
1003
|
+
ariaLabel,
|
|
1004
|
+
name,
|
|
1005
|
+
id,
|
|
1006
|
+
backupName
|
|
1007
|
+
}) {
|
|
1008
|
+
if (typeof label === "string" && label.trim()) return label.trim();
|
|
1009
|
+
if (typeof ariaLabel === "string" && ariaLabel.trim()) return ariaLabel.trim();
|
|
1010
|
+
return humanizeControlName(name) ?? humanizeControlName(id) ?? backupName;
|
|
1011
|
+
}
|
|
1012
|
+
function SharedTextField({
|
|
1013
|
+
size = "small",
|
|
1014
|
+
variant = "outlined",
|
|
1015
|
+
InputLabelProps,
|
|
1016
|
+
inputProps,
|
|
1017
|
+
id,
|
|
1018
|
+
name,
|
|
1019
|
+
label,
|
|
1020
|
+
backupName = "Text input",
|
|
1021
|
+
...props
|
|
1022
|
+
}) {
|
|
1023
|
+
const generatedId = useId().replace(/:/g, "");
|
|
1024
|
+
const controlId = id ?? `shared-text-field-${generatedId}`;
|
|
1025
|
+
const accessibleName = resolveControlName({
|
|
1026
|
+
label,
|
|
1027
|
+
ariaLabel: inputProps?.["aria-label"],
|
|
1028
|
+
name,
|
|
1029
|
+
id,
|
|
1030
|
+
backupName
|
|
1031
|
+
});
|
|
1032
|
+
return /* @__PURE__ */ jsx(
|
|
1033
|
+
TextField,
|
|
1034
|
+
{
|
|
1035
|
+
fullWidth: true,
|
|
1036
|
+
size,
|
|
1037
|
+
variant,
|
|
1038
|
+
id: controlId,
|
|
1039
|
+
name,
|
|
1040
|
+
label,
|
|
1041
|
+
InputLabelProps: { shrink: true, ...InputLabelProps },
|
|
1042
|
+
inputProps: {
|
|
1043
|
+
autoComplete: "off",
|
|
1044
|
+
"data-gramm": "false",
|
|
1045
|
+
...!label && !inputProps?.["aria-labelledby"] ? { "aria-label": accessibleName } : {},
|
|
1046
|
+
...inputProps
|
|
1047
|
+
},
|
|
1048
|
+
...props
|
|
1049
|
+
}
|
|
1050
|
+
);
|
|
1051
|
+
}
|
|
1052
|
+
function SearchInput({
|
|
1053
|
+
label = "Search",
|
|
1054
|
+
onSearch,
|
|
1055
|
+
shortcut = true,
|
|
1056
|
+
InputProps,
|
|
1057
|
+
inputRef,
|
|
1058
|
+
...props
|
|
1059
|
+
}) {
|
|
1060
|
+
const localRef = useRef(null);
|
|
1061
|
+
useEffect(() => {
|
|
1062
|
+
if (!shortcut) return void 0;
|
|
1063
|
+
const focusSearch = (event) => {
|
|
1064
|
+
const target = event.target;
|
|
1065
|
+
const isEditing = target?.tagName === "INPUT" || target?.tagName === "TEXTAREA" || target?.isContentEditable;
|
|
1066
|
+
if (event.shiftKey && event.key.toLowerCase() === "s" && !isEditing) {
|
|
1067
|
+
event.preventDefault();
|
|
1068
|
+
localRef.current?.focus();
|
|
1069
|
+
}
|
|
1070
|
+
};
|
|
1071
|
+
document.addEventListener("keydown", focusSearch);
|
|
1072
|
+
return () => document.removeEventListener("keydown", focusSearch);
|
|
1073
|
+
}, [shortcut]);
|
|
1074
|
+
const submit = () => onSearch?.(String(localRef.current?.value ?? ""));
|
|
1075
|
+
return /* @__PURE__ */ jsx(
|
|
1076
|
+
SharedTextField,
|
|
1077
|
+
{
|
|
1078
|
+
...props,
|
|
1079
|
+
label,
|
|
1080
|
+
type: "search",
|
|
1081
|
+
inputRef: (element) => {
|
|
1082
|
+
localRef.current = element;
|
|
1083
|
+
if (typeof inputRef === "function") inputRef(element);
|
|
1084
|
+
else if (inputRef) inputRef.current = element;
|
|
1085
|
+
},
|
|
1086
|
+
onKeyDown: (event) => {
|
|
1087
|
+
if (event.key === "Enter") submit();
|
|
1088
|
+
props.onKeyDown?.(event);
|
|
1089
|
+
},
|
|
1090
|
+
InputProps: {
|
|
1091
|
+
...InputProps,
|
|
1092
|
+
endAdornment: /* @__PURE__ */ jsx(InputAdornment2, { position: "end", children: /* @__PURE__ */ jsx(SharedIconButton, { "aria-label": "Search", size: "small", onClick: submit, children: /* @__PURE__ */ jsx(default157, { fontSize: "small" }) }) })
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
);
|
|
1096
|
+
}
|
|
1097
|
+
function SelectInput({
|
|
1098
|
+
label,
|
|
1099
|
+
options,
|
|
1100
|
+
helperText,
|
|
1101
|
+
formControlProps,
|
|
1102
|
+
inputProps,
|
|
1103
|
+
backupName = "Select option",
|
|
1104
|
+
...props
|
|
1105
|
+
}) {
|
|
1106
|
+
const generatedId = useId();
|
|
1107
|
+
const controlId = props.id ?? `shared-select-${generatedId.replace(/:/g, "")}`;
|
|
1108
|
+
const labelId = `${controlId}-label`;
|
|
1109
|
+
const helperId = `${controlId}-helper-text`;
|
|
1110
|
+
const accessibleName = resolveControlName({
|
|
1111
|
+
label,
|
|
1112
|
+
ariaLabel: inputProps?.["aria-label"],
|
|
1113
|
+
name: props.name,
|
|
1114
|
+
id: props.id,
|
|
1115
|
+
backupName
|
|
1116
|
+
});
|
|
1117
|
+
return /* @__PURE__ */ jsxs(FormControl, { fullWidth: true, size: "small", ...formControlProps, children: [
|
|
1118
|
+
label ? /* @__PURE__ */ jsx(InputLabel, { id: labelId, children: label }) : null,
|
|
1119
|
+
/* @__PURE__ */ jsx(
|
|
1120
|
+
Select,
|
|
1121
|
+
{
|
|
1122
|
+
id: controlId,
|
|
1123
|
+
labelId: label ? labelId : void 0,
|
|
1124
|
+
label,
|
|
1125
|
+
inputProps: {
|
|
1126
|
+
...inputProps,
|
|
1127
|
+
...!label ? { "aria-label": accessibleName } : {},
|
|
1128
|
+
...helperText ? { "aria-describedby": helperId } : {}
|
|
1129
|
+
},
|
|
1130
|
+
...props,
|
|
1131
|
+
children: options.map((option) => /* @__PURE__ */ jsx(
|
|
1132
|
+
MenuItem2,
|
|
1133
|
+
{
|
|
1134
|
+
value: option.value,
|
|
1135
|
+
disabled: option.disabled,
|
|
1136
|
+
children: option.label
|
|
1137
|
+
},
|
|
1138
|
+
String(option.value)
|
|
1139
|
+
))
|
|
1140
|
+
}
|
|
1141
|
+
),
|
|
1142
|
+
helperText ? /* @__PURE__ */ jsx(FormHelperText, { id: helperId, children: helperText }) : null
|
|
1143
|
+
] });
|
|
1144
|
+
}
|
|
1145
|
+
function DateInput({ renderInput, id, name, label, backupName = "Choose date", ...props }) {
|
|
1146
|
+
const generatedId = useId().replace(/:/g, "");
|
|
1147
|
+
const controlId = id ?? `shared-date-${generatedId}`;
|
|
1148
|
+
const accessibleName = resolveControlName({ label, name, id, backupName });
|
|
1149
|
+
return /* @__PURE__ */ jsx(LocalizationProvider, { dateAdapter: AdapterDayjs, children: /* @__PURE__ */ jsx(
|
|
1150
|
+
DatePicker,
|
|
1151
|
+
{
|
|
1152
|
+
...props,
|
|
1153
|
+
label,
|
|
1154
|
+
renderInput: (params) => {
|
|
1155
|
+
const enhancedParams = {
|
|
1156
|
+
...params,
|
|
1157
|
+
id: controlId,
|
|
1158
|
+
name,
|
|
1159
|
+
inputProps: {
|
|
1160
|
+
...params.inputProps,
|
|
1161
|
+
id: controlId,
|
|
1162
|
+
name,
|
|
1163
|
+
"aria-label": accessibleName
|
|
1164
|
+
}
|
|
1165
|
+
};
|
|
1166
|
+
return renderInput ? renderInput(enhancedParams) : /* @__PURE__ */ jsx(TextField, { ...enhancedParams, fullWidth: true, size: "small" });
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
) });
|
|
1170
|
+
}
|
|
1171
|
+
function DateTimeInput({ renderInput, id, name, label, backupName = "Choose date and time", ...props }) {
|
|
1172
|
+
const generatedId = useId().replace(/:/g, "");
|
|
1173
|
+
const controlId = id ?? `shared-date-time-${generatedId}`;
|
|
1174
|
+
const accessibleName = resolveControlName({ label, name, id, backupName });
|
|
1175
|
+
return /* @__PURE__ */ jsx(LocalizationProvider, { dateAdapter: AdapterDayjs, children: /* @__PURE__ */ jsx(
|
|
1176
|
+
DateTimePicker$1,
|
|
1177
|
+
{
|
|
1178
|
+
...props,
|
|
1179
|
+
label,
|
|
1180
|
+
renderInput: (params) => {
|
|
1181
|
+
const enhancedParams = {
|
|
1182
|
+
...params,
|
|
1183
|
+
id: controlId,
|
|
1184
|
+
name,
|
|
1185
|
+
inputProps: {
|
|
1186
|
+
...params.inputProps,
|
|
1187
|
+
id: controlId,
|
|
1188
|
+
name,
|
|
1189
|
+
"aria-label": accessibleName
|
|
1190
|
+
}
|
|
1191
|
+
};
|
|
1192
|
+
return renderInput ? renderInput(enhancedParams) : /* @__PURE__ */ jsx(TextField, { ...enhancedParams, fullWidth: true, size: "small" });
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
) });
|
|
1196
|
+
}
|
|
1197
|
+
var DateTimePicker = DateTimeInput;
|
|
1198
|
+
function AdvancedDropDownList({
|
|
1199
|
+
id,
|
|
1200
|
+
name,
|
|
1201
|
+
label = "",
|
|
1202
|
+
backupName = "Select option",
|
|
1203
|
+
value,
|
|
1204
|
+
onChange,
|
|
1205
|
+
options = [],
|
|
1206
|
+
errorMessage,
|
|
1207
|
+
disableClearable = false,
|
|
1208
|
+
disabled = false,
|
|
1209
|
+
loading = false,
|
|
1210
|
+
required = false,
|
|
1211
|
+
defaultSorting = true,
|
|
1212
|
+
noDataMsg = "No options",
|
|
1213
|
+
size = "small",
|
|
1214
|
+
variant = "outlined",
|
|
1215
|
+
renderOption,
|
|
1216
|
+
getOptionDisabled
|
|
1217
|
+
}) {
|
|
1218
|
+
const generatedId = useId();
|
|
1219
|
+
const controlId = id ?? `shared-dropdown-${generatedId.replace(/:/g, "")}`;
|
|
1220
|
+
const accessibleName = resolveControlName({ label, name, id, backupName });
|
|
1221
|
+
const sortedOptions = useMemo(
|
|
1222
|
+
() => defaultSorting ? [...options].sort(
|
|
1223
|
+
(a, b) => a.value.localeCompare(b.value, void 0, {
|
|
1224
|
+
numeric: true,
|
|
1225
|
+
sensitivity: "base"
|
|
1226
|
+
})
|
|
1227
|
+
) : [...options],
|
|
1228
|
+
[defaultSorting, options]
|
|
1229
|
+
);
|
|
1230
|
+
const selected = options.find((option) => option.id === value) ?? null;
|
|
1231
|
+
return /* @__PURE__ */ jsx(
|
|
1232
|
+
Autocomplete,
|
|
1233
|
+
{
|
|
1234
|
+
id: controlId,
|
|
1235
|
+
fullWidth: true,
|
|
1236
|
+
size,
|
|
1237
|
+
options: sortedOptions,
|
|
1238
|
+
value: selected,
|
|
1239
|
+
disabled: disabled || loading,
|
|
1240
|
+
loading,
|
|
1241
|
+
disableClearable,
|
|
1242
|
+
noOptionsText: noDataMsg,
|
|
1243
|
+
getOptionLabel: (option) => option.value || option.label || "",
|
|
1244
|
+
getOptionDisabled: getOptionDisabled ?? ((option) => Boolean(option.disabled)),
|
|
1245
|
+
isOptionEqualToValue: (option, selectedOption) => option.id === selectedOption.id,
|
|
1246
|
+
renderOption,
|
|
1247
|
+
onChange: (_, nextValue) => onChange?.({ target: { name: name ?? id ?? controlId, value: nextValue?.id ?? "" } }),
|
|
1248
|
+
popupIcon: loading ? /* @__PURE__ */ jsx(CircularProgress, { color: "inherit", size: 18 }) : void 0,
|
|
1249
|
+
renderInput: (params) => /* @__PURE__ */ jsx(
|
|
1250
|
+
TextField,
|
|
1251
|
+
{
|
|
1252
|
+
...params,
|
|
1253
|
+
label,
|
|
1254
|
+
required,
|
|
1255
|
+
variant,
|
|
1256
|
+
size,
|
|
1257
|
+
error: Boolean(errorMessage),
|
|
1258
|
+
helperText: errorMessage,
|
|
1259
|
+
InputLabelProps: { shrink: true },
|
|
1260
|
+
inputProps: {
|
|
1261
|
+
...params.inputProps,
|
|
1262
|
+
autoComplete: "new-password",
|
|
1263
|
+
"aria-label": accessibleName,
|
|
1264
|
+
name
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
)
|
|
1268
|
+
}
|
|
1269
|
+
);
|
|
1270
|
+
}
|
|
1271
|
+
var MuiAdvancedDropDownList = AdvancedDropDownList;
|
|
1272
|
+
var StyledAdvanceDropDownList = AdvancedDropDownList;
|
|
1273
|
+
var CustomMuiAdvancedDropDownList = AdvancedDropDownList;
|
|
1274
|
+
var GenericAdvanceDropDownList = AdvancedDropDownList;
|
|
1275
|
+
var GenericAdvancedSelect = AdvancedDropDownList;
|
|
1276
|
+
var GenericStyledAdvancedDropdown = AdvancedDropDownList;
|
|
1277
|
+
var NormalAdvancedDropDownList = AdvancedDropDownList;
|
|
1278
|
+
var FloatingAdvanceDropDownList = AdvancedDropDownList;
|
|
1279
|
+
var AdvancedDropDownWithMsg = AdvancedDropDownList;
|
|
1280
|
+
function MultiSelectDropDownList({
|
|
1281
|
+
id,
|
|
1282
|
+
name,
|
|
1283
|
+
label,
|
|
1284
|
+
backupName = "Select options",
|
|
1285
|
+
value = [],
|
|
1286
|
+
options = [],
|
|
1287
|
+
onChange,
|
|
1288
|
+
errorMessage,
|
|
1289
|
+
disabled = false,
|
|
1290
|
+
disableChip = false,
|
|
1291
|
+
loading = false,
|
|
1292
|
+
groupBy,
|
|
1293
|
+
highlightedOptionIds = [],
|
|
1294
|
+
highlightedChipTitle,
|
|
1295
|
+
getOptionDisabled,
|
|
1296
|
+
variant = "outlined",
|
|
1297
|
+
size = "small"
|
|
1298
|
+
}) {
|
|
1299
|
+
const generatedId = useId();
|
|
1300
|
+
const controlId = id ?? `shared-multi-select-${generatedId.replace(/:/g, "")}`;
|
|
1301
|
+
const accessibleName = resolveControlName({ label, name, id, backupName });
|
|
1302
|
+
const highlighted = new Set(highlightedOptionIds);
|
|
1303
|
+
return /* @__PURE__ */ jsx(
|
|
1304
|
+
Autocomplete,
|
|
1305
|
+
{
|
|
1306
|
+
multiple: true,
|
|
1307
|
+
id: controlId,
|
|
1308
|
+
fullWidth: true,
|
|
1309
|
+
size,
|
|
1310
|
+
disabled,
|
|
1311
|
+
loading,
|
|
1312
|
+
options: [...options],
|
|
1313
|
+
value: [...value],
|
|
1314
|
+
groupBy,
|
|
1315
|
+
filterSelectedOptions: true,
|
|
1316
|
+
getOptionLabel: (option) => option.value || option.label || "",
|
|
1317
|
+
getOptionDisabled: getOptionDisabled ?? ((option) => Boolean(option.disabled)),
|
|
1318
|
+
isOptionEqualToValue: (option, selected) => option.id === selected.id,
|
|
1319
|
+
onChange: (_, nextValue) => {
|
|
1320
|
+
const unique = Array.from(
|
|
1321
|
+
new Map(nextValue.map((option) => [option.id, option])).values()
|
|
1322
|
+
);
|
|
1323
|
+
onChange?.({ target: { name: name ?? id ?? controlId, value: unique } });
|
|
1324
|
+
},
|
|
1325
|
+
renderTags: (tagValue, getTagProps) => tagValue.map((option, index) => {
|
|
1326
|
+
const tagProps = getTagProps({ index });
|
|
1327
|
+
return /* @__PURE__ */ createElement(
|
|
1328
|
+
Chip,
|
|
1329
|
+
{
|
|
1330
|
+
...tagProps,
|
|
1331
|
+
key: String(option.id),
|
|
1332
|
+
label: option.value,
|
|
1333
|
+
title: highlighted.has(option.id) ? highlightedChipTitle : void 0,
|
|
1334
|
+
onDelete: disableChip ? void 0 : tagProps.onDelete,
|
|
1335
|
+
sx: highlighted.has(option.id) ? { bgcolor: "error.50", border: 1, borderColor: "error.main" } : void 0
|
|
1336
|
+
}
|
|
1337
|
+
);
|
|
1338
|
+
}),
|
|
1339
|
+
renderInput: (params) => /* @__PURE__ */ jsx(
|
|
1340
|
+
TextField,
|
|
1341
|
+
{
|
|
1342
|
+
...params,
|
|
1343
|
+
label,
|
|
1344
|
+
variant,
|
|
1345
|
+
error: Boolean(errorMessage),
|
|
1346
|
+
helperText: errorMessage,
|
|
1347
|
+
InputLabelProps: { shrink: true },
|
|
1348
|
+
inputProps: {
|
|
1349
|
+
...params.inputProps,
|
|
1350
|
+
name,
|
|
1351
|
+
"aria-label": accessibleName
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
)
|
|
1355
|
+
}
|
|
1356
|
+
);
|
|
1357
|
+
}
|
|
1358
|
+
var GroupedMultiSelectDropDown = MultiSelectDropDownList;
|
|
1359
|
+
var MuiGroupedMultiSelectDropDown = MultiSelectDropDownList;
|
|
1360
|
+
var FloatingMultiSelectDropDownList = MultiSelectDropDownList;
|
|
1361
|
+
function DropDownList({
|
|
1362
|
+
value = "",
|
|
1363
|
+
options = [],
|
|
1364
|
+
errorMessage,
|
|
1365
|
+
noDataMsg = "No options",
|
|
1366
|
+
...props
|
|
1367
|
+
}) {
|
|
1368
|
+
return /* @__PURE__ */ jsx(
|
|
1369
|
+
SharedTextField,
|
|
1370
|
+
{
|
|
1371
|
+
select: true,
|
|
1372
|
+
value,
|
|
1373
|
+
error: Boolean(errorMessage),
|
|
1374
|
+
helperText: errorMessage,
|
|
1375
|
+
...props,
|
|
1376
|
+
children: options.length ? options.map((option) => /* @__PURE__ */ jsx(MenuItem2, { value: option.id, disabled: option.disabled, children: option.value || option.label }, String(option.id))) : /* @__PURE__ */ jsx(MenuItem2, { disabled: true, value: "", children: noDataMsg })
|
|
1377
|
+
}
|
|
1378
|
+
);
|
|
1379
|
+
}
|
|
1380
|
+
var DropDownWithMessage = DropDownList;
|
|
1381
|
+
var DropDownListWithMessage = DropDownList;
|
|
1382
|
+
function TextFieldWithIcon({
|
|
1383
|
+
startIcon,
|
|
1384
|
+
endIcon,
|
|
1385
|
+
InputProps,
|
|
1386
|
+
...props
|
|
1387
|
+
}) {
|
|
1388
|
+
return /* @__PURE__ */ jsx(
|
|
1389
|
+
SharedTextField,
|
|
1390
|
+
{
|
|
1391
|
+
InputProps: {
|
|
1392
|
+
...InputProps,
|
|
1393
|
+
...startIcon ? {
|
|
1394
|
+
startAdornment: /* @__PURE__ */ jsx(InputAdornment2, { position: "start", children: startIcon })
|
|
1395
|
+
} : {},
|
|
1396
|
+
...endIcon ? {
|
|
1397
|
+
endAdornment: /* @__PURE__ */ jsx(InputAdornment2, { position: "end", children: endIcon })
|
|
1398
|
+
} : {}
|
|
1399
|
+
},
|
|
1400
|
+
...props
|
|
1401
|
+
}
|
|
1402
|
+
);
|
|
1403
|
+
}
|
|
1404
|
+
function CurrencyInput({
|
|
1405
|
+
currencySymbol = "$",
|
|
1406
|
+
inputProps,
|
|
1407
|
+
...props
|
|
1408
|
+
}) {
|
|
1409
|
+
return /* @__PURE__ */ jsx(
|
|
1410
|
+
TextFieldWithIcon,
|
|
1411
|
+
{
|
|
1412
|
+
startIcon: currencySymbol,
|
|
1413
|
+
inputProps: {
|
|
1414
|
+
inputMode: "decimal",
|
|
1415
|
+
pattern: "^-?[0-9]*[.,]?[0-9]*$",
|
|
1416
|
+
...inputProps
|
|
1417
|
+
},
|
|
1418
|
+
...props
|
|
1419
|
+
}
|
|
1420
|
+
);
|
|
1421
|
+
}
|
|
1422
|
+
var CurrencyTextField = CurrencyInput;
|
|
1423
|
+
var GenericCurrencyTextBox = CurrencyInput;
|
|
1424
|
+
var GenericStyledCurrencyTextField = CurrencyInput;
|
|
1425
|
+
var TextfieldWithIcon = TextFieldWithIcon;
|
|
1426
|
+
function StyledReadOnlyTextField({
|
|
1427
|
+
type,
|
|
1428
|
+
value,
|
|
1429
|
+
currencySymbol = "$",
|
|
1430
|
+
InputProps,
|
|
1431
|
+
inputProps,
|
|
1432
|
+
...props
|
|
1433
|
+
}) {
|
|
1434
|
+
const amount = type === "amount";
|
|
1435
|
+
const numericValue = Number(value);
|
|
1436
|
+
const displayValue = amount && value !== "" && value != null && Number.isFinite(numericValue) ? numericValue.toLocaleString("en-US", {
|
|
1437
|
+
minimumFractionDigits: 2,
|
|
1438
|
+
maximumFractionDigits: 2
|
|
1439
|
+
}) : value;
|
|
1440
|
+
return /* @__PURE__ */ jsx(
|
|
1441
|
+
SharedTextField,
|
|
1442
|
+
{
|
|
1443
|
+
value: displayValue,
|
|
1444
|
+
type: amount ? "text" : type,
|
|
1445
|
+
InputProps: {
|
|
1446
|
+
readOnly: true,
|
|
1447
|
+
...amount ? {
|
|
1448
|
+
startAdornment: /* @__PURE__ */ jsx(InputAdornment2, { position: "start", children: currencySymbol })
|
|
1449
|
+
} : {},
|
|
1450
|
+
...InputProps
|
|
1451
|
+
},
|
|
1452
|
+
inputProps: {
|
|
1453
|
+
tabIndex: -1,
|
|
1454
|
+
...inputProps
|
|
1455
|
+
},
|
|
1456
|
+
...props
|
|
1457
|
+
}
|
|
1458
|
+
);
|
|
1459
|
+
}
|
|
1460
|
+
function FileInput({
|
|
1461
|
+
id,
|
|
1462
|
+
label = "Choose file",
|
|
1463
|
+
accept,
|
|
1464
|
+
multiple,
|
|
1465
|
+
disabled,
|
|
1466
|
+
required,
|
|
1467
|
+
helperText,
|
|
1468
|
+
errorMessage,
|
|
1469
|
+
onFiles
|
|
1470
|
+
}) {
|
|
1471
|
+
const generatedId = useId();
|
|
1472
|
+
const inputRef = useRef(null);
|
|
1473
|
+
const [selection, setSelection] = useState("");
|
|
1474
|
+
const controlId = id ?? `shared-file-${generatedId.replace(/:/g, "")}`;
|
|
1475
|
+
const descriptionId = `${controlId}-description`;
|
|
1476
|
+
const handleChange = (event) => {
|
|
1477
|
+
const files = Array.from(event.target.files ?? []);
|
|
1478
|
+
setSelection(files.map((file) => file.name).join(", "));
|
|
1479
|
+
onFiles(files);
|
|
1480
|
+
};
|
|
1481
|
+
return /* @__PURE__ */ jsxs(Stack6, { spacing: 0.5, alignItems: "flex-start", children: [
|
|
1482
|
+
/* @__PURE__ */ jsxs(
|
|
1483
|
+
SharedButton,
|
|
1484
|
+
{
|
|
1485
|
+
variant: "outlined",
|
|
1486
|
+
disabled,
|
|
1487
|
+
startIcon: /* @__PURE__ */ jsx(UploadFileIcon, {}),
|
|
1488
|
+
onClick: () => inputRef.current?.click(),
|
|
1489
|
+
"aria-describedby": helperText || errorMessage ? descriptionId : void 0,
|
|
1490
|
+
children: [
|
|
1491
|
+
label,
|
|
1492
|
+
required ? " (required)" : ""
|
|
1493
|
+
]
|
|
1494
|
+
}
|
|
1495
|
+
),
|
|
1496
|
+
/* @__PURE__ */ jsx(
|
|
1497
|
+
"input",
|
|
1498
|
+
{
|
|
1499
|
+
ref: inputRef,
|
|
1500
|
+
id: controlId,
|
|
1501
|
+
type: "file",
|
|
1502
|
+
accept,
|
|
1503
|
+
multiple,
|
|
1504
|
+
disabled,
|
|
1505
|
+
required,
|
|
1506
|
+
hidden: true,
|
|
1507
|
+
onChange: handleChange
|
|
1508
|
+
}
|
|
1509
|
+
),
|
|
1510
|
+
helperText || errorMessage ? /* @__PURE__ */ jsx(
|
|
1511
|
+
FormHelperText,
|
|
1512
|
+
{
|
|
1513
|
+
id: descriptionId,
|
|
1514
|
+
error: Boolean(errorMessage),
|
|
1515
|
+
role: errorMessage ? "alert" : void 0,
|
|
1516
|
+
children: errorMessage ?? helperText
|
|
1517
|
+
}
|
|
1518
|
+
) : null,
|
|
1519
|
+
accept ? /* @__PURE__ */ jsxs(Typography20, { variant: "caption", color: "text.secondary", children: [
|
|
1520
|
+
"Accepted file types: ",
|
|
1521
|
+
accept
|
|
1522
|
+
] }) : null,
|
|
1523
|
+
/* @__PURE__ */ jsx(Typography20, { variant: "caption", "aria-live": "polite", children: selection ? `Selected: ${selection}` : "" })
|
|
1524
|
+
] });
|
|
1525
|
+
}
|
|
1526
|
+
function DropDownListWithImage({
|
|
1527
|
+
options,
|
|
1528
|
+
errorMessage,
|
|
1529
|
+
onChange,
|
|
1530
|
+
size = "small",
|
|
1531
|
+
variant = "outlined",
|
|
1532
|
+
...props
|
|
1533
|
+
}) {
|
|
1534
|
+
return /* @__PURE__ */ jsx(
|
|
1535
|
+
SharedTextField,
|
|
1536
|
+
{
|
|
1537
|
+
select: true,
|
|
1538
|
+
size,
|
|
1539
|
+
variant,
|
|
1540
|
+
error: Boolean(errorMessage),
|
|
1541
|
+
helperText: errorMessage,
|
|
1542
|
+
onChange,
|
|
1543
|
+
InputLabelProps: { shrink: true, ...props.InputLabelProps },
|
|
1544
|
+
...props,
|
|
1545
|
+
children: options.map((option) => /* @__PURE__ */ jsx(MenuItem2, { value: option.id, disabled: option.disabled, children: /* @__PURE__ */ jsxs(Stack6, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
1546
|
+
/* @__PURE__ */ jsx(Avatar, { src: option.image, alt: option.imageAlt ?? "", variant: "rounded", sx: { width: 20, height: 20 } }),
|
|
1547
|
+
/* @__PURE__ */ jsx("span", { children: option.value })
|
|
1548
|
+
] }) }, String(option.id)))
|
|
1549
|
+
}
|
|
1550
|
+
);
|
|
1551
|
+
}
|
|
1552
|
+
var emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
1553
|
+
function EmailSuggestionInput({
|
|
1554
|
+
label,
|
|
1555
|
+
backupName = "Email addresses",
|
|
1556
|
+
options = [],
|
|
1557
|
+
helperText,
|
|
1558
|
+
onChange,
|
|
1559
|
+
value = [],
|
|
1560
|
+
inputValue,
|
|
1561
|
+
setInputValue,
|
|
1562
|
+
textFieldProps,
|
|
1563
|
+
...props
|
|
1564
|
+
}) {
|
|
1565
|
+
const generatedId = useId().replace(/:/g, "");
|
|
1566
|
+
const controlId = props.id ?? `email-suggestions-${generatedId}`;
|
|
1567
|
+
const accessibleName = resolveControlName({
|
|
1568
|
+
label,
|
|
1569
|
+
ariaLabel: textFieldProps?.inputProps?.["aria-label"],
|
|
1570
|
+
name: textFieldProps?.name,
|
|
1571
|
+
id: props.id,
|
|
1572
|
+
backupName
|
|
1573
|
+
});
|
|
1574
|
+
const [draft, setDraft] = useState("");
|
|
1575
|
+
const activeDraft = inputValue ?? draft;
|
|
1576
|
+
const updateDraft = (nextDraft) => {
|
|
1577
|
+
setDraft(nextDraft);
|
|
1578
|
+
setInputValue?.(nextDraft);
|
|
1579
|
+
};
|
|
1580
|
+
const commitDraft = () => {
|
|
1581
|
+
const email = activeDraft.trim().replace(/,$/, "");
|
|
1582
|
+
if (email && !value.includes(email)) onChange([...value, email]);
|
|
1583
|
+
updateDraft("");
|
|
1584
|
+
};
|
|
1585
|
+
const handleKeyDown = (event) => {
|
|
1586
|
+
if (["Enter", ",", " "].includes(event.key) && activeDraft.trim()) {
|
|
1587
|
+
event.preventDefault();
|
|
1588
|
+
commitDraft();
|
|
1589
|
+
}
|
|
1590
|
+
};
|
|
1591
|
+
return /* @__PURE__ */ jsx(
|
|
1592
|
+
Autocomplete,
|
|
1593
|
+
{
|
|
1594
|
+
multiple: true,
|
|
1595
|
+
freeSolo: true,
|
|
1596
|
+
filterSelectedOptions: true,
|
|
1597
|
+
id: controlId,
|
|
1598
|
+
options: [...options],
|
|
1599
|
+
value,
|
|
1600
|
+
inputValue: activeDraft,
|
|
1601
|
+
onInputChange: (_, nextDraft) => updateDraft(nextDraft),
|
|
1602
|
+
onChange: (_, emails) => onChange(emails),
|
|
1603
|
+
onBlur: commitDraft,
|
|
1604
|
+
onKeyDown: handleKeyDown,
|
|
1605
|
+
renderTags: (emails, getTagProps) => emails.map((email, index) => /* @__PURE__ */ createElement(
|
|
1606
|
+
Chip,
|
|
1607
|
+
{
|
|
1608
|
+
label: email,
|
|
1609
|
+
color: emailPattern.test(email) ? "primary" : "error",
|
|
1610
|
+
variant: "outlined",
|
|
1611
|
+
...getTagProps({ index }),
|
|
1612
|
+
key: email
|
|
1613
|
+
}
|
|
1614
|
+
)),
|
|
1615
|
+
renderInput: (params) => /* @__PURE__ */ jsx(
|
|
1616
|
+
TextField,
|
|
1617
|
+
{
|
|
1618
|
+
...params,
|
|
1619
|
+
...textFieldProps,
|
|
1620
|
+
label,
|
|
1621
|
+
helperText,
|
|
1622
|
+
size: textFieldProps?.size ?? "small",
|
|
1623
|
+
inputProps: {
|
|
1624
|
+
...params.inputProps,
|
|
1625
|
+
...textFieldProps?.inputProps,
|
|
1626
|
+
...!label ? { "aria-label": accessibleName } : {}
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
),
|
|
1630
|
+
...props
|
|
1631
|
+
}
|
|
1632
|
+
);
|
|
1633
|
+
}
|
|
1634
|
+
var EmailSuggestionMuiTextBox = EmailSuggestionInput;
|
|
1635
|
+
var EmailSuggestionTextBox = EmailSuggestionInput;
|
|
1636
|
+
function CustomDropZone({ id, files, setFiles, onSave, acceptedFileTypes, multiple = false, maxFiles, maxFileSize, label = "Upload files", disabled = false }) {
|
|
1637
|
+
const generatedId = useId().replace(/:/g, "");
|
|
1638
|
+
const inputId = id ?? `drop-zone-${generatedId}`;
|
|
1639
|
+
const inputRef = useRef(null);
|
|
1640
|
+
const [error, setError] = useState("");
|
|
1641
|
+
const applyFiles = (incoming) => {
|
|
1642
|
+
setError("");
|
|
1643
|
+
const accepted = acceptedFileTypes?.split(",").map((item2) => item2.trim().toLowerCase()).filter(Boolean) ?? [];
|
|
1644
|
+
const valid = incoming.filter((file) => {
|
|
1645
|
+
if (!file.size) {
|
|
1646
|
+
setError(`File is empty: ${file.name}`);
|
|
1647
|
+
return false;
|
|
1648
|
+
}
|
|
1649
|
+
if (maxFileSize && file.size > maxFileSize * 1024 * 1024) {
|
|
1650
|
+
setError(`File is too large: ${file.name}`);
|
|
1651
|
+
return false;
|
|
1652
|
+
}
|
|
1653
|
+
if (accepted.length) {
|
|
1654
|
+
const extension = `.${file.name.split(".").pop()?.toLowerCase()}`;
|
|
1655
|
+
if (!accepted.some((type) => type === extension || type === file.type.toLowerCase() || type.endsWith("/*") && file.type.startsWith(type.slice(0, -1)))) {
|
|
1656
|
+
setError(`File type is not allowed: ${file.name}`);
|
|
1657
|
+
return false;
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
return true;
|
|
1661
|
+
});
|
|
1662
|
+
let next = multiple ? [...files, ...valid] : valid.slice(0, 1);
|
|
1663
|
+
if (maxFiles) next = next.slice(0, maxFiles);
|
|
1664
|
+
setFiles(next);
|
|
1665
|
+
onSave?.(next);
|
|
1666
|
+
};
|
|
1667
|
+
const handleInput = (event) => {
|
|
1668
|
+
applyFiles(Array.from(event.target.files ?? []));
|
|
1669
|
+
event.target.value = "";
|
|
1670
|
+
};
|
|
1671
|
+
const handleDrop = (event) => {
|
|
1672
|
+
event.preventDefault();
|
|
1673
|
+
if (!disabled) applyFiles(Array.from(event.dataTransfer.files));
|
|
1674
|
+
};
|
|
1675
|
+
const remove = (index) => {
|
|
1676
|
+
const next = files.filter((_, fileIndex) => fileIndex !== index);
|
|
1677
|
+
setFiles(next);
|
|
1678
|
+
onSave?.(next);
|
|
1679
|
+
};
|
|
1680
|
+
return /* @__PURE__ */ jsxs(Box14, { children: [
|
|
1681
|
+
/* @__PURE__ */ jsxs(Box14, { onDragOver: (event) => event.preventDefault(), onDrop: handleDrop, sx: { border: "2px dashed", borderColor: error ? "error.main" : "divider", borderRadius: 1, p: 2, textAlign: "center" }, children: [
|
|
1682
|
+
/* @__PURE__ */ jsx("input", { ref: inputRef, id: inputId, type: "file", hidden: true, multiple, accept: acceptedFileTypes, disabled, onChange: handleInput }),
|
|
1683
|
+
/* @__PURE__ */ jsx(SharedButton, { startIcon: /* @__PURE__ */ jsx(AttachFileIcon, {}), disabled, onClick: () => inputRef.current?.click(), children: label }),
|
|
1684
|
+
/* @__PURE__ */ jsx(Typography20, { variant: "body2", color: "text.secondary", sx: { mt: 1 }, children: "Drag and drop files here, or use the upload button." }),
|
|
1685
|
+
error ? /* @__PURE__ */ jsx(Typography20, { role: "alert", color: "error.main", variant: "body2", children: error }) : null
|
|
1686
|
+
] }),
|
|
1687
|
+
files.length ? /* @__PURE__ */ jsx(List, { dense: true, "aria-label": "Selected files", children: files.map((file, index) => /* @__PURE__ */ jsxs(ListItem, { secondaryAction: /* @__PURE__ */ jsx(SharedIconButton, { "aria-label": `Remove ${file.name}`, onClick: () => remove(index), children: /* @__PURE__ */ jsx(default59, {}) }), children: [
|
|
1688
|
+
/* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(AttachFileIcon, {}) }),
|
|
1689
|
+
/* @__PURE__ */ jsx(ListItemText, { primary: file.name, secondary: `${Math.ceil(file.size / 1024)} KB` })
|
|
1690
|
+
] }, `${file.name}-${file.lastModified}`)) }) : null
|
|
1691
|
+
] });
|
|
1692
|
+
}
|
|
1693
|
+
function defaultCompare(left, right) {
|
|
1694
|
+
if (left == null && right == null) return 0;
|
|
1695
|
+
if (left == null) return -1;
|
|
1696
|
+
if (right == null) return 1;
|
|
1697
|
+
if (typeof left === "number" && typeof right === "number") return left - right;
|
|
1698
|
+
return String(left).localeCompare(String(right), void 0, {
|
|
1699
|
+
numeric: true,
|
|
1700
|
+
sensitivity: "base"
|
|
1701
|
+
});
|
|
1702
|
+
}
|
|
1703
|
+
function DataTable({
|
|
1704
|
+
columns,
|
|
1705
|
+
rows,
|
|
1706
|
+
getRowKey = (row, index) => row["id"] ?? index,
|
|
1707
|
+
loading = false,
|
|
1708
|
+
emptyMessage = "No records found",
|
|
1709
|
+
initialSort,
|
|
1710
|
+
initialRowsPerPage = 10,
|
|
1711
|
+
rowsPerPageOptions = [5, 10, 25, 50],
|
|
1712
|
+
maxHeight,
|
|
1713
|
+
stickyHeader = true,
|
|
1714
|
+
onRowClick,
|
|
1715
|
+
getRowAriaLabel,
|
|
1716
|
+
getRowSx,
|
|
1717
|
+
selectedRowKeys,
|
|
1718
|
+
onSelectedRowKeysChange,
|
|
1719
|
+
isRowSelectable = () => true,
|
|
1720
|
+
selectionLabel = "Select rows",
|
|
1721
|
+
pagination,
|
|
1722
|
+
showPagination = true,
|
|
1723
|
+
caption,
|
|
1724
|
+
"aria-label": ariaLabel = "Data table"
|
|
1725
|
+
}) {
|
|
1726
|
+
const [sortField, setSortField] = useState(initialSort?.field);
|
|
1727
|
+
const [direction, setDirection] = useState(
|
|
1728
|
+
initialSort?.direction ?? "asc"
|
|
1729
|
+
);
|
|
1730
|
+
const [page, setPage] = useState(0);
|
|
1731
|
+
const [rowsPerPage, setRowsPerPage] = useState(initialRowsPerPage);
|
|
1732
|
+
const visibleColumns = useMemo(
|
|
1733
|
+
() => columns.filter((column) => !column.hidden),
|
|
1734
|
+
[columns]
|
|
1735
|
+
);
|
|
1736
|
+
const selectable = Boolean(selectedRowKeys && onSelectedRowKeysChange);
|
|
1737
|
+
const sortedRows = useMemo(() => {
|
|
1738
|
+
if (!sortField) return [...rows];
|
|
1739
|
+
const column = visibleColumns.find((item2) => item2.field === sortField);
|
|
1740
|
+
if (!column) return [...rows];
|
|
1741
|
+
return rows.map((row, index) => ({ row, index })).sort((left, right) => {
|
|
1742
|
+
const result = column.compare ? column.compare(left.row, right.row) : defaultCompare(left.row[column.field], right.row[column.field]);
|
|
1743
|
+
const stableResult = result || left.index - right.index;
|
|
1744
|
+
return direction === "asc" ? stableResult : -stableResult;
|
|
1745
|
+
}).map(({ row }) => row);
|
|
1746
|
+
}, [direction, rows, sortField, visibleColumns]);
|
|
1747
|
+
const activeRowsPerPage = pagination?.rowsPerPage ?? rowsPerPage;
|
|
1748
|
+
const activePage = pagination?.page ?? page;
|
|
1749
|
+
const effectivePage = Math.min(
|
|
1750
|
+
activePage,
|
|
1751
|
+
Math.max(
|
|
1752
|
+
0,
|
|
1753
|
+
Math.ceil((pagination?.count ?? rows.length) / activeRowsPerPage) - 1
|
|
1754
|
+
)
|
|
1755
|
+
);
|
|
1756
|
+
const visibleRows = pagination ? sortedRows : sortedRows.slice(
|
|
1757
|
+
effectivePage * activeRowsPerPage,
|
|
1758
|
+
effectivePage * activeRowsPerPage + activeRowsPerPage
|
|
1759
|
+
);
|
|
1760
|
+
const selectedKeySet = new Set(selectedRowKeys ?? []);
|
|
1761
|
+
const selectableKeys = rows.map((row, index) => ({ row, key: getRowKey(row, index) })).filter(({ row }) => isRowSelectable(row)).map(({ key }) => key);
|
|
1762
|
+
const allSelected = selectableKeys.length > 0 && selectableKeys.every((key) => selectedKeySet.has(key));
|
|
1763
|
+
const someSelected = selectableKeys.some((key) => selectedKeySet.has(key)) && !allSelected;
|
|
1764
|
+
const requestSort = (field) => {
|
|
1765
|
+
setDirection(sortField === field && direction === "asc" ? "desc" : "asc");
|
|
1766
|
+
setSortField(field);
|
|
1767
|
+
setPage(0);
|
|
1768
|
+
};
|
|
1769
|
+
return /* @__PURE__ */ jsxs(Paper, { variant: "outlined", children: [
|
|
1770
|
+
/* @__PURE__ */ jsx(TableContainer, { sx: { maxHeight }, children: /* @__PURE__ */ jsxs(Table, { size: "small", stickyHeader, "aria-label": ariaLabel, children: [
|
|
1771
|
+
caption ? /* @__PURE__ */ jsx("caption", { children: caption }) : null,
|
|
1772
|
+
/* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
1773
|
+
selectable ? /* @__PURE__ */ jsx(TableCell, { padding: "checkbox", children: /* @__PURE__ */ jsx(
|
|
1774
|
+
Checkbox,
|
|
1775
|
+
{
|
|
1776
|
+
inputProps: { "aria-label": `${selectionLabel}: select all` },
|
|
1777
|
+
checked: allSelected,
|
|
1778
|
+
indeterminate: someSelected,
|
|
1779
|
+
onChange: (_, checked) => onSelectedRowKeysChange?.(checked ? selectableKeys : [])
|
|
1780
|
+
}
|
|
1781
|
+
) }) : null,
|
|
1782
|
+
visibleColumns.map((column) => /* @__PURE__ */ jsx(
|
|
1783
|
+
TableCell,
|
|
1784
|
+
{
|
|
1785
|
+
align: column.align,
|
|
1786
|
+
sortDirection: sortField === column.field ? direction : false,
|
|
1787
|
+
padding: column.disablePadding ? "none" : "normal",
|
|
1788
|
+
sx: {
|
|
1789
|
+
width: column.width,
|
|
1790
|
+
minWidth: column.minWidth,
|
|
1791
|
+
maxWidth: column.maxWidth,
|
|
1792
|
+
whiteSpace: column.noWrapHeader ? "nowrap" : void 0,
|
|
1793
|
+
fontWeight: 600
|
|
1794
|
+
},
|
|
1795
|
+
children: column.sortable === false ? column.header ?? column.title : /* @__PURE__ */ jsx(
|
|
1796
|
+
TableSortLabel,
|
|
1797
|
+
{
|
|
1798
|
+
active: sortField === column.field,
|
|
1799
|
+
direction: sortField === column.field ? direction : "asc",
|
|
1800
|
+
onClick: () => requestSort(column.field),
|
|
1801
|
+
children: column.header ?? column.title
|
|
1802
|
+
}
|
|
1803
|
+
)
|
|
1804
|
+
},
|
|
1805
|
+
column.field
|
|
1806
|
+
))
|
|
1807
|
+
] }) }),
|
|
1808
|
+
/* @__PURE__ */ jsxs(TableBody, { children: [
|
|
1809
|
+
loading ? Array.from({ length: Math.min(activeRowsPerPage, 5) }, (_, rowIndex) => /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
1810
|
+
selectable ? /* @__PURE__ */ jsx(TableCell, { padding: "checkbox", children: /* @__PURE__ */ jsx(Skeleton, { variant: "circular", width: 24, height: 24 }) }) : null,
|
|
1811
|
+
visibleColumns.map((column) => /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Skeleton, { animation: "wave" }) }, column.field))
|
|
1812
|
+
] }, `skeleton-${rowIndex}`)) : visibleRows.map((row, rowIndex) => {
|
|
1813
|
+
const absoluteIndex = pagination ? effectivePage * activeRowsPerPage + rowIndex : effectivePage * activeRowsPerPage + rowIndex;
|
|
1814
|
+
const rowKey = getRowKey(row, absoluteIndex);
|
|
1815
|
+
const rowSelected = selectedKeySet.has(rowKey);
|
|
1816
|
+
const rowSelectable = isRowSelectable(row);
|
|
1817
|
+
return /* @__PURE__ */ jsxs(
|
|
1818
|
+
TableRow,
|
|
1819
|
+
{
|
|
1820
|
+
hover: Boolean(onRowClick),
|
|
1821
|
+
selected: rowSelected,
|
|
1822
|
+
onClick: () => onRowClick?.(row),
|
|
1823
|
+
onKeyDown: (event) => {
|
|
1824
|
+
if (onRowClick && (event.key === "Enter" || event.key === " ")) {
|
|
1825
|
+
event.preventDefault();
|
|
1826
|
+
onRowClick(row);
|
|
1827
|
+
}
|
|
1828
|
+
},
|
|
1829
|
+
tabIndex: onRowClick ? 0 : void 0,
|
|
1830
|
+
"aria-label": onRowClick ? getRowAriaLabel?.(
|
|
1831
|
+
row,
|
|
1832
|
+
absoluteIndex
|
|
1833
|
+
) ?? "Open row" : void 0,
|
|
1834
|
+
sx: {
|
|
1835
|
+
...onRowClick ? { cursor: "pointer" } : {},
|
|
1836
|
+
...getRowSx?.(row, absoluteIndex)
|
|
1837
|
+
},
|
|
1838
|
+
children: [
|
|
1839
|
+
selectable ? /* @__PURE__ */ jsx(TableCell, { padding: "checkbox", children: /* @__PURE__ */ jsx(
|
|
1840
|
+
Checkbox,
|
|
1841
|
+
{
|
|
1842
|
+
checked: rowSelected,
|
|
1843
|
+
disabled: !rowSelectable,
|
|
1844
|
+
inputProps: {
|
|
1845
|
+
"aria-label": `${selectionLabel}: ${getRowAriaLabel?.(row, absoluteIndex) ?? String(rowKey)}`
|
|
1846
|
+
},
|
|
1847
|
+
onClick: (event) => event.stopPropagation(),
|
|
1848
|
+
onChange: (_, checked) => {
|
|
1849
|
+
const next = checked ? [...selectedKeySet, rowKey] : [...selectedKeySet].filter((key) => key !== rowKey);
|
|
1850
|
+
onSelectedRowKeysChange?.(next);
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
) }) : null,
|
|
1854
|
+
visibleColumns.map((column) => {
|
|
1855
|
+
const value = row[column.field];
|
|
1856
|
+
return /* @__PURE__ */ jsx(
|
|
1857
|
+
TableCell,
|
|
1858
|
+
{
|
|
1859
|
+
align: column.align,
|
|
1860
|
+
padding: column.disablePadding ? "none" : "normal",
|
|
1861
|
+
sx: {
|
|
1862
|
+
width: column.width,
|
|
1863
|
+
minWidth: column.minWidth,
|
|
1864
|
+
maxWidth: column.maxWidth,
|
|
1865
|
+
whiteSpace: column.noWrapBody ? "nowrap" : void 0
|
|
1866
|
+
},
|
|
1867
|
+
children: column.render ? column.render(value, row, rowIndex) : value
|
|
1868
|
+
},
|
|
1869
|
+
column.field
|
|
1870
|
+
);
|
|
1871
|
+
})
|
|
1872
|
+
]
|
|
1873
|
+
},
|
|
1874
|
+
rowKey
|
|
1875
|
+
);
|
|
1876
|
+
}),
|
|
1877
|
+
!loading && rows.length === 0 ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: Math.max(visibleColumns.length + (selectable ? 1 : 0), 1), children: /* @__PURE__ */ jsx(Box14, { sx: { py: 4, textAlign: "center" }, children: /* @__PURE__ */ jsx(Typography20, { color: "text.secondary", children: emptyMessage }) }) }) }) : null
|
|
1878
|
+
] })
|
|
1879
|
+
] }) }),
|
|
1880
|
+
showPagination ? /* @__PURE__ */ jsx(
|
|
1881
|
+
TablePagination,
|
|
1882
|
+
{
|
|
1883
|
+
component: "div",
|
|
1884
|
+
count: pagination?.count ?? rows.length,
|
|
1885
|
+
page: effectivePage,
|
|
1886
|
+
rowsPerPage: activeRowsPerPage,
|
|
1887
|
+
rowsPerPageOptions: [...rowsPerPageOptions],
|
|
1888
|
+
onPageChange: (_, nextPage) => pagination ? pagination.onPageChange(nextPage) : setPage(nextPage),
|
|
1889
|
+
onRowsPerPageChange: (event) => {
|
|
1890
|
+
const next = Number(event.target.value);
|
|
1891
|
+
if (pagination) {
|
|
1892
|
+
pagination.onRowsPerPageChange?.(next);
|
|
1893
|
+
} else {
|
|
1894
|
+
setRowsPerPage(next);
|
|
1895
|
+
setPage(0);
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
) : null
|
|
1900
|
+
] });
|
|
1901
|
+
}
|
|
1902
|
+
var LightTooltip = styled(({ className, ...props }) => /* @__PURE__ */ jsx(Tooltip, { ...props, classes: className ? { popper: className } : void 0 }))(({ theme }) => ({
|
|
1903
|
+
[`& .MuiTooltip-tooltip`]: {
|
|
1904
|
+
backgroundColor: theme.palette.background.paper,
|
|
1905
|
+
color: theme.palette.text.primary,
|
|
1906
|
+
boxShadow: theme.shadows[2],
|
|
1907
|
+
border: `1px solid ${theme.palette.divider}`
|
|
1908
|
+
}
|
|
1909
|
+
}));
|
|
1910
|
+
function Spinner({
|
|
1911
|
+
centered = true,
|
|
1912
|
+
label = "Loading",
|
|
1913
|
+
...props
|
|
1914
|
+
}) {
|
|
1915
|
+
const spinner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1916
|
+
/* @__PURE__ */ jsx(CircularProgress, { size: 28, "aria-label": label, ...props }),
|
|
1917
|
+
/* @__PURE__ */ jsx(
|
|
1918
|
+
Box14,
|
|
1919
|
+
{
|
|
1920
|
+
component: "span",
|
|
1921
|
+
sx: {
|
|
1922
|
+
position: "absolute",
|
|
1923
|
+
width: 1,
|
|
1924
|
+
height: 1,
|
|
1925
|
+
p: 0,
|
|
1926
|
+
m: -1,
|
|
1927
|
+
overflow: "hidden",
|
|
1928
|
+
clip: "rect(0 0 0 0)",
|
|
1929
|
+
whiteSpace: "nowrap",
|
|
1930
|
+
border: 0
|
|
1931
|
+
},
|
|
1932
|
+
children: label
|
|
1933
|
+
}
|
|
1934
|
+
)
|
|
1935
|
+
] });
|
|
1936
|
+
return centered ? /* @__PURE__ */ jsx(Box14, { role: "status", sx: { display: "grid", placeItems: "center", p: 2 }, children: spinner }) : spinner;
|
|
1937
|
+
}
|
|
1938
|
+
function SuccessAlert(props) {
|
|
1939
|
+
return /* @__PURE__ */ jsx(Alert, { severity: "success", ...props });
|
|
1940
|
+
}
|
|
1941
|
+
function ErrorAlert(props) {
|
|
1942
|
+
return /* @__PURE__ */ jsx(Alert, { severity: "error", ...props });
|
|
1943
|
+
}
|
|
1944
|
+
var SharedTooltip = LightTooltip;
|
|
1945
|
+
function InfoTooltip({
|
|
1946
|
+
title,
|
|
1947
|
+
label = "More information",
|
|
1948
|
+
...props
|
|
1949
|
+
}) {
|
|
1950
|
+
return /* @__PURE__ */ jsx(LightTooltip, { title, arrow: true, children: /* @__PURE__ */ jsx(SharedIconButton, { "aria-label": label, size: "small", ...props, children: /* @__PURE__ */ jsx(InfoOutlined, { fontSize: "small" }) }) });
|
|
1951
|
+
}
|
|
1952
|
+
var InformationIcon = InfoTooltip;
|
|
1953
|
+
var InfoLabelIcon = InfoTooltip;
|
|
1954
|
+
var TicketLabelInfoIcon = InfoTooltip;
|
|
1955
|
+
function LabelsIcons({
|
|
1956
|
+
title,
|
|
1957
|
+
mandatory = false,
|
|
1958
|
+
onClick,
|
|
1959
|
+
onCreateTicket,
|
|
1960
|
+
onClickDocument
|
|
1961
|
+
}) {
|
|
1962
|
+
const [anchor, setAnchor] = useState(null);
|
|
1963
|
+
const dialogId = useId();
|
|
1964
|
+
const titleId = `${dialogId}-title`;
|
|
1965
|
+
const open = (event) => setAnchor(event.currentTarget);
|
|
1966
|
+
return /* @__PURE__ */ jsxs(Stack6, { component: "span", direction: "row", spacing: 0.25, alignItems: "center", children: [
|
|
1967
|
+
/* @__PURE__ */ jsx(
|
|
1968
|
+
SharedIconButton,
|
|
1969
|
+
{
|
|
1970
|
+
"aria-label": "More information",
|
|
1971
|
+
"aria-haspopup": "dialog",
|
|
1972
|
+
"aria-expanded": Boolean(anchor),
|
|
1973
|
+
"aria-controls": anchor ? dialogId : void 0,
|
|
1974
|
+
size: "small",
|
|
1975
|
+
onClick: open,
|
|
1976
|
+
children: /* @__PURE__ */ jsx(InfoOutlined, { fontSize: "small" })
|
|
1977
|
+
}
|
|
1978
|
+
),
|
|
1979
|
+
mandatory ? /* @__PURE__ */ jsx(Typography20, { component: "span", color: "error.main", "aria-label": "required", children: "*" }) : null,
|
|
1980
|
+
/* @__PURE__ */ jsx(
|
|
1981
|
+
Popover2,
|
|
1982
|
+
{
|
|
1983
|
+
open: Boolean(anchor),
|
|
1984
|
+
anchorEl: anchor,
|
|
1985
|
+
onClose: () => setAnchor(null),
|
|
1986
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
1987
|
+
slotProps: { paper: { id: dialogId, role: "dialog", "aria-labelledby": titleId } },
|
|
1988
|
+
children: /* @__PURE__ */ jsxs(Box14, { sx: { maxWidth: 320, p: 1.5, borderLeft: 5, borderColor: "primary.main" }, children: [
|
|
1989
|
+
/* @__PURE__ */ jsxs(Stack6, { direction: "row", justifyContent: "space-between", alignItems: "center", children: [
|
|
1990
|
+
/* @__PURE__ */ jsx(Typography20, { id: titleId, fontWeight: 700, children: "More information" }),
|
|
1991
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
1992
|
+
onClick || onCreateTicket ? /* @__PURE__ */ jsx(SharedIconButton, { "aria-label": "Create ticket", size: "small", onClick: onCreateTicket ?? onClick, children: /* @__PURE__ */ jsx(ConfirmationNumberOutlinedIcon, {}) }) : null,
|
|
1993
|
+
onClickDocument ? /* @__PURE__ */ jsx(SharedIconButton, { "aria-label": "Open documentation", size: "small", onClick: onClickDocument, children: /* @__PURE__ */ jsx(default62, {}) }) : null
|
|
1994
|
+
] })
|
|
1995
|
+
] }),
|
|
1996
|
+
/* @__PURE__ */ jsx(Typography20, { variant: "body2", children: title })
|
|
1997
|
+
] })
|
|
1998
|
+
}
|
|
1999
|
+
)
|
|
2000
|
+
] });
|
|
2001
|
+
}
|
|
2002
|
+
var TicketLabelInfoIcons = LabelsIcons;
|
|
2003
|
+
var StyledTableCell = styled(TableCell)(({ theme }) => ({
|
|
2004
|
+
[`&.${tableCellClasses.head}`]: {
|
|
2005
|
+
backgroundColor: theme.palette.primary.main,
|
|
2006
|
+
color: theme.palette.primary.contrastText,
|
|
2007
|
+
fontWeight: 600
|
|
2008
|
+
}
|
|
2009
|
+
}));
|
|
2010
|
+
var StyledBorderedTableCell = styled(StyledTableCell)(({ theme }) => ({
|
|
2011
|
+
border: `1px solid ${theme.palette.divider}`
|
|
2012
|
+
}));
|
|
2013
|
+
var StyledLinesBorderedTableCell = styled(TableCell)(({ theme }) => ({
|
|
2014
|
+
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
2015
|
+
borderRight: `1px solid ${theme.palette.divider}`
|
|
2016
|
+
}));
|
|
2017
|
+
var StyledTableSortLabel = styled(TableSortLabel)(({ theme }) => ({
|
|
2018
|
+
color: theme.palette.primary.contrastText,
|
|
2019
|
+
"&:hover, &.Mui-active": {
|
|
2020
|
+
color: theme.palette.primary.contrastText
|
|
2021
|
+
},
|
|
2022
|
+
"&.Mui-active .MuiTableSortLabel-icon": {
|
|
2023
|
+
color: theme.palette.primary.contrastText
|
|
2024
|
+
}
|
|
2025
|
+
}));
|
|
2026
|
+
var StickyTableCell = styled(TableCell, {
|
|
2027
|
+
shouldForwardProp: (property) => !["stickyLeft", "stickyTop", "noWrap", "compact"].includes(
|
|
2028
|
+
property
|
|
2029
|
+
)
|
|
2030
|
+
})(
|
|
2031
|
+
({ theme, stickyLeft, stickyTop, noWrap, compact }) => ({
|
|
2032
|
+
position: "sticky",
|
|
2033
|
+
left: stickyLeft,
|
|
2034
|
+
top: stickyTop,
|
|
2035
|
+
zIndex: stickyTop !== void 0 && stickyLeft !== void 0 ? 3 : 2,
|
|
2036
|
+
backgroundColor: theme.palette.background.paper,
|
|
2037
|
+
whiteSpace: noWrap ? "nowrap" : void 0,
|
|
2038
|
+
padding: compact ? theme.spacing(0.5, 1) : void 0,
|
|
2039
|
+
[`&.${tableCellClasses.head}`]: {
|
|
2040
|
+
backgroundColor: theme.palette.primary.main,
|
|
2041
|
+
color: theme.palette.primary.contrastText,
|
|
2042
|
+
fontWeight: 600
|
|
2043
|
+
}
|
|
2044
|
+
})
|
|
2045
|
+
);
|
|
2046
|
+
var StickyFooterTableCell = styled(StickyTableCell)(({ theme }) => ({
|
|
2047
|
+
fontWeight: 700,
|
|
2048
|
+
textAlign: "right",
|
|
2049
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
2050
|
+
backgroundColor: theme.palette.background.paper
|
|
2051
|
+
}));
|
|
2052
|
+
var HighlightedTableCell = styled(TableCell)(({ theme }) => ({
|
|
2053
|
+
padding: theme.spacing(0.5, 1),
|
|
2054
|
+
border: `1px solid ${theme.palette.background.paper}`,
|
|
2055
|
+
[`&.${tableCellClasses.head}, &.${tableCellClasses.footer}`]: {
|
|
2056
|
+
color: theme.palette.primary.contrastText,
|
|
2057
|
+
backgroundColor: theme.palette.info.main,
|
|
2058
|
+
fontWeight: 700
|
|
2059
|
+
}
|
|
2060
|
+
}));
|
|
2061
|
+
var YellowTableCell = HighlightedTableCell;
|
|
2062
|
+
var StyledTableRow = styled(TableRow)(({ theme }) => ({
|
|
2063
|
+
"&:nth-of-type(even)": { backgroundColor: theme.palette.action.hover },
|
|
2064
|
+
"&:last-child td, &:last-child th": { borderBottom: 0 }
|
|
2065
|
+
}));
|
|
2066
|
+
var StyledBorderedTableRow = styled(StyledTableRow)({
|
|
2067
|
+
"& td, & th": { borderCollapse: "collapse" }
|
|
2068
|
+
});
|
|
2069
|
+
function TableCellWithInfo({
|
|
2070
|
+
title,
|
|
2071
|
+
info,
|
|
2072
|
+
infoLabel = "More information",
|
|
2073
|
+
formula,
|
|
2074
|
+
formulaLabel = "View formula",
|
|
2075
|
+
bordered = false,
|
|
2076
|
+
...cellProps
|
|
2077
|
+
}) {
|
|
2078
|
+
const Cell = bordered ? StyledBorderedTableCell : StyledTableCell;
|
|
2079
|
+
return /* @__PURE__ */ jsxs(Cell, { ...cellProps, children: [
|
|
2080
|
+
info ? /* @__PURE__ */ jsx(InfoTooltip, { title: info, label: infoLabel }) : null,
|
|
2081
|
+
title,
|
|
2082
|
+
formula ? /* @__PURE__ */ jsx(LightTooltip, { title: formula, arrow: true, children: /* @__PURE__ */ jsx(SharedIconButton, { "aria-label": formulaLabel, size: "small", children: /* @__PURE__ */ jsx(default89, { fontSize: "small" }) }) }) : null
|
|
2083
|
+
] });
|
|
2084
|
+
}
|
|
2085
|
+
var CustomTableCellWithInfo = TableCellWithInfo;
|
|
2086
|
+
function StyledBorderedTableCellWithInfo(props) {
|
|
2087
|
+
return /* @__PURE__ */ jsx(TableCellWithInfo, { ...props, bordered: true });
|
|
2088
|
+
}
|
|
2089
|
+
function SkeletonTableBody({
|
|
2090
|
+
columns = 1,
|
|
2091
|
+
rows = 4,
|
|
2092
|
+
bordered = false
|
|
2093
|
+
}) {
|
|
2094
|
+
const Cell = bordered ? StyledBorderedTableCell : TableCell;
|
|
2095
|
+
return /* @__PURE__ */ jsx(TableBody, { children: Array.from({ length: rows }, (_, row) => /* @__PURE__ */ jsx(TableRow, { children: Array.from({ length: columns }, (__, column) => /* @__PURE__ */ jsx(Cell, { children: /* @__PURE__ */ jsx(Skeleton, { animation: "wave" }) }, column)) }, row)) });
|
|
2096
|
+
}
|
|
2097
|
+
function SkeletonBorderedTableBody(props) {
|
|
2098
|
+
return /* @__PURE__ */ jsx(SkeletonTableBody, { ...props, bordered: true });
|
|
2099
|
+
}
|
|
2100
|
+
function MandatoryIndicator() {
|
|
2101
|
+
return /* @__PURE__ */ jsx(Typography20, { component: "span", color: "error.main", "aria-hidden": "true", children: "*" });
|
|
2102
|
+
}
|
|
2103
|
+
function GenericLabel({ required, children, ...props }) {
|
|
2104
|
+
return /* @__PURE__ */ jsxs(Typography20, { component: "label", variant: "body2", ...props, children: [
|
|
2105
|
+
children,
|
|
2106
|
+
" ",
|
|
2107
|
+
required ? /* @__PURE__ */ jsx(MandatoryIndicator, {}) : null
|
|
2108
|
+
] });
|
|
2109
|
+
}
|
|
2110
|
+
function GenericCheckBox({
|
|
2111
|
+
label,
|
|
2112
|
+
errorMessage,
|
|
2113
|
+
backupName = "Select option",
|
|
2114
|
+
inputProps,
|
|
2115
|
+
...props
|
|
2116
|
+
}) {
|
|
2117
|
+
const accessibleName = resolveControlName({
|
|
2118
|
+
label,
|
|
2119
|
+
ariaLabel: inputProps?.["aria-label"],
|
|
2120
|
+
name: props.name,
|
|
2121
|
+
id: props.id,
|
|
2122
|
+
backupName
|
|
2123
|
+
});
|
|
2124
|
+
const checkbox = /* @__PURE__ */ jsx(
|
|
2125
|
+
Checkbox,
|
|
2126
|
+
{
|
|
2127
|
+
...props,
|
|
2128
|
+
inputProps: {
|
|
2129
|
+
...!label ? { "aria-label": accessibleName } : {},
|
|
2130
|
+
...inputProps
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
);
|
|
2134
|
+
return /* @__PURE__ */ jsxs(Stack6, { children: [
|
|
2135
|
+
label ? /* @__PURE__ */ jsx(FormControlLabel2, { control: checkbox, label }) : checkbox,
|
|
2136
|
+
errorMessage ? /* @__PURE__ */ jsx(FormHelperText, { error: true, children: errorMessage }) : null
|
|
2137
|
+
] });
|
|
2138
|
+
}
|
|
2139
|
+
function GenericTextBox(props) {
|
|
2140
|
+
return /* @__PURE__ */ jsx(SharedTextField, { ...props });
|
|
2141
|
+
}
|
|
2142
|
+
function GenericTextArea(props) {
|
|
2143
|
+
return /* @__PURE__ */ jsx(SharedTextField, { multiline: true, minRows: 3, ...props });
|
|
2144
|
+
}
|
|
2145
|
+
function ReadOnlyLabel({
|
|
2146
|
+
label,
|
|
2147
|
+
value,
|
|
2148
|
+
emptyValue = "\u2014",
|
|
2149
|
+
...props
|
|
2150
|
+
}) {
|
|
2151
|
+
return /* @__PURE__ */ jsxs(Stack6, { spacing: 0.25, children: [
|
|
2152
|
+
label ? /* @__PURE__ */ jsx(Typography20, { variant: "caption", color: "text.secondary", children: label }) : null,
|
|
2153
|
+
/* @__PURE__ */ jsx(Typography20, { variant: "body2", ...props, children: value === null || value === void 0 || value === "" ? emptyValue : value })
|
|
2154
|
+
] });
|
|
2155
|
+
}
|
|
2156
|
+
var GenericOutlinedCheckBox = GenericCheckBox;
|
|
2157
|
+
var MuiTextBox = GenericTextBox;
|
|
2158
|
+
var CustomMuiTextBox = GenericTextBox;
|
|
2159
|
+
var NormalMuiTextBox = GenericTextBox;
|
|
2160
|
+
var TextBox = GenericTextBox;
|
|
2161
|
+
function BlueHeaderText(props) {
|
|
2162
|
+
return /* @__PURE__ */ jsx(Typography20, { component: "span", color: "primary.dark", ...props });
|
|
2163
|
+
}
|
|
2164
|
+
function BoldText(props) {
|
|
2165
|
+
return /* @__PURE__ */ jsx(Typography20, { component: "strong", fontWeight: 700, ...props });
|
|
2166
|
+
}
|
|
2167
|
+
function ContentWrapper({ status, ...props }) {
|
|
2168
|
+
return /* @__PURE__ */ jsx(
|
|
2169
|
+
Paper,
|
|
2170
|
+
{
|
|
2171
|
+
variant: "outlined",
|
|
2172
|
+
...props,
|
|
2173
|
+
sx: {
|
|
2174
|
+
width: "100%",
|
|
2175
|
+
overflow: "hidden",
|
|
2176
|
+
borderWidth: 2,
|
|
2177
|
+
borderColor: status === "error" ? "error.main" : status === "success" || status === "c" ? "success.main" : "divider",
|
|
2178
|
+
boxShadow: 2,
|
|
2179
|
+
...props.sx
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
);
|
|
2183
|
+
}
|
|
2184
|
+
function QuestionTextWrapper(props) {
|
|
2185
|
+
return /* @__PURE__ */ jsx(Typography20, { component: "p", variant: "body1", ...props });
|
|
2186
|
+
}
|
|
2187
|
+
function PercentageInput({ value, label, ...props }) {
|
|
2188
|
+
return /* @__PURE__ */ jsx(
|
|
2189
|
+
SharedTextField,
|
|
2190
|
+
{
|
|
2191
|
+
type: "number",
|
|
2192
|
+
label,
|
|
2193
|
+
value: value ?? "",
|
|
2194
|
+
InputProps: { startAdornment: /* @__PURE__ */ jsx(InputAdornment2, { position: "start", children: "%" }), ...props.InputProps },
|
|
2195
|
+
...props
|
|
2196
|
+
}
|
|
2197
|
+
);
|
|
2198
|
+
}
|
|
2199
|
+
function TextInputWithLabel({ label, containerProps, id, ...props }) {
|
|
2200
|
+
const generatedId = useId().replace(/:/g, "");
|
|
2201
|
+
const controlId = id ?? `text-input-with-label-${generatedId}`;
|
|
2202
|
+
const labelId = `${controlId}-label`;
|
|
2203
|
+
return /* @__PURE__ */ jsxs(Box14, { ...containerProps, sx: { display: "grid", gridTemplateColumns: { sm: "minmax(8rem, 1fr) 2fr" }, gap: 1, alignItems: "center", ...containerProps?.sx }, children: [
|
|
2204
|
+
/* @__PURE__ */ jsx(Typography20, { id: labelId, component: "label", htmlFor: controlId, variant: "body2", fontWeight: 700, children: label }),
|
|
2205
|
+
/* @__PURE__ */ jsx(
|
|
2206
|
+
SharedTextField,
|
|
2207
|
+
{
|
|
2208
|
+
id: controlId,
|
|
2209
|
+
...props,
|
|
2210
|
+
inputProps: { "aria-labelledby": labelId, ...props.inputProps }
|
|
2211
|
+
}
|
|
2212
|
+
)
|
|
2213
|
+
] });
|
|
2214
|
+
}
|
|
2215
|
+
var TextInput = SharedTextField;
|
|
2216
|
+
function MandatoryIndicatorWithText({ children }) {
|
|
2217
|
+
return /* @__PURE__ */ jsxs(Typography20, { component: "span", children: [
|
|
2218
|
+
children,
|
|
2219
|
+
/* @__PURE__ */ jsx(Typography20, { component: "span", color: "error.main", "aria-label": "required", children: " *" })
|
|
2220
|
+
] });
|
|
2221
|
+
}
|
|
2222
|
+
function RequestModalGridItem(props) {
|
|
2223
|
+
return /* @__PURE__ */ jsx(Box14, { ...props, sx: { px: { xs: 2, md: 6 }, py: 1, ...props.sx } });
|
|
2224
|
+
}
|
|
2225
|
+
function TextInputWithLabelIcon({ helperTitle, icon, label, InputProps, ...props }) {
|
|
2226
|
+
return /* @__PURE__ */ jsx(SharedTextField, { label, InputProps: { startAdornment: icon, endAdornment: helperTitle ? /* @__PURE__ */ jsx(InfoTooltip, { title: helperTitle }) : void 0, ...InputProps }, ...props });
|
|
2227
|
+
}
|
|
2228
|
+
function CurrencyInputWithLabelIcon({ helperTitle, icon, label, InputProps, ...props }) {
|
|
2229
|
+
return /* @__PURE__ */ jsx(CurrencyInput, { label, InputProps: { startAdornment: icon, endAdornment: helperTitle ? /* @__PURE__ */ jsx(InfoTooltip, { title: helperTitle }) : void 0, ...InputProps }, ...props });
|
|
2230
|
+
}
|
|
2231
|
+
function HeaderToggles({ showInfo, setShowInfo, showFormula = false, setShowFormula }) {
|
|
2232
|
+
return /* @__PURE__ */ jsxs(Stack6, { direction: "row", justifyContent: "flex-end", children: [
|
|
2233
|
+
/* @__PURE__ */ jsx(
|
|
2234
|
+
FormControlLabel2,
|
|
2235
|
+
{
|
|
2236
|
+
control: /* @__PURE__ */ jsx(Checkbox, { size: "small", checked: showInfo, onChange: (_, checked) => setShowInfo(checked) }),
|
|
2237
|
+
label: /* @__PURE__ */ jsxs(Stack6, { component: "span", direction: "row", spacing: 0.5, alignItems: "center", children: [
|
|
2238
|
+
"Show information",
|
|
2239
|
+
/* @__PURE__ */ jsx(LightTooltip, { title: "Show additional information", children: /* @__PURE__ */ jsx(InfoOutlined, { color: "primary", fontSize: "small" }) })
|
|
2240
|
+
] })
|
|
2241
|
+
}
|
|
2242
|
+
),
|
|
2243
|
+
setShowFormula ? /* @__PURE__ */ jsx(
|
|
2244
|
+
FormControlLabel2,
|
|
2245
|
+
{
|
|
2246
|
+
control: /* @__PURE__ */ jsx(Checkbox, { size: "small", checked: showFormula, onChange: (_, checked) => setShowFormula(checked) }),
|
|
2247
|
+
label: /* @__PURE__ */ jsxs(Stack6, { component: "span", direction: "row", spacing: 0.5, alignItems: "center", children: [
|
|
2248
|
+
"Show formulas",
|
|
2249
|
+
/* @__PURE__ */ jsx(LightTooltip, { title: "Show formula details", children: /* @__PURE__ */ jsx(default89, { color: "primary", fontSize: "small" }) })
|
|
2250
|
+
] })
|
|
2251
|
+
}
|
|
2252
|
+
) : null
|
|
2253
|
+
] });
|
|
2254
|
+
}
|
|
2255
|
+
function ChoiceGroupLabel({ label, helperLabel, helperInfo, required }) {
|
|
2256
|
+
return /* @__PURE__ */ jsxs(Box14, { sx: { display: "flex", alignItems: "center", gap: 0.5, mb: 1 }, children: [
|
|
2257
|
+
/* @__PURE__ */ jsxs(Typography20, { component: "span", fontWeight: 600, children: [
|
|
2258
|
+
label,
|
|
2259
|
+
required ? /* @__PURE__ */ jsx(Typography20, { component: "span", color: "error.main", children: " *" }) : null
|
|
2260
|
+
] }),
|
|
2261
|
+
helperInfo || helperLabel ? /* @__PURE__ */ jsx(InfoTooltip, { title: helperInfo ?? `Help selecting ${helperLabel}` }) : null
|
|
2262
|
+
] });
|
|
2263
|
+
}
|
|
2264
|
+
function OptionSelectorWithLabel({ label, helperLabel, helperInfo, options = [], value, onChange, disabled = false, isMandatory, loading = false }) {
|
|
2265
|
+
return /* @__PURE__ */ jsxs(Box14, { component: "fieldset", sx: { border: 0, m: 0, p: 1.5 }, disabled, children: [
|
|
2266
|
+
/* @__PURE__ */ jsx(ChoiceGroupLabel, { label, helperLabel, helperInfo, required: isMandatory }),
|
|
2267
|
+
loading ? /* @__PURE__ */ jsx(Skeleton, { variant: "rectangular", height: 40 }) : /* @__PURE__ */ jsx(ToggleButtonGroup, { exclusive: true, value: value ?? null, onChange: (_, next) => {
|
|
2268
|
+
if (next != null) onChange(next);
|
|
2269
|
+
}, "aria-label": typeof label === "string" ? label : "Options", sx: { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(9rem, 1fr))", gap: 1 }, children: options.map((option) => /* @__PURE__ */ jsx(ToggleButton, { value: option.id, disabled: disabled || option.disabled || option.isAdjusting === "Y", children: option.value }, String(option.id))) })
|
|
2270
|
+
] });
|
|
2271
|
+
}
|
|
2272
|
+
function OptionMultiSelectorWithLabel({ label, helperLabel, helperInfo, options = [], value = [], onChange, disabled = false, isMandatory, loading = false }) {
|
|
2273
|
+
return /* @__PURE__ */ jsxs(Box14, { component: "fieldset", sx: { border: 0, m: 0, p: 1.5 }, disabled, children: [
|
|
2274
|
+
/* @__PURE__ */ jsx(ChoiceGroupLabel, { label, helperLabel, helperInfo, required: isMandatory }),
|
|
2275
|
+
loading ? /* @__PURE__ */ jsx(Skeleton, { variant: "rectangular", height: 40 }) : /* @__PURE__ */ jsx(ToggleButtonGroup, { value: [...value], onChange: (_, next) => onChange(next), "aria-label": typeof label === "string" ? label : "Options", sx: { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(9rem, 1fr))", gap: 1 }, children: options.map((option) => /* @__PURE__ */ jsx(ToggleButton, { value: option.id, disabled: disabled || option.disabled, children: option.value }, String(option.id))) })
|
|
2276
|
+
] });
|
|
2277
|
+
}
|
|
2278
|
+
function StatusIndicator({
|
|
2279
|
+
label,
|
|
2280
|
+
tone = "default",
|
|
2281
|
+
...props
|
|
2282
|
+
}) {
|
|
2283
|
+
return /* @__PURE__ */ jsx(Chip, { size: "small", label, color: tone, ...props });
|
|
2284
|
+
}
|
|
2285
|
+
var StatusIcon = StatusIndicator;
|
|
2286
|
+
var BudgetStatusIcon = StatusIndicator;
|
|
2287
|
+
function EmptyState({
|
|
2288
|
+
title,
|
|
2289
|
+
description,
|
|
2290
|
+
icon,
|
|
2291
|
+
action,
|
|
2292
|
+
...props
|
|
2293
|
+
}) {
|
|
2294
|
+
return /* @__PURE__ */ jsxs(Box14, { role: "status", textAlign: "center", p: 4, ...props, children: [
|
|
2295
|
+
icon ? /* @__PURE__ */ jsx(Box14, { "aria-hidden": "true", children: icon }) : null,
|
|
2296
|
+
/* @__PURE__ */ jsx(Typography20, { component: "h2", variant: "h6", children: title }),
|
|
2297
|
+
description ? /* @__PURE__ */ jsx(Typography20, { color: "text.secondary", children: description }) : null,
|
|
2298
|
+
action ? /* @__PURE__ */ jsx(Box14, { mt: 2, children: action }) : null
|
|
2299
|
+
] });
|
|
2300
|
+
}
|
|
2301
|
+
function ErrorState({ announce = true, ...props }) {
|
|
2302
|
+
return /* @__PURE__ */ jsx(EmptyState, { role: announce ? "alert" : "status", ...props });
|
|
2303
|
+
}
|
|
2304
|
+
function AccessError({ error, errorType, title = "Unable to load this content" }) {
|
|
2305
|
+
return /* @__PURE__ */ jsx(Paper, { role: "alert", variant: "outlined", sx: { maxWidth: 560, mx: "auto", my: 4, p: 3 }, children: /* @__PURE__ */ jsxs(Stack6, { spacing: 1.5, alignItems: "center", textAlign: "center", children: [
|
|
2306
|
+
/* @__PURE__ */ jsx(ErrorOutlineIcon, { color: "error", fontSize: "large", "aria-hidden": "true" }),
|
|
2307
|
+
/* @__PURE__ */ jsx(Typography20, { component: "h1", variant: "h5", children: title }),
|
|
2308
|
+
errorType ? /* @__PURE__ */ jsx(Typography20, { variant: "overline", children: errorType }) : null,
|
|
2309
|
+
error ? /* @__PURE__ */ jsx(Typography20, { children: error }) : null
|
|
2310
|
+
] }) });
|
|
2311
|
+
}
|
|
2312
|
+
function AccessLoader({ title = "Please wait\u2026", message = "Getting data ready." }) {
|
|
2313
|
+
return /* @__PURE__ */ jsxs(Stack6, { role: "status", spacing: 1, alignItems: "center", justifyContent: "center", sx: { minHeight: 240 }, children: [
|
|
2314
|
+
/* @__PURE__ */ jsx(Spinner, { centered: false, label: "Loading" }),
|
|
2315
|
+
/* @__PURE__ */ jsx(Typography20, { component: "h2", variant: "h6", children: title }),
|
|
2316
|
+
/* @__PURE__ */ jsx(Typography20, { color: "text.secondary", children: message })
|
|
2317
|
+
] });
|
|
2318
|
+
}
|
|
2319
|
+
function ErrorPage({
|
|
2320
|
+
code,
|
|
2321
|
+
title,
|
|
2322
|
+
message,
|
|
2323
|
+
onBack,
|
|
2324
|
+
onHome,
|
|
2325
|
+
backLabel = "Go back",
|
|
2326
|
+
homeLabel = "Return home",
|
|
2327
|
+
footer
|
|
2328
|
+
}) {
|
|
2329
|
+
return /* @__PURE__ */ jsxs(Stack6, { component: "main", alignItems: "center", justifyContent: "center", spacing: 2, sx: { minHeight: "60vh", p: 2 }, children: [
|
|
2330
|
+
/* @__PURE__ */ jsx(Paper, { variant: "outlined", sx: { width: "100%", maxWidth: 480, p: 4, textAlign: "center", borderTop: 6, borderTopColor: "primary.main" }, children: /* @__PURE__ */ jsxs(Stack6, { spacing: 2, alignItems: "center", children: [
|
|
2331
|
+
/* @__PURE__ */ jsx(Typography20, { "aria-hidden": "true", variant: "h2", color: "primary.main", fontWeight: 700, children: code }),
|
|
2332
|
+
/* @__PURE__ */ jsx(Typography20, { component: "h1", variant: "h5", children: title }),
|
|
2333
|
+
/* @__PURE__ */ jsx(Typography20, { color: "text.secondary", children: message }),
|
|
2334
|
+
onBack || onHome ? /* @__PURE__ */ jsxs(Stack6, { direction: { xs: "column", sm: "row" }, spacing: 1, children: [
|
|
2335
|
+
onBack ? /* @__PURE__ */ jsx(SharedButton, { variant: "outlined", onClick: onBack, children: backLabel }) : null,
|
|
2336
|
+
onHome ? /* @__PURE__ */ jsx(SharedButton, { onClick: onHome, children: homeLabel }) : null
|
|
2337
|
+
] }) : null
|
|
2338
|
+
] }) }),
|
|
2339
|
+
footer
|
|
2340
|
+
] });
|
|
2341
|
+
}
|
|
2342
|
+
function PageNotFound(props) {
|
|
2343
|
+
return /* @__PURE__ */ jsx(ErrorPage, { code: 404, title: "Page not found", message: "The requested page is unavailable.", ...props });
|
|
2344
|
+
}
|
|
2345
|
+
function MenuNotFoundPage(props) {
|
|
2346
|
+
return /* @__PURE__ */ jsx(ErrorPage, { code: 404, title: "Menu not found", message: "The requested menu is unavailable.", ...props });
|
|
2347
|
+
}
|
|
2348
|
+
function ForbiddenPage(props) {
|
|
2349
|
+
return /* @__PURE__ */ jsx(ErrorPage, { code: 403, title: "Access forbidden", message: "You do not have permission to access this resource.", ...props });
|
|
2350
|
+
}
|
|
2351
|
+
function UnauthorizedPage(props) {
|
|
2352
|
+
return /* @__PURE__ */ jsx(ErrorPage, { code: 401, title: "Authentication required", message: "Sign in to access this resource.", ...props });
|
|
2353
|
+
}
|
|
2354
|
+
function ServerErrorPage(props) {
|
|
2355
|
+
return /* @__PURE__ */ jsx(ErrorPage, { code: 500, title: "Something went wrong", message: "The server could not complete the request.", ...props });
|
|
2356
|
+
}
|
|
2357
|
+
var StyledTabs = styled((props) => /* @__PURE__ */ jsx(Tabs, { ...props }))({
|
|
2358
|
+
minHeight: 40,
|
|
2359
|
+
"& .MuiTabs-indicator": { height: 3 }
|
|
2360
|
+
});
|
|
2361
|
+
var StyledTab = styled((props) => /* @__PURE__ */ jsx(Tab, { ...props }))({
|
|
2362
|
+
minHeight: 40,
|
|
2363
|
+
textTransform: "none"
|
|
2364
|
+
});
|
|
2365
|
+
var WhiteStyledTab = styled(StyledTab)(({ theme }) => ({
|
|
2366
|
+
color: theme.palette.common.white,
|
|
2367
|
+
"&.Mui-selected": { color: theme.palette.common.white }
|
|
2368
|
+
}));
|
|
2369
|
+
function TabPanel({
|
|
2370
|
+
value,
|
|
2371
|
+
index,
|
|
2372
|
+
children,
|
|
2373
|
+
keepMounted,
|
|
2374
|
+
id,
|
|
2375
|
+
"aria-labelledby": ariaLabelledBy,
|
|
2376
|
+
tabIndex = 0
|
|
2377
|
+
}) {
|
|
2378
|
+
const active = value === index;
|
|
2379
|
+
if (!active && !keepMounted) return null;
|
|
2380
|
+
return /* @__PURE__ */ jsx(
|
|
2381
|
+
Box14,
|
|
2382
|
+
{
|
|
2383
|
+
role: "tabpanel",
|
|
2384
|
+
hidden: !active,
|
|
2385
|
+
id,
|
|
2386
|
+
"aria-labelledby": ariaLabelledBy,
|
|
2387
|
+
tabIndex: active ? tabIndex : void 0,
|
|
2388
|
+
sx: { p: 2 },
|
|
2389
|
+
children
|
|
2390
|
+
}
|
|
2391
|
+
);
|
|
2392
|
+
}
|
|
2393
|
+
function SharedToggleButton(props) {
|
|
2394
|
+
return /* @__PURE__ */ jsx(ToggleButton, { size: "small", ...props });
|
|
2395
|
+
}
|
|
2396
|
+
function CustomSwitch(props) {
|
|
2397
|
+
return /* @__PURE__ */ jsx(Switch, { size: "small", ...props });
|
|
2398
|
+
}
|
|
2399
|
+
var StyledSwitch = CustomSwitch;
|
|
2400
|
+
function tabA11yProps(baseId, index) {
|
|
2401
|
+
return {
|
|
2402
|
+
id: `${baseId}-tab-${index}`,
|
|
2403
|
+
"aria-controls": `${baseId}-panel-${index}`
|
|
2404
|
+
};
|
|
2405
|
+
}
|
|
2406
|
+
function tabPanelA11yProps(baseId, index) {
|
|
2407
|
+
return {
|
|
2408
|
+
id: `${baseId}-panel-${index}`,
|
|
2409
|
+
"aria-labelledby": `${baseId}-tab-${index}`
|
|
2410
|
+
};
|
|
2411
|
+
}
|
|
2412
|
+
function ConfirmDialog({
|
|
2413
|
+
title,
|
|
2414
|
+
message,
|
|
2415
|
+
confirmLabel = "Confirm",
|
|
2416
|
+
cancelLabel = "Cancel",
|
|
2417
|
+
onConfirm,
|
|
2418
|
+
onClose,
|
|
2419
|
+
confirmDisabled,
|
|
2420
|
+
children,
|
|
2421
|
+
...props
|
|
2422
|
+
}) {
|
|
2423
|
+
return /* @__PURE__ */ jsxs(Dialog, { onClose, ...props, children: [
|
|
2424
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: title }),
|
|
2425
|
+
/* @__PURE__ */ jsxs(DialogContent, { children: [
|
|
2426
|
+
message ? /* @__PURE__ */ jsx(DialogContentText, { children: message }) : null,
|
|
2427
|
+
children
|
|
2428
|
+
] }),
|
|
2429
|
+
/* @__PURE__ */ jsxs(DialogActions, { children: [
|
|
2430
|
+
/* @__PURE__ */ jsx(SharedButton, { onClick: onClose, children: cancelLabel }),
|
|
2431
|
+
/* @__PURE__ */ jsx(
|
|
2432
|
+
SharedButton,
|
|
2433
|
+
{
|
|
2434
|
+
variant: "contained",
|
|
2435
|
+
onClick: onConfirm,
|
|
2436
|
+
disabled: confirmDisabled,
|
|
2437
|
+
children: confirmLabel
|
|
2438
|
+
}
|
|
2439
|
+
)
|
|
2440
|
+
] })
|
|
2441
|
+
] });
|
|
2442
|
+
}
|
|
2443
|
+
function Modal({
|
|
2444
|
+
title,
|
|
2445
|
+
onClose,
|
|
2446
|
+
closeLabel = "Close dialog",
|
|
2447
|
+
closeOnBackdrop = true,
|
|
2448
|
+
children,
|
|
2449
|
+
...props
|
|
2450
|
+
}) {
|
|
2451
|
+
const generatedId = useId();
|
|
2452
|
+
const titleId = `shared-modal-title-${generatedId.replace(/:/g, "")}`;
|
|
2453
|
+
return /* @__PURE__ */ jsxs(
|
|
2454
|
+
Dialog,
|
|
2455
|
+
{
|
|
2456
|
+
"aria-labelledby": titleId,
|
|
2457
|
+
onClose: (_, reason) => {
|
|
2458
|
+
if (reason !== "backdropClick" || closeOnBackdrop) onClose();
|
|
2459
|
+
},
|
|
2460
|
+
...props,
|
|
2461
|
+
children: [
|
|
2462
|
+
/* @__PURE__ */ jsx(DialogTitle, { id: titleId, component: "div", children: /* @__PURE__ */ jsxs(Stack6, { direction: "row", alignItems: "center", justifyContent: "space-between", children: [
|
|
2463
|
+
/* @__PURE__ */ jsx("span", { children: title }),
|
|
2464
|
+
/* @__PURE__ */ jsx(SharedIconButton, { "aria-label": closeLabel, onClick: onClose, size: "small", children: /* @__PURE__ */ jsx(default43, {}) })
|
|
2465
|
+
] }) }),
|
|
2466
|
+
/* @__PURE__ */ jsx(DialogContent, { children })
|
|
2467
|
+
]
|
|
2468
|
+
}
|
|
2469
|
+
);
|
|
2470
|
+
}
|
|
2471
|
+
var ContentModal = Modal;
|
|
2472
|
+
var PreviewContentModal = Modal;
|
|
2473
|
+
var statusDefaults = {
|
|
2474
|
+
processing: { label: "Processing", color: "primary.main", icon: /* @__PURE__ */ jsx(CircularProgress, {}) },
|
|
2475
|
+
success: { label: "Success", color: "success.main", icon: /* @__PURE__ */ jsx(default42, {}) },
|
|
2476
|
+
error: { label: "Error", color: "error.main", icon: /* @__PURE__ */ jsx(ErrorOutlineIcon, {}) },
|
|
2477
|
+
warning: { label: "Warning", color: "warning.main", icon: /* @__PURE__ */ jsx(WarningAmberIcon, {}) }
|
|
2478
|
+
};
|
|
2479
|
+
function StatusDialog({
|
|
2480
|
+
severity,
|
|
2481
|
+
label,
|
|
2482
|
+
title,
|
|
2483
|
+
message,
|
|
2484
|
+
content,
|
|
2485
|
+
icon,
|
|
2486
|
+
htmlIcon,
|
|
2487
|
+
buttonText,
|
|
2488
|
+
onClose,
|
|
2489
|
+
onCancel,
|
|
2490
|
+
open = true,
|
|
2491
|
+
...props
|
|
2492
|
+
}) {
|
|
2493
|
+
const generatedId = useId().replace(/:/g, "");
|
|
2494
|
+
const titleId = `status-dialog-title-${generatedId}`;
|
|
2495
|
+
const descriptionId = `status-dialog-description-${generatedId}`;
|
|
2496
|
+
const defaults = statusDefaults[severity];
|
|
2497
|
+
const canDismiss = severity !== "processing" && Boolean(onClose || onCancel);
|
|
2498
|
+
return /* @__PURE__ */ jsxs(
|
|
2499
|
+
Dialog,
|
|
2500
|
+
{
|
|
2501
|
+
open,
|
|
2502
|
+
"aria-labelledby": titleId,
|
|
2503
|
+
"aria-describedby": message || title ? descriptionId : void 0,
|
|
2504
|
+
onClose: (_, reason) => {
|
|
2505
|
+
if (canDismiss && reason !== "backdropClick") (onCancel ?? onClose)?.();
|
|
2506
|
+
},
|
|
2507
|
+
disableEscapeKeyDown: !canDismiss,
|
|
2508
|
+
...props,
|
|
2509
|
+
children: [
|
|
2510
|
+
/* @__PURE__ */ jsx(DialogContent, { sx: { minWidth: { sm: 360 }, textAlign: "center", pt: 4 }, children: /* @__PURE__ */ jsxs(Stack6, { spacing: 2, alignItems: "center", children: [
|
|
2511
|
+
htmlIcon ?? (icon ? /* @__PURE__ */ jsx(Box14, { component: "img", src: icon, alt: "", sx: { maxWidth: 192, maxHeight: 128 } }) : /* @__PURE__ */ jsx(Box14, { "aria-hidden": "true", sx: { color: defaults.color, display: "grid", placeItems: "center", "& svg": { fontSize: 56 } }, children: defaults.icon })),
|
|
2512
|
+
/* @__PURE__ */ jsx(Typography20, { id: titleId, component: "h2", variant: "h6", children: label ?? defaults.label }),
|
|
2513
|
+
title || message ? /* @__PURE__ */ jsxs(DialogContentText, { id: descriptionId, component: "div", children: [
|
|
2514
|
+
title ? /* @__PURE__ */ jsx(Typography20, { component: "p", fontWeight: 600, children: title }) : null,
|
|
2515
|
+
message ? /* @__PURE__ */ jsx(Typography20, { component: "p", variant: "body2", children: message }) : null
|
|
2516
|
+
] }) : null,
|
|
2517
|
+
content
|
|
2518
|
+
] }) }),
|
|
2519
|
+
severity !== "processing" && onClose ? /* @__PURE__ */ jsx(DialogActions, { sx: { justifyContent: "center", pb: 3 }, children: /* @__PURE__ */ jsx(SharedButton, { color: severity === "error" ? "error" : severity === "warning" ? "warning" : "success", onClick: onClose, children: buttonText ?? (severity === "warning" ? "Close" : "Continue") }) }) : null
|
|
2520
|
+
]
|
|
2521
|
+
}
|
|
2522
|
+
);
|
|
2523
|
+
}
|
|
2524
|
+
function ProcessingModal(props) {
|
|
2525
|
+
return /* @__PURE__ */ jsx(StatusDialog, { severity: "processing", ...props });
|
|
2526
|
+
}
|
|
2527
|
+
function SuccessModal(props) {
|
|
2528
|
+
return /* @__PURE__ */ jsx(StatusDialog, { severity: "success", ...props });
|
|
2529
|
+
}
|
|
2530
|
+
function ErrorModal(props) {
|
|
2531
|
+
return /* @__PURE__ */ jsx(StatusDialog, { severity: "error", ...props });
|
|
2532
|
+
}
|
|
2533
|
+
function WarningModal(props) {
|
|
2534
|
+
return /* @__PURE__ */ jsx(StatusDialog, { severity: "warning", ...props });
|
|
2535
|
+
}
|
|
2536
|
+
var CustomTransition = forwardRef(function CustomTransition2(props, ref) {
|
|
2537
|
+
return /* @__PURE__ */ jsx(Slide, { direction: "up", ref, ...props });
|
|
2538
|
+
});
|
|
2539
|
+
function DialogAction(props) {
|
|
2540
|
+
return /* @__PURE__ */ jsx(
|
|
2541
|
+
DialogActions,
|
|
2542
|
+
{
|
|
2543
|
+
...props,
|
|
2544
|
+
sx: {
|
|
2545
|
+
position: "relative",
|
|
2546
|
+
boxShadow: (theme) => `0 -6px 12px -10px ${theme.palette.text.primary}`,
|
|
2547
|
+
...props.sx
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
);
|
|
2551
|
+
}
|
|
2552
|
+
var Transition = CustomTransition;
|
|
2553
|
+
var StyledDialogActions = DialogAction;
|
|
2554
|
+
function Page({
|
|
2555
|
+
title,
|
|
2556
|
+
subtitle,
|
|
2557
|
+
actions,
|
|
2558
|
+
maxWidth = false,
|
|
2559
|
+
children,
|
|
2560
|
+
...props
|
|
2561
|
+
}) {
|
|
2562
|
+
return /* @__PURE__ */ jsx(Box14, { component: "main", ...props, children: /* @__PURE__ */ jsxs(Container, { maxWidth, children: [
|
|
2563
|
+
title || subtitle || actions ? /* @__PURE__ */ jsxs(
|
|
2564
|
+
Stack6,
|
|
2565
|
+
{
|
|
2566
|
+
direction: { xs: "column", sm: "row" },
|
|
2567
|
+
justifyContent: "space-between",
|
|
2568
|
+
alignItems: { xs: "stretch", sm: "center" },
|
|
2569
|
+
gap: 2,
|
|
2570
|
+
mb: 2,
|
|
2571
|
+
children: [
|
|
2572
|
+
/* @__PURE__ */ jsxs(Box14, { children: [
|
|
2573
|
+
title ? /* @__PURE__ */ jsx(Typography20, { component: "h1", variant: "h5", children: title }) : null,
|
|
2574
|
+
subtitle ? /* @__PURE__ */ jsx(Typography20, { color: "text.secondary", children: subtitle }) : null
|
|
2575
|
+
] }),
|
|
2576
|
+
actions
|
|
2577
|
+
]
|
|
2578
|
+
}
|
|
2579
|
+
) : null,
|
|
2580
|
+
children
|
|
2581
|
+
] }) });
|
|
2582
|
+
}
|
|
2583
|
+
function PanelWrapper({ label, children, ...props }) {
|
|
2584
|
+
return /* @__PURE__ */ jsx(Box14, { component: "section", "aria-label": label, ...props, children });
|
|
2585
|
+
}
|
|
2586
|
+
var StyledCard = styled(Card2)(({ theme }) => ({
|
|
2587
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
2588
|
+
borderRadius: 2,
|
|
2589
|
+
boxShadow: theme.shadows[1],
|
|
2590
|
+
transition: theme.transitions.create("box-shadow"),
|
|
2591
|
+
"&:hover": { boxShadow: theme.shadows[3] }
|
|
2592
|
+
}));
|
|
2593
|
+
function StyledKpiCard({
|
|
2594
|
+
title,
|
|
2595
|
+
description,
|
|
2596
|
+
count = 0,
|
|
2597
|
+
onInfo,
|
|
2598
|
+
onClick,
|
|
2599
|
+
onRedirect,
|
|
2600
|
+
infoLabel = "More information",
|
|
2601
|
+
redirectLabel = "Open details",
|
|
2602
|
+
...props
|
|
2603
|
+
}) {
|
|
2604
|
+
const infoAction = onInfo ?? onClick;
|
|
2605
|
+
return /* @__PURE__ */ jsx(StyledCard, { ...props, children: /* @__PURE__ */ jsx(CardContent2, { children: /* @__PURE__ */ jsxs(Stack6, { spacing: 2, children: [
|
|
2606
|
+
/* @__PURE__ */ jsxs(Stack6, { direction: "row", alignItems: "center", justifyContent: "space-between", children: [
|
|
2607
|
+
/* @__PURE__ */ jsx(Typography20, { component: "h2", variant: "h6", children: title }),
|
|
2608
|
+
infoAction ? /* @__PURE__ */ jsx(SharedIconButton, { "aria-label": infoLabel, onClick: infoAction, children: /* @__PURE__ */ jsx(InfoOutlined, {}) }) : null
|
|
2609
|
+
] }),
|
|
2610
|
+
description ? /* @__PURE__ */ jsx(Typography20, { color: "text.secondary", children: description }) : null,
|
|
2611
|
+
/* @__PURE__ */ jsxs(Stack6, { direction: "row", alignItems: "center", justifyContent: "space-between", children: [
|
|
2612
|
+
/* @__PURE__ */ jsx(Typography20, { component: "p", variant: "h3", children: count }),
|
|
2613
|
+
onRedirect ? /* @__PURE__ */ jsx(SharedIconButton, { "aria-label": redirectLabel, onClick: onRedirect, children: /* @__PURE__ */ jsx(default126, {}) }) : null
|
|
2614
|
+
] })
|
|
2615
|
+
] }) }) });
|
|
2616
|
+
}
|
|
2617
|
+
var CustomAccordion = styled((props) => /* @__PURE__ */ jsx(Accordion, { disableGutters: true, elevation: 0, ...props }))(({ theme }) => ({
|
|
2618
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
2619
|
+
"&:before": { display: "none" }
|
|
2620
|
+
}));
|
|
2621
|
+
var CustomAccordionSummary = styled(
|
|
2622
|
+
(props) => /* @__PURE__ */ jsx(
|
|
2623
|
+
AccordionSummary,
|
|
2624
|
+
{
|
|
2625
|
+
expandIcon: /* @__PURE__ */ jsx(default16, { fontSize: "small" }),
|
|
2626
|
+
...props
|
|
2627
|
+
}
|
|
2628
|
+
)
|
|
2629
|
+
)(({ theme }) => ({
|
|
2630
|
+
flexDirection: "row-reverse",
|
|
2631
|
+
"& .MuiAccordionSummary-expandIconWrapper.Mui-expanded": {
|
|
2632
|
+
transform: "rotate(90deg)"
|
|
2633
|
+
},
|
|
2634
|
+
"& .MuiAccordionSummary-content": { marginLeft: theme.spacing(1) }
|
|
2635
|
+
}));
|
|
2636
|
+
var CustomAccordionDetails = styled(AccordionDetails)(({ theme }) => ({
|
|
2637
|
+
padding: theme.spacing(2),
|
|
2638
|
+
borderTop: `1px solid ${theme.palette.divider}`
|
|
2639
|
+
}));
|
|
2640
|
+
function Pipe(props) {
|
|
2641
|
+
return /* @__PURE__ */ jsx(Divider, { orientation: "vertical", flexItem: true, ...props });
|
|
2642
|
+
}
|
|
2643
|
+
function ExecutionKpiCard({ title, body, primaryAction, footer }) {
|
|
2644
|
+
return /* @__PURE__ */ jsx(Card2, { variant: "outlined", children: /* @__PURE__ */ jsxs(CardContent2, { children: [
|
|
2645
|
+
/* @__PURE__ */ jsxs(Stack6, { direction: "row", justifyContent: "space-between", alignItems: "center", children: [
|
|
2646
|
+
/* @__PURE__ */ jsx(Typography20, { component: "h2", variant: "h6", children: title }),
|
|
2647
|
+
primaryAction ? /* @__PURE__ */ jsx(SharedIconButton, { "aria-label": "Open KPI details", onClick: primaryAction, children: /* @__PURE__ */ jsx(CallMadeIcon, {}) }) : null
|
|
2648
|
+
] }),
|
|
2649
|
+
/* @__PURE__ */ jsx(Typography20, { component: "div", variant: "h4", children: body }),
|
|
2650
|
+
footer
|
|
2651
|
+
] }) });
|
|
2652
|
+
}
|
|
2653
|
+
function ReportRunKPICard({ title, body, primaryAction, secondaryAction }) {
|
|
2654
|
+
return /* @__PURE__ */ jsxs(Card2, { variant: "outlined", children: [
|
|
2655
|
+
/* @__PURE__ */ jsx(CardContent2, { children: /* @__PURE__ */ jsx(Typography20, { component: "h2", variant: "h6", children: title }) }),
|
|
2656
|
+
/* @__PURE__ */ jsxs(CardActions, { children: [
|
|
2657
|
+
/* @__PURE__ */ jsx(SharedButton, { onClick: primaryAction, children: body }),
|
|
2658
|
+
secondaryAction ? /* @__PURE__ */ jsx(SharedIconButton, { "aria-label": "Open KPI details", onClick: secondaryAction, children: /* @__PURE__ */ jsx(CallMadeIcon, {}) }) : null
|
|
2659
|
+
] })
|
|
2660
|
+
] });
|
|
2661
|
+
}
|
|
2662
|
+
function BackButton({
|
|
2663
|
+
onClick,
|
|
2664
|
+
label = "Back",
|
|
2665
|
+
disabled
|
|
2666
|
+
}) {
|
|
2667
|
+
return /* @__PURE__ */ jsx(SharedButton, { onClick, disabled, startIcon: /* @__PURE__ */ jsx(default14, {}), children: label });
|
|
2668
|
+
}
|
|
2669
|
+
function BreadcrumbNavigation({
|
|
2670
|
+
items,
|
|
2671
|
+
label = "Breadcrumb"
|
|
2672
|
+
}) {
|
|
2673
|
+
return /* @__PURE__ */ jsx(Breadcrumbs, { component: "nav", "aria-label": label, children: items.map((item2, index) => {
|
|
2674
|
+
const current = index === items.length - 1;
|
|
2675
|
+
const itemKey = item2.id ?? item2.href ?? (typeof item2.label === "string" ? item2.label : index);
|
|
2676
|
+
return current ? /* @__PURE__ */ jsx(Typography20, { color: "text.primary", "aria-current": "page", children: item2.label }, itemKey) : /* @__PURE__ */ jsx(
|
|
2677
|
+
Link,
|
|
2678
|
+
{
|
|
2679
|
+
href: item2.href ?? "#",
|
|
2680
|
+
onClick: (event) => {
|
|
2681
|
+
if (item2.onClick) {
|
|
2682
|
+
event.preventDefault();
|
|
2683
|
+
item2.onClick();
|
|
2684
|
+
}
|
|
2685
|
+
},
|
|
2686
|
+
children: item2.label
|
|
2687
|
+
},
|
|
2688
|
+
itemKey
|
|
2689
|
+
);
|
|
2690
|
+
}) });
|
|
2691
|
+
}
|
|
2692
|
+
var BreadCrumbList = BreadcrumbNavigation;
|
|
2693
|
+
function MainSelector({ label, options = [], onSelect }) {
|
|
2694
|
+
const [anchor, setAnchor] = useState(null);
|
|
2695
|
+
const [selected, setSelected] = useState(null);
|
|
2696
|
+
const menuId = `main-selector-${useId().replace(/:/g, "")}`;
|
|
2697
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2698
|
+
/* @__PURE__ */ jsx(Button, { "aria-haspopup": "menu", "aria-expanded": Boolean(anchor), "aria-controls": anchor ? menuId : void 0, endIcon: /* @__PURE__ */ jsx(ArrowDropDownIcon, {}), onClick: (event) => setAnchor(event.currentTarget), children: selected?.label ?? label }),
|
|
2699
|
+
/* @__PURE__ */ jsx(Menu, { id: menuId, anchorEl: anchor, open: Boolean(anchor), onClose: () => setAnchor(null), children: options.map((option) => /* @__PURE__ */ jsx(MenuItem2, { disabled: option.disabled, onClick: () => {
|
|
2700
|
+
setSelected(option);
|
|
2701
|
+
setAnchor(null);
|
|
2702
|
+
onSelect(option);
|
|
2703
|
+
}, children: option.label }, `${option.label}-${String(option.value)}`)) })
|
|
2704
|
+
] });
|
|
2705
|
+
}
|
|
2706
|
+
function TeslaStyleScrollIndicator({ scrollRef, onUpClick, onDownClick, currentPage = 1, totalPages = 1, label = "Scroll position" }) {
|
|
2707
|
+
const [progress, setProgress] = useState(0);
|
|
2708
|
+
useEffect(() => {
|
|
2709
|
+
const element = scrollRef.current;
|
|
2710
|
+
if (!element) return void 0;
|
|
2711
|
+
const update = () => {
|
|
2712
|
+
const max = element.scrollHeight - element.clientHeight;
|
|
2713
|
+
setProgress(max > 0 ? Math.round(element.scrollTop / max * 100) : 0);
|
|
2714
|
+
};
|
|
2715
|
+
update();
|
|
2716
|
+
element.addEventListener("scroll", update, { passive: true });
|
|
2717
|
+
return () => element.removeEventListener("scroll", update);
|
|
2718
|
+
}, [scrollRef]);
|
|
2719
|
+
const move = (next) => {
|
|
2720
|
+
const element = scrollRef.current;
|
|
2721
|
+
if (element) element.scrollTop = (element.scrollHeight - element.clientHeight) * next / 100;
|
|
2722
|
+
setProgress(next);
|
|
2723
|
+
};
|
|
2724
|
+
return /* @__PURE__ */ jsxs(Box14, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: 0.5 }, children: [
|
|
2725
|
+
/* @__PURE__ */ jsx(SharedIconButton, { "aria-label": "Scroll up", onClick: () => {
|
|
2726
|
+
onUpClick?.();
|
|
2727
|
+
move(Math.max(0, progress - 10));
|
|
2728
|
+
}, children: /* @__PURE__ */ jsx(KeyboardArrowUpIcon, {}) }),
|
|
2729
|
+
/* @__PURE__ */ jsx(Slider, { orientation: "vertical", value: progress, onChange: (_, value) => move(value), "aria-label": label, valueLabelDisplay: "auto", sx: { minHeight: 120 } }),
|
|
2730
|
+
/* @__PURE__ */ jsx(SharedIconButton, { "aria-label": "Scroll down", onClick: () => {
|
|
2731
|
+
onDownClick?.();
|
|
2732
|
+
move(Math.min(100, progress + 10));
|
|
2733
|
+
}, children: /* @__PURE__ */ jsx(KeyboardArrowDownIcon, {}) }),
|
|
2734
|
+
/* @__PURE__ */ jsxs(Box14, { component: "span", sx: { typography: "caption" }, children: [
|
|
2735
|
+
currentPage,
|
|
2736
|
+
"/",
|
|
2737
|
+
Math.max(totalPages, 1)
|
|
2738
|
+
] })
|
|
2739
|
+
] });
|
|
2740
|
+
}
|
|
2741
|
+
function TableWrapper({
|
|
2742
|
+
title,
|
|
2743
|
+
actions,
|
|
2744
|
+
maxHeight,
|
|
2745
|
+
children,
|
|
2746
|
+
...props
|
|
2747
|
+
}) {
|
|
2748
|
+
return /* @__PURE__ */ jsxs(Paper, { variant: "outlined", ...props, children: [
|
|
2749
|
+
title || actions ? /* @__PURE__ */ jsxs(Stack6, { direction: "row", justifyContent: "space-between", alignItems: "center", p: 2, children: [
|
|
2750
|
+
title ? /* @__PURE__ */ jsx(Typography20, { component: "h2", variant: "h6", children: title }) : null,
|
|
2751
|
+
actions
|
|
2752
|
+
] }) : null,
|
|
2753
|
+
/* @__PURE__ */ jsx(TableContainer, { sx: { maxHeight }, children })
|
|
2754
|
+
] });
|
|
2755
|
+
}
|
|
2756
|
+
var CustomGridTableWrapper = TableWrapper;
|
|
2757
|
+
function SearchableDataTable({
|
|
2758
|
+
searchLabel = "Search table",
|
|
2759
|
+
searchFields,
|
|
2760
|
+
getSearchText,
|
|
2761
|
+
rows,
|
|
2762
|
+
...props
|
|
2763
|
+
}) {
|
|
2764
|
+
const [query, setQuery] = useState("");
|
|
2765
|
+
const filteredRows = useMemo(() => {
|
|
2766
|
+
const normalized = query.trim().toLocaleLowerCase();
|
|
2767
|
+
if (!normalized) return rows;
|
|
2768
|
+
return rows.filter((row) => {
|
|
2769
|
+
const text = getSearchText ? getSearchText(row) : (searchFields ?? Object.keys(row)).map((field) => String(row[field] ?? "")).join(" ");
|
|
2770
|
+
return text.toLocaleLowerCase().includes(normalized);
|
|
2771
|
+
});
|
|
2772
|
+
}, [getSearchText, query, rows, searchFields]);
|
|
2773
|
+
return /* @__PURE__ */ jsxs(Stack6, { spacing: 1.5, children: [
|
|
2774
|
+
/* @__PURE__ */ jsx(
|
|
2775
|
+
SearchInput,
|
|
2776
|
+
{
|
|
2777
|
+
label: searchLabel,
|
|
2778
|
+
value: query,
|
|
2779
|
+
onChange: (event) => setQuery(event.target.value)
|
|
2780
|
+
}
|
|
2781
|
+
),
|
|
2782
|
+
/* @__PURE__ */ jsxs(Typography20, { component: "p", variant: "caption", "aria-live": "polite", children: [
|
|
2783
|
+
filteredRows.length,
|
|
2784
|
+
" ",
|
|
2785
|
+
filteredRows.length === 1 ? "result" : "results"
|
|
2786
|
+
] }),
|
|
2787
|
+
/* @__PURE__ */ jsx(DataTable, { rows: filteredRows, ...props })
|
|
2788
|
+
] });
|
|
2789
|
+
}
|
|
2790
|
+
function normalizeColumns(columns) {
|
|
2791
|
+
return columns.map((column) => ({
|
|
2792
|
+
field: column.field,
|
|
2793
|
+
header: column.header ?? column.title,
|
|
2794
|
+
...column.align !== void 0 ? { align: column.align } : {},
|
|
2795
|
+
...column.sorting !== void 0 ? { sortable: column.sorting } : {},
|
|
2796
|
+
...column.hidden !== void 0 ? { hidden: column.hidden } : {},
|
|
2797
|
+
...column.width !== void 0 ? { width: column.width } : {},
|
|
2798
|
+
...column.minWidth !== void 0 ? { minWidth: column.minWidth } : {},
|
|
2799
|
+
...column.maxWidth !== void 0 ? { maxWidth: column.maxWidth } : {},
|
|
2800
|
+
...column.disablePadding !== void 0 ? { disablePadding: column.disablePadding } : {},
|
|
2801
|
+
...column.noWrapHeader !== void 0 ? { noWrapHeader: column.noWrapHeader } : {},
|
|
2802
|
+
...column.noWrapBody !== void 0 ? { noWrapBody: column.noWrapBody } : {},
|
|
2803
|
+
...column.compare ? { compare: column.compare } : {},
|
|
2804
|
+
...column.render ? { render: (_value, row) => column.render?.(row) } : {}
|
|
2805
|
+
}));
|
|
2806
|
+
}
|
|
2807
|
+
function CommonTable({
|
|
2808
|
+
data,
|
|
2809
|
+
columns,
|
|
2810
|
+
title,
|
|
2811
|
+
rowsInPage = 10,
|
|
2812
|
+
height,
|
|
2813
|
+
minHeight: _minHeight,
|
|
2814
|
+
skeletonColumns: _skeletonColumns,
|
|
2815
|
+
skeletonRows: _skeletonRows,
|
|
2816
|
+
maxHeight,
|
|
2817
|
+
...props
|
|
2818
|
+
}) {
|
|
2819
|
+
return /* @__PURE__ */ jsx(
|
|
2820
|
+
DataTable,
|
|
2821
|
+
{
|
|
2822
|
+
rows: data,
|
|
2823
|
+
columns: normalizeColumns(columns),
|
|
2824
|
+
caption: title,
|
|
2825
|
+
initialRowsPerPage: rowsInPage,
|
|
2826
|
+
...(maxHeight ?? height) !== void 0 ? { maxHeight: maxHeight ?? height } : {},
|
|
2827
|
+
...props
|
|
2828
|
+
}
|
|
2829
|
+
);
|
|
2830
|
+
}
|
|
2831
|
+
var CustomTable = CommonTable;
|
|
2832
|
+
var CustomStickyTable = CommonTable;
|
|
2833
|
+
function CommonSearchTable({
|
|
2834
|
+
data,
|
|
2835
|
+
columns,
|
|
2836
|
+
title,
|
|
2837
|
+
rowsInPage = 10,
|
|
2838
|
+
searchLabel,
|
|
2839
|
+
searchFields,
|
|
2840
|
+
getSearchText,
|
|
2841
|
+
height,
|
|
2842
|
+
minHeight: _minHeight,
|
|
2843
|
+
skeletonColumns: _skeletonColumns,
|
|
2844
|
+
skeletonRows: _skeletonRows,
|
|
2845
|
+
maxHeight,
|
|
2846
|
+
...props
|
|
2847
|
+
}) {
|
|
2848
|
+
return /* @__PURE__ */ jsx(
|
|
2849
|
+
SearchableDataTable,
|
|
2850
|
+
{
|
|
2851
|
+
rows: data,
|
|
2852
|
+
columns: normalizeColumns(columns),
|
|
2853
|
+
caption: title,
|
|
2854
|
+
initialRowsPerPage: rowsInPage,
|
|
2855
|
+
...searchLabel !== void 0 ? { searchLabel } : {},
|
|
2856
|
+
...searchFields !== void 0 ? { searchFields } : {},
|
|
2857
|
+
...getSearchText !== void 0 ? { getSearchText } : {},
|
|
2858
|
+
...(maxHeight ?? height) !== void 0 ? { maxHeight: maxHeight ?? height } : {},
|
|
2859
|
+
...props
|
|
2860
|
+
}
|
|
2861
|
+
);
|
|
2862
|
+
}
|
|
2863
|
+
function PaginationTable({
|
|
2864
|
+
totalRecords,
|
|
2865
|
+
currentPageNumber,
|
|
2866
|
+
setCurrentPageNumber,
|
|
2867
|
+
handlePageChange,
|
|
2868
|
+
handleChangeRows,
|
|
2869
|
+
rowsInPage = 10,
|
|
2870
|
+
...props
|
|
2871
|
+
}) {
|
|
2872
|
+
return /* @__PURE__ */ jsx(
|
|
2873
|
+
CommonTable,
|
|
2874
|
+
{
|
|
2875
|
+
...props,
|
|
2876
|
+
rowsInPage,
|
|
2877
|
+
pagination: {
|
|
2878
|
+
count: totalRecords,
|
|
2879
|
+
page: Math.max(0, currentPageNumber - 1),
|
|
2880
|
+
rowsPerPage: rowsInPage,
|
|
2881
|
+
onPageChange: (page) => {
|
|
2882
|
+
setCurrentPageNumber?.(page + 1);
|
|
2883
|
+
handlePageChange?.(void 0, page + 1);
|
|
2884
|
+
},
|
|
2885
|
+
onRowsPerPageChange: (next) => {
|
|
2886
|
+
setCurrentPageNumber?.(1);
|
|
2887
|
+
handleChangeRows?.(next);
|
|
2888
|
+
}
|
|
2889
|
+
}
|
|
2890
|
+
}
|
|
2891
|
+
);
|
|
2892
|
+
}
|
|
2893
|
+
function CommonSelectionTable({
|
|
2894
|
+
primaryColId,
|
|
2895
|
+
selected,
|
|
2896
|
+
setSelected,
|
|
2897
|
+
hideCheckBoxes,
|
|
2898
|
+
isRowSelectable,
|
|
2899
|
+
getSelectionLabel,
|
|
2900
|
+
...props
|
|
2901
|
+
}) {
|
|
2902
|
+
return /* @__PURE__ */ jsx(
|
|
2903
|
+
CommonTable,
|
|
2904
|
+
{
|
|
2905
|
+
...props,
|
|
2906
|
+
getRowKey: (row) => row[primaryColId],
|
|
2907
|
+
getRowAriaLabel: (row) => getSelectionLabel?.(row) ?? String(row[primaryColId]),
|
|
2908
|
+
...hideCheckBoxes ? {} : { selectedRowKeys: selected, onSelectedRowKeysChange: setSelected },
|
|
2909
|
+
...isRowSelectable ? { isRowSelectable } : {}
|
|
2910
|
+
}
|
|
2911
|
+
);
|
|
2912
|
+
}
|
|
2913
|
+
function CommonSelectionValidateTable({
|
|
2914
|
+
validationError = [],
|
|
2915
|
+
isRowInvalid,
|
|
2916
|
+
...props
|
|
2917
|
+
}) {
|
|
2918
|
+
const errorKeys = new Set(validationError.map((error) => error.requestId));
|
|
2919
|
+
return /* @__PURE__ */ jsx(
|
|
2920
|
+
CommonSelectionTable,
|
|
2921
|
+
{
|
|
2922
|
+
...props,
|
|
2923
|
+
getRowSx: (row) => {
|
|
2924
|
+
const invalid = isRowInvalid ? isRowInvalid(row) : errorKeys.has(row.requestId);
|
|
2925
|
+
return invalid ? { backgroundColor: "error.light", "& td": { color: "error.contrastText" } } : {};
|
|
2926
|
+
}
|
|
2927
|
+
}
|
|
2928
|
+
);
|
|
2929
|
+
}
|
|
2930
|
+
var CommonSelectionStickyTable = CommonSelectionTable;
|
|
2931
|
+
function flattenAdvancedColumns(columns) {
|
|
2932
|
+
return columns.flatMap(
|
|
2933
|
+
(column) => column.columns?.length ? flattenAdvancedColumns(column.columns) : [column]
|
|
2934
|
+
);
|
|
2935
|
+
}
|
|
2936
|
+
function GenericCustomTable({
|
|
2937
|
+
advancedColumns = [],
|
|
2938
|
+
selection,
|
|
2939
|
+
primaryColId,
|
|
2940
|
+
selected = [],
|
|
2941
|
+
setSelected,
|
|
2942
|
+
disableCheckBox,
|
|
2943
|
+
showPagination = true,
|
|
2944
|
+
renderTableActions,
|
|
2945
|
+
columns,
|
|
2946
|
+
...props
|
|
2947
|
+
}) {
|
|
2948
|
+
const activeColumns = advancedColumns.length ? flattenAdvancedColumns(advancedColumns) : columns;
|
|
2949
|
+
const table = selection && primaryColId && setSelected ? /* @__PURE__ */ jsx(
|
|
2950
|
+
CommonSelectionTable,
|
|
2951
|
+
{
|
|
2952
|
+
...props,
|
|
2953
|
+
columns: activeColumns,
|
|
2954
|
+
primaryColId,
|
|
2955
|
+
selected,
|
|
2956
|
+
setSelected,
|
|
2957
|
+
...disableCheckBox !== void 0 ? { hideCheckBoxes: disableCheckBox } : {},
|
|
2958
|
+
showPagination
|
|
2959
|
+
}
|
|
2960
|
+
) : /* @__PURE__ */ jsx(
|
|
2961
|
+
CommonTable,
|
|
2962
|
+
{
|
|
2963
|
+
...props,
|
|
2964
|
+
columns: activeColumns,
|
|
2965
|
+
showPagination
|
|
2966
|
+
}
|
|
2967
|
+
);
|
|
2968
|
+
return renderTableActions ? /* @__PURE__ */ jsxs(Stack6, { spacing: 1, children: [
|
|
2969
|
+
/* @__PURE__ */ jsx(Stack6, { direction: "row", justifyContent: "flex-end", children: renderTableActions() }),
|
|
2970
|
+
table
|
|
2971
|
+
] }) : table;
|
|
2972
|
+
}
|
|
2973
|
+
function CustomTableCell({
|
|
2974
|
+
rowData,
|
|
2975
|
+
columnObject,
|
|
2976
|
+
bordered = true,
|
|
2977
|
+
...props
|
|
2978
|
+
}) {
|
|
2979
|
+
const Cell = bordered ? StyledBorderedTableCell : TableCell;
|
|
2980
|
+
return /* @__PURE__ */ jsx(Cell, { ...props, children: columnObject.render ? columnObject.render(rowData) : rowData[columnObject.field] });
|
|
2981
|
+
}
|
|
2982
|
+
function SelectWithTable({ columns, data = [], onChange, id, setOpenDetails, loading = false, label = "Select a row" }) {
|
|
2983
|
+
return /* @__PURE__ */ jsxs(Table, { size: "small", "aria-label": label, children: [
|
|
2984
|
+
/* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
2985
|
+
/* @__PURE__ */ jsx(TableCell, { padding: "checkbox", children: "Select" }),
|
|
2986
|
+
columns.map((column) => /* @__PURE__ */ jsx(TableCell, { children: column.title }, column.field))
|
|
2987
|
+
] }) }),
|
|
2988
|
+
/* @__PURE__ */ jsx(TableBody, { children: loading ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: columns.length + 1, children: /* @__PURE__ */ jsx(Skeleton, {}) }) }) : data.length ? data.map((row) => /* @__PURE__ */ jsxs(TableRow, { hover: true, selected: row.id === id, onClick: () => onChange(row.id), onDoubleClick: () => setOpenDetails?.(false), children: [
|
|
2989
|
+
/* @__PURE__ */ jsx(TableCell, { padding: "checkbox", children: /* @__PURE__ */ jsx(Radio, { checked: row.id === id, onChange: () => onChange(row.id), inputProps: { "aria-label": `Select row ${String(row.id)}` } }) }),
|
|
2990
|
+
columns.map((column) => /* @__PURE__ */ jsx(TableCell, { children: column.render ? column.render(row) : row[column.field] }, column.field))
|
|
2991
|
+
] }, row.id)) : /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: columns.length + 1, children: "No data found." }) }) })
|
|
2992
|
+
] });
|
|
2993
|
+
}
|
|
2994
|
+
function DateDisplay({
|
|
2995
|
+
value,
|
|
2996
|
+
locale,
|
|
2997
|
+
emptyValue = "\u2014",
|
|
2998
|
+
options = { dateStyle: "medium" },
|
|
2999
|
+
...props
|
|
3000
|
+
}) {
|
|
3001
|
+
const date = value == null || value === "" ? null : new Date(value);
|
|
3002
|
+
const valid = date && !Number.isNaN(date.getTime());
|
|
3003
|
+
return /* @__PURE__ */ jsx("time", { dateTime: valid ? date.toISOString() : void 0, ...props, children: valid ? new Intl.DateTimeFormat(locale, options).format(date) : emptyValue });
|
|
3004
|
+
}
|
|
3005
|
+
function DateTimeDisplay(props) {
|
|
3006
|
+
return /* @__PURE__ */ jsx(DateDisplay, { options: { dateStyle: "medium", timeStyle: "medium" }, ...props });
|
|
3007
|
+
}
|
|
3008
|
+
function SignedValue({
|
|
3009
|
+
value,
|
|
3010
|
+
locale,
|
|
3011
|
+
decimals = 2,
|
|
3012
|
+
zeroAsDash = false,
|
|
3013
|
+
kind = "number",
|
|
3014
|
+
currency = "USD",
|
|
3015
|
+
style,
|
|
3016
|
+
...props
|
|
3017
|
+
}) {
|
|
3018
|
+
const numeric = value === "" || value == null ? Number.NaN : Number(value);
|
|
3019
|
+
if (Number.isNaN(numeric) || zeroAsDash && numeric === 0) {
|
|
3020
|
+
return /* @__PURE__ */ jsx("span", { ...props, children: "\u2014" });
|
|
3021
|
+
}
|
|
3022
|
+
const formatter = new Intl.NumberFormat(locale, {
|
|
3023
|
+
style: kind === "currency" ? "currency" : kind === "percent" ? "percent" : "decimal",
|
|
3024
|
+
...kind === "currency" ? { currency } : {},
|
|
3025
|
+
minimumFractionDigits: decimals,
|
|
3026
|
+
maximumFractionDigits: decimals
|
|
3027
|
+
});
|
|
3028
|
+
const formatted = formatter.format(kind === "percent" ? Math.abs(numeric) / 100 : Math.abs(numeric));
|
|
3029
|
+
return /* @__PURE__ */ jsx(
|
|
3030
|
+
"data",
|
|
3031
|
+
{
|
|
3032
|
+
value: numeric,
|
|
3033
|
+
"aria-label": `${numeric < 0 ? "Negative " : ""}${formatted}`,
|
|
3034
|
+
style: { color: numeric < 0 ? "#a30000" : "inherit", ...style },
|
|
3035
|
+
...props,
|
|
3036
|
+
children: numeric < 0 ? `(${formatted})` : formatted
|
|
3037
|
+
}
|
|
3038
|
+
);
|
|
3039
|
+
}
|
|
3040
|
+
function SignedAmountValue(props) {
|
|
3041
|
+
return /* @__PURE__ */ jsx(SignedValue, { kind: "currency", zeroAsDash: true, ...props });
|
|
3042
|
+
}
|
|
3043
|
+
function SignedAmountWithZero(props) {
|
|
3044
|
+
return /* @__PURE__ */ jsx(SignedValue, { kind: "currency", ...props });
|
|
3045
|
+
}
|
|
3046
|
+
function SignedPercentage(props) {
|
|
3047
|
+
return /* @__PURE__ */ jsx(SignedValue, { kind: "percent", zeroAsDash: true, ...props });
|
|
3048
|
+
}
|
|
3049
|
+
function SignedPercentageWithZero(props) {
|
|
3050
|
+
return /* @__PURE__ */ jsx(SignedValue, { kind: "percent", ...props });
|
|
3051
|
+
}
|
|
3052
|
+
function ProfitDirectionIcon({ value, style, ...props }) {
|
|
3053
|
+
const label = value == null || value === 0 ? "No change" : value > 0 ? "Increase" : "Decrease";
|
|
3054
|
+
const symbol = value == null || value === 0 ? "\u2014" : value > 0 ? "\u2191" : "\u2193";
|
|
3055
|
+
return /* @__PURE__ */ jsx(
|
|
3056
|
+
"span",
|
|
3057
|
+
{
|
|
3058
|
+
role: "img",
|
|
3059
|
+
"aria-label": label,
|
|
3060
|
+
style: {
|
|
3061
|
+
color: value != null && value < 0 ? "#a30000" : value ? "#2e7d32" : "inherit",
|
|
3062
|
+
...style
|
|
3063
|
+
},
|
|
3064
|
+
...props,
|
|
3065
|
+
children: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: symbol })
|
|
3066
|
+
}
|
|
3067
|
+
);
|
|
3068
|
+
}
|
|
3069
|
+
function FormulaIcon({ formula, label = "View formula", color = "primary.main", fontSize = 18 }) {
|
|
3070
|
+
const [anchor, setAnchor] = useState(null);
|
|
3071
|
+
const id = useId().replace(/:/g, "");
|
|
3072
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3073
|
+
/* @__PURE__ */ jsx(LightTooltip, { title: label, children: /* @__PURE__ */ jsx(SharedIconButton, { "aria-label": label, size: "small", onClick: (event) => setAnchor(event.currentTarget), sx: { color }, children: /* @__PURE__ */ jsx(default89, { sx: { fontSize } }) }) }),
|
|
3074
|
+
/* @__PURE__ */ jsx(
|
|
3075
|
+
Popover2,
|
|
3076
|
+
{
|
|
3077
|
+
id: `formula-${id}`,
|
|
3078
|
+
open: Boolean(anchor),
|
|
3079
|
+
anchorEl: anchor,
|
|
3080
|
+
onClose: () => setAnchor(null),
|
|
3081
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
3082
|
+
children: /* @__PURE__ */ jsx(Typography20, { component: "pre", sx: { p: 2, m: 0, maxWidth: "min(90vw, 40rem)", whiteSpace: "pre-wrap" }, children: formula })
|
|
3083
|
+
}
|
|
3084
|
+
)
|
|
3085
|
+
] });
|
|
3086
|
+
}
|
|
3087
|
+
function FormulaInfoIcon({ formulaData, label = "View formula details" }) {
|
|
3088
|
+
const [anchor, setAnchor] = useState(null);
|
|
3089
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3090
|
+
/* @__PURE__ */ jsx(SharedIconButton, { "aria-label": label, size: "small", onClick: (event) => setAnchor(event.currentTarget), children: /* @__PURE__ */ jsx(InfoOutlined, { fontSize: "small" }) }),
|
|
3091
|
+
/* @__PURE__ */ jsx(Popover2, { open: Boolean(anchor), anchorEl: anchor, onClose: () => setAnchor(null), anchorOrigin: { vertical: "bottom", horizontal: "left" }, children: /* @__PURE__ */ jsxs(Table, { size: "small", "aria-label": "Formula details", children: [
|
|
3092
|
+
/* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
3093
|
+
/* @__PURE__ */ jsx(TableCell, { children: "Formula name" }),
|
|
3094
|
+
/* @__PURE__ */ jsx(TableCell, { children: "Formula description" })
|
|
3095
|
+
] }) }),
|
|
3096
|
+
/* @__PURE__ */ jsx(TableBody, { children: Object.entries(formulaData).map(([name, description]) => /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
3097
|
+
/* @__PURE__ */ jsx(TableCell, { component: "th", scope: "row", children: name }),
|
|
3098
|
+
/* @__PURE__ */ jsx(TableCell, { children: description })
|
|
3099
|
+
] }, name)) })
|
|
3100
|
+
] }) })
|
|
3101
|
+
] });
|
|
3102
|
+
}
|
|
3103
|
+
function NameDescriptionPopover({ value, name, description, label = "More information" }) {
|
|
3104
|
+
const [anchor, setAnchor] = useState(null);
|
|
3105
|
+
return /* @__PURE__ */ jsxs(Stack6, { component: "span", direction: "row", spacing: 0.5, alignItems: "center", children: [
|
|
3106
|
+
/* @__PURE__ */ jsx("span", { children: value }),
|
|
3107
|
+
/* @__PURE__ */ jsx(SharedIconButton, { "aria-label": label, size: "small", onClick: (event) => setAnchor(event.currentTarget), children: /* @__PURE__ */ jsx(InfoOutlined, { fontSize: "small" }) }),
|
|
3108
|
+
/* @__PURE__ */ jsx(Popover2, { open: Boolean(anchor), anchorEl: anchor, onClose: () => setAnchor(null), anchorOrigin: { vertical: "bottom", horizontal: "left" }, children: /* @__PURE__ */ jsxs(Box14, { sx: { p: 1.5, maxWidth: 360 }, children: [
|
|
3109
|
+
name ? /* @__PURE__ */ jsx(Typography20, { fontWeight: 700, children: name }) : null,
|
|
3110
|
+
description ? /* @__PURE__ */ jsx(Typography20, { variant: "body2", children: description }) : null
|
|
3111
|
+
] }) })
|
|
3112
|
+
] });
|
|
3113
|
+
}
|
|
3114
|
+
var NameDescPopover = NameDescriptionPopover;
|
|
3115
|
+
function ExpandableComment({ title = "Comment", value = "", handleChange, disabled = false, label = "Expand comment" }) {
|
|
3116
|
+
const [open, setOpen] = useState(false);
|
|
3117
|
+
const field = (rows) => /* @__PURE__ */ jsx(SharedTextField, { multiline: true, minRows: rows, label: title, value, disabled, onChange: (event) => handleChange?.(event.target.value) });
|
|
3118
|
+
return /* @__PURE__ */ jsxs(Stack6, { spacing: 0.5, children: [
|
|
3119
|
+
/* @__PURE__ */ jsx(Stack6, { direction: "row", justifyContent: "flex-end", children: /* @__PURE__ */ jsx(SharedIconButton, { "aria-label": label, size: "small", onClick: () => setOpen(true), children: /* @__PURE__ */ jsx(OpenInFullOutlinedIcon, { fontSize: "small" }) }) }),
|
|
3120
|
+
field(4),
|
|
3121
|
+
/* @__PURE__ */ jsxs(Modal, { open, title, onClose: () => setOpen(false), fullWidth: true, maxWidth: "md", children: [
|
|
3122
|
+
field(16),
|
|
3123
|
+
/* @__PURE__ */ jsx(DialogActions, { children: /* @__PURE__ */ jsx(SharedButton, { variant: "outlined", onClick: () => setOpen(false), children: "Close" }) })
|
|
3124
|
+
] })
|
|
3125
|
+
] });
|
|
3126
|
+
}
|
|
3127
|
+
var CommentExpand = ExpandableComment;
|
|
3128
|
+
function StatusBlinker({ status = "info", label = status }) {
|
|
3129
|
+
return /* @__PURE__ */ jsx(Box14, { component: "span", role: "status", "aria-label": label, sx: { display: "inline-block", width: 12, height: 12, borderRadius: "50%", bgcolor: `${status}.main` } });
|
|
3130
|
+
}
|
|
3131
|
+
function ErrorBlinker(props) {
|
|
3132
|
+
return /* @__PURE__ */ jsx(StatusBlinker, { status: "error", label: "Error", ...props });
|
|
3133
|
+
}
|
|
3134
|
+
function SuccessBlinker(props) {
|
|
3135
|
+
return /* @__PURE__ */ jsx(StatusBlinker, { status: "success", label: "Success", ...props });
|
|
3136
|
+
}
|
|
3137
|
+
var FormulaInfoWithIcon = FormulaInfoIcon;
|
|
3138
|
+
function DocumentationCard({ data, openDocument, viewLoading = false, setViewDocumentLoadingId }) {
|
|
3139
|
+
const open = () => {
|
|
3140
|
+
setViewDocumentLoadingId?.(data.helpDocumentId);
|
|
3141
|
+
openDocument(data.helpDocumentId, data.startFileName);
|
|
3142
|
+
};
|
|
3143
|
+
return /* @__PURE__ */ jsxs(Card2, { variant: "outlined", children: [
|
|
3144
|
+
/* @__PURE__ */ jsx(CardHeader, { avatar: /* @__PURE__ */ jsx(default62, { color: "primary" }), title: data.name ?? "Documentation guide", subheader: "Training resource" }),
|
|
3145
|
+
/* @__PURE__ */ jsx(CardContent2, { children: /* @__PURE__ */ jsx(Typography20, { color: "text.secondary", children: data.description ?? "Documentation and training materials." }) }),
|
|
3146
|
+
/* @__PURE__ */ jsx(CardActions, { children: /* @__PURE__ */ jsx(SharedButton, { fullWidth: true, disabled: viewLoading, endIcon: viewLoading ? /* @__PURE__ */ jsx(CircularProgress, { size: 18 }) : /* @__PURE__ */ jsx(ArrowForwardIosIcon, {}), onClick: open, children: viewLoading ? "Loading\u2026" : "Read documentation" }) })
|
|
3147
|
+
] });
|
|
3148
|
+
}
|
|
3149
|
+
function AppHelp({ documentData = [], openDocument, viewLoading = false, viewDocumentLoadingId, setViewDocumentLoadingId }) {
|
|
3150
|
+
return /* @__PURE__ */ jsx(Box14, { sx: { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 18rem), 1fr))", gap: 2 }, children: documentData.map((data) => /* @__PURE__ */ jsx(DocumentationCard, { data, openDocument, viewLoading: viewLoading && data.helpDocumentId === viewDocumentLoadingId, setViewDocumentLoadingId }, data.helpDocumentId)) });
|
|
3151
|
+
}
|
|
3152
|
+
function CardComponent({
|
|
3153
|
+
data,
|
|
3154
|
+
name,
|
|
3155
|
+
description,
|
|
3156
|
+
owner,
|
|
3157
|
+
type,
|
|
3158
|
+
icon,
|
|
3159
|
+
imageSrc,
|
|
3160
|
+
imageAlt = "",
|
|
3161
|
+
onClick,
|
|
3162
|
+
handleCardClick
|
|
3163
|
+
}) {
|
|
3164
|
+
const content = /* @__PURE__ */ jsxs(Stack6, { direction: "row", alignItems: "center", spacing: 2, sx: { p: 2 }, children: [
|
|
3165
|
+
imageSrc ? /* @__PURE__ */ jsx(Box14, { component: "img", src: imageSrc, alt: imageAlt, sx: { width: 64, height: 64, objectFit: "contain" } }) : icon,
|
|
3166
|
+
/* @__PURE__ */ jsxs(CardContent2, { sx: { minWidth: 0, p: 0, "&:last-child": { pb: 0 } }, children: [
|
|
3167
|
+
/* @__PURE__ */ jsx(Typography20, { fontWeight: 700, noWrap: true, children: name }),
|
|
3168
|
+
owner != null ? /* @__PURE__ */ jsx(Typography20, { variant: "body2", noWrap: true, children: owner }) : null,
|
|
3169
|
+
description != null ? /* @__PURE__ */ jsx(Typography20, { variant: "body2", color: "text.secondary", noWrap: true, children: description }) : null,
|
|
3170
|
+
type != null ? /* @__PURE__ */ jsx(Typography20, { variant: "caption", color: "text.secondary", children: type }) : null
|
|
3171
|
+
] })
|
|
3172
|
+
] });
|
|
3173
|
+
const activate = (event) => {
|
|
3174
|
+
handleCardClick?.(event, data);
|
|
3175
|
+
onClick?.(data);
|
|
3176
|
+
};
|
|
3177
|
+
return /* @__PURE__ */ jsx(Card2, { variant: "outlined", sx: { height: "100%" }, children: onClick || handleCardClick ? /* @__PURE__ */ jsx(CardActionArea, { onClick: activate, sx: { height: "100%" }, children: content }) : content });
|
|
3178
|
+
}
|
|
3179
|
+
function CardComponentWithActions({
|
|
3180
|
+
data,
|
|
3181
|
+
columns,
|
|
3182
|
+
getRowKey,
|
|
3183
|
+
icon,
|
|
3184
|
+
ariaLabel = "Cards",
|
|
3185
|
+
pageSizeOptions = [6, 12, 18],
|
|
3186
|
+
initialRowsPerPage = 6,
|
|
3187
|
+
maxHeight,
|
|
3188
|
+
minHeight,
|
|
3189
|
+
height
|
|
3190
|
+
}) {
|
|
3191
|
+
const [page, setPage] = useState(0);
|
|
3192
|
+
const [rowsPerPage, setRowsPerPage] = useState(initialRowsPerPage);
|
|
3193
|
+
const headingId = useId();
|
|
3194
|
+
const visibleRows = data.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage);
|
|
3195
|
+
const contentColumns = columns.filter((column) => !column.action && column.title !== "Actions");
|
|
3196
|
+
const actionColumns = columns.filter((column) => column.action || column.title === "Actions");
|
|
3197
|
+
const valueFor = (row, column) => column.render?.(row) ?? (column.field ? row[column.field] : null);
|
|
3198
|
+
return /* @__PURE__ */ jsxs(Box14, { component: "section", "aria-labelledby": headingId, children: [
|
|
3199
|
+
/* @__PURE__ */ jsx(Typography20, { id: headingId, sx: { position: "absolute", width: 1, height: 1, overflow: "hidden", clip: "rect(0 0 0 0)" }, children: ariaLabel }),
|
|
3200
|
+
/* @__PURE__ */ jsx(Grid, { container: true, spacing: 2, sx: { maxHeight, minHeight, height, overflow: maxHeight || height ? "auto" : void 0, p: 1 }, children: visibleRows.map((row, index) => /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, sm: 6, md: 4, children: /* @__PURE__ */ jsxs(Card2, { variant: "outlined", sx: { height: "100%" }, children: [
|
|
3201
|
+
/* @__PURE__ */ jsxs(Stack6, { direction: "row", alignItems: "center", children: [
|
|
3202
|
+
icon ? /* @__PURE__ */ jsx(Box14, { sx: { display: "grid", placeItems: "center", minWidth: 88, p: 2 }, children: typeof icon === "function" ? icon(row) : icon }) : null,
|
|
3203
|
+
/* @__PURE__ */ jsx(CardContent2, { sx: { minWidth: 0, flex: 1 }, children: contentColumns.map((column, columnIndex) => /* @__PURE__ */ jsxs(Box14, { sx: { mb: 0.5 }, children: [
|
|
3204
|
+
/* @__PURE__ */ jsx(Typography20, { variant: "caption", color: "text.secondary", children: column.title }),
|
|
3205
|
+
/* @__PURE__ */ jsx(Typography20, { component: "div", variant: columnIndex === 0 ? "subtitle1" : "body2", children: valueFor(row, column) ?? "\u2014" })
|
|
3206
|
+
] }, column.field ?? columnIndex)) })
|
|
3207
|
+
] }),
|
|
3208
|
+
actionColumns.length ? /* @__PURE__ */ jsx(CardActions, { children: actionColumns.map((column, index2) => /* @__PURE__ */ jsx(Box14, { children: valueFor(row, column) }, column.field ?? index2)) }) : null
|
|
3209
|
+
] }) }, getRowKey?.(row, page * rowsPerPage + index) ?? page * rowsPerPage + index)) }),
|
|
3210
|
+
/* @__PURE__ */ jsx(
|
|
3211
|
+
TablePagination,
|
|
3212
|
+
{
|
|
3213
|
+
component: "div",
|
|
3214
|
+
count: data.length,
|
|
3215
|
+
page: Math.min(page, Math.max(0, Math.ceil(data.length / rowsPerPage) - 1)),
|
|
3216
|
+
rowsPerPage,
|
|
3217
|
+
rowsPerPageOptions: [...pageSizeOptions],
|
|
3218
|
+
onPageChange: (_, nextPage) => setPage(nextPage),
|
|
3219
|
+
onRowsPerPageChange: (event) => {
|
|
3220
|
+
setRowsPerPage(Number(event.target.value));
|
|
3221
|
+
setPage(0);
|
|
3222
|
+
}
|
|
3223
|
+
}
|
|
3224
|
+
)
|
|
3225
|
+
] });
|
|
3226
|
+
}
|
|
3227
|
+
function defaultFormatDateTime(value) {
|
|
3228
|
+
const date = value instanceof Date ? value : new Date(String(value));
|
|
3229
|
+
return Number.isNaN(date.getTime()) ? String(value) : new Intl.DateTimeFormat(void 0, {
|
|
3230
|
+
dateStyle: "medium",
|
|
3231
|
+
timeStyle: "short"
|
|
3232
|
+
}).format(date);
|
|
3233
|
+
}
|
|
3234
|
+
function OperationsInfo({
|
|
3235
|
+
data,
|
|
3236
|
+
title,
|
|
3237
|
+
reviewedBy,
|
|
3238
|
+
reviewedOn,
|
|
3239
|
+
disabled = false,
|
|
3240
|
+
type = "Reviewed",
|
|
3241
|
+
formatDateTime = defaultFormatDateTime
|
|
3242
|
+
}) {
|
|
3243
|
+
const [anchor, setAnchor] = useState(null);
|
|
3244
|
+
const dialogId = useId();
|
|
3245
|
+
const headingId = `${dialogId}-heading`;
|
|
3246
|
+
const reviewer = data?.[reviewedBy];
|
|
3247
|
+
const reviewDate = data?.[reviewedOn];
|
|
3248
|
+
const isSkipped = title.toLowerCase() === "skipped";
|
|
3249
|
+
const open = (event) => {
|
|
3250
|
+
event.stopPropagation();
|
|
3251
|
+
setAnchor(event.currentTarget);
|
|
3252
|
+
};
|
|
3253
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3254
|
+
/* @__PURE__ */ jsx(LightTooltip, { title, children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(
|
|
3255
|
+
SharedIconButton,
|
|
3256
|
+
{
|
|
3257
|
+
"aria-label": title,
|
|
3258
|
+
"aria-haspopup": "dialog",
|
|
3259
|
+
"aria-expanded": Boolean(anchor),
|
|
3260
|
+
"aria-controls": anchor ? dialogId : void 0,
|
|
3261
|
+
disabled,
|
|
3262
|
+
color: isSkipped ? "secondary" : "success",
|
|
3263
|
+
onClick: open,
|
|
3264
|
+
children: isSkipped ? /* @__PURE__ */ jsx(SkipNextIcon, {}) : /* @__PURE__ */ jsx(CheckCircleOutlinedIcon, {})
|
|
3265
|
+
}
|
|
3266
|
+
) }) }),
|
|
3267
|
+
/* @__PURE__ */ jsx(
|
|
3268
|
+
Popover2,
|
|
3269
|
+
{
|
|
3270
|
+
open: Boolean(anchor),
|
|
3271
|
+
anchorEl: anchor,
|
|
3272
|
+
onClose: () => setAnchor(null),
|
|
3273
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
3274
|
+
slotProps: { paper: { id: dialogId, role: "dialog", "aria-labelledby": headingId } },
|
|
3275
|
+
children: /* @__PURE__ */ jsxs(Box14, { sx: { minWidth: 250, p: 2 }, children: [
|
|
3276
|
+
/* @__PURE__ */ jsxs(Typography20, { id: headingId, fontWeight: 700, children: [
|
|
3277
|
+
title,
|
|
3278
|
+
" details"
|
|
3279
|
+
] }),
|
|
3280
|
+
/* @__PURE__ */ jsxs(Stack6, { spacing: 0.5, sx: { mt: 1 }, children: [
|
|
3281
|
+
/* @__PURE__ */ jsxs(Typography20, { variant: "caption", color: "text.secondary", children: [
|
|
3282
|
+
type,
|
|
3283
|
+
" by"
|
|
3284
|
+
] }),
|
|
3285
|
+
/* @__PURE__ */ jsx(Typography20, { variant: "body2", children: reviewer == null || reviewer === "" ? "Not generated" : String(reviewer) }),
|
|
3286
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
3287
|
+
/* @__PURE__ */ jsxs(Typography20, { variant: "caption", color: "text.secondary", children: [
|
|
3288
|
+
type,
|
|
3289
|
+
" on"
|
|
3290
|
+
] }),
|
|
3291
|
+
/* @__PURE__ */ jsx(Typography20, { variant: "body2", children: reviewDate == null || reviewDate === "" ? "Not finalized" : formatDateTime(reviewDate) })
|
|
3292
|
+
] })
|
|
3293
|
+
] })
|
|
3294
|
+
}
|
|
3295
|
+
)
|
|
3296
|
+
] });
|
|
3297
|
+
}
|
|
3298
|
+
function VisuallyHidden({ children }) {
|
|
3299
|
+
return /* @__PURE__ */ jsx(
|
|
3300
|
+
Box14,
|
|
3301
|
+
{
|
|
3302
|
+
component: "span",
|
|
3303
|
+
sx: {
|
|
3304
|
+
border: 0,
|
|
3305
|
+
clip: "rect(0 0 0 0)",
|
|
3306
|
+
height: 1,
|
|
3307
|
+
margin: -1,
|
|
3308
|
+
overflow: "hidden",
|
|
3309
|
+
padding: 0,
|
|
3310
|
+
position: "absolute",
|
|
3311
|
+
whiteSpace: "nowrap",
|
|
3312
|
+
width: 1
|
|
3313
|
+
},
|
|
3314
|
+
children
|
|
3315
|
+
}
|
|
3316
|
+
);
|
|
3317
|
+
}
|
|
3318
|
+
function LiveRegion({
|
|
3319
|
+
children,
|
|
3320
|
+
priority = "polite",
|
|
3321
|
+
atomic = true,
|
|
3322
|
+
visuallyHidden = true
|
|
3323
|
+
}) {
|
|
3324
|
+
const content = /* @__PURE__ */ jsx(Box14, { component: "span", role: "status", "aria-live": priority, "aria-atomic": atomic, children });
|
|
3325
|
+
return visuallyHidden ? /* @__PURE__ */ jsx(VisuallyHidden, { children: content }) : content;
|
|
3326
|
+
}
|
|
3327
|
+
function SkipLink({
|
|
3328
|
+
href = "#main-content",
|
|
3329
|
+
children = "Skip to main content"
|
|
3330
|
+
}) {
|
|
3331
|
+
return /* @__PURE__ */ jsx(
|
|
3332
|
+
Link,
|
|
3333
|
+
{
|
|
3334
|
+
href,
|
|
3335
|
+
sx: {
|
|
3336
|
+
position: "fixed",
|
|
3337
|
+
top: 8,
|
|
3338
|
+
left: 8,
|
|
3339
|
+
zIndex: "tooltip",
|
|
3340
|
+
transform: "translateY(-200%)",
|
|
3341
|
+
bgcolor: "background.paper",
|
|
3342
|
+
color: "text.primary",
|
|
3343
|
+
p: 1,
|
|
3344
|
+
"&:focus": { transform: "translateY(0)" }
|
|
3345
|
+
},
|
|
3346
|
+
children
|
|
3347
|
+
}
|
|
3348
|
+
);
|
|
3349
|
+
}
|
|
3350
|
+
|
|
3351
|
+
// src/hooks/useDisplayOrder.ts
|
|
3352
|
+
function useDisplayOrder({
|
|
3353
|
+
data = [],
|
|
3354
|
+
value,
|
|
3355
|
+
orderKey = "displayOrder",
|
|
3356
|
+
idKey = "id",
|
|
3357
|
+
currentId = null
|
|
3358
|
+
}) {
|
|
3359
|
+
const highestDisplayOrder = data.reduce(
|
|
3360
|
+
(highest, item2) => Math.max(highest, Number(item2[orderKey]) || 0),
|
|
3361
|
+
0
|
|
3362
|
+
);
|
|
3363
|
+
const isDuplicate = data.some(
|
|
3364
|
+
(item2) => Number(item2[orderKey]) === Number(value) && (currentId == null || String(item2[idKey]) !== String(currentId))
|
|
3365
|
+
);
|
|
3366
|
+
return { isDuplicate, highestDisplayOrder };
|
|
3367
|
+
}
|
|
3368
|
+
|
|
3369
|
+
export { AccessError, AccessLoader, ActionIcon, ActionIconButton, ActionIconButtonData, ActionIconData, ActionsContainer, AdvancedDropDownList, AdvancedDropDownWithMsg, ConfirmDialog as AlertDialogBox, AppHelp, BackButton, BlueHeaderText, BoldText, BreadCrumbList, BreadcrumbNavigation, BudgetStatusIcon, SharedButton as Button, CardComponent, CardComponentWithActions, CommentExpand, CommonSearchTable, SearchInput as CommonSearchTextField, CommonSelectionStickyTable, CommonSelectionTable, CommonSelectionValidateTable, CommonTable, ConfirmDialog, ContentModal, ContentWrapper, CurrencyInput, CurrencyInputWithLabelIcon, CurrencyTextField, CustomAccordion, CustomAccordionDetails, CustomAccordionSummary, CustomButton, CurrencyInput as CustomCurrencyInput, CurrencyInput as CustomCurrencyInputWithNegative, CustomDropZone, CustomGridTableWrapper, CustomMuiAdvancedDropDownList, CustomMuiTextBox, CommonTable as CustomRequestTable, CommonSelectionTable as CustomSelectionTable, CustomStickyTable, StyledTab as CustomStyledTab, StyledTabs as CustomStyledTabs, CustomSwitch, CustomTable, CustomTableCell, CustomTableCellWithInfo, CustomTransition, DataTable, DateDisplay, DateInput, DateInput as DatePicker, DateTimeDisplay, DateTimeInput, DateTimePicker, DialogAction, DialogAction as DialogActions, DocumentationCard, DropDownList, DropDownListWithImage, DropDownListWithMessage, DropDownWithMessage, DropDownList as DropdownList, EmailSuggestionInput, EmailSuggestionMuiTextBox, EmailSuggestionTextBox, EmptyState, ErrorAlert, ErrorBlinker, ErrorModal, ErrorPage, ErrorState, ExecutionKpiCard, ExpandableComment, FileInput, FloatingAdvanceDropDownList, SharedTextField as FloatingInput, FloatingMultiSelectDropDownList, ForbiddenPage, FormulaIcon, FormulaInfoIcon, FormulaInfoWithIcon, GenericAdvanceDropDownList, GenericAdvancedSelect, GenericCheckBox, GenericCurrencyTextBox, GenericCustomTable, GenericLabel, GenericOutlinedCheckBox, SelectInput as GenericSelect, GenericStyledAdvancedDropdown, GenericStyledCurrencyTextField, DateInput as GenericStyledDatePicker, SharedTextField as GenericStyledFloatingTextField, SharedTextField as GenericStyledInput, StyledReadOnlyTextField as GenericStyledReadOnlyCurrencyInput, StyledReadOnlyTextField as GenericStyledReadOnlyTextField, SharedTextField as GenericStyledTextField, GenericTextArea, GenericTextBox, BackButton as GoBack, GroupedMultiSelectDropDown, HeaderToggles, HighlightedTableCell, SharedIconButton as IconButton, InfoLabelIcon, InfoTooltip, InformationIcon, StyledKpiCard as KPICard, LabelsIcons, LightTooltip, LiveRegion, MainSelector, MandatoryIndicator, MandatoryIndicatorWithText, MenuNotFoundPage, Modal, MuiAdvancedDropDownList, MuiGroupedMultiSelectDropDown, MuiTextBox, MultiSelectDropDownList, NameDescPopover, NameDescriptionPopover, NormalAdvancedDropDownList, DateInput as NormalDatePicker, NormalMuiTextBox, OperationsInfo, OptionMultiSelectorWithLabel, OptionSelectorWithLabel, Page, PageNotFound, PaginationTable, PanelWrapper, PercentageInput, Pipe, SharedTextField as PlaceHolderTextbox, PreviewContentModal, ProcessingModal, ProfitDirectionIcon, QuestionTextWrapper, ReadOnlyLabel, ReportRunKPICard, StyledBorderedTableCell as ReqDetailsBorderedTableCell, RequestModalGridItem, SearchInput, SearchInput as SearchTextField, SearchableDataTable, SelectInput, SelectWithTable, ServerErrorPage, SharedButton, SharedIconButton, SharedTextField, SharedToggleButton, SharedTooltip, SignedAmountValue, SignedAmountWithZero, SignedPercentage, SignedPercentageWithZero, SignedValue, SkeletonBorderedTableBody, SkeletonTableBody, SkipLink, Spinner, StatusBlinker, StatusDialog, StatusIcon, StatusIndicator, StickyFooterTableCell, StickyTableCell, StyledAdvanceDropDownList, StyledBorderedTableCell, StyledBorderedTableCellWithInfo, StyledBorderedTableRow, SharedButton as StyledButton, StyledCard, StyledDialogActions, StyledKpiCard, StyledLinesBorderedTableCell, StyledReadOnlyTextField, StyledSwitch, StyledTab, StyledTableCell, StyledTableRow, StyledTableSortLabel, StyledTabs, SharedTextField as StyledTextField, SuccessAlert, SuccessBlinker, SuccessModal, TabPanel, TableCellWithInfo, TableWrapper, TeslaStyleScrollIndicator, TextBox, SharedTextField as TextField, TextFieldWithIcon, TextInput, TextInputWithLabel, TextInputWithLabelIcon, TextfieldWithIcon, TicketLabelInfoIcon, TicketLabelInfoIcons, SharedToggleButton as ToggleButton, Transition, UnauthorizedPage, VisuallyHidden, WarningModal, WhiteStyledTab, YellowTableCell, actionIconRegistry, humanizeControlName, resolveControlName, tabA11yProps, tabPanelA11yProps, useDisplayOrder };
|
|
3370
|
+
//# sourceMappingURL=index.js.map
|
|
3371
|
+
//# sourceMappingURL=index.js.map
|