@judo/components 0.1.1-alpha.3
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 +277 -0
- package/README.md +1 -0
- package/dist/cjs/components.cjs +2 -0
- package/dist/cjs/components.cjs.map +1 -0
- package/dist/components.d.cts +111 -0
- package/dist/components.d.mts +111 -0
- package/dist/esm/components.mjs +2 -0
- package/dist/esm/components.mjs.map +1 -0
- package/package.json +54 -0
- package/src/AggregationInput.tsx +156 -0
- package/src/CustomBreadcrumb.tsx +144 -0
- package/src/CustomLink.tsx +35 -0
- package/src/CustomTablePagination.tsx +41 -0
- package/src/DropdownButton.tsx +124 -0
- package/src/PageHeader.tsx +35 -0
- package/src/TrinaryLogicCombobox.tsx +64 -0
- package/src/dialog/ConfirmationDialog.tsx +50 -0
- package/src/dialog/DialogContext.tsx +206 -0
- package/src/dialog/FilterDialog.tsx +424 -0
- package/src/dialog/PageDialog.tsx +40 -0
- package/src/dialog/RangeDialog.tsx +324 -0
- package/src/dialog/index.tsx +5 -0
- package/src/index.tsx +9 -0
- package/src/table/index.tsx +1 -0
- package/src/table/table-row-actions.tsx +86 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
Eclipse Public License - v 2.0
|
|
2
|
+
|
|
3
|
+
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
|
|
4
|
+
PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
|
|
5
|
+
OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
|
6
|
+
|
|
7
|
+
1. DEFINITIONS
|
|
8
|
+
|
|
9
|
+
"Contribution" means:
|
|
10
|
+
|
|
11
|
+
a) in the case of the initial Contributor, the initial content
|
|
12
|
+
Distributed under this Agreement, and
|
|
13
|
+
|
|
14
|
+
b) in the case of each subsequent Contributor:
|
|
15
|
+
i) changes to the Program, and
|
|
16
|
+
ii) additions to the Program;
|
|
17
|
+
where such changes and/or additions to the Program originate from
|
|
18
|
+
and are Distributed by that particular Contributor. A Contribution
|
|
19
|
+
"originates" from a Contributor if it was added to the Program by
|
|
20
|
+
such Contributor itself or anyone acting on such Contributor's behalf.
|
|
21
|
+
Contributions do not include changes or additions to the Program that
|
|
22
|
+
are not Modified Works.
|
|
23
|
+
|
|
24
|
+
"Contributor" means any person or entity that Distributes the Program.
|
|
25
|
+
|
|
26
|
+
"Licensed Patents" mean patent claims licensable by a Contributor which
|
|
27
|
+
are necessarily infringed by the use or sale of its Contribution alone
|
|
28
|
+
or when combined with the Program.
|
|
29
|
+
|
|
30
|
+
"Program" means the Contributions Distributed in accordance with this
|
|
31
|
+
Agreement.
|
|
32
|
+
|
|
33
|
+
"Recipient" means anyone who receives the Program under this Agreement
|
|
34
|
+
or any Secondary License (as applicable), including Contributors.
|
|
35
|
+
|
|
36
|
+
"Derivative Works" shall mean any work, whether in Source Code or other
|
|
37
|
+
form, that is based on (or derived from) the Program and for which the
|
|
38
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
39
|
+
represent, as a whole, an original work of authorship.
|
|
40
|
+
|
|
41
|
+
"Modified Works" shall mean any work in Source Code or other form that
|
|
42
|
+
results from an addition to, deletion from, or modification of the
|
|
43
|
+
contents of the Program, including, for purposes of clarity any new file
|
|
44
|
+
in Source Code form that contains any contents of the Program. Modified
|
|
45
|
+
Works shall not include works that contain only declarations,
|
|
46
|
+
interfaces, types, classes, structures, or files of the Program solely
|
|
47
|
+
in each case in order to link to, bind by name, or subclass the Program
|
|
48
|
+
or Modified Works thereof.
|
|
49
|
+
|
|
50
|
+
"Distribute" means the acts of a) distributing or b) making available
|
|
51
|
+
in any manner that enables the transfer of a copy.
|
|
52
|
+
|
|
53
|
+
"Source Code" means the form of a Program preferred for making
|
|
54
|
+
modifications, including but not limited to software source code,
|
|
55
|
+
documentation source, and configuration files.
|
|
56
|
+
|
|
57
|
+
"Secondary License" means either the GNU General Public License,
|
|
58
|
+
Version 2.0, or any later versions of that license, including any
|
|
59
|
+
exceptions or additional permissions as identified by the initial
|
|
60
|
+
Contributor.
|
|
61
|
+
|
|
62
|
+
2. GRANT OF RIGHTS
|
|
63
|
+
|
|
64
|
+
a) Subject to the terms of this Agreement, each Contributor hereby
|
|
65
|
+
grants Recipient a non-exclusive, worldwide, royalty-free copyright
|
|
66
|
+
license to reproduce, prepare Derivative Works of, publicly display,
|
|
67
|
+
publicly perform, Distribute and sublicense the Contribution of such
|
|
68
|
+
Contributor, if any, and such Derivative Works.
|
|
69
|
+
|
|
70
|
+
b) Subject to the terms of this Agreement, each Contributor hereby
|
|
71
|
+
grants Recipient a non-exclusive, worldwide, royalty-free patent
|
|
72
|
+
license under Licensed Patents to make, use, sell, offer to sell,
|
|
73
|
+
import and otherwise transfer the Contribution of such Contributor,
|
|
74
|
+
if any, in Source Code or other form. This patent license shall
|
|
75
|
+
apply to the combination of the Contribution and the Program if, at
|
|
76
|
+
the time the Contribution is added by the Contributor, such addition
|
|
77
|
+
of the Contribution causes such combination to be covered by the
|
|
78
|
+
Licensed Patents. The patent license shall not apply to any other
|
|
79
|
+
combinations which include the Contribution. No hardware per se is
|
|
80
|
+
licensed hereunder.
|
|
81
|
+
|
|
82
|
+
c) Recipient understands that although each Contributor grants the
|
|
83
|
+
licenses to its Contributions set forth herein, no assurances are
|
|
84
|
+
provided by any Contributor that the Program does not infringe the
|
|
85
|
+
patent or other intellectual property rights of any other entity.
|
|
86
|
+
Each Contributor disclaims any liability to Recipient for claims
|
|
87
|
+
brought by any other entity based on infringement of intellectual
|
|
88
|
+
property rights or otherwise. As a condition to exercising the
|
|
89
|
+
rights and licenses granted hereunder, each Recipient hereby
|
|
90
|
+
assumes sole responsibility to secure any other intellectual
|
|
91
|
+
property rights needed, if any. For example, if a third party
|
|
92
|
+
patent license is required to allow Recipient to Distribute the
|
|
93
|
+
Program, it is Recipient's responsibility to acquire that license
|
|
94
|
+
before distributing the Program.
|
|
95
|
+
|
|
96
|
+
d) Each Contributor represents that to its knowledge it has
|
|
97
|
+
sufficient copyright rights in its Contribution, if any, to grant
|
|
98
|
+
the copyright license set forth in this Agreement.
|
|
99
|
+
|
|
100
|
+
e) Notwithstanding the terms of any Secondary License, no
|
|
101
|
+
Contributor makes additional grants to any Recipient (other than
|
|
102
|
+
those set forth in this Agreement) as a result of such Recipient's
|
|
103
|
+
receipt of the Program under the terms of a Secondary License
|
|
104
|
+
(if permitted under the terms of Section 3).
|
|
105
|
+
|
|
106
|
+
3. REQUIREMENTS
|
|
107
|
+
|
|
108
|
+
3.1 If a Contributor Distributes the Program in any form, then:
|
|
109
|
+
|
|
110
|
+
a) the Program must also be made available as Source Code, in
|
|
111
|
+
accordance with section 3.2, and the Contributor must accompany
|
|
112
|
+
the Program with a statement that the Source Code for the Program
|
|
113
|
+
is available under this Agreement, and informs Recipients how to
|
|
114
|
+
obtain it in a reasonable manner on or through a medium customarily
|
|
115
|
+
used for software exchange; and
|
|
116
|
+
|
|
117
|
+
b) the Contributor may Distribute the Program under a license
|
|
118
|
+
different than this Agreement, provided that such license:
|
|
119
|
+
i) effectively disclaims on behalf of all other Contributors all
|
|
120
|
+
warranties and conditions, express and implied, including
|
|
121
|
+
warranties or conditions of title and non-infringement, and
|
|
122
|
+
implied warranties or conditions of merchantability and fitness
|
|
123
|
+
for a particular purpose;
|
|
124
|
+
|
|
125
|
+
ii) effectively excludes on behalf of all other Contributors all
|
|
126
|
+
liability for damages, including direct, indirect, special,
|
|
127
|
+
incidental and consequential damages, such as lost profits;
|
|
128
|
+
|
|
129
|
+
iii) does not attempt to limit or alter the recipients' rights
|
|
130
|
+
in the Source Code under section 3.2; and
|
|
131
|
+
|
|
132
|
+
iv) requires any subsequent distribution of the Program by any
|
|
133
|
+
party to be under a license that satisfies the requirements
|
|
134
|
+
of this section 3.
|
|
135
|
+
|
|
136
|
+
3.2 When the Program is Distributed as Source Code:
|
|
137
|
+
|
|
138
|
+
a) it must be made available under this Agreement, or if the
|
|
139
|
+
Program (i) is combined with other material in a separate file or
|
|
140
|
+
files made available under a Secondary License, and (ii) the initial
|
|
141
|
+
Contributor attached to the Source Code the notice described in
|
|
142
|
+
Exhibit A of this Agreement, then the Program may be made available
|
|
143
|
+
under the terms of such Secondary Licenses, and
|
|
144
|
+
|
|
145
|
+
b) a copy of this Agreement must be included with each copy of
|
|
146
|
+
the Program.
|
|
147
|
+
|
|
148
|
+
3.3 Contributors may not remove or alter any copyright, patent,
|
|
149
|
+
trademark, attribution notices, disclaimers of warranty, or limitations
|
|
150
|
+
of liability ("notices") contained within the Program from any copy of
|
|
151
|
+
the Program which they Distribute, provided that Contributors may add
|
|
152
|
+
their own appropriate notices.
|
|
153
|
+
|
|
154
|
+
4. COMMERCIAL DISTRIBUTION
|
|
155
|
+
|
|
156
|
+
Commercial distributors of software may accept certain responsibilities
|
|
157
|
+
with respect to end users, business partners and the like. While this
|
|
158
|
+
license is intended to facilitate the commercial use of the Program,
|
|
159
|
+
the Contributor who includes the Program in a commercial product
|
|
160
|
+
offering should do so in a manner which does not create potential
|
|
161
|
+
liability for other Contributors. Therefore, if a Contributor includes
|
|
162
|
+
the Program in a commercial product offering, such Contributor
|
|
163
|
+
("Commercial Contributor") hereby agrees to defend and indemnify every
|
|
164
|
+
other Contributor ("Indemnified Contributor") against any losses,
|
|
165
|
+
damages and costs (collectively "Losses") arising from claims, lawsuits
|
|
166
|
+
and other legal actions brought by a third party against the Indemnified
|
|
167
|
+
Contributor to the extent caused by the acts or omissions of such
|
|
168
|
+
Commercial Contributor in connection with its distribution of the Program
|
|
169
|
+
in a commercial product offering. The obligations in this section do not
|
|
170
|
+
apply to any claims or Losses relating to any actual or alleged
|
|
171
|
+
intellectual property infringement. In order to qualify, an Indemnified
|
|
172
|
+
Contributor must: a) promptly notify the Commercial Contributor in
|
|
173
|
+
writing of such claim, and b) allow the Commercial Contributor to control,
|
|
174
|
+
and cooperate with the Commercial Contributor in, the defense and any
|
|
175
|
+
related settlement negotiations. The Indemnified Contributor may
|
|
176
|
+
participate in any such claim at its own expense.
|
|
177
|
+
|
|
178
|
+
For example, a Contributor might include the Program in a commercial
|
|
179
|
+
product offering, Product X. That Contributor is then a Commercial
|
|
180
|
+
Contributor. If that Commercial Contributor then makes performance
|
|
181
|
+
claims, or offers warranties related to Product X, those performance
|
|
182
|
+
claims and warranties are such Commercial Contributor's responsibility
|
|
183
|
+
alone. Under this section, the Commercial Contributor would have to
|
|
184
|
+
defend claims against the other Contributors related to those performance
|
|
185
|
+
claims and warranties, and if a court requires any other Contributor to
|
|
186
|
+
pay any damages as a result, the Commercial Contributor must pay
|
|
187
|
+
those damages.
|
|
188
|
+
|
|
189
|
+
5. NO WARRANTY
|
|
190
|
+
|
|
191
|
+
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
|
|
192
|
+
PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS"
|
|
193
|
+
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
|
|
194
|
+
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
|
|
195
|
+
TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
|
|
196
|
+
PURPOSE. Each Recipient is solely responsible for determining the
|
|
197
|
+
appropriateness of using and distributing the Program and assumes all
|
|
198
|
+
risks associated with its exercise of rights under this Agreement,
|
|
199
|
+
including but not limited to the risks and costs of program errors,
|
|
200
|
+
compliance with applicable laws, damage to or loss of data, programs
|
|
201
|
+
or equipment, and unavailability or interruption of operations.
|
|
202
|
+
|
|
203
|
+
6. DISCLAIMER OF LIABILITY
|
|
204
|
+
|
|
205
|
+
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
|
|
206
|
+
PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
|
|
207
|
+
SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
208
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
|
|
209
|
+
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
210
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
211
|
+
ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
|
|
212
|
+
EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
|
|
213
|
+
POSSIBILITY OF SUCH DAMAGES.
|
|
214
|
+
|
|
215
|
+
7. GENERAL
|
|
216
|
+
|
|
217
|
+
If any provision of this Agreement is invalid or unenforceable under
|
|
218
|
+
applicable law, it shall not affect the validity or enforceability of
|
|
219
|
+
the remainder of the terms of this Agreement, and without further
|
|
220
|
+
action by the parties hereto, such provision shall be reformed to the
|
|
221
|
+
minimum extent necessary to make such provision valid and enforceable.
|
|
222
|
+
|
|
223
|
+
If Recipient institutes patent litigation against any entity
|
|
224
|
+
(including a cross-claim or counterclaim in a lawsuit) alleging that the
|
|
225
|
+
Program itself (excluding combinations of the Program with other software
|
|
226
|
+
or hardware) infringes such Recipient's patent(s), then such Recipient's
|
|
227
|
+
rights granted under Section 2(b) shall terminate as of the date such
|
|
228
|
+
litigation is filed.
|
|
229
|
+
|
|
230
|
+
All Recipient's rights under this Agreement shall terminate if it
|
|
231
|
+
fails to comply with any of the material terms or conditions of this
|
|
232
|
+
Agreement and does not cure such failure in a reasonable period of
|
|
233
|
+
time after becoming aware of such noncompliance. If all Recipient's
|
|
234
|
+
rights under this Agreement terminate, Recipient agrees to cease use
|
|
235
|
+
and distribution of the Program as soon as reasonably practicable.
|
|
236
|
+
However, Recipient's obligations under this Agreement and any licenses
|
|
237
|
+
granted by Recipient relating to the Program shall continue and survive.
|
|
238
|
+
|
|
239
|
+
Everyone is permitted to copy and distribute copies of this Agreement,
|
|
240
|
+
but in order to avoid inconsistency the Agreement is copyrighted and
|
|
241
|
+
may only be modified in the following manner. The Agreement Steward
|
|
242
|
+
reserves the right to publish new versions (including revisions) of
|
|
243
|
+
this Agreement from time to time. No one other than the Agreement
|
|
244
|
+
Steward has the right to modify this Agreement. The Eclipse Foundation
|
|
245
|
+
is the initial Agreement Steward. The Eclipse Foundation may assign the
|
|
246
|
+
responsibility to serve as the Agreement Steward to a suitable separate
|
|
247
|
+
entity. Each new version of the Agreement will be given a distinguishing
|
|
248
|
+
version number. The Program (including Contributions) may always be
|
|
249
|
+
Distributed subject to the version of the Agreement under which it was
|
|
250
|
+
received. In addition, after a new version of the Agreement is published,
|
|
251
|
+
Contributor may elect to Distribute the Program (including its
|
|
252
|
+
Contributions) under the new version.
|
|
253
|
+
|
|
254
|
+
Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
|
|
255
|
+
receives no rights or licenses to the intellectual property of any
|
|
256
|
+
Contributor under this Agreement, whether expressly, by implication,
|
|
257
|
+
estoppel or otherwise. All rights in the Program not expressly granted
|
|
258
|
+
under this Agreement are reserved. Nothing in this Agreement is intended
|
|
259
|
+
to be enforceable by any entity that is not a Contributor or Recipient.
|
|
260
|
+
No third-party beneficiary rights are created under this Agreement.
|
|
261
|
+
|
|
262
|
+
Exhibit A - Form of Secondary Licenses Notice
|
|
263
|
+
|
|
264
|
+
"This Source Code may also be made available under the following
|
|
265
|
+
Secondary Licenses when the conditions for such availability set forth
|
|
266
|
+
in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
|
|
267
|
+
version(s), and exceptions or additional permissions here}."
|
|
268
|
+
|
|
269
|
+
Simply including a copy of this Agreement, including this Exhibit A
|
|
270
|
+
is not sufficient to license the Source Code under Secondary Licenses.
|
|
271
|
+
|
|
272
|
+
If it is not possible or desirable to put the notice in a particular
|
|
273
|
+
file, then You may include the notice in a location (such as a LICENSE
|
|
274
|
+
file in a relevant directory) where a recipient would be likely to
|
|
275
|
+
look for such a notice.
|
|
276
|
+
|
|
277
|
+
You may add additional accurate notices of copyright ownership.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# @judo/components
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@mui/material"),r=require("react"),n=require("@mdi/js"),i=require("@mdi/react"),o=require("@mui/icons-material"),a=require("@mui/x-date-pickers"),l=require("@mui/x-data-grid"),s=require("notistack"),d=require("react-router-dom");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(i);const p=({confirmationMessage:n,title:i,resolve:o,open:a,handleClose:l})=>{const s=r.useRef(null);r.useEffect((()=>{if(a){const{current:e}=s;null!==e&&e.focus()}}),[a]);return e.jsxs(t.Dialog,{open:a,onClose:l,scroll:"paper",fullWidth:!0,maxWidth:"xs",children:[i&&e.jsx(t.DialogTitle,{id:"scroll-dialog-title",children:i}),e.jsx(t.DialogContent,{dividers:!!i,children:e.jsx(t.DialogContentText,{id:"scroll-dialog-description",ref:s,tabIndex:-1,children:n})}),e.jsxs(t.DialogActions,{children:[e.jsx(t.Button,{variant:"text",onClick:()=>{l(),o(!1)},children:"No"}),e.jsx(t.Button,{variant:"text",onClick:()=>{l(),o(!0)},children:"Yes"})]})]})},h=new Map([[null,"Unknown"],[!0,"Yes"],[!1,"No"]]);var x;!function(e){e[e.boolean=0]="boolean",e[e.numeric=1]="numeric",e[e.string=2]="string",e[e.enumeration=3]="enumeration",e[e.date=4]="date",e[e.dateTime=5]="dateTime",e[e.trinaryLogic=6]="trinaryLogic"}(x||(x={}));const g=e=>null!=e,m=(e,t,r)=>{if(g(e[0].location)){if(t("Please make sure all fields are filled in correctly.",{variant:"error",preventDuplicate:!0,persist:!r?.duration,autoHideDuration:r?.duration??void 0}),void 0!==r?.setValidation){let t=new Map;e.forEach((e=>t.set(e.location,e.code))),r?.setValidation(t)}}else t(e[0].code,{variant:"error",preventDuplicate:!0,persist:!r?.duration,autoHideDuration:r?.duration??void 0})},f=e=>{e("Something went wrong. Please contact with the system admins.",{variant:"error",preventDuplicate:!0,persist:!0})},b=e=>({message:e.code}),v={marginTop:8,marginBottom:8,display:"flex",flexDirection:"column",alignItems:"center"},y=t.createTheme({palette:{mode:"light",primary:{main:"#3C4166FF"},secondary:{main:"#E7501DFF"},text:{primary:"#17191DFF",secondary:"#434448FF"},background:{default:"#FAFAFAFF"},subtitleColor:{main:"#8c8c8c"}},typography:{h5:{fontWeight:500,fontSize:26,letterSpacing:.5}},shape:{borderRadius:8},components:{MuiTab:{defaultProps:{disableRipple:!0}}},mixins:{toolbar:{minHeight:48}}}),j={...y,components:{MuiAppBar:{styleOverrides:{colorPrimary:{backgroundColor:y.palette.background.default}}},MuiButton:{defaultProps:{variant:"contained",size:"small"},styleOverrides:{root:{textTransform:"none",borderRadius:"20px 20px 20px 20px",paddingLeft:15,paddingRight:15},contained:{boxShadow:"none","&:active":{boxShadow:"none"}},outlined:{border:"2px solid",fontWeight:"bold","&:hover":{border:"2px solid",background:t.alpha(y.palette.primary.main,.15)}}}},MuiInputLabel:{styleOverrides:{root:{color:y.palette.subtitleColor.main,fontWeight:500,fontSize:16,"&.Mui-focused":{color:y.palette.subtitleColor.main}}}},MuiFilledInput:{styleOverrides:{input:{"&:-webkit-autofill":{WebkitBackgroundClip:"text !important"}},root:{background:"inherit","&.Mui-focused":{background:"inherit"},"&:hover:not(.Mui-disabled):not(.Mui-focused)":{background:t.alpha(y.palette.secondary.main,.1)},"&:hover:not(.Mui-disabled):before":{borderBottom:"none"},"&.Mui-focused .MuiInputAdornment-root .MuiSvgIcon-root":{color:y.palette.secondary.main}}}},MuiTextField:{defaultProps:{fullWidth:!0,variant:"filled",color:"secondary"},styleOverrides:{root:{background:"white","& .MuiFilledInput-underline:before":{borderBottom:"none"},"&.Mui-readOnly:not(.Mui-disabled):not(.Mui-focused)":{borderBottom:`1px solid ${t.alpha(y.palette.primary.main,.2)}`,background:"transparent"},"&:not(.Mui-readOnly):not(.Mui-disabled)":{boxShadow:"0px 0px 8px 2px rgba(0,0,0,0.05)",borderRadius:"8px 8px 0 0"}}}},MuiSelect:{styleOverrides:{filled:{"&:focus":{backgroundColor:"white"}}}},MuiDataGrid:{styleOverrides:{root:{border:"none"},toolbarContainer:{padding:"8px 8px 4px 8px"}}},MuiPaper:{styleOverrides:{rounded:{boxShadow:"0px 0px 8px 1px rgba(0,0,0,0.05)",borderRadius:16,padding:8}}},MuiDrawer:{styleOverrides:{paper:{border:"none",boxShadow:"0px 0px 8px 1px rgba(0,0,0,0.05)"}}},MuiTabs:{styleOverrides:{root:{marginLeft:y.spacing(1)},indicator:{height:3,borderTopLeftRadius:3,borderTopRightRadius:3,backgroundColor:y.palette.common.white}}},MuiTab:{styleOverrides:{root:{textTransform:"none",margin:"0 16px",minWidth:0,padding:0,[y.breakpoints.up("md")]:{padding:0,minWidth:0}}}},MuiIconButton:{styleOverrides:{root:{color:y.palette.secondary.main,padding:y.spacing(1)}}},MuiTooltip:{styleOverrides:{tooltip:{borderRadius:4}}},MuiDivider:{styleOverrides:{root:{backgroundColor:"rgb(255,255,255,0.15)"},middle:{marginTop:8,marginBottom:8}}},MuiListItemButton:{defaultProps:{disableTouchRipple:!0}},MuiListItemText:{styleOverrides:{primary:{fontSize:14,fontWeight:y.typography.fontWeightMedium}}},MuiListItemIcon:{styleOverrides:{root:{color:"inherit",minWidth:"auto",marginRight:y.spacing(2),"& svg":{fontSize:20}}}},MuiAvatar:{styleOverrides:{root:{width:32,height:32}}},MuiCard:{styleOverrides:{root:{width:"100%",length:"100%",padding:10}}}}};var C,w,O,k;function D({children:n,id:i,menuItems:a,disabled:l=!1,showDropdownIcon:s=!0,fullWidth:d=!1,variant:u="contained"}){const[c,p]=r.useState(!1),h=r.useRef(null),x=e=>{h.current&&h.current.contains(e.target)||p(!1)};function g(e){"Tab"===e.key?(e.preventDefault(),p(!1)):"Escape"===e.key&&p(!1)}const m=r.useRef(c);return r.useEffect((()=>{m.current&&!c&&h.current.focus(),m.current=c}),[c]),e.jsxs(e.Fragment,{children:[e.jsx(t.Button,{ref:h,id:i,onClick:()=>{p((e=>!e))},endIcon:s&&e.jsx(o.KeyboardArrowDown,{}),disabled:l,fullWidth:d,variant:u,children:n}),e.jsx(t.Popper,{open:c,anchorEl:h.current,placement:"bottom",transition:!0,style:{zIndex:1400,minWidth:h.current?.scrollWidth},children:({TransitionProps:r,placement:n})=>e.jsx(t.Grow,{...r,style:{transformOrigin:"bottom-start"===n?"left top":"left bottom"},children:e.jsx(t.Paper,{children:e.jsx(t.ClickAwayListener,{onClickAway:x,children:e.jsx(t.MenuList,{autoFocusItem:c,onKeyDown:g,children:a.filter((e=>e.visible??!0)).map(((r,n)=>e.jsxs(t.MenuItem,{id:r.label??""+n,disabled:r.disabled??!1,onClick:e=>{x(e),r.onClick()},children:[r.startIcon,r.label,r.endIcon]})))})})})})})]})}!function(e){e.equals="equals"}(C||(C={})),function(e){e.equals="equals",e.notEquals="notEquals"}(w||(w={})),function(e){e.lessThan="lessThan",e.greaterThan="greaterThan",e.lessOrEqual="lessOrEqual",e.greaterOrEqual="greaterOrEqual",e.equal="equal",e.notEqual="notEqual"}(O||(O={})),function(e){e.lessThan="lessThan",e.greaterThan="greaterThan",e.lessOrEqual="lessOrEqual",e.greaterOrEqual="greaterOrEqual",e.equal="equal",e.notEqual="notEqual",e.matches="matches",e.like="like"}(k||(k={}));const T=({readOnly:r=!1,value:n=null,id:i,label:a,name:l,error:s,helperText:d,onChange:u})=>{const c=u?e=>{const t=Array.from(h.values()).indexOf(e.target.value),r=Array.from(h.keys());u(r[t])}:void 0;return e.jsx(t.TextField,{name:l,id:i,label:a,select:!0,value:h.get(n),onChange:c,className:r?"Mui-readOnly":void 0,error:s,helperText:d,InputProps:{readOnly:r,startAdornment:e.jsx(t.InputAdornment,{position:"start",children:e.jsx(o.CheckBoxOutlined,{})})},children:Array.from(h.keys()).map((r=>e.jsx(t.MenuItem,{value:h.get(r),children:h.get(r)},h.get(r))))})},I=e=>{switch(e){case x.boolean:return C.equals;case x.date:case x.dateTime:return O.equal;case x.enumeration:return w.equals;case x.numeric:return O.equal;case x.string:return k.equal;case x.trinaryLogic:return C.equals}},P=e=>{switch(e.filterOption.filterType){case x.boolean:return Object.values(C);case x.date:case x.dateTime:return Object.values(O);case x.enumeration:return Object.values(w);case x.numeric:return Object.values(O);case x.string:return Object.values(k);case x.trinaryLogic:return Object.values(C)}},M=({filter:r,setFilterOperator:n})=>e.jsx(t.TextField,{name:"operation",id:"operation",label:"Operation",select:!0,value:r.filterBy.operator,onChange:e=>{n(r,((e,t)=>{switch(e.filterOption.filterType){case x.boolean:return C[t];case x.date:case x.dateTime:return O[t];case x.enumeration:return w[t];case x.numeric:return O[t];case x.string:return k[t];case x.trinaryLogic:return C[t]}})(r,e.target.value))},children:P(r).map((r=>e.jsx(t.MenuItem,{value:r,children:r},r)))}),S=({filter:r,setFilterValue:i})=>{if(r.filterOption.filterType===x.enumeration&&!g(r.filterOption.enumValues))throw new Error(`Missing enumValues from FilterOptions of ${r.filterOption.attributeName}`);return e.jsx(e.Fragment,{children:(()=>{switch(r.filterOption.filterType){case x.boolean:return e.jsx(t.FormControlLabel,{control:e.jsx(t.Checkbox,{checked:!!r.filterBy.value,onChange:e=>i(r,!!e.target.value)}),label:r.filterOption.attributeName});case x.date:return e.jsx(a.DatePicker,{renderInput:r=>e.jsx(t.TextField,{...r}),label:r.filterOption.attributeName,value:r.filterBy.value??null,onChange:e=>i(r,(e=>e?e.toISOString().substring(0,10):e)(e)),InputProps:{startAdornment:e.jsx(t.InputAdornment,{position:"start",children:e.jsx(c.default,{path:n.mdiCalendarMonth,size:1})})}});case x.dateTime:return e.jsx(a.DateTimePicker,{renderInput:r=>e.jsx(t.TextField,{...r}),label:r.filterOption.attributeName,value:r.filterBy.value??null,onChange:e=>i(r,e),InputProps:{startAdornment:e.jsx(t.InputAdornment,{position:"start",children:e.jsx(c.default,{path:n.mdiCalendarClock,size:1})})}});case x.enumeration:return e.jsx(t.TextField,{label:r.filterOption.attributeName,value:r.filterBy.value,select:!0,onChange:e=>i(r,e.target.value),children:r.filterOption.enumValues?.map((r=>e.jsx(t.MenuItem,{value:r,children:r},r)))});case x.numeric:return e.jsx(t.TextField,{label:r.filterOption.attributeName,type:"number",value:r.filterBy.value,onChange:e=>i(r,Number(e.target.value)),InputProps:{startAdornment:e.jsx(t.InputAdornment,{position:"start",children:e.jsx(c.default,{path:n.mdiNumeric,size:1})})}});case x.string:return e.jsx(t.TextField,{label:r.filterOption.attributeName,value:r.filterBy.value,onChange:e=>i(r,e.target.value),InputProps:{startAdornment:e.jsx(t.InputAdornment,{position:"start",children:e.jsx(c.default,{path:n.mdiFormatTextVariant,size:1})})}});case x.trinaryLogic:return e.jsx(T,{label:r.filterOption.attributeName,value:r.filterBy.value,onChange:e=>i(r,e)})}})()})},F=({filter:r,closeHandler:n,setFilterOperator:i,setFilterValue:a})=>e.jsxs(t.Grid,{item:!0,container:!0,spacing:2,alignItems:"center",children:[e.jsx(t.Grid,{item:!0,xs:4,children:r&&e.jsx(M,{filter:r,setFilterOperator:i})}),e.jsx(t.Grid,{item:!0,xs:7,children:r&&e.jsx(S,{filter:r,setFilterValue:a})}),e.jsx(t.Grid,{item:!0,xs:1,children:e.jsx(t.IconButton,{onClick:()=>n(r),children:e.jsx(o.Close,{})})})]}),B=r.forwardRef((function(r,n){return e.jsx(t.Slide,{direction:"left",ref:n,...r})})),A=({filters:n,filterOptions:i,resolve:o,open:a,handleClose:l})=>{const s=r.useRef(null),[d,u]=r.useState(n??[]);r.useEffect((()=>{if(a){const{current:e}=s;null!==e&&e.focus()}}),[a]);const c=(e,t)=>{u((r=>r.map((r=>e.id===r.id?{...r,filterBy:{value:t,operator:r.filterBy.operator}}:r))))},p=(e,t)=>{u((r=>r.map((r=>e.id===r.id?{...r,filterBy:{value:r.filterBy.value,operator:t}}:r))))},h=e=>{u((t=>[...t.filter((t=>t.id!==e.id))]))},x=()=>{l(),o(void 0)};return e.jsxs(t.Dialog,{open:a,onClose:x,scroll:"paper",TransitionComponent:B,disableEnforceFocus:!0,fullWidth:!0,maxWidth:"sm",sx:{"& .MuiDialog-container":{justifyContent:"flex-end"}},PaperProps:{sx:{m:0,height:"100%"}},children:[e.jsx(t.DialogTitle,{id:"scroll-dialog-title",children:e.jsx(t.Typography,{component:"span",color:"text.primary",variant:"h5",children:"Filters"})}),e.jsx(t.DialogContent,{dividers:!0,children:e.jsx(t.DialogContentText,{id:"scroll-dialog-description",ref:s,tabIndex:-1,children:e.jsx(t.Container,{component:"main",maxWidth:"xs",children:e.jsx(t.Box,{sx:v,children:e.jsxs(t.Grid,{container:!0,spacing:2,children:[d.map((t=>e.jsx(F,{filter:t,closeHandler:h,setFilterOperator:p,setFilterValue:c},t.id))),e.jsx(t.Grid,{item:!0,container:!0,children:e.jsx(D,{fullWidth:!0,showDropdownIcon:!1,menuItems:i.map((e=>({label:e.label??e.attributeName,onClick:()=>u((t=>[...t,{id:t.length,filterOption:{attributeName:e.attributeName,label:e.label,filterType:e.filterType},filterBy:{operator:I(e.filterType)}}]))}))),children:"Add new filter"})})]})})})})}),e.jsxs(t.DialogActions,{children:[e.jsx(t.Button,{fullWidth:!0,variant:"outlined",onClick:x,children:"Cancel"}),e.jsxs(t.Button,{fullWidth:!0,onClick:()=>{l(),o(d)},children:["Apply ","("+d.length+")"]})]})]})},E=({page:n,open:i,handleClose:o,resolve:a})=>{const l=r.useRef(null);r.useEffect((()=>{if(i){const{current:e}=l;null!==e&&e.focus()}}),[i]);const s=()=>{a(),o()};return e.jsxs(t.Dialog,{open:i,onClose:s,scroll:"paper",children:[e.jsx(t.DialogContent,{dividers:!0,children:e.jsx(t.DialogContentText,{ref:l,tabIndex:-1,children:n})}),e.jsx(t.DialogActions,{children:e.jsx(t.Button,{onClick:s,children:"Ok"})})]})},q=r=>e.jsx(t.TablePagination,{component:"div",count:-1,page:r.page,onPageChange:async(e,t)=>{let n=!0;t<r.page&&(n=!1),r.setPage(t),await r.pageChange(n)},rowsPerPage:r.rowPerPage,rowsPerPageOptions:[r.rowPerPage],labelDisplayedRows:({from:e,to:t})=>`${e}–${t}`,nextIconButtonProps:{disabled:!r.isNextButtonEnabled},backIconButtonProps:{disabled:0===r.page}}),R=({resolve:n,open:i,handleClose:o,single:a=!1,columns:d,defaultSortField:u,rangeCall:c,alreadySelectedItems:p,initalQueryCustomizer:h,filterOptions:x})=>{const{openFilterDialog:v}=G(),{enqueueSnackbar:y}=s.useSnackbar(),j=r.useRef(null),[C,w]=r.useState(!1),[O,k]=r.useState(0),[D,T]=r.useState([u]),[I,P]=r.useState(),[M,S]=r.useState(),[F,B]=r.useState(!0),[A,E]=r.useState(0),[R,N]=r.useState([]),[W,L]=r.useState(p??(a?void 0:[])),[z,_]=r.useState([]),[V,H]=r.useState([]),[Q,$]=r.useState({...h,_seek:{limit:6}}),J=async e=>{$((t=>({...t,_seek:{limit:e?6:5,reverse:!e,lastItem:e?I:M}}))),B(!e)},K=async()=>{w(!0);try{const e=await c(Q);e.length>5?(B(!0),e.pop()):6===Q._seek?.limit&&B(!1),N(e),S(e[0]),P(e[e.length-1]),k(e.length||0)}catch(e){((e,t,r)=>{if(!e||"boolean"!=typeof e.isAxiosError||!0!==e.isAxiosError)return void f(t);const n=e.response;if(g(n))if(n?.status)if(422===n?.status)t(b(e.response?.data).message,{variant:"error",preventDuplicate:!0,persist:!0});else{if(400===n?.status)return m(n.data,t,r);t(b(n?.data).message,{variant:"error",preventDuplicate:!0,persist:!0})}else f(t);else f(t)})(e,y)}w(!1)};r.useEffect((()=>{K()}),[Q]),r.useEffect((()=>{if(i){const{current:e}=j;null!==e&&e.focus()}}),[i]);const Y=()=>{o(),n(void 0)};return e.jsxs(t.Dialog,{open:i,onClose:Y,scroll:"paper",fullWidth:!0,maxWidth:"sm",children:[e.jsx(t.DialogTitle,{id:"scroll-dialog-title",children:"Select"}),e.jsx(t.DialogContent,{dividers:!0,children:e.jsx(t.DialogContentText,{id:"scroll-dialog-description",ref:j,tabIndex:-1,children:e.jsx(l.DataGrid,{sx:a?{".MuiDataGrid-columnHeaderCheckbox .MuiDataGrid-columnHeaderTitleContainer":{display:"none"}}:void 0,autoHeight:!0,getRowId:e=>e.__identifier,loading:C,paginationMode:"server",rows:R,rowCount:O,sortingOrder:["desc","asc"],sortingMode:"server",sortModel:D,onSortModelChange:e=>{E(0),T(e);const{field:t,sort:r}=e[0];$((e=>({...e,_orderBy:[{attribute:t,descending:"desc"===r}]})))},checkboxSelection:!0,onSelectionModelChange:a?e=>{if(Array.isArray(W))return;if(0===e.length)return L(""),void _(void 0);const t=e[e.length-1];L(t),_(R.find((e=>e.__identifier===t)))}:e=>{if(Array.isArray(W)){if(e.length>W.length){const t=e.length-W.length,r=[...e].slice(-1*t),n=R.filter((e=>-1!==r.indexOf(e.__identifier)));_((e=>{if(Array.isArray(e))return[...e,...n]}))}if(e.length<W.length){const t=W.filter((t=>-1===e.indexOf(t)));_((e=>{if(Array.isArray(e))return[...e.filter((e=>-1===t.indexOf(e.__identifier)))]}))}L(e)}},isRowSelectable:a?void 0:e=>{if(p){if(!Array.isArray(p))throw Error("Range dialog gets wrong alreadySelectedItems.");return!p.includes(e.id)}return!0},selectionModel:W,hideFooterSelectedRowCount:a,columns:d,keepNonExistentRowsSelected:!0,components:{Toolbar:()=>e.jsx(l.GridToolbarContainer,{children:e.jsxs(t.Button,{variant:"outlined",onClick:async()=>{const e=await v(x,V);e&&(e=>{E(0),H(e),$((t=>{const r={...t};return x.forEach((t=>r[t.attributeName]=mapFiltersToQueryCustomizerProperty(e,t.attributeName))),{...t,_seek:{lastItem:void 0,limit:6,reverse:void 0},...r}}))})(e)},disabled:C,children:["Set filters ",0!==V.length?"("+V.length+")":""]})}),Pagination:()=>e.jsx(q,{pageChange:J,isNextButtonEnabled:F,page:A,setPage:E,rowPerPage:5})}})})}),e.jsxs(t.DialogActions,{children:[e.jsx(t.Button,{onClick:Y,children:"Cancel"}),e.jsx(t.Button,{onClick:()=>{o(),n(z)},children:"Ok"})]})]})},N=r.createContext(),W=r.createContext(),L=r.createContext(),z=r.createContext(),G=()=>{const e=r.useContext(z);if(void 0===e)throw new Error("useFilterDialog was used outside of its Provider");return e},_=(r,n)=>r.map(((r,i)=>({field:r.label+i,headerName:"",align:"center",type:"actions",renderCell:i=>e.jsxs(t.Button,{variant:"text",onClick:()=>r.action(i.row),children:[r.icon,(n?.showLabel??!0)&&r.label]})}))),V=t=>0===t.length?[]:[{field:"actions",headerName:"",align:"center",type:"actions",renderCell:r=>e.jsx(D,{variant:"text",showDropdownIcon:!1,menuItems:t.map((e=>({label:e.label,startIcon:e.icon,onClick:()=>e.action(r.row)}))),children:e.jsx(o.MoreHoriz,{})})}],H=({value:r,disabled:n,onCreate:i,onDelete:a,onView:l})=>{let s;return s=g(r)?e.jsxs(e.Fragment,{children:[l&&e.jsx(t.IconButton,{disabled:n,onClick:l,children:e.jsx(o.Visibility,{})}),a&&e.jsx(t.IconButton,{disabled:n,onClick:a,children:e.jsx(o.Delete,{})})]}):e.jsx(e.Fragment,{children:i&&e.jsx(t.IconButton,{disabled:n,onClick:i,children:e.jsx(o.NoteAdd,{})})}),e.jsx(e.Fragment,{children:s})},Q=({value:r,disabled:n,onRemove:i})=>{let a;return a=g(r)?e.jsx(e.Fragment,{children:i&&e.jsx(t.IconButton,{disabled:n,onClick:i,children:e.jsx(o.LinkOff,{})})}):e.jsx(e.Fragment,{}),e.jsx(e.Fragment,{children:a})},$=r.createContext(),J=r.createContext([]),K=()=>{const e=r.useContext($);if(void 0===e)throw new Error("useJudoNavigation was used outside of its Provider");return e},Y={py:"2px",px:3,color:j.palette.text.secondary,"&:hover, &:focus":{color:j.palette.secondary.main},"&.Mui-selected":{color:j.palette.secondary.main}};exports.AggregationInput=({name:n,id:i,label:o,value:a,error:l=!1,helperText:s,disabled:d=!1,readonly:u=!0,labelList:c,icon:p,onSet:h,onView:x,onCreate:g,onRemove:m,onDelete:f})=>{const[b,v]=r.useState(!1);let y;return y=u?e.jsx(H,{value:a,disabled:d,onCreate:g,onView:x,onDelete:f}):e.jsx(Q,{value:a,disabled:d,onRemove:m}),e.jsxs(t.Grid,{container:!0,item:!0,direction:"row",justifyContent:"stretch",alignContent:"stretch",children:[e.jsx(t.ButtonBase,{sx:{padding:0},disabled:d||u,onFocusCapture:()=>v(!0),onBlur:()=>v(!1),onClick:h,children:e.jsx(t.TextField,{disabled:!h||d,name:n,id:i,label:o,error:l,helperText:s,focused:b,fullWidth:!0,value:c.join(" - "),className:u?"Mui-readOnly":void 0,sx:{":hover":{cursor:"pointer"},".MuiFilledInput-input:hover":{cursor:"pointer"}},InputProps:{readOnly:!0,startAdornment:e.jsx(t.InputAdornment,{position:"start",children:p})}})}),y]})},exports.BreadcrumbProvider=({children:t})=>{const n=d.useNavigate(),i=d.useLocation(),[o,a]=r.useState([]),[l,s]=r.useState({});r.useEffect((()=>{s((e=>({...e,key:"0."+i.pathname,path:i.pathname})))}),[]);const u={clearNavigate:e=>{a([]),s({key:"0."+e.toString(),label:null,path:e}),n(e)},navigate:e=>{if(null===l.label)throw Error("Page title has not been set!");a((e=>[...e,l])),s({key:o.length+"."+e.toString(),label:null,path:e}),n(e)},back:()=>{if(0!==o.length){const e=o[o.length-1];return s(e),a((e=>[...e.slice(0,e.length-1)])),void n(e.path)}a([]),s({key:"0."+"/".toString(),label:null,path:"/"}),n("/")},isBackDisabled:r.useMemo((()=>0===o.length),[o]),setTitle:e=>{s((t=>({...t,label:e})))}};return e.jsx(J.Provider,{value:o,children:e.jsx($.Provider,{value:u,children:t})})},exports.ConfirmationDialog=p,exports.CustomBreadcrumb=()=>{const n=r.useContext(J);return e.jsxs(t.Breadcrumbs,{maxItems:2,separator:">",children:[e.jsx(o.Home,{}),n.map((({label:r,key:n},i)=>e.jsx(t.Typography,{color:"text.primary",children:r},n)))]})},exports.CustomLink=function({children:r,to:n,...i}){const o=d.useResolvedPath(n),a=d.useMatch({path:o.pathname,end:!0}),{clearNavigate:l}=K();return e.jsx(t.ListItem,{disablePadding:!0,style:{textDecoration:"none"},children:e.jsx(t.ListItemButton,{selected:!!a,sx:Y,onClick:()=>{l(n)},children:r})})},exports.CustomTablePagination=q,exports.DialogProvider=({children:t})=>{const[n,i]=r.useState(!1),[o,a]=r.useState(),l=()=>{i(!1)},s={openPageDialog:async t=>(i(!0),new Promise((r=>{a(e.jsx(E,{page:t,handleClose:l,open:!0,resolve:r}))})))},[d,u]=r.useState(!1),[c,h]=r.useState(),x=()=>{u(!1)},g={openRangeDialog:async({columns:t,defaultSortField:r,rangeCall:n,single:i=!1,alreadySelectedItems:o,filterOptions:a,initialQueryCustomizer:l})=>(u(!0),new Promise((s=>{h(e.jsx(R,{handleClose:x,open:!0,resolve:s,columns:t,defaultSortField:r,rangeCall:n,single:i,alreadySelectedItems:o,filterOptions:a,initalQueryCustomizer:l}))})))},[m,f]=r.useState(!1),[b,v]=r.useState(),y=()=>(f(!1),!1),j={openConfirmDialog:async(t,r)=>(f(!0),new Promise((n=>{v(e.jsx(p,{confirmationMessage:t,title:r,handleClose:y,open:!0,resolve:n}))})))},[C,w]=r.useState(!1),[O,k]=r.useState(),D=()=>(w(!1),!1),T={openFilterDialog:async(t,r)=>(w(!0),new Promise((n=>{k(e.jsx(A,{filters:r,filterOptions:t,handleClose:D,open:!0,resolve:n}))})))};return e.jsx(N.Provider,{value:s,children:e.jsx(W.Provider,{value:j,children:e.jsx(L.Provider,{value:g,children:e.jsxs(z.Provider,{value:T,children:[t,n&&o,m&&b,d&&c,C&&O]})})})})},exports.DropdownButton=D,exports.FilterDialog=A,exports.PageDialog=E,exports.PageHeader=({title:n,children:i})=>{const{setTitle:o}=K();return r.useEffect((()=>{o(n)}),[n]),e.jsxs(e.Fragment,{children:[e.jsx(t.AppBar,{component:"div",position:"static",elevation:0,sx:{zIndex:0},children:e.jsx(t.Toolbar,{children:e.jsxs(t.Grid,{container:!0,alignItems:"center",spacing:1,children:[e.jsx(t.Grid,{item:!0,xs:!0,children:e.jsx(t.Typography,{component:"span",color:"text.primary",variant:"h5",children:n})}),i]})})}),e.jsx(t.Divider,{})]})},exports.RangeDialog=R,exports.columnsActionCalculator=(e,t)=>{if(!g(e)||0===e.length)return[];let r=1;if(t?.shownActions&&(r=e.length<t.shownActions?e.length:t.shownActions),r<0)return _(e,t);if(0===r)return[];if(1===r)return V(e);{const n=e.length===r?r:r-1,i=e.slice(0,n),o=e.slice(n);return[..._(i,t),...V(o)]}},exports.useConfirmDialog=()=>{const e=r.useContext(W);if(void 0===e)throw new Error("useConfirmDialog was used outside of its Provider");return e},exports.useFilterDialog=G,exports.useJudoNavigation=K,exports.usePageDialog=()=>{const e=r.useContext(N);if(void 0===e)throw new Error("useConfirmDialog was used outside of its Provider");return e},exports.useRangeDialog=()=>{const e=r.useContext(L);if(void 0===e)throw new Error("useRangeDialog was used outside of its Provider");return e};
|
|
2
|
+
//# sourceMappingURL=components.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.cjs","sources":["../../src/dialog/ConfirmationDialog.tsx","../../../components-api/dist/esm/components-api.mjs","../../../utilities/dist/esm/utilities.mjs","../../../theme/dist/esm/theme.mjs","../../../data-api-common/dist/esm/data-api-common.mjs","../../src/DropdownButton.tsx","../../src/TrinaryLogicCombobox.tsx","../../src/dialog/FilterDialog.tsx","../../src/dialog/PageDialog.tsx","../../src/CustomTablePagination.tsx","../../src/dialog/RangeDialog.tsx","../../src/dialog/DialogContext.tsx","../../src/table/table-row-actions.tsx","../../src/AggregationInput.tsx","../../src/CustomBreadcrumb.tsx","../../src/CustomLink.tsx","../../src/PageHeader.tsx"],"sourcesContent":["import { Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button } from '@mui/material';\nimport { useEffect, useRef } from 'react';\nimport type { ConfirmationDialogProps } from '@judo/components-api';\n\nexport const ConfirmationDialog = ({\n confirmationMessage,\n title,\n resolve,\n open,\n handleClose,\n}: ConfirmationDialogProps) => {\n const descriptionElementRef = useRef<HTMLElement>(null);\n useEffect(() => {\n if (open) {\n const { current: descriptionElement } = descriptionElementRef;\n if (descriptionElement !== null) {\n descriptionElement.focus();\n }\n }\n }, [open]);\n\n const cancel = () => {\n handleClose();\n resolve(false);\n };\n\n const ok = () => {\n handleClose();\n resolve(true);\n };\n\n return (\n <Dialog open={open} onClose={handleClose} scroll=\"paper\" fullWidth={true} maxWidth={'xs'}>\n {title && <DialogTitle id=\"scroll-dialog-title\">{title}</DialogTitle>}\n <DialogContent dividers={!!title}>\n <DialogContentText id=\"scroll-dialog-description\" ref={descriptionElementRef} tabIndex={-1}>\n {confirmationMessage}\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button variant=\"text\" onClick={cancel}>\n No\n </Button>\n <Button variant=\"text\" onClick={ok}>\n Yes\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n","const TRINARY_LOGIC = new Map([\n [null, 'Unknown'],\n [true, 'Yes'],\n [false, 'No'],\n]);\n\nvar FilterType;\n(function (FilterType) {\n FilterType[FilterType[\"boolean\"] = 0] = \"boolean\";\n FilterType[FilterType[\"numeric\"] = 1] = \"numeric\";\n FilterType[FilterType[\"string\"] = 2] = \"string\";\n FilterType[FilterType[\"enumeration\"] = 3] = \"enumeration\";\n FilterType[FilterType[\"date\"] = 4] = \"date\";\n FilterType[FilterType[\"dateTime\"] = 5] = \"dateTime\";\n // time,\n FilterType[FilterType[\"trinaryLogic\"] = 6] = \"trinaryLogic\";\n})(FilterType || (FilterType = {}));\n\nexport { FilterType, TRINARY_LOGIC };\n","const e=e=>null!=e,t=e=>e?e.toISOString().substring(0,10):e,r=(t,r,s)=>{if(!t||\"boolean\"!=typeof t.isAxiosError||!0!==t.isAxiosError)return void a(r);const n=t.response;if(e(n))if(n?.status)if(422===n?.status)r(o(t.response?.data).message,{variant:\"error\",preventDuplicate:!0,persist:!0});else{if(400===n?.status)return i(n.data,r,s);r(o(n?.data).message,{variant:\"error\",preventDuplicate:!0,persist:!0})}else a(r);else a(r)},i=(t,r,i)=>{if(e(t[0].location)){if(r(\"Please make sure all fields are filled in correctly.\",{variant:\"error\",preventDuplicate:!0,persist:!i?.duration,autoHideDuration:i?.duration??void 0}),void 0!==i?.setValidation){let e=new Map;t.forEach((t=>e.set(t.location,t.code))),i?.setValidation(e)}}else r(t[0].code,{variant:\"error\",preventDuplicate:!0,persist:!i?.duration,autoHideDuration:i?.duration??void 0})},a=e=>{e(\"Something went wrong. Please contact with the system admins.\",{variant:\"error\",preventDuplicate:!0,persist:!0})},o=e=>({message:e.code}),s=(e,t)=>{if(e.some((e=>e.filterOption.attributeName===t)))return e.filter((e=>e.filterOption.attributeName===t&&e.filterBy.value)).map((e=>({value:e.filterBy.value,operator:e.filterBy.operator})))},n=(e,...t)=>{let r={};for(const i of t)r[i]=s(e,i);return r};export{t as dateToJudoDateString,r as errorHandling,e as exists,n as mapAllFiltersToQueryCustomizerProperties,s as mapFiltersToQueryCustomizerProperty};\n//# sourceMappingURL=utilities.mjs.map\n","import{createTheme as e,alpha as o}from\"@mui/material\";const i={marginTop:8,marginBottom:8,display:\"flex\",flexDirection:\"column\",alignItems:\"center\"},t=e({palette:{mode:\"light\",primary:{main:\"#3C4166FF\"},secondary:{main:\"#E7501DFF\"},text:{primary:\"#17191DFF\",secondary:\"#434448FF\"},background:{default:\"#FAFAFAFF\"},subtitleColor:{main:\"#8c8c8c\"}},typography:{h5:{fontWeight:500,fontSize:26,letterSpacing:.5}},shape:{borderRadius:8},components:{MuiTab:{defaultProps:{disableRipple:!0}}},mixins:{toolbar:{minHeight:48}}}),r={...t,components:{MuiAppBar:{styleOverrides:{colorPrimary:{backgroundColor:t.palette.background.default}}},MuiButton:{defaultProps:{variant:\"contained\",size:\"small\"},styleOverrides:{root:{textTransform:\"none\",borderRadius:\"20px 20px 20px 20px\",paddingLeft:15,paddingRight:15},contained:{boxShadow:\"none\",\"&:active\":{boxShadow:\"none\"}},outlined:{border:\"2px solid\",fontWeight:\"bold\",\"&:hover\":{border:\"2px solid\",background:o(t.palette.primary.main,.15)}}}},MuiInputLabel:{styleOverrides:{root:{color:t.palette.subtitleColor.main,fontWeight:500,fontSize:16,\"&.Mui-focused\":{color:t.palette.subtitleColor.main}}}},MuiFilledInput:{styleOverrides:{input:{\"&:-webkit-autofill\":{WebkitBackgroundClip:\"text !important\"}},root:{background:\"inherit\",\"&.Mui-focused\":{background:\"inherit\"},\"&:hover:not(.Mui-disabled):not(.Mui-focused)\":{background:o(t.palette.secondary.main,.1)},\"&:hover:not(.Mui-disabled):before\":{borderBottom:\"none\"},\"&.Mui-focused .MuiInputAdornment-root .MuiSvgIcon-root\":{color:t.palette.secondary.main}}}},MuiTextField:{defaultProps:{fullWidth:!0,variant:\"filled\",color:\"secondary\"},styleOverrides:{root:{background:\"white\",\"& .MuiFilledInput-underline:before\":{borderBottom:\"none\"},\"&.Mui-readOnly:not(.Mui-disabled):not(.Mui-focused)\":{borderBottom:`1px solid ${o(t.palette.primary.main,.2)}`,background:\"transparent\"},\"&:not(.Mui-readOnly):not(.Mui-disabled)\":{boxShadow:\"0px 0px 8px 2px rgba(0,0,0,0.05)\",borderRadius:\"8px 8px 0 0\"}}}},MuiSelect:{styleOverrides:{filled:{\"&:focus\":{backgroundColor:\"white\"}}}},MuiDataGrid:{styleOverrides:{root:{border:\"none\"},toolbarContainer:{padding:\"8px 8px 4px 8px\"}}},MuiPaper:{styleOverrides:{rounded:{boxShadow:\"0px 0px 8px 1px rgba(0,0,0,0.05)\",borderRadius:16,padding:8}}},MuiDrawer:{styleOverrides:{paper:{border:\"none\",boxShadow:\"0px 0px 8px 1px rgba(0,0,0,0.05)\"}}},MuiTabs:{styleOverrides:{root:{marginLeft:t.spacing(1)},indicator:{height:3,borderTopLeftRadius:3,borderTopRightRadius:3,backgroundColor:t.palette.common.white}}},MuiTab:{styleOverrides:{root:{textTransform:\"none\",margin:\"0 16px\",minWidth:0,padding:0,[t.breakpoints.up(\"md\")]:{padding:0,minWidth:0}}}},MuiIconButton:{styleOverrides:{root:{color:t.palette.secondary.main,padding:t.spacing(1)}}},MuiTooltip:{styleOverrides:{tooltip:{borderRadius:4}}},MuiDivider:{styleOverrides:{root:{backgroundColor:\"rgb(255,255,255,0.15)\"},middle:{marginTop:8,marginBottom:8}}},MuiListItemButton:{defaultProps:{disableTouchRipple:!0}},MuiListItemText:{styleOverrides:{primary:{fontSize:14,fontWeight:t.typography.fontWeightMedium}}},MuiListItemIcon:{styleOverrides:{root:{color:\"inherit\",minWidth:\"auto\",marginRight:t.spacing(2),\"& svg\":{fontSize:20}}}},MuiAvatar:{styleOverrides:{root:{width:32,height:32}}},MuiCard:{styleOverrides:{root:{width:\"100%\",length:\"100%\",padding:10}}}}};export{i as mainContainerPadding,r as theme,t as themeBase};\n//# sourceMappingURL=theme.mjs.map\n","var a,e,l,r;!function(a){a.equals=\"equals\"}(a||(a={})),function(a){a.equals=\"equals\",a.notEquals=\"notEquals\"}(e||(e={})),function(a){a.lessThan=\"lessThan\",a.greaterThan=\"greaterThan\",a.lessOrEqual=\"lessOrEqual\",a.greaterOrEqual=\"greaterOrEqual\",a.equal=\"equal\",a.notEqual=\"notEqual\"}(l||(l={})),function(a){a.lessThan=\"lessThan\",a.greaterThan=\"greaterThan\",a.lessOrEqual=\"lessOrEqual\",a.greaterOrEqual=\"greaterOrEqual\",a.equal=\"equal\",a.notEqual=\"notEqual\",a.matches=\"matches\",a.like=\"like\"}(r||(r={}));export{a as _BooleanOperation,e as _EnumerationOperation,l as _NumericOperation,r as _StringOperation};\n//# sourceMappingURL=data-api-common.mjs.map\n","import { Button, ClickAwayListener, Grow, MenuItem, MenuList, Paper, Popper } from '@mui/material';\nimport { useState, useRef, useEffect } from 'react';\nimport type { ReactNode, KeyboardEvent, SyntheticEvent } from 'react';\nimport { KeyboardArrowDown } from '@mui/icons-material';\n\ninterface DropdownMenuItem {\n disabled?: boolean;\n visible?: boolean;\n label?: string;\n onClick: () => void;\n startIcon?: ReactNode;\n endIcon?: ReactNode;\n}\n\ninterface DropdownButtonProps {\n children?: ReactNode;\n id?: string | undefined;\n menuItems: DropdownMenuItem[];\n disabled?: boolean;\n showDropdownIcon?: boolean;\n fullWidth?: boolean;\n variant?: 'text' | 'outlined' | 'contained' | undefined;\n}\n\nexport function DropdownButton({\n children,\n id,\n menuItems,\n disabled = false,\n showDropdownIcon = true,\n fullWidth = false,\n variant = 'contained',\n}: DropdownButtonProps) {\n const [open, setOpen] = useState(false);\n const anchorRef = useRef<HTMLButtonElement>(null);\n\n const handleToggle = () => {\n setOpen((prevOpen) => !prevOpen);\n };\n\n const handleClose = (event: Event | SyntheticEvent) => {\n if (anchorRef.current && anchorRef.current.contains(event.target as HTMLElement)) {\n return;\n }\n\n setOpen(false);\n };\n\n function handleListKeyDown(event: KeyboardEvent) {\n if (event.key === 'Tab') {\n event.preventDefault();\n setOpen(false);\n } else if (event.key === 'Escape') {\n setOpen(false);\n }\n }\n\n // return focus to the button when we transitioned from !open -> open\n const prevOpen = useRef(open);\n useEffect(() => {\n if (prevOpen.current && !open) {\n anchorRef.current!.focus();\n }\n\n prevOpen.current = open;\n }, [open]);\n\n return (\n <>\n <Button\n ref={anchorRef}\n id={id}\n onClick={handleToggle}\n endIcon={showDropdownIcon && <KeyboardArrowDown />}\n disabled={disabled}\n fullWidth={fullWidth}\n variant={variant}\n >\n {children}\n </Button>\n <Popper\n open={open}\n anchorEl={anchorRef.current}\n placement=\"bottom\"\n transition\n style={{ zIndex: 1400, minWidth: anchorRef.current?.scrollWidth }}\n >\n {({ TransitionProps, placement }) => (\n <Grow\n {...TransitionProps}\n style={{\n transformOrigin: placement === 'bottom-start' ? 'left top' : 'left bottom',\n }}\n >\n <Paper>\n <ClickAwayListener onClickAway={handleClose}>\n <MenuList autoFocusItem={open} onKeyDown={handleListKeyDown}>\n {menuItems\n .filter((menuItem) => menuItem.visible ?? true)\n .map((menuItem, index) => {\n return (\n <MenuItem\n id={menuItem.label ?? '' + index}\n disabled={menuItem.disabled ?? false}\n onClick={(event) => {\n handleClose(event);\n menuItem.onClick();\n }}\n >\n {menuItem.startIcon}\n {menuItem.label}\n {menuItem.endIcon}\n </MenuItem>\n );\n })}\n </MenuList>\n </ClickAwayListener>\n </Paper>\n </Grow>\n )}\n </Popper>\n </>\n );\n}\n","import { CheckBoxOutlined } from '@mui/icons-material';\nimport { TextField, InputAdornment, MenuItem } from '@mui/material';\nimport type { ChangeEvent } from 'react';\nimport { TRINARY_LOGIC } from '@judo/components-api';\n\ninterface TrinaryLogicProps {\n readOnly?: boolean;\n value?: boolean | null;\n id?: string;\n label: string;\n name?: string;\n error?: boolean | undefined;\n helperText?: string | undefined;\n onChange?: (value: boolean | null) => void;\n}\n\nconst TrinaryLogicCombobox = ({\n readOnly = false,\n value = null,\n id,\n label,\n name,\n error,\n helperText,\n onChange,\n}: TrinaryLogicProps) => {\n const onChangeHandler = onChange\n ? (event: ChangeEvent<HTMLTextAreaElement | HTMLInputElement>) => {\n const index = Array.from(TRINARY_LOGIC.values()).indexOf(event.target.value);\n const keysArray = Array.from(TRINARY_LOGIC.keys());\n onChange(keysArray[index]);\n }\n : undefined;\n\n return (\n <TextField\n name={name}\n id={id}\n label={label}\n select\n value={TRINARY_LOGIC.get(value)}\n onChange={onChangeHandler}\n className={readOnly ? 'Mui-readOnly' : undefined}\n error={error}\n helperText={helperText}\n InputProps={{\n readOnly: readOnly,\n startAdornment: (\n <InputAdornment position=\"start\">\n <CheckBoxOutlined />\n </InputAdornment>\n ),\n }}\n >\n {Array.from(TRINARY_LOGIC.keys()).map((key) => (\n <MenuItem key={TRINARY_LOGIC.get(key)} value={TRINARY_LOGIC.get(key)}>\n {TRINARY_LOGIC.get(key)}\n </MenuItem>\n ))}\n </TextField>\n );\n};\n\nexport default TrinaryLogicCombobox;\n","import { mdiCalendarClock, mdiCalendarMonth, mdiFormatTextVariant, mdiNumeric } from '@mdi/js';\nimport Icon from '@mdi/react';\nimport { Close } from '@mui/icons-material';\nimport {\n Dialog,\n DialogTitle,\n DialogContent,\n DialogContentText,\n DialogActions,\n Button,\n Slide,\n Box,\n Container,\n Grid,\n TextField,\n MenuItem,\n Checkbox,\n FormControlLabel,\n InputAdornment,\n IconButton,\n Typography,\n} from '@mui/material';\nimport type { TransitionProps } from '@mui/material/transitions';\nimport { DatePicker, DateTimePicker } from '@mui/x-date-pickers';\nimport { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { ChangeEvent, ReactElement, Ref } from 'react';\nimport type {\n Filter,\n FilterDialogProps,\n FilterInputProps,\n FilterOperatorProps,\n FilterProps,\n Operation,\n} from '@judo/components-api';\nimport { FilterType } from '@judo/components-api';\nimport { dateToJudoDateString, exists } from '@judo/utilities';\nimport { mainContainerPadding } from '@judo/theme';\nimport { _BooleanOperation, _EnumerationOperation, _NumericOperation, _StringOperation } from '@judo/data-api-common';\nimport { DropdownButton } from '../DropdownButton';\nimport TrinaryLogicCombobox from '../TrinaryLogicCombobox';\n\nconst getDefaultOperator = (filterType: FilterType) => {\n switch (filterType) {\n case FilterType.boolean:\n return _BooleanOperation['equals'];\n case FilterType.date:\n return _NumericOperation['equal'];\n case FilterType.dateTime:\n return _NumericOperation['equal'];\n // case FilterType.time:\n // return _NumericOperation['equal'];\n case FilterType.enumeration:\n return _EnumerationOperation['equals'];\n case FilterType.numeric:\n return _NumericOperation['equal'];\n case FilterType.string:\n return _StringOperation['equal'];\n case FilterType.trinaryLogic:\n return _BooleanOperation['equals'];\n }\n};\n\nconst getOperationEnumValue = (filter: Filter, operator: string) => {\n switch (filter.filterOption.filterType) {\n case FilterType.boolean:\n return _BooleanOperation[operator as keyof typeof _BooleanOperation];\n case FilterType.date:\n return _NumericOperation[operator as keyof typeof _NumericOperation];\n case FilterType.dateTime:\n return _NumericOperation[operator as keyof typeof _NumericOperation];\n // case FilterType.time:\n // return _NumericOperation[operator as keyof typeof _NumericOperation];\n case FilterType.enumeration:\n return _EnumerationOperation[operator as keyof typeof _BooleanOperation];\n case FilterType.numeric:\n return _NumericOperation[operator as keyof typeof _NumericOperation];\n case FilterType.string:\n return _StringOperation[operator as keyof typeof _StringOperation];\n case FilterType.trinaryLogic:\n return _BooleanOperation[operator as keyof typeof _BooleanOperation];\n }\n};\n\nconst getOperatorsByFilter = (filter: Filter): string[] => {\n switch (filter.filterOption.filterType) {\n case FilterType.boolean:\n return Object.values(_BooleanOperation);\n case FilterType.date:\n return Object.values(_NumericOperation);\n case FilterType.dateTime:\n return Object.values(_NumericOperation);\n // case FilterType.time:\n // return Object.values(_NumericOperation);\n case FilterType.enumeration:\n return Object.values(_EnumerationOperation);\n case FilterType.numeric:\n return Object.values(_NumericOperation);\n case FilterType.string:\n return Object.values(_StringOperation);\n case FilterType.trinaryLogic:\n return Object.values(_BooleanOperation);\n }\n};\n\nconst FilterOperator = ({ filter, setFilterOperator }: FilterOperatorProps) => {\n const onChangeHandler = (event: ChangeEvent<HTMLTextAreaElement | HTMLInputElement>) => {\n setFilterOperator(filter, getOperationEnumValue(filter, event.target.value));\n };\n\n return (\n <TextField\n name={'operation'}\n id={'operation'}\n label={'Operation'}\n select\n value={filter.filterBy.operator}\n onChange={onChangeHandler}\n >\n {getOperatorsByFilter(filter).map((item) => (\n <MenuItem key={item} value={item}>\n {/* TODO: do not forget localization here*/}\n {item}\n </MenuItem>\n ))}\n </TextField>\n );\n};\n\nconst FilterInput = ({ filter, setFilterValue }: FilterInputProps) => {\n if (filter.filterOption.filterType === FilterType.enumeration && !exists(filter.filterOption.enumValues)) {\n throw new Error(`Missing enumValues from FilterOptions of ${filter.filterOption.attributeName}`);\n }\n\n return (\n <>\n {(() => {\n switch (filter.filterOption.filterType) {\n case FilterType.boolean:\n return (\n <FormControlLabel\n control={\n <Checkbox\n checked={!!filter.filterBy.value}\n onChange={(event) => setFilterValue(filter, !!event.target.value)}\n />\n }\n label={filter.filterOption.attributeName}\n />\n );\n case FilterType.date:\n return (\n <DatePicker\n renderInput={(props) => <TextField {...props} />}\n label={filter.filterOption.attributeName}\n value={filter.filterBy.value ?? null}\n onChange={(newValue) => setFilterValue(filter, dateToJudoDateString(newValue))}\n InputProps={{\n startAdornment: (\n <InputAdornment position=\"start\">\n <Icon path={mdiCalendarMonth} size={1} />\n </InputAdornment>\n ),\n }}\n />\n );\n case FilterType.dateTime:\n return (\n <DateTimePicker\n renderInput={(props) => <TextField {...props} />}\n label={filter.filterOption.attributeName}\n value={filter.filterBy.value ?? null}\n onChange={(newValue) => setFilterValue(filter, newValue)}\n InputProps={{\n startAdornment: (\n <InputAdornment position=\"start\">\n <Icon path={mdiCalendarClock} size={1} />\n </InputAdornment>\n ),\n }}\n />\n );\n // case FilterType.time:\n // return (\n // <TextField\n // label={filter.filterOption.attributeName}\n // value={filter.filterBy.value}\n // onChange={(event) => setFilterValue(filter, event.target.value)}\n // InputProps={{\n // startAdornment: (\n // <InputAdornment position=\"start\">\n // <Icon path={mdiClockOutline} size={1} />\n // </InputAdornment>\n // ),\n // }}\n // />\n // );\n case FilterType.enumeration:\n return (\n <TextField\n label={filter.filterOption.attributeName}\n value={filter.filterBy.value}\n select\n onChange={(event) => setFilterValue(filter, event.target.value)}\n >\n {filter.filterOption.enumValues?.map((item) => (\n <MenuItem key={item} value={item}>\n {item}\n </MenuItem>\n ))}\n </TextField>\n );\n case FilterType.numeric:\n return (\n <TextField\n label={filter.filterOption.attributeName}\n type=\"number\"\n value={filter.filterBy.value}\n onChange={(event) => setFilterValue(filter, Number(event.target.value))}\n InputProps={{\n startAdornment: (\n <InputAdornment position=\"start\">\n <Icon path={mdiNumeric} size={1} />\n </InputAdornment>\n ),\n }}\n />\n );\n case FilterType.string:\n return (\n <TextField\n label={filter.filterOption.attributeName}\n value={filter.filterBy.value}\n onChange={(event) => setFilterValue(filter, event.target.value)}\n InputProps={{\n startAdornment: (\n <InputAdornment position=\"start\">\n <Icon path={mdiFormatTextVariant} size={1} />\n </InputAdornment>\n ),\n }}\n />\n );\n case FilterType.trinaryLogic:\n return (\n <TrinaryLogicCombobox\n label={filter.filterOption.attributeName}\n value={filter.filterBy.value}\n onChange={(value) => setFilterValue(filter, value)}\n />\n );\n }\n })()}\n </>\n );\n};\n\nconst FilterRow = ({ filter, closeHandler, setFilterOperator, setFilterValue }: FilterProps) => {\n return (\n <Grid item container spacing={2} alignItems={'center'}>\n <Grid item xs={4}>\n {filter && <FilterOperator filter={filter} setFilterOperator={setFilterOperator} />}\n </Grid>\n <Grid item xs={7}>\n {filter && <FilterInput filter={filter} setFilterValue={setFilterValue} />}\n </Grid>\n <Grid item xs={1}>\n <IconButton onClick={() => closeHandler(filter)}>\n <Close />\n </IconButton>\n </Grid>\n </Grid>\n );\n};\n\nconst Transition = forwardRef(function Transition(\n props: TransitionProps & {\n children: ReactElement<any, any>;\n },\n ref: Ref<unknown>,\n) {\n return <Slide direction=\"left\" ref={ref} {...props} />;\n});\n\nexport const FilterDialog = ({ filters, filterOptions, resolve, open, handleClose }: FilterDialogProps) => {\n const descriptionElementRef = useRef<HTMLElement>(null);\n const [tempFilters, setTempFilters] = useState<Filter[]>(filters ?? []);\n\n useEffect(() => {\n if (open) {\n const { current: descriptionElement } = descriptionElementRef;\n if (descriptionElement !== null) {\n descriptionElement.focus();\n }\n }\n }, [open]);\n\n const updateFilterValue = (filter: Filter, value: any) => {\n setTempFilters((prevTempFilters) => {\n return prevTempFilters.map((tempFilter) => {\n if (filter.id === tempFilter.id) {\n return {\n ...tempFilter,\n filterBy: { value: value, operator: tempFilter.filterBy.operator },\n };\n }\n\n return tempFilter;\n });\n });\n };\n\n const updateFilterOperator = (filter: Filter, operator: Operation) => {\n setTempFilters((prevTempFilters) => {\n return prevTempFilters.map((tempFilter) => {\n if (filter.id === tempFilter.id) {\n return {\n ...tempFilter,\n filterBy: { value: tempFilter.filterBy.value, operator: operator },\n };\n }\n\n return tempFilter;\n });\n });\n };\n\n const filterCloseHandler = (filter: Filter) => {\n setTempFilters((prevTempFilters) => [...prevTempFilters.filter((tempFilter) => tempFilter.id !== filter.id)]);\n };\n\n const cancel = () => {\n handleClose();\n resolve(undefined);\n };\n\n const ok = () => {\n handleClose();\n resolve(tempFilters);\n };\n\n return (\n <Dialog\n open={open}\n onClose={cancel}\n scroll=\"paper\"\n TransitionComponent={Transition}\n disableEnforceFocus\n fullWidth\n maxWidth=\"sm\"\n sx={{\n '& .MuiDialog-container': {\n justifyContent: 'flex-end',\n },\n }}\n PaperProps={{\n sx: {\n m: 0,\n height: '100%',\n },\n }}\n >\n <DialogTitle id=\"scroll-dialog-title\">\n <Typography component=\"span\" color=\"text.primary\" variant=\"h5\">\n Filters\n </Typography>\n </DialogTitle>\n <DialogContent dividers={true}>\n <DialogContentText id=\"scroll-dialog-description\" ref={descriptionElementRef} tabIndex={-1}>\n <Container component=\"main\" maxWidth=\"xs\">\n <Box sx={mainContainerPadding}>\n <Grid container spacing={2}>\n {tempFilters.map((filter) => (\n <FilterRow\n key={filter.id}\n filter={filter}\n closeHandler={filterCloseHandler}\n setFilterOperator={updateFilterOperator}\n setFilterValue={updateFilterValue}\n />\n ))}\n <Grid item container>\n <DropdownButton\n fullWidth={true}\n showDropdownIcon={false}\n menuItems={filterOptions.map((filterOption) => {\n return {\n label: filterOption.label ?? filterOption.attributeName,\n onClick: () =>\n setTempFilters((prevTempFilters) => [\n ...prevTempFilters,\n {\n id: prevTempFilters.length,\n filterOption: {\n attributeName: filterOption.attributeName,\n label: filterOption.label,\n filterType: filterOption.filterType,\n },\n filterBy: {\n operator: getDefaultOperator(filterOption.filterType),\n },\n },\n ]),\n };\n })}\n >\n Add new filter\n </DropdownButton>\n </Grid>\n </Grid>\n </Box>\n </Container>\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button fullWidth variant=\"outlined\" onClick={cancel}>\n Cancel\n </Button>\n <Button fullWidth onClick={ok}>\n Apply {'(' + tempFilters.length + ')'}\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n","import { Dialog, DialogContent, DialogContentText, DialogActions, Button } from '@mui/material';\nimport { useEffect, useRef } from 'react';\nimport type { ReactNode } from 'react';\n\ninterface PageDialogProps {\n page: ReactNode;\n open: boolean;\n handleClose: () => void;\n resolve: () => void;\n}\n\nexport const PageDialog = ({ page, open, handleClose, resolve }: PageDialogProps) => {\n const descriptionElementRef = useRef<HTMLElement>(null);\n useEffect(() => {\n if (open) {\n const { current: descriptionElement } = descriptionElementRef;\n if (descriptionElement !== null) {\n descriptionElement.focus();\n }\n }\n }, [open]);\n\n const ok = () => {\n resolve();\n handleClose();\n };\n\n return (\n <Dialog open={open} onClose={ok} scroll=\"paper\">\n <DialogContent dividers={true}>\n <DialogContentText ref={descriptionElementRef} tabIndex={-1}>\n {page}\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button onClick={ok}>Ok</Button>\n </DialogActions>\n </Dialog>\n );\n};\n","import { TablePagination } from '@mui/material';\nimport type { MouseEvent, Dispatch, SetStateAction } from 'react';\n\nexport interface CustomTablePaginationProps {\n pageChange: (isNext: boolean) => Promise<void>;\n isNextButtonEnabled: boolean;\n page: number;\n rowPerPage: number;\n setPage: Dispatch<SetStateAction<number>>;\n}\n\nexport const CustomTablePagination = (props: CustomTablePaginationProps) => {\n const handleChangePage = async (event: MouseEvent<HTMLButtonElement> | null, newPage: number) => {\n let isNext = true;\n if (newPage < props.page) {\n isNext = false;\n }\n\n props.setPage(newPage);\n\n await props.pageChange(isNext);\n };\n\n return (\n <TablePagination\n component=\"div\"\n count={-1}\n page={props.page}\n onPageChange={handleChangePage}\n rowsPerPage={props.rowPerPage}\n rowsPerPageOptions={[props.rowPerPage]}\n labelDisplayedRows={({ from, to }) => `${from}–${to}`}\n nextIconButtonProps={{\n disabled: !props.isNextButtonEnabled,\n }}\n backIconButtonProps={{\n disabled: props.page === 0,\n }}\n />\n );\n};\n","import { Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button } from '@mui/material';\nimport {\n GridSortModel,\n GridRowModel,\n DataGrid,\n GridRowParams,\n GridColumns,\n GridSortItem,\n GridSelectionModel,\n GridToolbarContainer,\n GridRowId,\n} from '@mui/x-data-grid';\nimport { useSnackbar } from 'notistack';\nimport { useEffect, useRef, useState } from 'react';\nimport type { JudoStored, QueryCustomizer } from '@judo/data-api-common';\nimport type { Filter, FilterOption } from '@judo/components-api';\nimport { errorHandling } from '@judo/utilities';\nimport { CustomTablePagination } from '../CustomTablePagination';\nimport { useFilterDialog } from './DialogContext';\n\ninterface RangeDialogProps<T extends JudoStored<T>, U extends QueryCustomizer<T>> {\n resolve: (value: any) => void;\n open: boolean;\n handleClose: () => void;\n single?: boolean;\n columns: GridColumns<T>;\n defaultSortField: GridSortItem;\n rangeCall: (queryCustomizer: U) => Promise<Array<T>>;\n alreadySelectedItems: GridSelectionModel | GridRowId;\n initalQueryCustomizer: U;\n filterOptions: FilterOption[];\n}\n\nexport const RangeDialog = <T extends JudoStored<T>, U extends QueryCustomizer<T>>({\n resolve,\n open,\n handleClose,\n single = false,\n columns,\n defaultSortField,\n rangeCall,\n alreadySelectedItems,\n initalQueryCustomizer,\n filterOptions,\n}: RangeDialogProps<T, U>) => {\n const { openFilterDialog } = useFilterDialog();\n const { enqueueSnackbar } = useSnackbar();\n\n const descriptionElementRef = useRef<HTMLElement>(null);\n const [isLoading, setIsLoading] = useState<boolean>(false);\n const [rowCount, setRowCount] = useState<number>(0);\n const [sortModel, setSortModel] = useState<GridSortModel>([defaultSortField]);\n const [lastItem, setLastItem] = useState<T>();\n const [firstItem, setFirstItem] = useState<T>();\n const [isNextButtonEnabled, setIsNextButtonEnabled] = useState<boolean>(true);\n const [page, setPage] = useState<number>(0);\n const [data, setData] = useState<GridRowModel<T>[]>([]);\n const [selectionModel, setSelectionModel] = useState<GridSelectionModel | GridRowId | undefined>(\n alreadySelectedItems ?? (single ? undefined : []),\n );\n const [selectedItems, setSelectedItems] = useState<T[] | T | undefined>([]);\n const [filters, setFilters] = useState<Filter[]>([]);\n const [queryCustomizer, setQueryCustomizer] = useState<U>({\n ...initalQueryCustomizer,\n _seek: {\n limit: 6,\n },\n });\n\n const handlePageChange = async (isNext: boolean) => {\n setQueryCustomizer((prevQueryCustomizer) => {\n return {\n ...prevQueryCustomizer,\n _seek: {\n limit: isNext ? 6 : 5,\n reverse: !isNext,\n lastItem: isNext ? lastItem : firstItem,\n },\n };\n });\n\n setIsNextButtonEnabled(!isNext);\n };\n\n const fetchData = async () => {\n setIsLoading(true);\n try {\n const res = await rangeCall(queryCustomizer);\n\n if (res.length > 5) {\n setIsNextButtonEnabled(true);\n res.pop();\n } else if (queryCustomizer._seek?.limit === 6) {\n setIsNextButtonEnabled(false);\n }\n\n setData(res);\n setFirstItem(res[0]);\n setLastItem(res[res.length - 1]);\n setRowCount(res.length || 0);\n } catch (error) {\n errorHandling(error, enqueueSnackbar);\n }\n setIsLoading(false);\n };\n\n const handleFiltersChange = (newFilters: Filter[]) => {\n setPage(0);\n setFilters(newFilters);\n\n // @ts-ignore\n setQueryCustomizer((prevQueryCustomizer) => {\n const tempQueryCustomizer = { ...prevQueryCustomizer };\n\n filterOptions.forEach(\n (filter) =>\n // @ts-ignore\n (tempQueryCustomizer[filter.attributeName] = mapFiltersToQueryCustomizerProperty(\n newFilters,\n filter.attributeName,\n )),\n );\n\n return {\n ...prevQueryCustomizer,\n _seek: {\n lastItem: undefined,\n limit: 6,\n reverse: undefined,\n },\n ...tempQueryCustomizer,\n };\n });\n };\n\n const handleSortModelChange = (newModel: GridSortModel) => {\n setPage(0);\n setSortModel(newModel);\n\n const { field, sort } = newModel[0];\n\n setQueryCustomizer((prevQueryCustomizer) => {\n return {\n ...prevQueryCustomizer,\n _orderBy: [{ attribute: field, descending: sort === 'desc' }],\n };\n });\n };\n\n // useEffect(() => {\n // setPage(0);\n // const { field, sort } = sortModel[0];\n\n // setQueryCustomizer((prevQueryCustomizer) => {\n // const tempQueryCustomizer = { ...prevQueryCustomizer };\n\n // filterOptions.forEach(\n // (filter) =>\n // // @ts-ignore\n // (tempQueryCustomizer[filter.attributeName] = mapFiltersToQueryCustomizerProperty(\n // filters,\n // filter.attributeName,\n // )),\n // );\n\n // return {\n // ...prevQueryCustomizer,\n // _seek: {\n // lastItem: undefined,\n // limit: 6,\n // reverse: undefined,\n // },\n // _orderBy: [{ attribute: field, descending: sort === 'desc' }],\n // ...tempQueryCustomizer,\n // };\n // });\n // }, [sortModel, filters]);\n\n useEffect(() => {\n fetchData();\n }, [queryCustomizer]);\n\n useEffect(() => {\n if (open) {\n const { current: descriptionElement } = descriptionElementRef;\n if (descriptionElement !== null) {\n descriptionElement.focus();\n }\n }\n }, [open]);\n\n const cancel = () => {\n handleClose();\n resolve(undefined);\n };\n\n const ok = () => {\n handleClose();\n resolve(selectedItems);\n };\n\n const handleOnSelection = (newSelectionModel: GridSelectionModel) => {\n if (!Array.isArray(selectionModel)) return;\n\n // added new items\n if (newSelectionModel.length > selectionModel.length) {\n const diff = newSelectionModel.length - selectionModel.length;\n const newItemsId = [...newSelectionModel].slice(diff * -1);\n const newItems = data.filter((value) => newItemsId.indexOf(value.__identifier as GridRowId) !== -1);\n setSelectedItems((prevSelectedItems) => {\n if (!Array.isArray(prevSelectedItems)) return;\n\n return [...prevSelectedItems, ...newItems];\n });\n }\n\n // removed items\n if (newSelectionModel.length < selectionModel.length) {\n const removedItemsId = selectionModel.filter((value) => newSelectionModel.indexOf(value) === -1);\n setSelectedItems((prevSelectedItems) => {\n if (!Array.isArray(prevSelectedItems)) return;\n\n return [...prevSelectedItems.filter((value) => removedItemsId.indexOf(value.__identifier as GridRowId) === -1)];\n });\n }\n\n setSelectionModel(newSelectionModel);\n };\n\n const handleSingleOnSelection = (newSelectionModel: GridSelectionModel) => {\n if (Array.isArray(selectionModel)) return;\n\n if (newSelectionModel.length === 0) {\n setSelectionModel('');\n setSelectedItems(undefined);\n return;\n }\n\n const lastId = newSelectionModel[newSelectionModel.length - 1];\n\n setSelectionModel(lastId);\n setSelectedItems(data.find((value) => value.__identifier === lastId));\n };\n\n const handleIsRowSelectable = (params: GridRowParams<T>) => {\n if (alreadySelectedItems) {\n if (!Array.isArray(alreadySelectedItems)) throw Error('Range dialog gets wrong alreadySelectedItems.');\n\n return !alreadySelectedItems.includes(params.id);\n }\n\n return true;\n };\n\n return (\n <Dialog open={open} onClose={cancel} scroll=\"paper\" fullWidth={true} maxWidth={'sm'}>\n <DialogTitle id=\"scroll-dialog-title\">Select</DialogTitle>\n <DialogContent dividers={true}>\n <DialogContentText id=\"scroll-dialog-description\" ref={descriptionElementRef} tabIndex={-1}>\n <DataGrid\n sx={\n single\n ? {\n '.MuiDataGrid-columnHeaderCheckbox .MuiDataGrid-columnHeaderTitleContainer': {\n display: 'none',\n },\n }\n : undefined\n }\n autoHeight\n getRowId={(row: T) => row.__identifier as GridRowId}\n loading={isLoading}\n paginationMode=\"server\"\n rows={data}\n rowCount={rowCount}\n sortingOrder={['desc', 'asc']}\n sortingMode=\"server\"\n sortModel={sortModel}\n onSortModelChange={handleSortModelChange}\n checkboxSelection\n onSelectionModelChange={!single ? handleOnSelection : handleSingleOnSelection}\n isRowSelectable={!single ? handleIsRowSelectable : undefined}\n selectionModel={selectionModel}\n hideFooterSelectedRowCount={single}\n columns={columns}\n keepNonExistentRowsSelected\n components={{\n Toolbar: () => (\n <GridToolbarContainer>\n <Button\n variant=\"outlined\"\n onClick={async () => {\n const newFilters = await openFilterDialog(filterOptions, filters);\n\n if (newFilters) {\n handleFiltersChange(newFilters);\n }\n }}\n disabled={isLoading}\n >\n Set filters {filters.length !== 0 ? '(' + filters.length + ')' : ''}\n </Button>\n </GridToolbarContainer>\n ),\n Pagination: () => (\n <CustomTablePagination\n pageChange={handlePageChange}\n isNextButtonEnabled={isNextButtonEnabled}\n page={page}\n setPage={setPage}\n rowPerPage={5}\n />\n ),\n }}\n />\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button onClick={cancel}>Cancel</Button>\n <Button onClick={ok}>Ok</Button>\n </DialogActions>\n </Dialog>\n );\n};\n","import { createContext, useContext, useState } from 'react';\nimport type { ReactNode } from 'react';\nimport { ConfirmationDialog } from './ConfirmationDialog';\nimport { FilterDialog } from './FilterDialog';\nimport { PageDialog } from './PageDialog';\nimport { RangeDialog } from './RangeDialog';\nimport type {\n ConfirmDialogProviderContext,\n DialogProviderProps,\n FilterDialogProviderContext,\n OpenRangeDialogProps,\n PageDialogProviderContext,\n RangeDialogProviderContext,\n} from '@judo/components-api';\nimport type { Filter, FilterOption } from '@judo/components-api';\nimport type { JudoStored, QueryCustomizer } from '@judo/data-api-common';\n\n// @ts-ignore\nconst PageDialogContextState = createContext<PageDialogProviderContext>();\n\n// @ts-ignore\nconst ConfirmDialogContextState = createContext<ConfirmDialogProviderContext>();\n\n// @ts-ignore\nconst RangeDialogContextState = createContext<RangeDialogProviderContext>();\n\n// @ts-ignore\nconst FilterDialogContextState = createContext<FilterDialogProviderContext>();\n\nconst usePageDialog = () => {\n const context = useContext(PageDialogContextState);\n\n if (context === undefined) {\n throw new Error('useConfirmDialog was used outside of its Provider');\n }\n\n return context;\n};\n\nconst useConfirmDialog = () => {\n const context = useContext(ConfirmDialogContextState);\n\n if (context === undefined) {\n throw new Error('useConfirmDialog was used outside of its Provider');\n }\n\n return context;\n};\n\nconst useRangeDialog = () => {\n const context = useContext(RangeDialogContextState);\n\n if (context === undefined) {\n throw new Error('useRangeDialog was used outside of its Provider');\n }\n\n return context;\n};\n\nconst useFilterDialog = () => {\n const context = useContext(FilterDialogContextState);\n\n if (context === undefined) {\n throw new Error('useFilterDialog was used outside of its Provider');\n }\n\n return context;\n};\n\nconst DialogProvider = ({ children }: DialogProviderProps) => {\n // Page Dialog\n const [isOpenPageDialog, setIsOpenPageDialog] = useState(false);\n const [pageDialog, setPageDialog] = useState<ReactNode>();\n\n const handleClosePageDialog = () => {\n setIsOpenPageDialog(false);\n };\n\n const handleOpenPageDialog = async (page: ReactNode) => {\n setIsOpenPageDialog(true);\n return new Promise<void>((resolve) => {\n setPageDialog(<PageDialog page={page} handleClose={handleClosePageDialog} open={true} resolve={resolve} />);\n });\n };\n\n const pageDialogContext: PageDialogProviderContext = {\n openPageDialog: handleOpenPageDialog,\n };\n\n // Range Dialog\n const [isOpenRangeDialog, setIsOpenRangeDialog] = useState(false);\n const [rangeDialog, setRangeDialog] = useState<ReactNode>();\n\n const handleCloseRangeDialog = () => {\n setIsOpenRangeDialog(false);\n };\n\n const handleOpenRangeDialog = async <T extends JudoStored<T>, U extends QueryCustomizer<T>>({\n columns,\n defaultSortField,\n rangeCall,\n single = false,\n alreadySelectedItems,\n filterOptions,\n initialQueryCustomizer,\n }: OpenRangeDialogProps<T, U>) => {\n setIsOpenRangeDialog(true);\n\n return new Promise<T[] | T>((resolve) => {\n setRangeDialog(\n <RangeDialog<T, U>\n handleClose={handleCloseRangeDialog}\n open={true}\n resolve={resolve}\n columns={columns}\n defaultSortField={defaultSortField}\n rangeCall={rangeCall}\n single={single}\n alreadySelectedItems={alreadySelectedItems}\n filterOptions={filterOptions}\n initalQueryCustomizer={initialQueryCustomizer}\n />,\n );\n });\n };\n\n const customDialogContext: RangeDialogProviderContext = {\n openRangeDialog: handleOpenRangeDialog,\n };\n\n // Confirmation Dialog\n const [isOpenConfirmDialog, setIsOpenConfirmDialog] = useState(false);\n const [confirmDialog, setConfirmDialog] = useState<ReactNode>();\n\n const handleCloseConfirmDialog = () => {\n setIsOpenConfirmDialog(false);\n return false;\n };\n\n const handleOpenConfirmDialog = async (confirmationMessage: string | ReactNode, title?: string | ReactNode) => {\n setIsOpenConfirmDialog(true);\n\n return new Promise<boolean>((resolve) => {\n setConfirmDialog(\n <ConfirmationDialog\n confirmationMessage={confirmationMessage}\n title={title}\n handleClose={handleCloseConfirmDialog}\n open={true}\n resolve={resolve}\n />,\n );\n });\n };\n\n const confirmDialogContext: ConfirmDialogProviderContext = {\n openConfirmDialog: handleOpenConfirmDialog,\n };\n\n // Filter dialog\n const [isOpenFilterDialog, setIsOpenFilterDialog] = useState(false);\n const [filterDialog, setFilterDialog] = useState<ReactNode>();\n\n const handleCloseFilterDialog = () => {\n setIsOpenFilterDialog(false);\n return false;\n };\n\n const handleOpenFilterDialog = async (filterOptions: FilterOption[], filters?: Filter[]) => {\n setIsOpenFilterDialog(true);\n\n return new Promise<Filter[]>((resolve) => {\n setFilterDialog(\n <FilterDialog\n filters={filters}\n filterOptions={filterOptions}\n handleClose={handleCloseFilterDialog}\n open={true}\n resolve={resolve}\n />,\n );\n });\n };\n\n const filterDialogContext: FilterDialogProviderContext = {\n openFilterDialog: handleOpenFilterDialog,\n };\n\n return (\n <PageDialogContextState.Provider value={pageDialogContext}>\n <ConfirmDialogContextState.Provider value={confirmDialogContext}>\n <RangeDialogContextState.Provider value={customDialogContext}>\n <FilterDialogContextState.Provider value={filterDialogContext}>\n {children}\n {isOpenPageDialog && pageDialog}\n {isOpenConfirmDialog && confirmDialog}\n {isOpenRangeDialog && rangeDialog}\n {isOpenFilterDialog && filterDialog}\n </FilterDialogContextState.Provider>\n </RangeDialogContextState.Provider>\n </ConfirmDialogContextState.Provider>\n </PageDialogContextState.Provider>\n );\n};\n\nexport { DialogProvider, useConfirmDialog, useRangeDialog, useFilterDialog, usePageDialog };\n","import type { ColumnActionsProvider, ColumnsActionsOptions, TableRowAction } from '@judo/utilities';\nimport { exists } from '@judo/utilities';\nimport { MoreHoriz } from '@mui/icons-material';\nimport { Button } from '@mui/material';\nimport { GridColDef, GridRenderCellParams } from '@mui/x-data-grid';\nimport { DropdownButton } from '../DropdownButton';\n\nexport const columnsActionCalculator: ColumnActionsProvider<any> = (\n actions: TableRowAction<any>[],\n options?: ColumnsActionsOptions,\n): GridColDef[] => {\n if (!exists(actions) || actions.length === 0) {\n return [];\n }\n\n let shownActionsNumber = 1;\n if (options?.shownActions) {\n shownActionsNumber = actions.length < options.shownActions ? actions.length : options.shownActions;\n }\n\n if (shownActionsNumber < 0) {\n return standaloneActions(actions, options);\n } else if (shownActionsNumber === 0) {\n return [];\n } else if (shownActionsNumber === 1) {\n return dropdownActions(actions, options);\n } else {\n const sliceNumber = actions.length === shownActionsNumber ? shownActionsNumber : shownActionsNumber - 1;\n const standaloneRowActions = actions.slice(0, sliceNumber);\n const dropdownRowActions = actions.slice(sliceNumber);\n\n return [...standaloneActions(standaloneRowActions, options), ...dropdownActions(dropdownRowActions, options)];\n }\n};\n\nconst standaloneActions: ColumnActionsProvider<unknown> = (\n actions: TableRowAction<unknown>[],\n options?: ColumnsActionsOptions,\n): GridColDef[] => {\n return actions.map((action, index) => {\n return {\n field: action.label + index,\n headerName: '',\n align: 'center',\n type: 'actions',\n renderCell: (params: GridRenderCellParams) => {\n return (\n <Button variant=\"text\" onClick={() => action.action(params.row)}>\n {action.icon}\n {(options?.showLabel ?? true) && action.label}\n </Button>\n );\n },\n };\n });\n};\n\nconst dropdownActions: ColumnActionsProvider<unknown> = (actions: TableRowAction<unknown>[]): GridColDef[] => {\n if (actions.length === 0) return [];\n\n return [\n {\n field: 'actions',\n headerName: '',\n align: 'center',\n type: 'actions',\n renderCell: (params: GridRenderCellParams) => {\n return (\n <DropdownButton\n variant=\"text\"\n showDropdownIcon={false}\n menuItems={actions.map((action) => {\n return {\n label: action.label,\n startIcon: action.icon,\n onClick: () => action.action(params.row),\n };\n })}\n >\n <MoreHoriz />\n </DropdownButton>\n );\n },\n },\n ];\n};\n","import { Delete, LinkOff, NoteAdd, Visibility } from '@mui/icons-material';\nimport { ButtonBase, Grid, IconButton, InputAdornment, TextField } from '@mui/material';\nimport { useState } from 'react';\nimport type { ReactNode } from 'react';\nimport { exists } from '@judo/utilities';\n\ninterface AggregationInputProps {\n name?: string;\n id?: string;\n label?: string;\n value: any | undefined | null;\n error?: boolean | undefined;\n helperText?: string | undefined;\n disabled?: boolean | undefined;\n readonly?: boolean | undefined;\n labelList: string[];\n icon?: ReactNode;\n onSet?: () => Promise<void> | undefined;\n onView?: () => void | undefined;\n onCreate?: () => void | undefined;\n onDelete?: () => Promise<void> | undefined;\n onRemove?: () => void | undefined;\n}\n\ninterface ViewIconsProps {\n value: any | undefined | null;\n disabled: boolean;\n onView?: () => void | undefined;\n onCreate?: () => void | undefined;\n onDelete?: () => Promise<void> | undefined;\n}\n\ninterface EditIconsProps {\n value: any | undefined | null;\n disabled: boolean;\n onRemove?: () => void | undefined;\n}\n\nexport const AggregationInput = ({\n name,\n id,\n label,\n value,\n error = false,\n helperText,\n disabled = false,\n readonly = true,\n labelList,\n icon,\n onSet,\n onView,\n onCreate,\n onRemove,\n onDelete,\n}: AggregationInputProps) => {\n const [focused, setFocused] = useState(false);\n\n let icons: ReactNode;\n\n if (readonly) {\n icons = <ViewIcons value={value} disabled={disabled} onCreate={onCreate} onView={onView} onDelete={onDelete} />;\n } else {\n icons = <EditIcons value={value} disabled={disabled} onRemove={onRemove} />;\n }\n\n return (\n <Grid container item direction=\"row\" justifyContent=\"stretch\" alignContent=\"stretch\">\n <ButtonBase\n sx={{ padding: 0 }}\n disabled={disabled || readonly}\n onFocusCapture={() => setFocused(true)}\n onBlur={() => setFocused(false)}\n onClick={onSet}\n >\n <TextField\n disabled={!onSet || disabled}\n name={name}\n id={id}\n label={label}\n error={error}\n helperText={helperText}\n focused={focused}\n fullWidth\n value={labelList.join(' - ')}\n className={!readonly ? undefined : 'Mui-readOnly'}\n sx={{\n ':hover': {\n cursor: 'pointer',\n },\n '.MuiFilledInput-input:hover': {\n cursor: 'pointer',\n },\n }}\n InputProps={{\n readOnly: true,\n startAdornment: <InputAdornment position=\"start\">{icon}</InputAdornment>,\n }}\n />\n </ButtonBase>\n {icons}\n </Grid>\n );\n};\n\nconst ViewIcons = ({ value, disabled, onCreate, onDelete, onView }: ViewIconsProps) => {\n let icons: ReactNode;\n\n if (exists(value)) {\n icons = (\n <>\n {onView && (\n <IconButton disabled={disabled} onClick={onView}>\n <Visibility />\n </IconButton>\n )}\n {onDelete && (\n <IconButton disabled={disabled} onClick={onDelete}>\n <Delete />\n </IconButton>\n )}\n </>\n );\n } else {\n icons = (\n <>\n {onCreate && (\n <IconButton disabled={disabled} onClick={onCreate}>\n <NoteAdd />\n </IconButton>\n )}\n </>\n );\n }\n\n return <>{icons}</>;\n};\n\nconst EditIcons = ({ value, disabled, onRemove }: EditIconsProps) => {\n let icons: ReactNode;\n\n if (exists(value)) {\n icons = (\n <>\n {onRemove && (\n <IconButton disabled={disabled} onClick={onRemove}>\n <LinkOff />\n </IconButton>\n )}\n </>\n );\n } else {\n icons = <></>;\n }\n\n return <>{icons}</>;\n};\n","import { Home } from '@mui/icons-material';\nimport { Breadcrumbs, Typography } from '@mui/material';\nimport { useState, useContext, createContext, useMemo, useEffect } from 'react';\nimport type { ReactNode } from 'react';\nimport { useLocation, useNavigate } from 'react-router-dom';\nimport type { To } from 'react-router-dom';\n\ninterface BreadcrumbProviderProps {\n children: ReactNode;\n}\n\nexport type JudoNavigationSetTitle = (pageTitle: string) => void;\n\ninterface JudoNavigationProviderContext {\n clearNavigate: (to: To) => void;\n navigate: (to: To) => void;\n back: () => void;\n isBackDisabled: boolean;\n setTitle: JudoNavigationSetTitle;\n}\n\ninterface BreadcrumbItem {\n key: string;\n path: To;\n label: string | null;\n}\n\n// @ts-ignore\nconst JudoNavigationContextState = createContext<JudoNavigationProviderContext>();\n\nconst BreadcrumbContextState = createContext<BreadcrumbItem[]>([]);\n\nexport const useJudoNavigation = () => {\n const context = useContext(JudoNavigationContextState);\n\n if (context === undefined) {\n throw new Error('useJudoNavigation was used outside of its Provider');\n }\n\n return context;\n};\n\nexport const BreadcrumbProvider = ({ children }: BreadcrumbProviderProps) => {\n const navigate = useNavigate();\n const location = useLocation();\n\n const [breadcrumbItems, setBreadcrumbItems] = useState<BreadcrumbItem[]>([]);\n const [nextBreadcrumbItem, setNextBreadcrumbItem] = useState<BreadcrumbItem>({} as any);\n\n useEffect(() => {\n setNextBreadcrumbItem((prevNextBreadcrumbItem) => {\n return {\n ...prevNextBreadcrumbItem,\n key: '0.' + location.pathname,\n path: location.pathname,\n };\n });\n }, []);\n\n const isBackDisabled = useMemo(() => {\n return breadcrumbItems.length === 0;\n }, [breadcrumbItems]);\n\n const judoNavigationContext = {\n clearNavigate: (to: To) => {\n setBreadcrumbItems([]);\n setNextBreadcrumbItem({\n key: '0.' + to.toString(),\n label: null,\n path: to,\n });\n\n navigate(to);\n },\n navigate: (to: To) => {\n if (nextBreadcrumbItem.label === null) {\n throw Error('Page title has not been set!');\n }\n\n setBreadcrumbItems((prevBreadCrumbItems) => {\n return [...prevBreadCrumbItems, nextBreadcrumbItem];\n });\n\n setNextBreadcrumbItem({\n key: breadcrumbItems.length + '.' + to.toString(),\n label: null,\n path: to,\n });\n\n navigate(to);\n },\n back: () => {\n if (breadcrumbItems.length !== 0) {\n const lastItem = breadcrumbItems[breadcrumbItems.length - 1];\n setNextBreadcrumbItem(lastItem);\n setBreadcrumbItems((prevBreadcrumbItems) => {\n return [...prevBreadcrumbItems.slice(0, prevBreadcrumbItems.length - 1)];\n });\n navigate(lastItem.path);\n return;\n }\n\n setBreadcrumbItems([]);\n setNextBreadcrumbItem({\n key: '0.' + '/'.toString(),\n label: null,\n path: '/',\n });\n\n navigate('/');\n },\n isBackDisabled: isBackDisabled,\n setTitle: (pageTitle: string) => {\n setNextBreadcrumbItem((prevNextBreadcrumbItem) => {\n return { ...prevNextBreadcrumbItem, label: pageTitle };\n });\n },\n };\n\n return (\n <BreadcrumbContextState.Provider value={breadcrumbItems}>\n <JudoNavigationContextState.Provider value={judoNavigationContext}>\n {children}\n </JudoNavigationContextState.Provider>\n </BreadcrumbContextState.Provider>\n );\n};\n\nexport const CustomBreadcrumb = () => {\n const breadcrumbItems = useContext(BreadcrumbContextState);\n\n return (\n <Breadcrumbs maxItems={2} separator=\">\">\n <Home />\n {breadcrumbItems.map(({ label, key }, index) => {\n return (\n <Typography color=\"text.primary\" key={key}>\n {label}\n </Typography>\n );\n })}\n </Breadcrumbs>\n );\n};\n","import { useMatch, useResolvedPath } from 'react-router-dom';\nimport type { LinkProps } from 'react-router-dom';\nimport { theme } from '@judo/theme';\nimport { ListItem, ListItemButton } from '@mui/material';\nimport { useJudoNavigation } from './CustomBreadcrumb';\n\nconst customLinkItemStyle = {\n py: '2px',\n px: 3,\n color: theme.palette.text.secondary,\n '&:hover, &:focus': {\n color: theme.palette.secondary.main,\n },\n '&.Mui-selected': {\n color: theme.palette.secondary.main,\n },\n};\n\nexport function CustomLink({ children, to, ...props }: LinkProps) {\n const resolved = useResolvedPath(to);\n const match = useMatch({ path: resolved.pathname, end: true });\n const { clearNavigate } = useJudoNavigation();\n\n const onClickHandler = () => {\n clearNavigate(to);\n };\n\n return (\n <ListItem disablePadding style={{ textDecoration: 'none' }}>\n <ListItemButton selected={!!match} sx={customLinkItemStyle} onClick={onClickHandler}>\n {children}\n </ListItemButton>\n </ListItem>\n );\n}\n","import { AppBar, Toolbar, Grid, Typography, Divider } from '@mui/material';\nimport { useEffect } from 'react';\nimport type { ReactNode } from 'react';\nimport { useJudoNavigation } from './CustomBreadcrumb';\n\ninterface PageHeaderProps {\n title: string;\n children: ReactNode;\n}\n\nexport const PageHeader = ({ title, children }: PageHeaderProps) => {\n const { setTitle } = useJudoNavigation();\n\n useEffect(() => {\n setTitle(title);\n }, [title]);\n\n return (\n <>\n <AppBar component=\"div\" position=\"static\" elevation={0} sx={{ zIndex: 0 }}>\n <Toolbar>\n <Grid container alignItems=\"center\" spacing={1}>\n <Grid item xs>\n <Typography component=\"span\" color=\"text.primary\" variant=\"h5\">\n {title}\n </Typography>\n </Grid>\n {children}\n </Grid>\n </Toolbar>\n </AppBar>\n <Divider />\n </>\n );\n};\n"],"names":["ConfirmationDialog","confirmationMessage","title","resolve","open","handleClose","descriptionElementRef","useRef","useEffect","current","descriptionElement","focus","_jsxs","Dialog","onClose","scroll","fullWidth","maxWidth","children","_jsx","jsx","DialogTitle","id","DialogContent","dividers","DialogContentText","ref","tabIndex","DialogActions","Button","variant","onClick","TRINARY_LOGIC","Map","FilterType","e","i","t","r","location","preventDuplicate","persist","duration","autoHideDuration","setValidation","forEach","set","code","a","o","message","marginTop","marginBottom","display","flexDirection","alignItems","palette","mode","primary","main","secondary","text","background","default","subtitleColor","typography","h5","fontWeight","fontSize","letterSpacing","shape","borderRadius","components","MuiTab","defaultProps","disableRipple","mixins","toolbar","minHeight","MuiAppBar","styleOverrides","colorPrimary","backgroundColor","MuiButton","size","root","textTransform","paddingLeft","paddingRight","contained","boxShadow","outlined","border","MuiInputLabel","color","MuiFilledInput","input","WebkitBackgroundClip","alpha","borderBottom","MuiTextField","MuiSelect","filled","MuiDataGrid","toolbarContainer","padding","MuiPaper","rounded","MuiDrawer","paper","MuiTabs","marginLeft","spacing","indicator","height","borderTopLeftRadius","borderTopRightRadius","common","white","margin","minWidth","breakpoints","up","MuiIconButton","MuiTooltip","tooltip","MuiDivider","middle","MuiListItemButton","disableTouchRipple","MuiListItemText","fontWeightMedium","MuiListItemIcon","marginRight","MuiAvatar","width","MuiCard","length","l","DropdownButton","menuItems","disabled","showDropdownIcon","setOpen","useState","anchorRef","event","contains","target","handleListKeyDown","key","preventDefault","prevOpen","jsxs","_Fragment","Fragment","endIcon","KeyboardArrowDown","Popper","anchorEl","placement","transition","style","zIndex","scrollWidth","TransitionProps","Grow","transformOrigin","Paper","ClickAwayListener","onClickAway","MenuList","autoFocusItem","onKeyDown","filter","menuItem","visible","map","index","MenuItem","label","startIcon","equals","notEquals","lessThan","greaterThan","lessOrEqual","greaterOrEqual","equal","notEqual","matches","like","TrinaryLogicCombobox","readOnly","value","name","error","helperText","onChange","onChangeHandler","Array","from","values","indexOf","keysArray","keys","undefined","TextField","select","get","className","InputProps","startAdornment","InputAdornment","position","CheckBoxOutlined","getDefaultOperator","filterType","boolean","_BooleanOperation","date","dateTime","_NumericOperation","enumeration","_EnumerationOperation","numeric","string","_StringOperation","trinaryLogic","getOperatorsByFilter","filterOption","Object","FilterOperator","setFilterOperator","filterBy","operator","getOperationEnumValue","item","FilterInput","setFilterValue","exists","enumValues","Error","attributeName","FormControlLabel","control","Checkbox","checked","DatePicker","renderInput","props","newValue","toISOString","substring","dateToJudoDateString","Icon","path","mdiCalendarMonth","DateTimePicker","mdiCalendarClock","type","Number","mdiNumeric","mdiFormatTextVariant","FilterRow","closeHandler","Grid","container","xs","IconButton","Close","Transition","forwardRef","Slide","direction","FilterDialog","filters","filterOptions","tempFilters","setTempFilters","updateFilterValue","prevTempFilters","tempFilter","updateFilterOperator","filterCloseHandler","cancel","TransitionComponent","disableEnforceFocus","sx","justifyContent","PaperProps","m","Typography","component","Container","Box","mainContainerPadding","PageDialog","page","ok","CustomTablePagination","TablePagination","count","onPageChange","async","newPage","isNext","setPage","pageChange","rowsPerPage","rowPerPage","rowsPerPageOptions","labelDisplayedRows","to","nextIconButtonProps","isNextButtonEnabled","backIconButtonProps","RangeDialog","single","columns","defaultSortField","rangeCall","alreadySelectedItems","initalQueryCustomizer","openFilterDialog","useFilterDialog","enqueueSnackbar","useSnackbar","isLoading","setIsLoading","rowCount","setRowCount","sortModel","setSortModel","lastItem","setLastItem","firstItem","setFirstItem","setIsNextButtonEnabled","data","setData","selectionModel","setSelectionModel","selectedItems","setSelectedItems","setFilters","queryCustomizer","setQueryCustomizer","_seek","limit","handlePageChange","prevQueryCustomizer","reverse","fetchData","res","pop","s","isAxiosError","n","response","status","errorHandling","DataGrid","autoHeight","getRowId","row","__identifier","loading","paginationMode","rows","sortingOrder","sortingMode","onSortModelChange","newModel","field","sort","_orderBy","attribute","descending","checkboxSelection","onSelectionModelChange","newSelectionModel","isArray","lastId","find","diff","newItemsId","slice","newItems","prevSelectedItems","removedItemsId","isRowSelectable","params","includes","hideFooterSelectedRowCount","keepNonExistentRowsSelected","Toolbar","GridToolbarContainer","newFilters","tempQueryCustomizer","mapFiltersToQueryCustomizerProperty","handleFiltersChange","Pagination","PageDialogContextState","createContext","ConfirmDialogContextState","RangeDialogContextState","FilterDialogContextState","context","useContext","standaloneActions","actions","options","action","headerName","align","renderCell","icon","showLabel","dropdownActions","MoreHoriz","ViewIcons","onCreate","onDelete","onView","icons","Visibility","Delete","NoteAdd","EditIcons","onRemove","LinkOff","JudoNavigationContextState","BreadcrumbContextState","useJudoNavigation","customLinkItemStyle","py","px","theme","readonly","labelList","onSet","focused","setFocused","alignContent","ButtonBase","onFocusCapture","onBlur","join","cursor","navigate","useNavigate","useLocation","breadcrumbItems","setBreadcrumbItems","nextBreadcrumbItem","setNextBreadcrumbItem","prevNextBreadcrumbItem","pathname","judoNavigationContext","clearNavigate","toString","prevBreadCrumbItems","back","prevBreadcrumbItems","isBackDisabled","useMemo","setTitle","pageTitle","Provider","Breadcrumbs","maxItems","separator","Home","resolved","useResolvedPath","match","useMatch","end","ListItem","disablePadding","textDecoration","ListItemButton","selected","isOpenPageDialog","setIsOpenPageDialog","pageDialog","setPageDialog","handleClosePageDialog","pageDialogContext","openPageDialog","Promise","isOpenRangeDialog","setIsOpenRangeDialog","rangeDialog","setRangeDialog","handleCloseRangeDialog","customDialogContext","openRangeDialog","initialQueryCustomizer","isOpenConfirmDialog","setIsOpenConfirmDialog","confirmDialog","setConfirmDialog","handleCloseConfirmDialog","confirmDialogContext","openConfirmDialog","isOpenFilterDialog","setIsOpenFilterDialog","filterDialog","setFilterDialog","handleCloseFilterDialog","filterDialogContext","AppBar","elevation","Divider","shownActionsNumber","shownActions","sliceNumber","standaloneRowActions","dropdownRowActions"],"mappings":"0aAIa,MAAAA,EAAqB,EAChCC,sBACAC,QACAC,UACAC,OACAC,kBAEA,MAAMC,EAAwBC,SAAoB,MAClDC,EAAAA,WAAU,KACR,GAAIJ,EAAM,CACR,MAAQK,QAASC,GAAuBJ,EACb,OAAvBI,GACFA,EAAmBC,OAEtB,IACA,CAACP,IAYJ,OACEQ,EAAAA,KAACC,EAAAA,OAAM,CAACT,KAAMA,EAAMU,QAAST,EAAaU,OAAO,QAAQC,WAAW,EAAMC,SAAU,KACjFC,SAAA,CAAAhB,GAASiB,EAACC,IAAAC,EAAWA,aAACC,GAAG,sBAAuBJ,SAAAhB,IACjDiB,EAAAA,IAACI,EAAaA,cAAC,CAAAC,WAAYtB,EAAKgB,SAC9BC,EAACC,IAAAK,EAAiBA,mBAACH,GA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