@xaypay/tui 0.2.14 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1860 -511
- package/dist/index.js +1864 -510
- package/package.json +1 -1
- package/tui.config.js +174 -15
package/dist/index.es.js
CHANGED
|
@@ -121,6 +121,39 @@ const SvgWrong = ({
|
|
|
121
121
|
fill: "#051942"
|
|
122
122
|
}));
|
|
123
123
|
|
|
124
|
+
const SvgDocIcon = ({
|
|
125
|
+
title,
|
|
126
|
+
titleId,
|
|
127
|
+
...props
|
|
128
|
+
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
129
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
130
|
+
width: "1em",
|
|
131
|
+
height: "1em",
|
|
132
|
+
fill: "none",
|
|
133
|
+
viewBox: "0 0 32 32",
|
|
134
|
+
"aria-labelledby": titleId
|
|
135
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
136
|
+
id: titleId
|
|
137
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
138
|
+
stroke: "#D0D5DD",
|
|
139
|
+
strokeWidth: 1.2,
|
|
140
|
+
d: "M6.2 3.2A2.6 2.6 0 0 1 8.8.6h12.8c.097 0 .19.039.258.107l8.635 8.634a.37.37 0 0 1 .107.259v19.2a2.6 2.6 0 0 1-2.6 2.6H8.8a2.6 2.6 0 0 1-2.6-2.6z"
|
|
141
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
142
|
+
stroke: "#D0D5DD",
|
|
143
|
+
strokeWidth: 1.2,
|
|
144
|
+
d: "M21.6.4v6a3.2 3.2 0 0 0 3.2 3.2h6"
|
|
145
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
146
|
+
width: 23.8,
|
|
147
|
+
height: 13.2,
|
|
148
|
+
x: 0.5,
|
|
149
|
+
y: 14.2,
|
|
150
|
+
fill: "#3C68FF",
|
|
151
|
+
rx: 1.6
|
|
152
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
153
|
+
fill: "#fff",
|
|
154
|
+
d: "M5.922 23.8H3.859v-5.818h2.08q.878 0 1.511.35.633.346.975.996.343.651.343 1.557 0 .909-.343 1.563-.341.653-.98 1.003-.637.349-1.523.349m-.833-1.054h.782q.546 0 .917-.193.375-.196.563-.605.19-.413.19-1.063 0-.645-.19-1.054a1.23 1.23 0 0 0-.56-.602q-.372-.193-.918-.193H5.09zm9.937-1.855q0 .951-.36 1.62a2.5 2.5 0 0 1-.978 1.02q-.616.348-1.386.349-.776 0-1.392-.353a2.5 2.5 0 0 1-.975-1.02q-.357-.668-.358-1.616 0-.952.358-1.62.359-.667.975-1.017a2.76 2.76 0 0 1 1.392-.352q.77 0 1.386.352.62.35.977 1.018.36.667.361 1.619m-1.247 0q0-.617-.185-1.04a1.4 1.4 0 0 0-.514-.642 1.4 1.4 0 0 0-.778-.219q-.447 0-.779.22-.332.218-.517.641-.182.423-.182 1.04 0 .616.182 1.04.185.423.517.642.332.218.779.218.445 0 .778-.218.333-.219.514-.642.185-.425.185-1.04m7.292-.872h-1.245a1.2 1.2 0 0 0-.139-.43 1.1 1.1 0 0 0-.27-.323 1.2 1.2 0 0 0-.38-.205 1.5 1.5 0 0 0-.463-.07 1.4 1.4 0 0 0-.787.224 1.43 1.43 0 0 0-.52.648q-.185.423-.185 1.028 0 .622.185 1.045.188.423.523.64.335.215.775.215.247 0 .457-.065.215-.065.378-.19.165-.128.273-.31.11-.182.154-.415l1.244.006a2.323 2.323 0 0 1-.756 1.435 2.4 2.4 0 0 1-.767.46q-.443.168-1.003.168-.778 0-1.392-.353a2.5 2.5 0 0 1-.966-1.02q-.352-.668-.352-1.616 0-.952.358-1.62.358-.667.972-1.017.614-.352 1.38-.352.506 0 .938.142.434.142.77.415.335.27.545.662.213.391.273.898"
|
|
155
|
+
}));
|
|
156
|
+
|
|
124
157
|
const SvgListItemPdf = ({
|
|
125
158
|
title,
|
|
126
159
|
titleId,
|
|
@@ -232,9 +265,11 @@ const FileItem = /*#__PURE__*/React__default.memo(({
|
|
|
232
265
|
check,
|
|
233
266
|
radius,
|
|
234
267
|
status,
|
|
268
|
+
iconDoc,
|
|
235
269
|
iconPdf,
|
|
236
270
|
iconPng,
|
|
237
271
|
iconJpg,
|
|
272
|
+
iconDocx,
|
|
238
273
|
iconJpeg,
|
|
239
274
|
iconHeic,
|
|
240
275
|
iconWrong,
|
|
@@ -374,7 +409,7 @@ const FileItem = /*#__PURE__*/React__default.memo(({
|
|
|
374
409
|
style: {
|
|
375
410
|
width: '32px'
|
|
376
411
|
}
|
|
377
|
-
}, fileFormat === 'pdf' ? iconPdf ? iconPdf : /*#__PURE__*/React__default.createElement(SvgListItemPdf, null) : fileFormat === 'jpg' ? iconJpg ? iconJpg : /*#__PURE__*/React__default.createElement(SvgListItemJpg, null) : fileFormat === 'png' ? iconPng ? iconPng : /*#__PURE__*/React__default.createElement(SvgListItemPng, null) : fileFormat === 'jpeg' ? iconJpeg ? iconJpeg : /*#__PURE__*/React__default.createElement(SvgListItemJpeg, null) : fileFormat === 'heic' || fileFormat === 'heif' ? iconHeic ? iconHeic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
412
|
+
}, fileFormat === 'pdf' ? iconPdf ? iconPdf : /*#__PURE__*/React__default.createElement(SvgListItemPdf, null) : fileFormat === 'jpg' ? iconJpg ? iconJpg : /*#__PURE__*/React__default.createElement(SvgListItemJpg, null) : fileFormat === 'png' ? iconPng ? iconPng : /*#__PURE__*/React__default.createElement(SvgListItemPng, null) : fileFormat === 'jpeg' ? iconJpeg ? iconJpeg : /*#__PURE__*/React__default.createElement(SvgListItemJpeg, null) : fileFormat === 'heic' || fileFormat === 'heif' ? iconHeic ? iconHeic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : fileFormat === 'msword' ? iconDoc ? iconDoc : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : fileFormat === 'vnd.openxmlformats-officedocument.wordprocessingml.document' ? iconDocx ? iconDocx : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
378
413
|
style: {
|
|
379
414
|
position: 'relative',
|
|
380
415
|
display: 'flex',
|
|
@@ -432,6 +467,13 @@ const FileItem = /*#__PURE__*/React__default.memo(({
|
|
|
432
467
|
}, iconDelItem ? iconDelItem : /*#__PURE__*/React__default.createElement(SvgListItemDelete, null))));
|
|
433
468
|
});
|
|
434
469
|
|
|
470
|
+
var img$4 = "data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_18850_5919)'%3e%3cpath d='M13.4695 11.9505L20.7595 4.66046C20.9234 4.46916 21.009 4.22308 20.9993 3.9714C20.9895 3.71973 20.8852 3.48099 20.7071 3.30289C20.529 3.1248 20.2903 3.02047 20.0386 3.01075C19.7869 3.00102 19.5408 3.08663 19.3495 3.25046L12.0595 10.5405L4.76954 3.24046C4.57824 3.07663 4.33217 2.99102 4.08049 3.00075C3.82881 3.01047 3.59008 3.1148 3.41198 3.29289C3.23389 3.47099 3.12955 3.70973 3.11983 3.9614C3.11011 4.21308 3.19572 4.45915 3.35954 4.65046L10.6495 11.9505L3.34954 19.2405C3.24486 19.3301 3.15984 19.4404 3.09982 19.5645C3.0398 19.6886 3.00606 19.8237 3.00075 19.9614C2.99543 20.0991 3.01863 20.2365 3.06891 20.3648C3.11918 20.4931 3.19544 20.6097 3.29289 20.7071C3.39035 20.8046 3.5069 20.8808 3.63522 20.9311C3.76355 20.9814 3.90088 21.0046 4.0386 20.9993C4.17632 20.9939 4.31145 20.9602 4.43551 20.9002C4.55958 20.8402 4.6699 20.7551 4.75954 20.6505L12.0595 13.3605L19.3495 20.6505C19.5408 20.8143 19.7869 20.8999 20.0386 20.8902C20.2903 20.8804 20.529 20.7761 20.7071 20.598C20.8852 20.4199 20.9895 20.1812 20.9993 19.9295C21.009 19.6778 20.9234 19.4318 20.7595 19.2405L13.4695 11.9505Z' fill='%231C212D'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_18850_5919'%3e%3crect width='24' height='24' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
471
|
+
|
|
472
|
+
var img$3 = "data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 1V15M1 8H15' stroke='%23009B8B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
473
|
+
|
|
474
|
+
var img$2 = "data:image/svg+xml,%3csvg width='16' height='2' viewBox='0 0 16 2' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M1 1H15' stroke='%23009B8B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
475
|
+
|
|
476
|
+
// import React from 'react'
|
|
435
477
|
const boxSizing = 'border-box';
|
|
436
478
|
const fontStyle = 'normal';
|
|
437
479
|
const fontFamily = 'Arial';
|
|
@@ -458,17 +500,18 @@ const fontObject = {
|
|
|
458
500
|
var packageResult = {
|
|
459
501
|
// default properties for <Button /> component
|
|
460
502
|
BUTTON: {
|
|
461
|
-
|
|
503
|
+
opacity: 1,
|
|
462
504
|
width: '100%',
|
|
505
|
+
radius: '6px',
|
|
506
|
+
className: '',
|
|
507
|
+
type: 'button',
|
|
463
508
|
height: '46px',
|
|
464
509
|
color: 'white',
|
|
465
|
-
contentWidth: false,
|
|
466
510
|
border: 'none',
|
|
467
|
-
|
|
511
|
+
disabled: false,
|
|
468
512
|
cursor: 'pointer',
|
|
513
|
+
contentWidth: false,
|
|
469
514
|
padding: '12px 20px',
|
|
470
|
-
disabled: false,
|
|
471
|
-
className: '',
|
|
472
515
|
transition: 'background-color 240ms, color 240ms',
|
|
473
516
|
box: {
|
|
474
517
|
sizing: boxSizing
|
|
@@ -478,7 +521,11 @@ var packageResult = {
|
|
|
478
521
|
backgroundHover: '#CB3A3A',
|
|
479
522
|
disabled: 'rgba(60, 57, 62, 1)',
|
|
480
523
|
disabledLine: 'rgba(60, 57, 62, 1)',
|
|
481
|
-
disabledBackground: 'rgba(238, 238, 238, 1)'
|
|
524
|
+
disabledBackground: 'rgba(238, 238, 238, 1)',
|
|
525
|
+
withoutStyling: {
|
|
526
|
+
color: '#000000',
|
|
527
|
+
hoverColor: '#121212'
|
|
528
|
+
}
|
|
482
529
|
},
|
|
483
530
|
font: {
|
|
484
531
|
...fontObject
|
|
@@ -490,8 +537,10 @@ var packageResult = {
|
|
|
490
537
|
}
|
|
491
538
|
},
|
|
492
539
|
icon: {
|
|
540
|
+
marginLeft: '10px',
|
|
493
541
|
marginRight: '10px'
|
|
494
|
-
}
|
|
542
|
+
},
|
|
543
|
+
withoutStyling: false
|
|
495
544
|
},
|
|
496
545
|
// default properties for <Input /> component
|
|
497
546
|
INPUT: {
|
|
@@ -506,6 +555,7 @@ var packageResult = {
|
|
|
506
555
|
className: '',
|
|
507
556
|
maxLength: 255,
|
|
508
557
|
iconWidth: '64px',
|
|
558
|
+
iconPadding: '10px',
|
|
509
559
|
autoComplete: 'off',
|
|
510
560
|
box: {
|
|
511
561
|
sizing: boxSizing,
|
|
@@ -525,6 +575,7 @@ var packageResult = {
|
|
|
525
575
|
color: presetColors.dark,
|
|
526
576
|
display: 'block',
|
|
527
577
|
lineHeight: '22px',
|
|
578
|
+
iconMargin: '10px',
|
|
528
579
|
marginBottom: '6px',
|
|
529
580
|
font: {
|
|
530
581
|
...fontObject
|
|
@@ -536,7 +587,11 @@ var packageResult = {
|
|
|
536
587
|
zIndex: '1',
|
|
537
588
|
className: '',
|
|
538
589
|
marginTop: '10px',
|
|
590
|
+
iconMargin: '10px',
|
|
539
591
|
lineHeight: '19px',
|
|
592
|
+
box: {
|
|
593
|
+
shadow: '0 0 0 1px #F20918'
|
|
594
|
+
},
|
|
540
595
|
font: {
|
|
541
596
|
...fontObject
|
|
542
597
|
}
|
|
@@ -684,6 +739,7 @@ var packageResult = {
|
|
|
684
739
|
SELECT: {
|
|
685
740
|
dots: false,
|
|
686
741
|
className: '',
|
|
742
|
+
arrowNoRotate: false,
|
|
687
743
|
showCloseIcon: true,
|
|
688
744
|
// arrowIcon: React.createElement(SvgChecked, { fill: 'green' }),
|
|
689
745
|
// closeIcon: React.createElement(SvgChecked, { fill: 'green' }),
|
|
@@ -1060,8 +1116,14 @@ var packageResult = {
|
|
|
1060
1116
|
header: {
|
|
1061
1117
|
color: presetColors.primarySecond,
|
|
1062
1118
|
height: '30px',
|
|
1119
|
+
align: 'left',
|
|
1063
1120
|
font: {
|
|
1064
1121
|
...fontObject
|
|
1122
|
+
},
|
|
1123
|
+
icon: {
|
|
1124
|
+
maxWidth: '60px',
|
|
1125
|
+
maxHeight: '60px',
|
|
1126
|
+
marginRight: '20px'
|
|
1065
1127
|
}
|
|
1066
1128
|
},
|
|
1067
1129
|
image: {
|
|
@@ -1081,6 +1143,36 @@ var packageResult = {
|
|
|
1081
1143
|
},
|
|
1082
1144
|
closeAreaBackgroundColor: 'linear-gradient(to bottom, rgb(60, 57, 62), rgba(60, 57, 62, 0))' // for close div background color
|
|
1083
1145
|
},
|
|
1146
|
+
// default properties for <SwipeModal /> component
|
|
1147
|
+
SWIPEMODAL: {
|
|
1148
|
+
width: '300px',
|
|
1149
|
+
height: '100vh',
|
|
1150
|
+
titleStyle: {
|
|
1151
|
+
color: '#1C212D',
|
|
1152
|
+
textAlign: 'left',
|
|
1153
|
+
maxHeight: '66px',
|
|
1154
|
+
padding: '0px 20px',
|
|
1155
|
+
font: {
|
|
1156
|
+
...fontObject
|
|
1157
|
+
}
|
|
1158
|
+
},
|
|
1159
|
+
parent: {
|
|
1160
|
+
width: '100%',
|
|
1161
|
+
height: '100vh',
|
|
1162
|
+
colors: {
|
|
1163
|
+
background: 'rgba(60, 61, 70, 0.2)'
|
|
1164
|
+
}
|
|
1165
|
+
},
|
|
1166
|
+
colors: {
|
|
1167
|
+
background: 'white'
|
|
1168
|
+
},
|
|
1169
|
+
border: {
|
|
1170
|
+
radius: '10px'
|
|
1171
|
+
},
|
|
1172
|
+
// withParent: true,
|
|
1173
|
+
outSideClose: false,
|
|
1174
|
+
closeIcon: img$4
|
|
1175
|
+
},
|
|
1084
1176
|
// default properties for <Checkbox /> component
|
|
1085
1177
|
CHECKBOX: {
|
|
1086
1178
|
className: '',
|
|
@@ -1159,17 +1251,76 @@ var packageResult = {
|
|
|
1159
1251
|
},
|
|
1160
1252
|
// default properties for <Pagination /> component
|
|
1161
1253
|
PAGINATION: {
|
|
1162
|
-
|
|
1254
|
+
width: '34px',
|
|
1255
|
+
height: '34px',
|
|
1256
|
+
lineHeight: '16px',
|
|
1257
|
+
className: '',
|
|
1258
|
+
// for pagination class
|
|
1259
|
+
color: '#000000',
|
|
1260
|
+
font: {
|
|
1261
|
+
size: '13px',
|
|
1262
|
+
style: '',
|
|
1263
|
+
weight: '',
|
|
1264
|
+
family: ''
|
|
1265
|
+
},
|
|
1266
|
+
colors: {
|
|
1267
|
+
hover: '#000000',
|
|
1268
|
+
active: '#ffffff',
|
|
1269
|
+
background: '#ffffff',
|
|
1270
|
+
activeHover: '#ffffff',
|
|
1271
|
+
hoverBackground: '#dddddd',
|
|
1272
|
+
activeBackground: '#00236a'
|
|
1273
|
+
},
|
|
1274
|
+
border: {
|
|
1275
|
+
width: '1px',
|
|
1276
|
+
color: 'rgba(238,238,238, 1)',
|
|
1277
|
+
radius: '6px'
|
|
1278
|
+
}
|
|
1163
1279
|
},
|
|
1164
1280
|
// default properties for <Toaster /> component
|
|
1165
1281
|
TOASTER: {
|
|
1282
|
+
width: '440px',
|
|
1283
|
+
height: '83px',
|
|
1166
1284
|
className: '',
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1285
|
+
marginBottom: '20px',
|
|
1286
|
+
backgroundColor: '#FFFFFF',
|
|
1287
|
+
padding: '14px 29px 14px 12px',
|
|
1288
|
+
border: {
|
|
1289
|
+
width: '2px',
|
|
1290
|
+
style: 'solid',
|
|
1291
|
+
radius: '40px',
|
|
1292
|
+
color: '#EEEEEE'
|
|
1293
|
+
},
|
|
1294
|
+
title: {
|
|
1295
|
+
color: '#3C393E',
|
|
1296
|
+
lineHeight: '22px',
|
|
1297
|
+
font: {
|
|
1298
|
+
size: '16px',
|
|
1299
|
+
style: 'normal',
|
|
1300
|
+
weight: 600,
|
|
1301
|
+
family: ''
|
|
1302
|
+
},
|
|
1303
|
+
props: {}
|
|
1304
|
+
},
|
|
1305
|
+
description: {
|
|
1306
|
+
color: '#3C393E',
|
|
1307
|
+
lineHeight: '16px',
|
|
1308
|
+
font: {
|
|
1309
|
+
size: '12px',
|
|
1310
|
+
style: 'normal',
|
|
1311
|
+
weight: 500,
|
|
1312
|
+
family: ''
|
|
1313
|
+
},
|
|
1314
|
+
props: {
|
|
1315
|
+
opacity: 0.8
|
|
1316
|
+
}
|
|
1317
|
+
},
|
|
1318
|
+
icons: {
|
|
1319
|
+
info: '',
|
|
1320
|
+
warn: '',
|
|
1321
|
+
error: '',
|
|
1322
|
+
close: '',
|
|
1323
|
+
success: ''
|
|
1173
1324
|
}
|
|
1174
1325
|
},
|
|
1175
1326
|
// default properties for <Stepper /> component
|
|
@@ -1189,10 +1340,12 @@ var packageResult = {
|
|
|
1189
1340
|
width: '2px',
|
|
1190
1341
|
style: 'solid',
|
|
1191
1342
|
color: '#E7E7E7',
|
|
1343
|
+
hoverColor: '#E7E7E7',
|
|
1192
1344
|
activeColor: '#3C3D46'
|
|
1193
1345
|
},
|
|
1194
1346
|
label: {
|
|
1195
1347
|
color: '#3C3D46',
|
|
1348
|
+
activeColor: '#3C3D46',
|
|
1196
1349
|
lineHeight: '21px',
|
|
1197
1350
|
font: {
|
|
1198
1351
|
...fontObject
|
|
@@ -1202,6 +1355,39 @@ var packageResult = {
|
|
|
1202
1355
|
// default properties for <Form /> component
|
|
1203
1356
|
FORM: {
|
|
1204
1357
|
className: ''
|
|
1358
|
+
},
|
|
1359
|
+
// default properties for <Accordion /> component
|
|
1360
|
+
ACCORDION: {
|
|
1361
|
+
className: '',
|
|
1362
|
+
padding: '15px',
|
|
1363
|
+
color: '#121212',
|
|
1364
|
+
marginBottom: '0px',
|
|
1365
|
+
colors: {
|
|
1366
|
+
hover: '#009B8B',
|
|
1367
|
+
background: '#E5E7EA',
|
|
1368
|
+
backgroundHover: '#CBCED5'
|
|
1369
|
+
},
|
|
1370
|
+
border: {
|
|
1371
|
+
color: '#A8ADB9',
|
|
1372
|
+
width: '1px',
|
|
1373
|
+
style: 'solid',
|
|
1374
|
+
radius: '0px',
|
|
1375
|
+
top: false,
|
|
1376
|
+
left: false,
|
|
1377
|
+
right: false,
|
|
1378
|
+
bottom: true
|
|
1379
|
+
},
|
|
1380
|
+
font: {
|
|
1381
|
+
size: '14px',
|
|
1382
|
+
style: 'normal',
|
|
1383
|
+
weight: 700,
|
|
1384
|
+
family: 'Noto Sans Armenian'
|
|
1385
|
+
},
|
|
1386
|
+
icon: {
|
|
1387
|
+
open: img$3,
|
|
1388
|
+
close: img$2,
|
|
1389
|
+
openHover: img$3
|
|
1390
|
+
}
|
|
1205
1391
|
}
|
|
1206
1392
|
};
|
|
1207
1393
|
|
|
@@ -1255,6 +1441,7 @@ const Button = ({
|
|
|
1255
1441
|
radius,
|
|
1256
1442
|
outline,
|
|
1257
1443
|
padding,
|
|
1444
|
+
opacity,
|
|
1258
1445
|
onClick,
|
|
1259
1446
|
disabled,
|
|
1260
1447
|
className,
|
|
@@ -1263,13 +1450,18 @@ const Button = ({
|
|
|
1263
1450
|
hoverColor,
|
|
1264
1451
|
transition,
|
|
1265
1452
|
contentWidth,
|
|
1453
|
+
iconRightSide,
|
|
1266
1454
|
disabledColor,
|
|
1267
1455
|
textTransform,
|
|
1456
|
+
withoutStyling,
|
|
1268
1457
|
backgroundColor,
|
|
1269
1458
|
disabledLineColor,
|
|
1459
|
+
btnIconMarginLeft,
|
|
1270
1460
|
btnIconMarginRight,
|
|
1461
|
+
withoutStylingColor,
|
|
1271
1462
|
backgroundHoverColor,
|
|
1272
1463
|
disabledBackgroundColor,
|
|
1464
|
+
withoutStylingHoverColor,
|
|
1273
1465
|
...props
|
|
1274
1466
|
}) => {
|
|
1275
1467
|
const [classProps, setClassProps] = useState({});
|
|
@@ -1305,22 +1497,23 @@ const Button = ({
|
|
|
1305
1497
|
outline: 'none',
|
|
1306
1498
|
alignItems: 'center',
|
|
1307
1499
|
justifyContent: 'center',
|
|
1500
|
+
height: height ?? configStyles.BUTTON.height,
|
|
1501
|
+
padding: padding ?? configStyles.BUTTON.padding,
|
|
1308
1502
|
fontSize: size ?? configStyles.BUTTON.font.size,
|
|
1503
|
+
borderRadius: radius ?? configStyles.BUTTON.radius,
|
|
1309
1504
|
fontStyle: style ?? configStyles.BUTTON.font.style,
|
|
1310
1505
|
fontFamily: font ?? configStyles.BUTTON.font.family,
|
|
1311
|
-
height: height ?? configStyles.BUTTON.height,
|
|
1312
1506
|
fontWeight: weight ?? configStyles.BUTTON.font.weight,
|
|
1313
|
-
padding: padding ?? configStyles.BUTTON.padding,
|
|
1314
|
-
borderRadius: radius ?? configStyles.BUTTON.radius,
|
|
1315
1507
|
boxSizing: boxSizing ?? configStyles.BUTTON.box.sizing,
|
|
1316
1508
|
transition: transition ?? configStyles.BUTTON.transition,
|
|
1317
1509
|
border: outline ? 'none' : border ?? configStyles.BUTTON.border,
|
|
1318
1510
|
width: contentWidth ? 'auto' : width ?? configStyles.BUTTON.width,
|
|
1319
|
-
cursor: disabled ? 'not-allowed' : cursor ?? configStyles.BUTTON.cursor,
|
|
1320
1511
|
textTransform: textTransform ?? configStyles.BUTTON.text.transform,
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1512
|
+
cursor: disabled ? 'not-allowed' : cursor ?? configStyles.BUTTON.cursor,
|
|
1513
|
+
opacity: opacity ?? configStyles.BUTTON.opacity,
|
|
1514
|
+
backgroundColor: withoutStyling ?? configStyles.BUTTON.withoutStyling ? 'transparent' : (outline || !outline) && disabled ? disabledBackgroundColor ? disabledBackgroundColor : configStyles.BUTTON.colors.disabledBackground : outline && !disabled ? isHover ? backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : '#ffffff' : !outline && !disabled && isHover ? backgroundHoverColor ? backgroundHoverColor : configStyles.BUTTON.colors.backgroundHover : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background,
|
|
1515
|
+
boxShadow: outline && !withoutStyling && !configStyles.BUTTON.withoutStyling ? disabled ? `inset 0 0 0 2px ${disabledLineColor ? disabledLineColor : configStyles.BUTTON.colors.disabledLine}` : `inset 0 0 0 2px ${backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background}` : 'none',
|
|
1516
|
+
color: withoutStyling ?? configStyles.BUTTON.withoutStyling ? isHover ? withoutStylingHoverColor ?? configStyles.BUTTON.colors.withoutStyling.hoverColor : withoutStylingColor ?? configStyles.BUTTON.colors.withoutStyling.color : (outline || !outline) && disabled ? disabledColor ? disabledColor : configStyles.BUTTON.colors.disabled : outline && !disabled ? isHover ? color ? color : configStyles.BUTTON.color : backgroundColor ? backgroundColor : configStyles.BUTTON.colors.background : !outline && !disabled && isHover ? hoverColor ? hoverColor : configStyles.BUTTON.text.colors.hover : color ? color : configStyles.BUTTON.color
|
|
1324
1517
|
},
|
|
1325
1518
|
type: type ?? configStyles.BUTTON.type,
|
|
1326
1519
|
disabled: disabled ?? configStyles.BUTTON.disabled,
|
|
@@ -1328,43 +1521,50 @@ const Button = ({
|
|
|
1328
1521
|
onMouseEnter: handleMouseEnter,
|
|
1329
1522
|
onMouseLeave: handleMouseLeave,
|
|
1330
1523
|
className: classProps
|
|
1331
|
-
}, props), isHover && hoverIcon ? hoverIcon : icon ?? null, ' ', label && /*#__PURE__*/React__default.createElement("span", {
|
|
1524
|
+
}, props), !iconRightSide ? isHover && hoverIcon ? hoverIcon : icon ?? null : ' ', ' ', label && /*#__PURE__*/React__default.createElement("span", {
|
|
1332
1525
|
style: {
|
|
1333
|
-
marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight : configStyles.BUTTON.icon.marginRight : '0px'
|
|
1526
|
+
marginLeft: icon && !iconRightSide ? btnIconMarginRight ? btnIconMarginRight : configStyles.BUTTON.icon.marginRight : '0px',
|
|
1527
|
+
marginRight: icon && iconRightSide ? btnIconMarginLeft ? btnIconMarginLeft : configStyles.BUTTON.icon.marginLeft : '0px'
|
|
1334
1528
|
}
|
|
1335
|
-
}, label), ' ', !icon && !label && 'Add icon or label prop on Button component'));
|
|
1529
|
+
}, label), ' ', iconRightSide ? isHover && hoverIcon ? hoverIcon : icon ?? null : ' ', !icon && !label && 'Add icon or label prop on Button component'));
|
|
1336
1530
|
};
|
|
1337
1531
|
Button.propTypes = {
|
|
1338
1532
|
type: PropTypes.string,
|
|
1339
1533
|
size: PropTypes.string,
|
|
1340
1534
|
style: PropTypes.string,
|
|
1341
|
-
weight: PropTypes.string,
|
|
1342
1535
|
font: PropTypes.string,
|
|
1343
1536
|
icon: PropTypes.element,
|
|
1344
|
-
hoverIcon: PropTypes.element,
|
|
1345
1537
|
color: PropTypes.string,
|
|
1346
1538
|
width: PropTypes.string,
|
|
1347
1539
|
outline: PropTypes.bool,
|
|
1348
1540
|
onClick: PropTypes.func,
|
|
1349
1541
|
label: PropTypes.string,
|
|
1542
|
+
weight: PropTypes.string,
|
|
1350
1543
|
height: PropTypes.string,
|
|
1351
1544
|
cursor: PropTypes.string,
|
|
1352
1545
|
border: PropTypes.string,
|
|
1353
1546
|
disabled: PropTypes.bool,
|
|
1354
1547
|
radius: PropTypes.string,
|
|
1355
1548
|
padding: PropTypes.string,
|
|
1549
|
+
opacity: PropTypes.number,
|
|
1356
1550
|
boxSizing: PropTypes.string,
|
|
1357
1551
|
className: PropTypes.string,
|
|
1552
|
+
hoverIcon: PropTypes.element,
|
|
1358
1553
|
hoverColor: PropTypes.string,
|
|
1359
1554
|
transition: PropTypes.string,
|
|
1360
1555
|
contentWidth: PropTypes.bool,
|
|
1556
|
+
iconRightSide: PropTypes.bool,
|
|
1557
|
+
withoutStyling: PropTypes.bool,
|
|
1361
1558
|
textTransform: PropTypes.string,
|
|
1362
1559
|
disabledColor: PropTypes.string,
|
|
1363
1560
|
backgroundColor: PropTypes.string,
|
|
1364
1561
|
disabledLineColor: PropTypes.string,
|
|
1562
|
+
btnIconMarginLeft: PropTypes.string,
|
|
1365
1563
|
btnIconMarginRight: PropTypes.string,
|
|
1564
|
+
withoutStylingColor: PropTypes.string,
|
|
1366
1565
|
backgroundHoverColor: PropTypes.string,
|
|
1367
|
-
disabledBackgroundColor: PropTypes.string
|
|
1566
|
+
disabledBackgroundColor: PropTypes.string,
|
|
1567
|
+
withoutStylingHoverColor: PropTypes.string
|
|
1368
1568
|
};
|
|
1369
1569
|
|
|
1370
1570
|
const SvgPdf = ({
|
|
@@ -1523,8 +1723,10 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1523
1723
|
progressColor,
|
|
1524
1724
|
noChoosenFile,
|
|
1525
1725
|
iconPdf,
|
|
1726
|
+
iconDoc,
|
|
1526
1727
|
iconPng,
|
|
1527
1728
|
iconJpg,
|
|
1729
|
+
iconDocx,
|
|
1528
1730
|
iconJpeg,
|
|
1529
1731
|
iconHeic,
|
|
1530
1732
|
iconWrong,
|
|
@@ -1628,8 +1830,26 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1628
1830
|
for (let ix = 0; ix < file.length; ix++) {
|
|
1629
1831
|
if (file[ix]) {
|
|
1630
1832
|
if (file[ix].size <= maxSize * Math.pow(2, 20)) {
|
|
1631
|
-
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif')) {
|
|
1632
|
-
if (
|
|
1833
|
+
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') || (fileExtensions.includes('doc') || fileExtensions.includes('docx')) && (file[ix].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || file[ix].type.split('/')[1] === 'msword')) {
|
|
1834
|
+
if (file[ix].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
1835
|
+
change({
|
|
1836
|
+
id: '',
|
|
1837
|
+
check: '',
|
|
1838
|
+
status: '',
|
|
1839
|
+
file: file[ix],
|
|
1840
|
+
uuid: v4()
|
|
1841
|
+
});
|
|
1842
|
+
setImage('docx');
|
|
1843
|
+
} else if (file[ix].type === 'application/msword') {
|
|
1844
|
+
change({
|
|
1845
|
+
id: '',
|
|
1846
|
+
check: '',
|
|
1847
|
+
status: '',
|
|
1848
|
+
file: file[ix],
|
|
1849
|
+
uuid: v4()
|
|
1850
|
+
});
|
|
1851
|
+
setImage('doc');
|
|
1852
|
+
} else if ((fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif'))) {
|
|
1633
1853
|
handleCheckHeicFormat(file[ix]).then(() => {
|
|
1634
1854
|
change({
|
|
1635
1855
|
id: '',
|
|
@@ -1676,8 +1896,26 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1676
1896
|
for (let ix = 0; ix < file.length; ix++) {
|
|
1677
1897
|
if (file[ix]) {
|
|
1678
1898
|
if (file[ix].size <= maxSize * Math.pow(2, 20)) {
|
|
1679
|
-
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif')) {
|
|
1680
|
-
if (
|
|
1899
|
+
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') || (fileExtensions.includes('doc') || fileExtensions.includes('docx')) && (file[ix].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || file[ix].type.split('/')[1] === 'msword')) {
|
|
1900
|
+
if (file[ix].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
1901
|
+
change({
|
|
1902
|
+
id: '',
|
|
1903
|
+
check: '',
|
|
1904
|
+
status: '',
|
|
1905
|
+
file: file[ix],
|
|
1906
|
+
uuid: v4()
|
|
1907
|
+
});
|
|
1908
|
+
setImage('docx');
|
|
1909
|
+
} else if (file[ix].type === 'application/msword') {
|
|
1910
|
+
change({
|
|
1911
|
+
id: '',
|
|
1912
|
+
check: '',
|
|
1913
|
+
status: '',
|
|
1914
|
+
file: file[ix],
|
|
1915
|
+
uuid: v4()
|
|
1916
|
+
});
|
|
1917
|
+
setImage('doc');
|
|
1918
|
+
} else if ((fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif'))) {
|
|
1681
1919
|
handleCheckHeicFormat(file[ix]).then(() => {
|
|
1682
1920
|
change({
|
|
1683
1921
|
id: '',
|
|
@@ -1733,9 +1971,17 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1733
1971
|
} else {
|
|
1734
1972
|
if (file[0]) {
|
|
1735
1973
|
if (file[0].size <= maxSize * Math.pow(2, 20)) {
|
|
1736
|
-
if (fileExtensions.includes(file[0].type.split('/')[1]) || (fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[0].type === 'image/heif' || file[0].type === 'image/heic' || file[0].name.toLowerCase().endsWith('.heic') || file[0].name.toLowerCase().endsWith('.heif'))) {
|
|
1974
|
+
if (fileExtensions.includes(file[0].type.split('/')[1]) || (fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[0].type === 'image/heif' || file[0].type === 'image/heic' || file[0].name.toLowerCase().endsWith('.heic') || file[0].name.toLowerCase().endsWith('.heif')) || (fileExtensions.includes('doc') || fileExtensions.includes('docx')) && (file[0].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || file[0].type.split('/')[1] === 'msword')) {
|
|
1737
1975
|
setError('');
|
|
1738
|
-
if (file[0].type === 'application/
|
|
1976
|
+
if (file[0].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
1977
|
+
setImage('docx');
|
|
1978
|
+
change(file);
|
|
1979
|
+
setSingleFile(file);
|
|
1980
|
+
} else if (file[0].type === 'application/msword') {
|
|
1981
|
+
setImage('doc');
|
|
1982
|
+
change(file);
|
|
1983
|
+
setSingleFile(file);
|
|
1984
|
+
} else if (file[0].type === 'application/pdf') {
|
|
1739
1985
|
setImage('pdf');
|
|
1740
1986
|
change(file);
|
|
1741
1987
|
setSingleFile(file);
|
|
@@ -1750,6 +1996,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1750
1996
|
});
|
|
1751
1997
|
} else {
|
|
1752
1998
|
change(file);
|
|
1999
|
+
setSingleFile(file);
|
|
1753
2000
|
setImage(URL.createObjectURL(file[0]));
|
|
1754
2001
|
}
|
|
1755
2002
|
} else {
|
|
@@ -1770,8 +2017,12 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1770
2017
|
const handleClick = () => {
|
|
1771
2018
|
inpRef.current.files = null;
|
|
1772
2019
|
inpRef.current.value = null;
|
|
1773
|
-
if (
|
|
2020
|
+
if (multiple) {
|
|
1774
2021
|
inpRef.current.click();
|
|
2022
|
+
} else {
|
|
2023
|
+
if (!image) {
|
|
2024
|
+
inpRef.current.click();
|
|
2025
|
+
}
|
|
1775
2026
|
}
|
|
1776
2027
|
};
|
|
1777
2028
|
const handleDrop = e => {
|
|
@@ -1935,7 +2186,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1935
2186
|
fontFamily: family ?? configStyles.FILE.font.family,
|
|
1936
2187
|
fontWeight: weight ?? configStyles.FILE.font.weight
|
|
1937
2188
|
}
|
|
1938
|
-
}, !multiple && image && preview ? image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : /*#__PURE__*/React__default.createElement("img", {
|
|
2189
|
+
}, !multiple && image && preview ? image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : /*#__PURE__*/React__default.createElement("img", {
|
|
1939
2190
|
src: image,
|
|
1940
2191
|
style: {
|
|
1941
2192
|
display: 'block',
|
|
@@ -1960,7 +2211,8 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1960
2211
|
}
|
|
1961
2212
|
}, /*#__PURE__*/React__default.createElement("p", {
|
|
1962
2213
|
style: {
|
|
1963
|
-
margin: '0px'
|
|
2214
|
+
margin: '0px',
|
|
2215
|
+
padding: '0px 10px'
|
|
1964
2216
|
}
|
|
1965
2217
|
}, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
1966
2218
|
style: {
|
|
@@ -1992,7 +2244,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1992
2244
|
whiteSpace: 'nowrap',
|
|
1993
2245
|
textOverflow: 'ellipsis'
|
|
1994
2246
|
}
|
|
1995
|
-
}, singleFile ? singleFile
|
|
2247
|
+
}, singleFile ? singleFile.name : /*#__PURE__*/React__default.createElement("span", null, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))))), /*#__PURE__*/React__default.createElement("div", {
|
|
1996
2248
|
style: {
|
|
1997
2249
|
position: 'absolute',
|
|
1998
2250
|
top: '0px',
|
|
@@ -2031,11 +2283,13 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2031
2283
|
uuid: item.uuid,
|
|
2032
2284
|
check: item.check,
|
|
2033
2285
|
status: item.status,
|
|
2034
|
-
size: item
|
|
2035
|
-
name: item
|
|
2286
|
+
size: item?.file?.size,
|
|
2287
|
+
name: item?.file?.name,
|
|
2036
2288
|
iconPdf: iconPdf ?? configStyles.FILE.icon.pdf,
|
|
2289
|
+
iconDoc: iconDoc ?? configStyles.FILE.icon.doc,
|
|
2037
2290
|
iconPng: iconPng ?? configStyles.FILE.icon.png,
|
|
2038
2291
|
iconJpg: iconJpg ?? configStyles.FILE.icon.jpg,
|
|
2292
|
+
iconDocx: iconDocx ?? configStyles.FILE.icon.docx,
|
|
2039
2293
|
iconJpeg: iconJpeg ?? configStyles.FILE.icon.jpeg,
|
|
2040
2294
|
iconHeic: iconHeic ?? configStyles.FILE.icon.heic,
|
|
2041
2295
|
iconWrong: iconWrong ?? configStyles.FILE.icon.wrong,
|
|
@@ -2043,7 +2297,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2043
2297
|
timeForRemoveError: timeForRemoveError,
|
|
2044
2298
|
removeFile: removeFile ? removeFile : _ => _,
|
|
2045
2299
|
radius: radius ?? configStyles.FILE.radius,
|
|
2046
|
-
fileFormat: item
|
|
2300
|
+
fileFormat: item?.file?.type.split('/')[1]?.toLowerCase(),
|
|
2047
2301
|
progressColor: progressColor ?? configStyles.FILE.progress.color,
|
|
2048
2302
|
listItemHeight: listItemHeight ?? configStyles.FILE.listItem.height,
|
|
2049
2303
|
listItemPadding: listItemPadding ?? configStyles.FILE.listItem.padding,
|
|
@@ -2109,8 +2363,10 @@ File.propTypes = {
|
|
|
2109
2363
|
deleteComponent: PropTypes.bool,
|
|
2110
2364
|
removeComponent: PropTypes.func,
|
|
2111
2365
|
iconPdf: PropTypes.element,
|
|
2366
|
+
iconDoc: PropTypes.element,
|
|
2112
2367
|
iconPng: PropTypes.element,
|
|
2113
2368
|
iconJpg: PropTypes.element,
|
|
2369
|
+
iconDocx: PropTypes.element,
|
|
2114
2370
|
iconJpeg: PropTypes.element,
|
|
2115
2371
|
iconHeic: PropTypes.element,
|
|
2116
2372
|
iconWrong: PropTypes.element,
|
|
@@ -2358,15 +2614,21 @@ const handleUtilsCheckTypeTel = (val, prevVal) => {
|
|
|
2358
2614
|
}
|
|
2359
2615
|
return val;
|
|
2360
2616
|
};
|
|
2361
|
-
const handleUtilsCheckTypeNumber = (val, prevVal, maxLength, floatToFix, maxNumSize, withoutDot, innerMinNumSize, numberMaxLength) => {
|
|
2617
|
+
const handleUtilsCheckTypeNumber = (val, prevVal, maxLength, floatToFix, maxNumSize, withoutDot, innerMinNumSize, numberMaxLength, cardNumber) => {
|
|
2362
2618
|
if (maxLength && maxLength > 0) {
|
|
2363
2619
|
if (val.length > maxLength) {
|
|
2364
2620
|
val = val.substr(0, maxLength);
|
|
2365
2621
|
}
|
|
2366
2622
|
} else {
|
|
2367
2623
|
const regNum = floatToFix && floatToFix >= 0 ? /^\d+(\.|\․|\.|\,)?(\d+)?$/ : /^\d+$/;
|
|
2368
|
-
if (
|
|
2369
|
-
val
|
|
2624
|
+
if (cardNumber) {
|
|
2625
|
+
if (val.length > 19 && !val.includes('.')) {
|
|
2626
|
+
val = val.substr(0, 19);
|
|
2627
|
+
}
|
|
2628
|
+
} else {
|
|
2629
|
+
if (val.length > 16 && !val.includes('.')) {
|
|
2630
|
+
val = val.substr(0, 16);
|
|
2631
|
+
}
|
|
2370
2632
|
}
|
|
2371
2633
|
if (numberMaxLength && numberMaxLength > 0 && !val.includes('.')) {
|
|
2372
2634
|
val = val.substr(0, numberMaxLength);
|
|
@@ -2442,9 +2704,9 @@ function styleInject(css, ref) {
|
|
|
2442
2704
|
}
|
|
2443
2705
|
}
|
|
2444
2706
|
|
|
2445
|
-
var css_248z$
|
|
2446
|
-
var styles$
|
|
2447
|
-
styleInject(css_248z$
|
|
2707
|
+
var css_248z$c = ".table-module_sorting-arrows__BaN-G:after{content:\"▲\";font-size:11px;position:absolute;right:0;top:calc(50% - 12px)}.table-module_sorting-arrows__BaN-G:before{bottom:calc(50% - 12px);content:\"▼\";font-size:11px;position:absolute;right:0}.table-module_td-span__XHo6k{display:inline-block;position:relative}.table-module_td-span__XHo6k>svg{left:0;position:absolute;top:0;z-index:-1}.table-module_list-text__kmKIq{align-items:center;cursor:pointer;display:flex;margin:0 0 8px;min-height:38px;white-space:wrap}.table-module_dots-option-item__jNOxO{box-sizing:border-box;cursor:pointer;display:flex;height:39px;margin-bottom:2px;padding:10px;position:relative;width:100%}.table-module_dots-option-item__jNOxO:after{background-color:#eee;border-radius:1px;-webkit-border-radius:1px;-moz-border-radius:1px;-ms-border-radius:1px;-o-border-radius:1px;content:\"\";height:2px;left:10px;position:absolute;top:calc(100% - 2px);width:calc(100% - 20px)}.table-module_dots-option-item__jNOxO:last-child:after{display:none}.table-module_no-tabel-data__6xp3N{align-items:center;display:flex;height:200px;justify-content:center;width:100%}";
|
|
2708
|
+
var styles$a = {"sorting-arrows":"table-module_sorting-arrows__BaN-G","td-span":"table-module_td-span__XHo6k","list-text":"table-module_list-text__kmKIq","dots-option-item":"table-module_dots-option-item__jNOxO","no-tabel-data":"table-module_no-tabel-data__6xp3N"};
|
|
2709
|
+
styleInject(css_248z$c);
|
|
2448
2710
|
|
|
2449
2711
|
/* eslint-disable no-prototype-builtins */
|
|
2450
2712
|
const TH = ({
|
|
@@ -2486,7 +2748,7 @@ const TH = ({
|
|
|
2486
2748
|
borderColor: hideBorder ? 'transparent' : '#eeeeee'
|
|
2487
2749
|
},
|
|
2488
2750
|
onClick: handleHeaderItemClick,
|
|
2489
|
-
className: `${hasOwnerProperty(item, 'sortingArrows') ? item.sortingArrows === true ? styles$
|
|
2751
|
+
className: `${hasOwnerProperty(item, 'sortingArrows') ? item.sortingArrows === true ? styles$a['sorting-arrows'] : '' : ''}`
|
|
2490
2752
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2491
2753
|
style: {
|
|
2492
2754
|
display: 'flex',
|
|
@@ -2502,7 +2764,8 @@ const TH = ({
|
|
|
2502
2764
|
unCheckedColor: item.checkBox.unCheckedColor ? item.checkBox.unCheckedColor : ''
|
|
2503
2765
|
}) : '', /*#__PURE__*/React__default.createElement("p", {
|
|
2504
2766
|
style: {
|
|
2505
|
-
margin: '0px'
|
|
2767
|
+
margin: '0px',
|
|
2768
|
+
whiteSpace: 'nowrap'
|
|
2506
2769
|
},
|
|
2507
2770
|
onClick: e => handleCheckArrowAction(e, item, 'arrowComponent')
|
|
2508
2771
|
}, item.type === 'show' ? item.content : hasOwnerProperty(item, 'arrowComponent') ? item.status === 'close' ? item.closeArrow : item.openArrow : '')));
|
|
@@ -2620,7 +2883,7 @@ const TD = ({
|
|
|
2620
2883
|
},
|
|
2621
2884
|
id: newItem.id,
|
|
2622
2885
|
type: newItem.type,
|
|
2623
|
-
className: styles$
|
|
2886
|
+
className: styles$a['td-span'],
|
|
2624
2887
|
key: `${newItem.id}_${newIndex}`,
|
|
2625
2888
|
onClick: e => handleCheckActions(e, newItem, 'type', newIndex)
|
|
2626
2889
|
}, newItem.content === 0 ? newItem.content.toString() : newItem.content ? newItem.content : '');
|
|
@@ -2642,7 +2905,7 @@ const TD = ({
|
|
|
2642
2905
|
},
|
|
2643
2906
|
id: iT.id ? iT.id : '',
|
|
2644
2907
|
type: iT.type ? iT.type : '',
|
|
2645
|
-
className: styles$
|
|
2908
|
+
className: styles$a['td-span'],
|
|
2646
2909
|
onClick: e => handleCheckActions(e, iT, 'type', iN),
|
|
2647
2910
|
key: `${iT.id || iT.content}_${iN}`
|
|
2648
2911
|
}, iT.content === 0 ? iT.content.toString() : iT.content ? iT.content : '');
|
|
@@ -2666,7 +2929,7 @@ const TD = ({
|
|
|
2666
2929
|
cursor: 'pointer'
|
|
2667
2930
|
},
|
|
2668
2931
|
onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex, item),
|
|
2669
|
-
className: styles$
|
|
2932
|
+
className: styles$a['td-span']
|
|
2670
2933
|
}, hasOwnerProperty(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '', hasOwnerProperty(item, 'draggableIcon') && /*#__PURE__*/React__default.createElement("div", {
|
|
2671
2934
|
draggable: true,
|
|
2672
2935
|
style: {
|
|
@@ -2735,7 +2998,7 @@ const TD = ({
|
|
|
2735
2998
|
}, hasOwnerProperty(item, 'options') && item.options.map((optionItem, optionIndex) => {
|
|
2736
2999
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
2737
3000
|
key: `${optionItem.content}_${optionIndex}`,
|
|
2738
|
-
className: styles$
|
|
3001
|
+
className: styles$a['dots-option-item'],
|
|
2739
3002
|
style: {
|
|
2740
3003
|
color: '#3C393E',
|
|
2741
3004
|
fontSize: '14px',
|
|
@@ -2777,7 +3040,7 @@ const TD = ({
|
|
|
2777
3040
|
}, innerItem.content.map((contInnerItem, contInnerIndex) => {
|
|
2778
3041
|
return /*#__PURE__*/React__default.createElement("p", {
|
|
2779
3042
|
key: `${contInnerItem}_${contInnerIndex}`,
|
|
2780
|
-
className: styles$
|
|
3043
|
+
className: styles$a['list-text'],
|
|
2781
3044
|
style: {
|
|
2782
3045
|
maxWidth: '100%',
|
|
2783
3046
|
color: openListColor,
|
|
@@ -2794,7 +3057,7 @@ const TD = ({
|
|
|
2794
3057
|
} else {
|
|
2795
3058
|
return /*#__PURE__*/React__default.createElement("p", {
|
|
2796
3059
|
key: `${innerItem}_${innerItemIndex}`,
|
|
2797
|
-
className: styles$
|
|
3060
|
+
className: styles$a['list-text'],
|
|
2798
3061
|
style: {
|
|
2799
3062
|
maxWidth: '100%',
|
|
2800
3063
|
color: openListColor,
|
|
@@ -2815,7 +3078,7 @@ const TD = ({
|
|
|
2815
3078
|
cursor: 'pointer'
|
|
2816
3079
|
},
|
|
2817
3080
|
onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex, item),
|
|
2818
|
-
className: styles$
|
|
3081
|
+
className: styles$a['td-span']
|
|
2819
3082
|
}, hasOwnerProperty(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '') : '');
|
|
2820
3083
|
};
|
|
2821
3084
|
|
|
@@ -3072,7 +3335,6 @@ const Table = ({
|
|
|
3072
3335
|
}
|
|
3073
3336
|
};
|
|
3074
3337
|
const handleCheckedHeader = (data, e) => {
|
|
3075
|
-
console.log('ok - - - - - - - ');
|
|
3076
3338
|
e.stopPropagation();
|
|
3077
3339
|
let removeItemIndex;
|
|
3078
3340
|
let checkableItemBool;
|
|
@@ -3183,9 +3445,18 @@ const Table = ({
|
|
|
3183
3445
|
tempCheckedArray.push(innerItem.checked);
|
|
3184
3446
|
});
|
|
3185
3447
|
if (tempCheckedArray.every(i => i)) {
|
|
3186
|
-
item
|
|
3448
|
+
if (hasOwnerProperty(item, 'checkBox')) {
|
|
3449
|
+
if (hasOwnerProperty(item.checkBox, 'checked')) {
|
|
3450
|
+
item.checkBox.checked = true;
|
|
3451
|
+
return item;
|
|
3452
|
+
}
|
|
3453
|
+
}
|
|
3187
3454
|
} else {
|
|
3188
|
-
item
|
|
3455
|
+
if (hasOwnerProperty(item, 'checkBox')) {
|
|
3456
|
+
if (hasOwnerProperty(item.checkBox, 'checked')) {
|
|
3457
|
+
item.checkBox.checked = false;
|
|
3458
|
+
}
|
|
3459
|
+
}
|
|
3189
3460
|
}
|
|
3190
3461
|
}
|
|
3191
3462
|
return item;
|
|
@@ -3250,7 +3521,7 @@ const Table = ({
|
|
|
3250
3521
|
const handleCheckArrowActionHeader = (e, item) => {
|
|
3251
3522
|
e.stopPropagation();
|
|
3252
3523
|
const checkedOpenableAllRows = header.map((innerItem, innerIndex) => {
|
|
3253
|
-
if (item.checkIndex === innerIndex) {
|
|
3524
|
+
if (item.checkIndex === (draggable && !showOrder ? innerIndex - 1 : draggable && showOrder ? innerIndex - 2 : innerIndex)) {
|
|
3254
3525
|
if (item.status === 'close') {
|
|
3255
3526
|
innerItem.status = 'open';
|
|
3256
3527
|
} else {
|
|
@@ -3360,7 +3631,12 @@ const Table = ({
|
|
|
3360
3631
|
const newRows = body;
|
|
3361
3632
|
const [draggedRow] = newRows.splice(draggedRowIndex.current, 1);
|
|
3362
3633
|
newRows.splice(index, 0, draggedRow);
|
|
3363
|
-
newRows.map(item => {
|
|
3634
|
+
newRows.map((item, newIndex) => {
|
|
3635
|
+
item.map(innerItem => {
|
|
3636
|
+
if (hasOwnerProperty(innerItem, 'checkIndex')) {
|
|
3637
|
+
innerItem.checkIndex = newIndex;
|
|
3638
|
+
}
|
|
3639
|
+
});
|
|
3364
3640
|
correctData.push([...item]);
|
|
3365
3641
|
});
|
|
3366
3642
|
setBody(correctData);
|
|
@@ -3382,8 +3658,18 @@ const Table = ({
|
|
|
3382
3658
|
itemRefs.current[index] = element;
|
|
3383
3659
|
}
|
|
3384
3660
|
};
|
|
3661
|
+
const handleSafeStringify = obj => {
|
|
3662
|
+
const seen = new WeakSet();
|
|
3663
|
+
return JSON.stringify(obj, (key, value) => {
|
|
3664
|
+
if (typeof value === "object" && value !== null) {
|
|
3665
|
+
if (seen.has(value)) return; // Ignore circular reference
|
|
3666
|
+
seen.add(value);
|
|
3667
|
+
}
|
|
3668
|
+
return value;
|
|
3669
|
+
});
|
|
3670
|
+
};
|
|
3385
3671
|
useEffect(() => {
|
|
3386
|
-
const draggableArray = body && body.length
|
|
3672
|
+
const draggableArray = body && body.length > 0 ? body.map((item, index) => {
|
|
3387
3673
|
if (showOrder) {
|
|
3388
3674
|
Object.values(item).map((innerItem, innerIndex) => {
|
|
3389
3675
|
if (innerIndex === 1) {
|
|
@@ -3393,20 +3679,24 @@ const Table = ({
|
|
|
3393
3679
|
});
|
|
3394
3680
|
}
|
|
3395
3681
|
return item;
|
|
3396
|
-
});
|
|
3682
|
+
}) : [];
|
|
3397
3683
|
getDraggableData && getDraggableData(draggableArray);
|
|
3398
3684
|
setBody(() => draggableArray);
|
|
3399
3685
|
}, [checkDrag]);
|
|
3400
3686
|
useEffect(() => {
|
|
3401
|
-
const isEqual =
|
|
3687
|
+
const isEqual = handleSafeStringify(body) === handleSafeStringify(dataBody);
|
|
3402
3688
|
if (!isEqual) {
|
|
3403
3689
|
let insert = [];
|
|
3404
3690
|
let newArray = [];
|
|
3405
3691
|
let checkedItems = [];
|
|
3406
3692
|
const disabledArray = [];
|
|
3407
|
-
const checkBodyForChackedItems = dataBody.slice().map(item => Object.values(item));
|
|
3693
|
+
const checkBodyForChackedItems = dataBody && dataBody.length > 0 ? dataBody.slice().map(item => Object.values(item)) : [];
|
|
3408
3694
|
if (arrowShow) {
|
|
3409
|
-
|
|
3695
|
+
let column = arrowColumn;
|
|
3696
|
+
if (draggable) {
|
|
3697
|
+
column -= 1;
|
|
3698
|
+
}
|
|
3699
|
+
const arrowColumnCount = handleSetInsertIndex(checkBodyForChackedItems[0], column);
|
|
3410
3700
|
const checkForInsertArrow = handleTransformDataForInsertArrow(checkBodyForChackedItems, arrowColumnCount, 'body');
|
|
3411
3701
|
insert = checkForInsertArrow.map((item, index) => {
|
|
3412
3702
|
item.map((innerItem, innerIndex) => {
|
|
@@ -3425,29 +3715,10 @@ const Table = ({
|
|
|
3425
3715
|
});
|
|
3426
3716
|
return item;
|
|
3427
3717
|
});
|
|
3718
|
+
newArray = insert;
|
|
3428
3719
|
checkedItems = handleSetCheckboxArray(insert);
|
|
3429
|
-
if (draggable) {
|
|
3430
|
-
newArray = insert && insert.length && insert.map((item, index) => {
|
|
3431
|
-
item.map(innerItem => {
|
|
3432
|
-
if (hasOwnerProperty(innerItem, 'colorStatus')) {
|
|
3433
|
-
innerItem.colorStatus = null;
|
|
3434
|
-
}
|
|
3435
|
-
});
|
|
3436
|
-
if (showOrder) {
|
|
3437
|
-
item.unshift({
|
|
3438
|
-
content: index + 1,
|
|
3439
|
-
draggable: true
|
|
3440
|
-
});
|
|
3441
|
-
}
|
|
3442
|
-
item.unshift({
|
|
3443
|
-
draggableIcon: '',
|
|
3444
|
-
colorStatus: draggableColor
|
|
3445
|
-
});
|
|
3446
|
-
return item;
|
|
3447
|
-
});
|
|
3448
|
-
}
|
|
3449
3720
|
} else {
|
|
3450
|
-
insert = checkBodyForChackedItems.map((item, index) => {
|
|
3721
|
+
insert = checkBodyForChackedItems && checkBodyForChackedItems.length > 0 ? checkBodyForChackedItems.map((item, index) => {
|
|
3451
3722
|
item.map((innerItem, innerIndex) => {
|
|
3452
3723
|
if (hasOwnerProperty(innerItem, 'checkBox')) {
|
|
3453
3724
|
if (hasOwnerProperty(innerItem.checkBox, 'disabled')) {
|
|
@@ -3463,70 +3734,62 @@ const Table = ({
|
|
|
3463
3734
|
}
|
|
3464
3735
|
});
|
|
3465
3736
|
return item;
|
|
3466
|
-
});
|
|
3737
|
+
}) : [];
|
|
3738
|
+
newArray = insert;
|
|
3467
3739
|
checkedItems = handleSetCheckboxArray(insert);
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
});
|
|
3475
|
-
if (showOrder) {
|
|
3476
|
-
item.unshift({
|
|
3477
|
-
content: index + 1,
|
|
3478
|
-
draggable: true
|
|
3479
|
-
});
|
|
3740
|
+
}
|
|
3741
|
+
if (draggable && dataBody && dataBody.length > 0) {
|
|
3742
|
+
newArray = insert && insert.length > 0 ? insert.map((item, index) => {
|
|
3743
|
+
item.map(innerItem => {
|
|
3744
|
+
if (hasOwnerProperty(innerItem, 'colorStatus')) {
|
|
3745
|
+
innerItem.colorStatus = null;
|
|
3480
3746
|
}
|
|
3747
|
+
});
|
|
3748
|
+
if (showOrder) {
|
|
3481
3749
|
item.unshift({
|
|
3482
|
-
|
|
3483
|
-
|
|
3750
|
+
content: index + 1,
|
|
3751
|
+
draggable: true
|
|
3484
3752
|
});
|
|
3485
|
-
|
|
3753
|
+
}
|
|
3754
|
+
item.unshift({
|
|
3755
|
+
draggableIcon: '',
|
|
3756
|
+
colorStatus: draggableColor
|
|
3486
3757
|
});
|
|
3487
|
-
|
|
3758
|
+
return item;
|
|
3759
|
+
}) : [];
|
|
3488
3760
|
}
|
|
3489
|
-
|
|
3490
|
-
setBody(() => newArray && newArray.length ? newArray : insert);
|
|
3761
|
+
setBody(() => [...newArray]);
|
|
3491
3762
|
setDisableArr(disabledArray);
|
|
3492
3763
|
setCheckedArray(() => checkedItems);
|
|
3493
3764
|
}
|
|
3494
3765
|
}, [dataBody, arrowColumn, arrowShow, draggable]);
|
|
3495
3766
|
useEffect(() => {
|
|
3496
|
-
const isEqual =
|
|
3767
|
+
const isEqual = handleSafeStringify(header) === handleSafeStringify(dataHeader);
|
|
3497
3768
|
if (!isEqual) {
|
|
3498
|
-
let insert = [];
|
|
3499
3769
|
let newArray = [];
|
|
3500
3770
|
if (arrowShow) {
|
|
3501
|
-
|
|
3502
|
-
const arrowColumnCount = handleSetInsertIndex(header, arrowColumn);
|
|
3503
|
-
const checkForInsertArrow = handleTransformDataForInsertArrow(header, arrowColumnCount, 'header');
|
|
3504
|
-
insert = checkForInsertArrow;
|
|
3771
|
+
let column = arrowColumn;
|
|
3505
3772
|
if (draggable) {
|
|
3506
|
-
|
|
3507
|
-
newArray && newArray.length && newArray.unshift({
|
|
3508
|
-
content: ''
|
|
3509
|
-
});
|
|
3510
|
-
if (showOrder) {
|
|
3511
|
-
newArray.unshift({
|
|
3512
|
-
content: ''
|
|
3513
|
-
});
|
|
3514
|
-
}
|
|
3773
|
+
column -= 1;
|
|
3515
3774
|
}
|
|
3775
|
+
const header = dataHeader.slice();
|
|
3776
|
+
const arrowColumnCount = handleSetInsertIndex(header, column);
|
|
3777
|
+
const checkForInsertArrow = handleTransformDataForInsertArrow(header, arrowColumnCount, 'header');
|
|
3778
|
+
newArray = checkForInsertArrow;
|
|
3516
3779
|
} else {
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3780
|
+
newArray = dataHeader.slice();
|
|
3781
|
+
}
|
|
3782
|
+
if (draggable) {
|
|
3783
|
+
newArray && newArray.length && newArray.unshift({
|
|
3784
|
+
content: ''
|
|
3785
|
+
});
|
|
3786
|
+
if (showOrder) {
|
|
3787
|
+
newArray.unshift({
|
|
3520
3788
|
content: ''
|
|
3521
3789
|
});
|
|
3522
|
-
if (showOrder) {
|
|
3523
|
-
newArray.unshift({
|
|
3524
|
-
content: ''
|
|
3525
|
-
});
|
|
3526
|
-
}
|
|
3527
3790
|
}
|
|
3528
3791
|
}
|
|
3529
|
-
setHeader(() => newArray
|
|
3792
|
+
setHeader(() => [...newArray]);
|
|
3530
3793
|
}
|
|
3531
3794
|
}, [dataHeader, arrowColumn, arrowShow, disableArr, draggable]);
|
|
3532
3795
|
useEffect(() => {
|
|
@@ -3544,7 +3807,7 @@ const Table = ({
|
|
|
3544
3807
|
console.error(error);
|
|
3545
3808
|
});
|
|
3546
3809
|
}, []);
|
|
3547
|
-
return configStyles.TABLE && /*#__PURE__*/React__default.createElement("table", {
|
|
3810
|
+
return configStyles.TABLE && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("table", {
|
|
3548
3811
|
style: {
|
|
3549
3812
|
width: '100%',
|
|
3550
3813
|
borderCollapse: tableRowItem ?? configStyles.TABLE.body.row.asItem ? 'separate' : 'collapse',
|
|
@@ -3579,7 +3842,7 @@ const Table = ({
|
|
|
3579
3842
|
tableColumnMinWidth: tableColumnMinWidth ?? configStyles.TABLE.column.minWidth,
|
|
3580
3843
|
tableColumnMaxWidth: tableColumnMaxWidth ?? configStyles.TABLE.column.maxWidth
|
|
3581
3844
|
});
|
|
3582
|
-
}))), body && body.length > 0
|
|
3845
|
+
}))), body && body.length > 0 ? /*#__PURE__*/React__default.createElement("tbody", {
|
|
3583
3846
|
style: {
|
|
3584
3847
|
boxShadow: tBodyBoxShadow ?? configStyles.TABLE.body.box.shadow
|
|
3585
3848
|
}
|
|
@@ -3591,7 +3854,7 @@ const Table = ({
|
|
|
3591
3854
|
style: {
|
|
3592
3855
|
backgroundColor: tableRowBGColor ?? configStyles.TABLE.body.row.colors.background,
|
|
3593
3856
|
borderBottom: index === body.length - 1 ? 'none' : tBodyRowBorder ? tBodyRowBorder : configStyles.TABLE.body.row.border,
|
|
3594
|
-
borderColor: hideBorder ? 'transparent' : configStyles.TABLE.body.row.borderColor,
|
|
3857
|
+
borderColor: hideBorder || index === body.length - 1 ? 'transparent' : configStyles.TABLE.body.row.borderColor,
|
|
3595
3858
|
boxShadow: (tableRowItem ? tableRowItem : configStyles.TABLE.body.row.asItem) ? tableRowBoxShadow ? tableRowBoxShadow : configStyles.TABLE.body.row.box.shadow : 'none'
|
|
3596
3859
|
},
|
|
3597
3860
|
ref: el => setRef(index, el)
|
|
@@ -3638,7 +3901,7 @@ const Table = ({
|
|
|
3638
3901
|
handleOpenCloseRowSingleArrow: handleOpenCloseRowSingleArrow
|
|
3639
3902
|
});
|
|
3640
3903
|
}));
|
|
3641
|
-
})), draggable && dragging && draggedItem && /*#__PURE__*/React__default.createElement("
|
|
3904
|
+
})) : '', body && body.length > 0 && draggable && dragging && draggedItem && /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
|
|
3642
3905
|
style: {
|
|
3643
3906
|
position: 'fixed',
|
|
3644
3907
|
top: `${position.y - 30}px`,
|
|
@@ -3684,10 +3947,15 @@ const Table = ({
|
|
|
3684
3947
|
borderRight: innerIndex === Object.values(draggedItem).length - 1 ? 'none' : configStyles.TABLE.body.row.border,
|
|
3685
3948
|
borderRightColor: innerIndex === Object.values(draggedItem).length - 1 ? 'transparent' : configStyles.TABLE.body.row.borderColor
|
|
3686
3949
|
});
|
|
3687
|
-
})))
|
|
3950
|
+
})))), !body.length && /*#__PURE__*/React__default.createElement("div", {
|
|
3951
|
+
className: styles$a['no-tabel-data']
|
|
3952
|
+
}, /*#__PURE__*/React__default.createElement("p", null, "\u054F\u057E\u0575\u0561\u056C\u0576\u0565\u0580 \u0579\u056F\u0561\u0576")));
|
|
3688
3953
|
};
|
|
3689
3954
|
Table.propTypes = {
|
|
3690
3955
|
getData: PropTypes.func,
|
|
3956
|
+
getDraggableData: PropTypes.func,
|
|
3957
|
+
draggable: PropTypes.bool,
|
|
3958
|
+
showOrder: PropTypes.bool,
|
|
3691
3959
|
dataBody: PropTypes.array,
|
|
3692
3960
|
arrowShow: PropTypes.bool,
|
|
3693
3961
|
dataHeader: PropTypes.array,
|
|
@@ -3725,9 +3993,9 @@ Table.propTypes = {
|
|
|
3725
3993
|
hideBorder: PropTypes.bool
|
|
3726
3994
|
};
|
|
3727
3995
|
|
|
3728
|
-
var css_248z$
|
|
3729
|
-
var styles$
|
|
3730
|
-
styleInject(css_248z$
|
|
3996
|
+
var css_248z$b = ".modal-module_animation__modal__3mt48{animation:modal-module_show-popup__WrH7a .15s;-webkit-animation:modal-module_show-popup__WrH7a .15s}@keyframes modal-module_show-popup__WrH7a{0%{transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-o-transform:translate3d(0,-50%,0)}to{opacity:1;transform:translateZ(0);-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0)}}";
|
|
3997
|
+
var styles$9 = {"animation__modal":"modal-module_animation__modal__3mt48","show-popup":"modal-module_show-popup__WrH7a"};
|
|
3998
|
+
styleInject(css_248z$b);
|
|
3731
3999
|
|
|
3732
4000
|
const SvgNext = ({
|
|
3733
4001
|
title,
|
|
@@ -3847,6 +4115,7 @@ const Modal = ({
|
|
|
3847
4115
|
prevIcon,
|
|
3848
4116
|
nextIcon,
|
|
3849
4117
|
closeIcon,
|
|
4118
|
+
showCloseIcon,
|
|
3850
4119
|
closeSlideIcon,
|
|
3851
4120
|
selected,
|
|
3852
4121
|
children,
|
|
@@ -3859,6 +4128,7 @@ const Modal = ({
|
|
|
3859
4128
|
headerText,
|
|
3860
4129
|
imageWidth,
|
|
3861
4130
|
headerSize,
|
|
4131
|
+
headerIcon,
|
|
3862
4132
|
headerStyle,
|
|
3863
4133
|
headerFamily,
|
|
3864
4134
|
imageHeight,
|
|
@@ -3872,10 +4142,14 @@ const Modal = ({
|
|
|
3872
4142
|
headerWeight,
|
|
3873
4143
|
headerHeight,
|
|
3874
4144
|
justifyContent,
|
|
4145
|
+
headerTextAlign,
|
|
3875
4146
|
backgroundColor,
|
|
3876
4147
|
imageWrapHeight,
|
|
3877
4148
|
grayDecorHeight,
|
|
4149
|
+
headerIconMaxWidth,
|
|
4150
|
+
headerIconMaxHeight,
|
|
3878
4151
|
layerBackgroundColor,
|
|
4152
|
+
headerIconMarginRight,
|
|
3879
4153
|
closeAreaBackgroundColor,
|
|
3880
4154
|
type = 'content'
|
|
3881
4155
|
}) => {
|
|
@@ -3887,7 +4161,15 @@ const Modal = ({
|
|
|
3887
4161
|
const [classProps, setClassProps] = useState({});
|
|
3888
4162
|
const [configStyles, setConfigStyles] = useState({});
|
|
3889
4163
|
const handleCloseModal = () => {
|
|
3890
|
-
|
|
4164
|
+
if (outsideClose !== undefined) {
|
|
4165
|
+
if (outsideClose) {
|
|
4166
|
+
setShow(false);
|
|
4167
|
+
}
|
|
4168
|
+
} else {
|
|
4169
|
+
if (configStyles.MODAL.outsideClose) {
|
|
4170
|
+
setShow(false);
|
|
4171
|
+
}
|
|
4172
|
+
}
|
|
3891
4173
|
};
|
|
3892
4174
|
const handleStopClosing = e => {
|
|
3893
4175
|
e.stopPropagation();
|
|
@@ -3982,7 +4264,7 @@ const Modal = ({
|
|
|
3982
4264
|
}, []);
|
|
3983
4265
|
return configStyles.MODAL && /*#__PURE__*/React__default.createElement("div", {
|
|
3984
4266
|
className: classProps,
|
|
3985
|
-
onClick:
|
|
4267
|
+
onClick: handleCloseModal,
|
|
3986
4268
|
style: {
|
|
3987
4269
|
top: '0px',
|
|
3988
4270
|
left: '0px',
|
|
@@ -4002,7 +4284,7 @@ const Modal = ({
|
|
|
4002
4284
|
justifyContent: justifyContent ?? configStyles.MODAL.justifyContent
|
|
4003
4285
|
}
|
|
4004
4286
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
4005
|
-
className: `${styles$
|
|
4287
|
+
className: `${styles$9['animation__modal']}`,
|
|
4006
4288
|
onClick: handleStopClosing,
|
|
4007
4289
|
style: {
|
|
4008
4290
|
position: 'relative',
|
|
@@ -4031,7 +4313,18 @@ const Modal = ({
|
|
|
4031
4313
|
justifyContent: headerText && type === 'content' ? 'space-between' : 'flex-end',
|
|
4032
4314
|
backgroundColor: closeAreaBackgroundColor ?? configStyles.MODAL.closeAreaBackgroundColor
|
|
4033
4315
|
}
|
|
4034
|
-
},
|
|
4316
|
+
}, headerIcon && type === 'content' && /*#__PURE__*/React__default.createElement("div", {
|
|
4317
|
+
style: {
|
|
4318
|
+
display: 'flex',
|
|
4319
|
+
width: 'fit-content',
|
|
4320
|
+
alignItems: 'center',
|
|
4321
|
+
height: 'fit-content',
|
|
4322
|
+
justifyContent: 'center',
|
|
4323
|
+
maxWidth: headerIconMaxWidth ?? configStyles.MODAL.header.icon.maxWidth,
|
|
4324
|
+
maxHeight: headerIconMaxHeight ?? configStyles.MODAL.header.icon.maxHeight,
|
|
4325
|
+
marginRight: headerIconMarginRight ?? configStyles.MODAL.header.icon.marginRight
|
|
4326
|
+
}
|
|
4327
|
+
}, headerIcon), headerText && type === 'content' && /*#__PURE__*/React__default.createElement("p", {
|
|
4035
4328
|
style: {
|
|
4036
4329
|
flex: '1',
|
|
4037
4330
|
overflow: 'hidden',
|
|
@@ -4040,18 +4333,25 @@ const Modal = ({
|
|
|
4040
4333
|
margin: '0px 16px 0px 0px',
|
|
4041
4334
|
color: headerColor ?? configStyles.MODAL.header.color,
|
|
4042
4335
|
fontSize: headerSize ?? configStyles.MODAL.header.font.size,
|
|
4336
|
+
textAlign: headerTextAlign ?? configStyles.MODAL.header.align,
|
|
4043
4337
|
fontStyle: headerStyle ?? configStyles.MODAL.header.font.style,
|
|
4044
4338
|
fontFamily: headerFamily ?? configStyles.MODAL.header.font.family,
|
|
4045
4339
|
fontWeight: headerWeight ?? configStyles.MODAL.header.font.weight
|
|
4046
4340
|
}
|
|
4047
|
-
}, headerText), /*#__PURE__*/React__default.createElement("div", {
|
|
4048
|
-
onClick:
|
|
4341
|
+
}, headerText), showCloseIcon ? /*#__PURE__*/React__default.createElement("div", {
|
|
4342
|
+
onClick: () => setShow(false),
|
|
4049
4343
|
style: {
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4344
|
+
display: 'flex',
|
|
4345
|
+
minWidth: '14px',
|
|
4346
|
+
minHeight: '14px',
|
|
4347
|
+
cursor: 'pointer',
|
|
4348
|
+
width: 'fit-content',
|
|
4349
|
+
alignItems: 'center',
|
|
4350
|
+
alignSelf: 'flex-end',
|
|
4351
|
+
height: 'fit-content',
|
|
4352
|
+
justifyContent: 'center'
|
|
4053
4353
|
}
|
|
4054
|
-
}, closeIcon ? closeIcon : configStyles.MODAL.icon.close ? configStyles.MODAL.icon.close : /*#__PURE__*/React__default.createElement(SvgCloseIcon, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
4354
|
+
}, closeIcon ? closeIcon : configStyles.MODAL.icon.close ? configStyles.MODAL.icon.close : /*#__PURE__*/React__default.createElement(SvgCloseIcon, null)) : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
4055
4355
|
style: {
|
|
4056
4356
|
display: 'flex',
|
|
4057
4357
|
width: '100%',
|
|
@@ -4094,7 +4394,7 @@ const Modal = ({
|
|
|
4094
4394
|
background: closeAreaBackgroundColor ?? configStyles.MODAL.closeAreaBackgroundColor
|
|
4095
4395
|
}
|
|
4096
4396
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
4097
|
-
onClick:
|
|
4397
|
+
onClick: () => setShow(false),
|
|
4098
4398
|
style: {
|
|
4099
4399
|
position: 'absolute',
|
|
4100
4400
|
zIndex: '1',
|
|
@@ -4199,14 +4499,20 @@ Modal.propTypes = {
|
|
|
4199
4499
|
prevIcon: PropTypes.element,
|
|
4200
4500
|
nextIcon: PropTypes.element,
|
|
4201
4501
|
closeIcon: PropTypes.element,
|
|
4502
|
+
showCloseIcon: PropTypes.bool,
|
|
4202
4503
|
closeSlideIcon: PropTypes.element,
|
|
4203
|
-
alignItems: PropTypes.string,
|
|
4204
|
-
mMaxHeight: PropTypes.string,
|
|
4205
4504
|
headerText: PropTypes.string,
|
|
4206
|
-
imageWidth: PropTypes.string,
|
|
4207
4505
|
headerSize: PropTypes.string,
|
|
4208
4506
|
headerStyle: PropTypes.string,
|
|
4507
|
+
headerIcon: PropTypes.element,
|
|
4209
4508
|
headerFamily: PropTypes.string,
|
|
4509
|
+
headerTextAlign: PropTypes.string,
|
|
4510
|
+
headerIconMaxWidth: PropTypes.string,
|
|
4511
|
+
headerIconMaxHeight: PropTypes.string,
|
|
4512
|
+
headerIconMarginRight: PropTypes.string,
|
|
4513
|
+
alignItems: PropTypes.string,
|
|
4514
|
+
mMaxHeight: PropTypes.string,
|
|
4515
|
+
imageWidth: PropTypes.string,
|
|
4210
4516
|
outsideClose: PropTypes.bool,
|
|
4211
4517
|
showZoomIcon: PropTypes.bool,
|
|
4212
4518
|
imageMargin: PropTypes.string,
|
|
@@ -4285,19 +4591,23 @@ const TelInput = ({
|
|
|
4285
4591
|
...inpStyles,
|
|
4286
4592
|
border: 'none',
|
|
4287
4593
|
outline: 'none',
|
|
4288
|
-
|
|
4594
|
+
borderTopRightRadius: radius,
|
|
4595
|
+
borderBottomRightRadius: radius
|
|
4289
4596
|
}
|
|
4290
4597
|
}));
|
|
4291
4598
|
};
|
|
4292
4599
|
|
|
4293
4600
|
const TextInput = ({
|
|
4601
|
+
ssn,
|
|
4294
4602
|
value,
|
|
4295
4603
|
radius,
|
|
4296
|
-
|
|
4604
|
+
disabled,
|
|
4297
4605
|
maxLength,
|
|
4298
4606
|
inpStyles,
|
|
4299
|
-
|
|
4300
|
-
inpAttributes
|
|
4607
|
+
inputChange,
|
|
4608
|
+
inpAttributes,
|
|
4609
|
+
checkLeftIcon,
|
|
4610
|
+
checkRightIcon
|
|
4301
4611
|
}) => {
|
|
4302
4612
|
const [innerValue, setInnerValue] = useState('');
|
|
4303
4613
|
const handleChange = event => {
|
|
@@ -4306,9 +4616,9 @@ const TextInput = ({
|
|
|
4306
4616
|
if (maxLength && currentValue.length > maxLength) {
|
|
4307
4617
|
currentValue = currentValue.substr(0, maxLength);
|
|
4308
4618
|
}
|
|
4309
|
-
setInnerValue(() => currentValue);
|
|
4619
|
+
setInnerValue(() => ssn ? currentValue.replace(/[^a-zA-ZԱ-Ֆա-ֆА-Яа-яЁё0-9\s]/g, '') : currentValue);
|
|
4310
4620
|
if (inputChange && currentValue !== prevValue) {
|
|
4311
|
-
inputChange(currentValue);
|
|
4621
|
+
inputChange(ssn ? currentValue.replace(/[^a-zA-ZԱ-Ֆա-ֆА-Яа-яЁё0-9\s]/g, '') : currentValue);
|
|
4312
4622
|
}
|
|
4313
4623
|
};
|
|
4314
4624
|
useEffect(() => {
|
|
@@ -4319,7 +4629,7 @@ const TextInput = ({
|
|
|
4319
4629
|
newValue = value.substr(0, maxLength);
|
|
4320
4630
|
}
|
|
4321
4631
|
}
|
|
4322
|
-
setInnerValue(() => newValue);
|
|
4632
|
+
setInnerValue(() => ssn ? newValue.replace(/[^a-zA-ZԱ-Ֆա-ֆА-Яа-яЁё0-9\s]/g, '') : newValue);
|
|
4323
4633
|
}, [value]);
|
|
4324
4634
|
return /*#__PURE__*/React__default.createElement("input", {
|
|
4325
4635
|
type: "text",
|
|
@@ -4333,7 +4643,10 @@ const TextInput = ({
|
|
|
4333
4643
|
...inpStyles,
|
|
4334
4644
|
border: 'none',
|
|
4335
4645
|
outline: 'none',
|
|
4336
|
-
|
|
4646
|
+
borderTopLeftRadius: checkLeftIcon ? '0px' : radius,
|
|
4647
|
+
borderTopRightRadius: checkRightIcon ? '0px' : radius,
|
|
4648
|
+
borderBottomLeftRadius: checkLeftIcon ? '0px' : radius,
|
|
4649
|
+
borderBottomRightRadius: checkRightIcon ? '0px' : radius
|
|
4337
4650
|
}
|
|
4338
4651
|
});
|
|
4339
4652
|
};
|
|
@@ -4342,11 +4655,13 @@ const PassInput = ({
|
|
|
4342
4655
|
show,
|
|
4343
4656
|
value,
|
|
4344
4657
|
radius,
|
|
4345
|
-
|
|
4658
|
+
disabled,
|
|
4346
4659
|
maxLength,
|
|
4660
|
+
inpStyles,
|
|
4661
|
+
inputChange,
|
|
4347
4662
|
inpAttributes,
|
|
4348
|
-
|
|
4349
|
-
|
|
4663
|
+
checkLeftIcon,
|
|
4664
|
+
checkRightIcon
|
|
4350
4665
|
}) => {
|
|
4351
4666
|
const [innerShow, setInnerShow] = useState('');
|
|
4352
4667
|
const [innerValue, setInnerValue] = useState('');
|
|
@@ -4386,7 +4701,10 @@ const PassInput = ({
|
|
|
4386
4701
|
...inpStyles,
|
|
4387
4702
|
border: 'none',
|
|
4388
4703
|
outline: 'none',
|
|
4389
|
-
|
|
4704
|
+
borderTopLeftRadius: checkLeftIcon ? '0px' : radius,
|
|
4705
|
+
borderTopRightRadius: checkRightIcon ? '0px' : radius,
|
|
4706
|
+
borderBottomLeftRadius: checkLeftIcon ? '0px' : radius,
|
|
4707
|
+
borderBottomRightRadius: checkRightIcon ? '0px' : radius
|
|
4390
4708
|
}
|
|
4391
4709
|
});
|
|
4392
4710
|
};
|
|
@@ -4399,11 +4717,15 @@ const NumberInput = ({
|
|
|
4399
4717
|
withZero,
|
|
4400
4718
|
disabled,
|
|
4401
4719
|
inpStyles,
|
|
4720
|
+
cardNumber,
|
|
4402
4721
|
minNumSize,
|
|
4403
4722
|
maxNumSize,
|
|
4404
4723
|
insideError,
|
|
4405
4724
|
inputChange,
|
|
4725
|
+
errorMessage,
|
|
4726
|
+
checkLeftIcon,
|
|
4406
4727
|
inpAttributes,
|
|
4728
|
+
checkRightIcon,
|
|
4407
4729
|
numberMaxLength,
|
|
4408
4730
|
setInnerErrorMessage
|
|
4409
4731
|
}) => {
|
|
@@ -4412,32 +4734,51 @@ const NumberInput = ({
|
|
|
4412
4734
|
const handleChange = event => {
|
|
4413
4735
|
let prevValue = innerValue;
|
|
4414
4736
|
let currentValue = event.target.value.replace(/\.|․|\.|,/g, '.');
|
|
4415
|
-
currentValue = handleUtilsCheckTypeNumber(currentValue, prevValue, null, float, maxNumSize, dots, innerMinNumSize, numberMaxLength);
|
|
4416
|
-
setInnerValue(() => currentValue);
|
|
4737
|
+
currentValue = handleUtilsCheckTypeNumber(currentValue, prevValue, null, float, maxNumSize, dots, innerMinNumSize, numberMaxLength, cardNumber);
|
|
4738
|
+
setInnerValue(() => cardNumber ? currentValue.replace(/(\d{4})(?=\d)/g, '$1-') : currentValue);
|
|
4417
4739
|
if (inputChange && currentValue !== prevValue) {
|
|
4418
4740
|
if (currentValue < Number.MIN_SAFE_INTEGER || currentValue > Number.MAX_SAFE_INTEGER) {
|
|
4419
|
-
if (
|
|
4420
|
-
|
|
4741
|
+
if (!cardNumber) {
|
|
4742
|
+
if (currentValue === '') {
|
|
4743
|
+
setInnerErrorMessage(() => '');
|
|
4744
|
+
} else {
|
|
4745
|
+
insideError && insideError();
|
|
4746
|
+
setInnerErrorMessage(() => `Լրացված դաշտի արժեքը պետք է լինի ${Number.MIN_SAFE_INTEGER} - ${Number.MAX_SAFE_INTEGER} թվերի միջակայքում`);
|
|
4747
|
+
}
|
|
4421
4748
|
} else {
|
|
4422
|
-
|
|
4423
|
-
|
|
4749
|
+
inputChange(currentValue.replaceAll('-', ''));
|
|
4750
|
+
if (errorMessage) {
|
|
4751
|
+
setInnerErrorMessage(() => errorMessage);
|
|
4752
|
+
} else {
|
|
4753
|
+
setInnerErrorMessage(() => '');
|
|
4754
|
+
}
|
|
4424
4755
|
}
|
|
4425
4756
|
} else if (innerMinNumSize && currentValue < innerMinNumSize || maxNumSize && currentValue > maxNumSize) {
|
|
4426
4757
|
if (currentValue === '') {
|
|
4427
4758
|
setInnerErrorMessage(() => '');
|
|
4428
4759
|
} else {
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4760
|
+
if (!cardNumber) {
|
|
4761
|
+
insideError && insideError();
|
|
4762
|
+
if (innerMinNumSize && !maxNumSize) {
|
|
4763
|
+
setInnerErrorMessage(() => `Լրացված դաշտի արժեքը պետք է լինի ոչ պակաս ${innerMinNumSize} - ից`);
|
|
4764
|
+
} else if (!innerMinNumSize && maxNumSize) {
|
|
4765
|
+
setInnerErrorMessage(() => `Լրացված դաշտի արժեքը պետք է լինի ոչ մեծ ${maxNumSize} ֊ ից`);
|
|
4766
|
+
} else if (innerMinNumSize && maxNumSize) {
|
|
4767
|
+
setInnerErrorMessage(() => `Լրացված դաշտի արժեքը պետք է լինի ${innerMinNumSize} - ${maxNumSize} թվերի միջակայքում`);
|
|
4768
|
+
}
|
|
4436
4769
|
}
|
|
4437
4770
|
}
|
|
4438
4771
|
} else if (currentValue >= Number.MIN_SAFE_INTEGER || currentValue <= Number.MAX_SAFE_INTEGER || innerMinNumSize && currentValue >= innerMinNumSize || maxNumSize && currentValue <= maxNumSize) {
|
|
4439
|
-
inputChange(currentValue);
|
|
4440
|
-
|
|
4772
|
+
inputChange(cardNumber ? currentValue.replaceAll('-', '') : currentValue);
|
|
4773
|
+
if (cardNumber) {
|
|
4774
|
+
if (errorMessage) {
|
|
4775
|
+
setInnerErrorMessage(() => errorMessage);
|
|
4776
|
+
} else {
|
|
4777
|
+
setInnerErrorMessage(() => '');
|
|
4778
|
+
}
|
|
4779
|
+
} else {
|
|
4780
|
+
setInnerErrorMessage(() => '');
|
|
4781
|
+
}
|
|
4441
4782
|
}
|
|
4442
4783
|
}
|
|
4443
4784
|
};
|
|
@@ -4447,7 +4788,7 @@ const NumberInput = ({
|
|
|
4447
4788
|
if (parseFloat(newVal) === 0) {
|
|
4448
4789
|
inputChange('');
|
|
4449
4790
|
} else {
|
|
4450
|
-
inputChange(newVal);
|
|
4791
|
+
inputChange(cardNumber ? newVal.replaceAll('-', '') : newVal);
|
|
4451
4792
|
}
|
|
4452
4793
|
}
|
|
4453
4794
|
};
|
|
@@ -4465,10 +4806,11 @@ const NumberInput = ({
|
|
|
4465
4806
|
useEffect(() => {
|
|
4466
4807
|
let newValue = '';
|
|
4467
4808
|
if (value !== undefined && value !== null) {
|
|
4468
|
-
newValue = handleUtilsCheckTypeNumber(value, newValue, null, float, maxNumSize, dots, innerMinNumSize, numberMaxLength);
|
|
4809
|
+
newValue = handleUtilsCheckTypeNumber(value, newValue, null, float, maxNumSize, dots, innerMinNumSize, numberMaxLength, cardNumber);
|
|
4469
4810
|
}
|
|
4470
|
-
setInnerValue(() => newValue);
|
|
4471
|
-
|
|
4811
|
+
setInnerValue(() => cardNumber ? newValue.replace(/(\d{4})(?=\d)/g, '$1-') : newValue);
|
|
4812
|
+
// inputChange(cardNumber ? newValue.replaceAll('-', '') : newValue);
|
|
4813
|
+
}, [dots, value, float, cardNumber, maxNumSize, minNumSize, numberMaxLength]);
|
|
4472
4814
|
return /*#__PURE__*/React__default.createElement("input", {
|
|
4473
4815
|
type: "text",
|
|
4474
4816
|
value: innerValue,
|
|
@@ -4480,7 +4822,10 @@ const NumberInput = ({
|
|
|
4480
4822
|
...inpStyles,
|
|
4481
4823
|
border: 'none',
|
|
4482
4824
|
outline: 'none',
|
|
4483
|
-
|
|
4825
|
+
borderTopLeftRadius: checkLeftIcon ? '0px' : radius,
|
|
4826
|
+
borderTopRightRadius: checkRightIcon ? '0px' : radius,
|
|
4827
|
+
borderBottomLeftRadius: checkLeftIcon ? '0px' : radius,
|
|
4828
|
+
borderBottomRightRadius: checkRightIcon ? '0px' : radius
|
|
4484
4829
|
},
|
|
4485
4830
|
min: minNumSize,
|
|
4486
4831
|
max: maxNumSize,
|
|
@@ -4489,9 +4834,9 @@ const NumberInput = ({
|
|
|
4489
4834
|
});
|
|
4490
4835
|
};
|
|
4491
4836
|
|
|
4492
|
-
var css_248z$
|
|
4493
|
-
var styles$
|
|
4494
|
-
styleInject(css_248z$
|
|
4837
|
+
var css_248z$a = ".input-module_input-wrap__NunrE{position:relative;width:100%}.input-module_input-content__kP7lZ{appearance:none!important;-webkit-appearance:none!important;display:flex;width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{background-color:inherit!important}input::-ms-clear,input::-ms-reveal{display:none}.input-module_error-message-show__OrVSo{animation-fill-mode:forwards;animation-name:input-module_error-show__9MP6k}.input-module_inp-num__vH7HL::-webkit-inner-spin-button,.input-module_inp-num__vH7HL::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.input-module_inp-num__vH7HL[type=number]{-moz-appearance:textfield}@keyframes input-module_error-show__9MP6k{to{bottom:-20px;transform:scaleX(1);-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);-o-transform:scaleX(1)}}";
|
|
4838
|
+
var styles$8 = {"input-wrap":"input-module_input-wrap__NunrE","input-content":"input-module_input-content__kP7lZ","error-message-show":"input-module_error-message-show__OrVSo","error-show":"input-module_error-show__9MP6k","inp-num":"input-module_inp-num__vH7HL"};
|
|
4839
|
+
styleInject(css_248z$a);
|
|
4495
4840
|
|
|
4496
4841
|
const InputTypes = {
|
|
4497
4842
|
TEL: 'tel',
|
|
@@ -4499,10 +4844,15 @@ const InputTypes = {
|
|
|
4499
4844
|
NUMBER: 'number',
|
|
4500
4845
|
PASSWORD: 'password'
|
|
4501
4846
|
};
|
|
4847
|
+
const IconSides = {
|
|
4848
|
+
LEFT: 'left',
|
|
4849
|
+
RIGHT: 'right'
|
|
4850
|
+
};
|
|
4502
4851
|
const P = styled.span`
|
|
4503
4852
|
animation: ${true};
|
|
4504
4853
|
`;
|
|
4505
4854
|
const Input = ({
|
|
4855
|
+
ssn,
|
|
4506
4856
|
size,
|
|
4507
4857
|
name,
|
|
4508
4858
|
style,
|
|
@@ -4521,6 +4871,8 @@ const Input = ({
|
|
|
4521
4871
|
leftIcon,
|
|
4522
4872
|
required,
|
|
4523
4873
|
disabled,
|
|
4874
|
+
errorDots,
|
|
4875
|
+
errorIcon,
|
|
4524
4876
|
labelDots,
|
|
4525
4877
|
iconWidth,
|
|
4526
4878
|
rightIcon,
|
|
@@ -4531,6 +4883,7 @@ const Input = ({
|
|
|
4531
4883
|
errorSize,
|
|
4532
4884
|
labelSize,
|
|
4533
4885
|
maxLength,
|
|
4886
|
+
labelIcon,
|
|
4534
4887
|
labelStyle,
|
|
4535
4888
|
floatToFix,
|
|
4536
4889
|
minNumSize,
|
|
@@ -4539,6 +4892,9 @@ const Input = ({
|
|
|
4539
4892
|
errorColor,
|
|
4540
4893
|
withoutDot,
|
|
4541
4894
|
errorStyle,
|
|
4895
|
+
iconPadding,
|
|
4896
|
+
labelAction,
|
|
4897
|
+
errorAction,
|
|
4542
4898
|
placeholder,
|
|
4543
4899
|
errorZindex,
|
|
4544
4900
|
labelWeight,
|
|
@@ -4548,15 +4904,22 @@ const Input = ({
|
|
|
4548
4904
|
errorMessage,
|
|
4549
4905
|
autoComplete,
|
|
4550
4906
|
labelDisplay,
|
|
4907
|
+
labelIconSide,
|
|
4908
|
+
showLabelIcon,
|
|
4909
|
+
errorIconSide,
|
|
4910
|
+
showErrorIcon,
|
|
4551
4911
|
errorMarginTop,
|
|
4912
|
+
errorBoxShadow,
|
|
4552
4913
|
boxShadowHover,
|
|
4553
4914
|
errorClassName,
|
|
4915
|
+
labelIconMargin,
|
|
4554
4916
|
labelFontFamily,
|
|
4555
4917
|
phoneAlignItems,
|
|
4556
4918
|
errorLineHeight,
|
|
4557
4919
|
labelLineHeight,
|
|
4558
4920
|
numberMaxLength,
|
|
4559
4921
|
backgroundColor,
|
|
4922
|
+
errorIconMargin,
|
|
4560
4923
|
withZero = false,
|
|
4561
4924
|
labelMarginBottom,
|
|
4562
4925
|
regexpErrorMessage,
|
|
@@ -4567,6 +4930,7 @@ const Input = ({
|
|
|
4567
4930
|
fireInputInsideError,
|
|
4568
4931
|
backgroundDisableColor,
|
|
4569
4932
|
telBorderRightColorHover,
|
|
4933
|
+
cardNumber,
|
|
4570
4934
|
type = 'text'
|
|
4571
4935
|
}) => {
|
|
4572
4936
|
const [show, setShow] = useState(false);
|
|
@@ -4574,7 +4938,11 @@ const Input = ({
|
|
|
4574
4938
|
const [classProps, setClassProps] = useState({});
|
|
4575
4939
|
const [innerValue, setInnerValue] = useState('');
|
|
4576
4940
|
const [configStyles, setConfigStyles] = useState({});
|
|
4941
|
+
const [innerErrorIcon, setInnerErrorIcon] = useState('');
|
|
4942
|
+
const [innerLabelIcon, setInnerLabelIcon] = useState('');
|
|
4577
4943
|
const [innerErrorMessage, setInnerErrorMessage] = useState('');
|
|
4944
|
+
const [innerErrorIconSide, setInnerErrorIconSide] = useState('left');
|
|
4945
|
+
const [innerLabelIconSide, setInnerLabelIconSide] = useState('left');
|
|
4578
4946
|
const inpStyles = configStyles.INPUT && {
|
|
4579
4947
|
width: width ?? configStyles.INPUT.width,
|
|
4580
4948
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
@@ -4594,19 +4962,22 @@ const Input = ({
|
|
|
4594
4962
|
iName: name ? name : `tui_${uuid}_tui`,
|
|
4595
4963
|
autoComplete: autoComplete ?? configStyles.INPUT.autoComplete
|
|
4596
4964
|
};
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4965
|
+
|
|
4966
|
+
// const errorShow = keyframes`
|
|
4967
|
+
// 100% {
|
|
4968
|
+
// bottom: '-20px';
|
|
4969
|
+
// transform: scale3d(1,1,1);
|
|
4970
|
+
// -webkit-transform: scale3d(1,1,1);
|
|
4971
|
+
// -moz-transform: scale3d(1,1,1);
|
|
4972
|
+
// -ms-transform: scale3d(1,1,1);
|
|
4973
|
+
// -o-transform: scale3d(1,1,1);
|
|
4974
|
+
// }
|
|
4975
|
+
// `
|
|
4976
|
+
|
|
4977
|
+
// const animation = () => css`
|
|
4978
|
+
// ${errorShow} 240ms forwards
|
|
4979
|
+
// `
|
|
4980
|
+
|
|
4610
4981
|
const handleMouseEnter = () => {
|
|
4611
4982
|
setIsHover(true);
|
|
4612
4983
|
};
|
|
@@ -4631,11 +5002,27 @@ const Input = ({
|
|
|
4631
5002
|
setInnerValue(() => val);
|
|
4632
5003
|
}, [value]);
|
|
4633
5004
|
useEffect(() => {
|
|
4634
|
-
className && setClassProps(() => classnames(className ?? configStyles.INPUT.className, type === 'number' ? styles$
|
|
5005
|
+
className && setClassProps(() => classnames(className ?? configStyles.INPUT.className, type === 'number' ? styles$8['inp-num'] : '', styles$8['input-wrap']));
|
|
4635
5006
|
}, [className]);
|
|
5007
|
+
useEffect(() => {
|
|
5008
|
+
setInnerErrorIcon(() => errorIcon);
|
|
5009
|
+
}, [errorIcon]);
|
|
5010
|
+
useEffect(() => {
|
|
5011
|
+
if (errorIconSide) {
|
|
5012
|
+
setInnerErrorIconSide(() => errorIconSide);
|
|
5013
|
+
}
|
|
5014
|
+
}, [errorIconSide]);
|
|
5015
|
+
useEffect(() => {
|
|
5016
|
+
setInnerLabelIcon(() => labelIcon);
|
|
5017
|
+
}, [labelIcon]);
|
|
5018
|
+
useEffect(() => {
|
|
5019
|
+
if (labelIconSide) {
|
|
5020
|
+
setInnerLabelIconSide(() => labelIconSide);
|
|
5021
|
+
}
|
|
5022
|
+
}, [labelIconSide]);
|
|
4636
5023
|
useEffect(() => {
|
|
4637
5024
|
configStylesPromise.then(data => {
|
|
4638
|
-
setClassProps(() => classnames(className ?? data.INPUT.className, type === 'number' ? styles$
|
|
5025
|
+
setClassProps(() => classnames(className ?? data.INPUT.className, type === 'number' ? styles$8['inp-num'] : '', styles$8['input-wrap']));
|
|
4639
5026
|
setConfigStyles(() => {
|
|
4640
5027
|
return {
|
|
4641
5028
|
...data
|
|
@@ -4663,12 +5050,32 @@ const Input = ({
|
|
|
4663
5050
|
textOverflow: (labelDots ? labelDots : configStyles.INPUT.label.dots) ? 'ellipsis' : ''
|
|
4664
5051
|
},
|
|
4665
5052
|
title: label
|
|
4666
|
-
},
|
|
4667
|
-
|
|
5053
|
+
}, showLabelIcon && innerLabelIcon && innerLabelIconSide === 'left' ? /*#__PURE__*/React__default.createElement("img", {
|
|
5054
|
+
alt: "label icon",
|
|
5055
|
+
src: innerLabelIcon,
|
|
5056
|
+
style: {
|
|
5057
|
+
width: '14px',
|
|
5058
|
+
height: '14px',
|
|
5059
|
+
cursor: labelAction ? 'pointer' : 'normal',
|
|
5060
|
+
marginRight: labelIconMargin ?? configStyles.INPUT.label.iconMargin
|
|
5061
|
+
},
|
|
5062
|
+
onClick: labelAction ? () => labelAction() : _ => _
|
|
5063
|
+
}) : '', label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null)), showLabelIcon && innerLabelIcon && innerLabelIconSide === 'right' ? /*#__PURE__*/React__default.createElement("img", {
|
|
5064
|
+
alt: "label icon",
|
|
5065
|
+
src: innerLabelIcon,
|
|
5066
|
+
style: {
|
|
5067
|
+
width: '14px',
|
|
5068
|
+
height: '14px',
|
|
5069
|
+
cursor: labelAction ? 'pointer' : 'normal',
|
|
5070
|
+
marginLeft: labelIconMargin ?? configStyles.INPUT.label.iconMargin
|
|
5071
|
+
},
|
|
5072
|
+
onClick: labelAction ? () => labelAction() : _ => _
|
|
5073
|
+
}) : '') : '', /*#__PURE__*/React__default.createElement("div", {
|
|
5074
|
+
className: `${styles$8['input-content']}`,
|
|
4668
5075
|
style: {
|
|
4669
5076
|
width: width ?? configStyles.INPUT.width,
|
|
4670
5077
|
borderRadius: radius ?? configStyles.INPUT.radius,
|
|
4671
|
-
boxShadow: innerErrorMessage ?
|
|
5078
|
+
boxShadow: innerErrorMessage ? errorBoxShadow ? errorBoxShadow : configStyles.INPUT.error.box.shadow : isHover && !disabled ? boxShadowHover ? boxShadowHover : configStyles.INPUT.box.shadowHover : boxShadow ? boxShadow : configStyles.INPUT.box.shadow
|
|
4672
5079
|
},
|
|
4673
5080
|
onMouseEnter: handleMouseEnter,
|
|
4674
5081
|
onMouseLeave: handleMouseLeave
|
|
@@ -4680,9 +5087,9 @@ const Input = ({
|
|
|
4680
5087
|
justifyContent: 'center',
|
|
4681
5088
|
cursor: type === 'password' ? 'pointer' : 'default',
|
|
4682
5089
|
height: height ?? configStyles.INPUT.height,
|
|
4683
|
-
padding: padding ?? configStyles.INPUT.padding,
|
|
4684
5090
|
width: iconWidth ?? configStyles.INPUT.iconWidth,
|
|
4685
5091
|
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
5092
|
+
padding: iconPadding ?? configStyles.INPUT.iconPadding,
|
|
4686
5093
|
borderTopLeftRadius: radius ?? configStyles.INPUT.radius,
|
|
4687
5094
|
borderBottomLeftRadius: radius ?? configStyles.INPUT.radius,
|
|
4688
5095
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
@@ -4711,13 +5118,17 @@ const Input = ({
|
|
|
4711
5118
|
withZero: withZero,
|
|
4712
5119
|
inputChange: change,
|
|
4713
5120
|
inpStyles: inpStyles,
|
|
5121
|
+
cardNumber: cardNumber,
|
|
5122
|
+
errorMessage: errorMessage,
|
|
4714
5123
|
inpAttributes: inpAttributes,
|
|
4715
5124
|
numberMaxLength: numberMaxLength,
|
|
4716
5125
|
insideError: fireInputInsideError,
|
|
4717
5126
|
minNumSize: minNumSize ? minNumSize : '',
|
|
4718
5127
|
maxNumSize: maxNumSize ? maxNumSize : '',
|
|
4719
5128
|
setInnerErrorMessage: setInnerErrorMessage,
|
|
4720
|
-
radius: radius ?? configStyles.INPUT.radius
|
|
5129
|
+
radius: radius ?? configStyles.INPUT.radius,
|
|
5130
|
+
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5131
|
+
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
4721
5132
|
}) : type === 'password' ? /*#__PURE__*/React__default.createElement(PassInput, {
|
|
4722
5133
|
show: show,
|
|
4723
5134
|
type: type,
|
|
@@ -4727,15 +5138,20 @@ const Input = ({
|
|
|
4727
5138
|
inpStyles: inpStyles,
|
|
4728
5139
|
inpAttributes: inpAttributes,
|
|
4729
5140
|
radius: radius ?? configStyles.INPUT.radius,
|
|
4730
|
-
maxLength: maxLength ?? configStyles.INPUT.maxLength
|
|
5141
|
+
maxLength: maxLength ?? configStyles.INPUT.maxLength,
|
|
5142
|
+
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5143
|
+
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
4731
5144
|
}) : /*#__PURE__*/React__default.createElement(TextInput, {
|
|
5145
|
+
ssn: ssn,
|
|
4732
5146
|
value: innerValue,
|
|
4733
5147
|
disabled: disabled,
|
|
4734
5148
|
inputChange: change,
|
|
4735
5149
|
inpStyles: inpStyles,
|
|
4736
5150
|
inpAttributes: inpAttributes,
|
|
4737
5151
|
radius: radius ?? configStyles.INPUT.radius,
|
|
4738
|
-
maxLength: maxLength ?? configStyles.INPUT.maxLength
|
|
5152
|
+
maxLength: maxLength ?? configStyles.INPUT.maxLength,
|
|
5153
|
+
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5154
|
+
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
4739
5155
|
}), rightIcon && rightIcon.length > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
4740
5156
|
onClick: type === 'password' ? handleShowPass : _ => _,
|
|
4741
5157
|
style: {
|
|
@@ -4744,41 +5160,72 @@ const Input = ({
|
|
|
4744
5160
|
justifyContent: 'center',
|
|
4745
5161
|
cursor: type === 'password' ? 'pointer' : 'default',
|
|
4746
5162
|
height: height ?? configStyles.INPUT.height,
|
|
4747
|
-
padding: padding ?? configStyles.INPUT.padding,
|
|
4748
5163
|
width: iconWidth ?? configStyles.INPUT.iconWidth,
|
|
4749
5164
|
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
5165
|
+
padding: iconPadding ?? configStyles.INPUT.iconPadding,
|
|
4750
5166
|
borderTopRightRadius: radius ?? configStyles.INPUT.radius,
|
|
4751
5167
|
borderBottomRightRadius: radius ?? configStyles.INPUT.radius,
|
|
4752
5168
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
4753
5169
|
}
|
|
4754
|
-
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), tooltip ? tooltip : '', innerErrorMessage ? /*#__PURE__*/React__default.createElement(P
|
|
4755
|
-
|
|
5170
|
+
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), tooltip ? tooltip : '', innerErrorMessage ? /*#__PURE__*/React__default.createElement(P
|
|
5171
|
+
// animation={animation}
|
|
5172
|
+
, {
|
|
4756
5173
|
style: {
|
|
4757
5174
|
margin: '0px',
|
|
5175
|
+
display: 'flex',
|
|
5176
|
+
alignItems: 'center',
|
|
4758
5177
|
position: 'absolute',
|
|
4759
5178
|
width: width ?? configStyles.INPUT.width,
|
|
4760
5179
|
left: errorLeft ?? configStyles.INPUT.error.left,
|
|
4761
5180
|
color: errorColor ?? configStyles.INPUT.error.color,
|
|
5181
|
+
zIndex: errorZindex ?? configStyles.INPUT.error.zIndex,
|
|
4762
5182
|
fontSize: errorSize ?? configStyles.INPUT.error.font.size,
|
|
4763
5183
|
fontStyle: errorStyle ?? configStyles.INPUT.error.font.style,
|
|
4764
5184
|
fontFamily: errorFamily ?? configStyles.INPUT.error.font.family,
|
|
4765
5185
|
fontWeight: errorWeight ?? configStyles.INPUT.error.font.weight,
|
|
4766
|
-
zIndex: errorZindex ?? configStyles.INPUT.error.zIndex,
|
|
4767
5186
|
lineHeight: errorLineHeight ?? configStyles.INPUT.error.lineHeight,
|
|
4768
5187
|
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.INPUT.error.marginTop})`,
|
|
4769
5188
|
transform: 'scale3d(1,1,1)'
|
|
4770
5189
|
},
|
|
4771
5190
|
className: errorClassName ?? configStyles.INPUT.error.className
|
|
4772
|
-
},
|
|
5191
|
+
}, showErrorIcon && innerErrorIcon && innerErrorIconSide === 'left' ? /*#__PURE__*/React__default.createElement("img", {
|
|
5192
|
+
alt: "error icon",
|
|
5193
|
+
src: innerErrorIcon,
|
|
5194
|
+
style: {
|
|
5195
|
+
width: '14px',
|
|
5196
|
+
height: '14px',
|
|
5197
|
+
cursor: errorAction ? 'pointer' : 'normal',
|
|
5198
|
+
marginRight: errorIconMargin ?? configStyles.INPUT.error.iconMargin
|
|
5199
|
+
},
|
|
5200
|
+
onClick: errorAction ? () => errorAction() : _ => _
|
|
5201
|
+
}) : '', /*#__PURE__*/React__default.createElement("span", {
|
|
5202
|
+
style: {
|
|
5203
|
+
display: 'inline-block',
|
|
5204
|
+
whiteSpace: (errorDots ? errorDots : configStyles.INPUT.error.dots) ? 'nowrap' : 'normal',
|
|
5205
|
+
overflow: (errorDots ? errorDots : configStyles.INPUT.error.dots) ? 'hidden' : 'visible',
|
|
5206
|
+
textOverflow: (errorDots ? errorDots : configStyles.INPUT.error.dots) ? 'ellipsis' : '',
|
|
5207
|
+
maxWidth: `calc(100% - ${(errorIconMargin ? Number(errorIconMargin.match(/\d+/)[0]) : Number(configStyles.INPUT.error.iconMargin.match(/\d+/)[0])) + 14}px)`
|
|
5208
|
+
}
|
|
5209
|
+
}, innerErrorMessage), showErrorIcon && innerErrorIcon && innerErrorIconSide === 'right' && /*#__PURE__*/React__default.createElement("img", {
|
|
5210
|
+
alt: "error icon",
|
|
5211
|
+
src: innerErrorIcon,
|
|
5212
|
+
style: {
|
|
5213
|
+
width: '14px',
|
|
5214
|
+
height: '14px',
|
|
5215
|
+
cursor: errorAction ? 'pointer' : 'normal',
|
|
5216
|
+
marginLeft: errorIconMargin ?? configStyles.INPUT.error.iconMargin
|
|
5217
|
+
},
|
|
5218
|
+
onClick: errorAction ? () => errorAction() : _ => _
|
|
5219
|
+
})) : '');
|
|
4773
5220
|
};
|
|
4774
5221
|
Input.propTypes = {
|
|
5222
|
+
ssn: PropTypes.bool,
|
|
4775
5223
|
size: PropTypes.string,
|
|
4776
5224
|
name: PropTypes.string,
|
|
4777
5225
|
change: PropTypes.func,
|
|
4778
5226
|
style: PropTypes.string,
|
|
4779
5227
|
color: PropTypes.string,
|
|
4780
5228
|
width: PropTypes.string,
|
|
4781
|
-
label: PropTypes.string,
|
|
4782
5229
|
withZero: PropTypes.bool,
|
|
4783
5230
|
weight: PropTypes.string,
|
|
4784
5231
|
family: PropTypes.string,
|
|
@@ -4787,45 +5234,59 @@ Input.propTypes = {
|
|
|
4787
5234
|
height: PropTypes.string,
|
|
4788
5235
|
radius: PropTypes.string,
|
|
4789
5236
|
padding: PropTypes.string,
|
|
4790
|
-
|
|
5237
|
+
cardNumber: PropTypes.bool,
|
|
4791
5238
|
tooltip: PropTypes.element,
|
|
4792
5239
|
withoutDot: PropTypes.bool,
|
|
4793
5240
|
className: PropTypes.string,
|
|
4794
5241
|
iconWidth: PropTypes.string,
|
|
4795
|
-
|
|
4796
|
-
boxShadow: PropTypes.string,
|
|
4797
|
-
errorSize: PropTypes.string,
|
|
4798
|
-
errorLeft: PropTypes.string,
|
|
4799
|
-
labelSize: PropTypes.string,
|
|
5242
|
+
iconPadding: PropTypes.string,
|
|
4800
5243
|
maxLength: PropTypes.number,
|
|
4801
5244
|
floatToFix: PropTypes.number,
|
|
4802
5245
|
minNumSize: PropTypes.number,
|
|
4803
5246
|
maxNumSize: PropTypes.number,
|
|
4804
|
-
|
|
5247
|
+
label: PropTypes.string,
|
|
5248
|
+
labelDots: PropTypes.bool,
|
|
5249
|
+
labelAction: PropTypes.func,
|
|
5250
|
+
labelIcon: PropTypes.string,
|
|
5251
|
+
labelSize: PropTypes.string,
|
|
4805
5252
|
labelColor: PropTypes.string,
|
|
4806
5253
|
labelStyle: PropTypes.string,
|
|
5254
|
+
showLabelIcon: PropTypes.bool,
|
|
5255
|
+
labelWeight: PropTypes.string,
|
|
5256
|
+
labelDisplay: PropTypes.string,
|
|
5257
|
+
labelIconSide: PropTypes.oneOf(Object.values(IconSides)),
|
|
5258
|
+
labelLineHeight: PropTypes.string,
|
|
5259
|
+
labelFontFamily: PropTypes.string,
|
|
5260
|
+
labelIconMargin: PropTypes.string,
|
|
5261
|
+
labelMarginBottom: PropTypes.string,
|
|
5262
|
+
borderRight: PropTypes.string,
|
|
5263
|
+
placeholder: PropTypes.string,
|
|
5264
|
+
phoneDisplay: PropTypes.string,
|
|
5265
|
+
autoComplete: PropTypes.string,
|
|
5266
|
+
errorDots: PropTypes.bool,
|
|
5267
|
+
errorLeft: PropTypes.string,
|
|
5268
|
+
errorSize: PropTypes.string,
|
|
5269
|
+
errorIcon: PropTypes.string,
|
|
5270
|
+
errorAction: PropTypes.func,
|
|
5271
|
+
errorColor: PropTypes.string,
|
|
4807
5272
|
errorStyle: PropTypes.string,
|
|
5273
|
+
showErrorIcon: PropTypes.bool,
|
|
4808
5274
|
errorWeight: PropTypes.string,
|
|
4809
5275
|
errorFamily: PropTypes.string,
|
|
4810
|
-
borderRight: PropTypes.string,
|
|
4811
|
-
placeholder: PropTypes.string,
|
|
4812
5276
|
errorZindex: PropTypes.string,
|
|
4813
|
-
|
|
5277
|
+
errorIconSide: PropTypes.oneOf(Object.values(IconSides)),
|
|
4814
5278
|
errorMessage: PropTypes.string,
|
|
4815
|
-
phoneDisplay: PropTypes.string,
|
|
4816
|
-
autoComplete: PropTypes.string,
|
|
4817
|
-
labelDisplay: PropTypes.string,
|
|
4818
5279
|
errorPosition: PropTypes.string,
|
|
4819
5280
|
errorMarginTop: PropTypes.string,
|
|
4820
|
-
boxShadowHover: PropTypes.string,
|
|
4821
5281
|
errorClassName: PropTypes.string,
|
|
4822
|
-
|
|
4823
|
-
backgroundColor: PropTypes.string,
|
|
4824
|
-
phoneAlignItems: PropTypes.string,
|
|
5282
|
+
errorIconMargin: PropTypes.string,
|
|
4825
5283
|
errorLineHeight: PropTypes.string,
|
|
4826
|
-
|
|
5284
|
+
boxSizing: PropTypes.string,
|
|
5285
|
+
boxShadow: PropTypes.string,
|
|
5286
|
+
errorBoxShadow: PropTypes.string,
|
|
5287
|
+
boxShadowHover: PropTypes.string,
|
|
5288
|
+
phoneAlignItems: PropTypes.string,
|
|
4827
5289
|
numberMaxLength: PropTypes.number,
|
|
4828
|
-
labelMarginBottom: PropTypes.string,
|
|
4829
5290
|
regexpErrorMessage: PropTypes.string,
|
|
4830
5291
|
regexp: PropTypes.instanceOf(RegExp),
|
|
4831
5292
|
fireInputInsideError: PropTypes.func,
|
|
@@ -4833,6 +5294,7 @@ Input.propTypes = {
|
|
|
4833
5294
|
telBorderRightStyle: PropTypes.string,
|
|
4834
5295
|
telBorderRightColor: PropTypes.string,
|
|
4835
5296
|
phoneJustifyContent: PropTypes.string,
|
|
5297
|
+
backgroundColor: PropTypes.string,
|
|
4836
5298
|
backgroundDisableColor: PropTypes.string,
|
|
4837
5299
|
telBorderRightColorHover: PropTypes.string,
|
|
4838
5300
|
leftIcon: PropTypes.arrayOf(PropTypes.element),
|
|
@@ -4858,10 +5320,12 @@ const Radio = ({
|
|
|
4858
5320
|
borderStyle,
|
|
4859
5321
|
labelFontSize,
|
|
4860
5322
|
labelFontStyle,
|
|
5323
|
+
labelActiveColor,
|
|
4861
5324
|
labelFontFamily,
|
|
4862
5325
|
labelFontWeight,
|
|
4863
5326
|
labelLineHeight,
|
|
4864
5327
|
radioMarginRight,
|
|
5328
|
+
borderHoverColor,
|
|
4865
5329
|
borderActiveColor,
|
|
4866
5330
|
radioItemMarginRight,
|
|
4867
5331
|
radioItemMarginBottom,
|
|
@@ -4880,22 +5344,14 @@ const Radio = ({
|
|
|
4880
5344
|
});
|
|
4881
5345
|
const handleMouseEnter = (id, elemID) => {
|
|
4882
5346
|
const elem = document.querySelector(`#${elemID}`);
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
// ? borderActiveColor
|
|
4887
|
-
// ? borderActiveColor
|
|
4888
|
-
// : configStyles.RADIO.border.activeColor
|
|
4889
|
-
// : borderColor
|
|
4890
|
-
// ? borderColor
|
|
4891
|
-
// : configStyles.RADIO.border.color
|
|
4892
|
-
// }
|
|
4893
|
-
// handleUtilsMouseEnterLeave(e, newStyles);
|
|
4894
|
-
|
|
4895
|
-
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.border.activeColor : borderColor ? borderColor : configStyles.RADIO.border.color;
|
|
5347
|
+
const borderStyle = elem.parentElement;
|
|
5348
|
+
borderStyle.style.borderColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.border.activeColor : borderHoverColor ? borderHoverColor : configStyles.RADIO.border.hoverColor;
|
|
5349
|
+
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.border.activeColor : borderHoverColor ? borderHoverColor : configStyles.RADIO.border.hoverColor;
|
|
4896
5350
|
};
|
|
4897
5351
|
const handleMouseLeave = (id, elemID) => {
|
|
4898
5352
|
const elem = document.querySelector(`#${elemID}`);
|
|
5353
|
+
const borderStyle = elem.parentElement;
|
|
5354
|
+
borderStyle.style.borderColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.border.activeColor : borderColor ? borderColor : configStyles.RADIO.border.color;
|
|
4899
5355
|
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.border.activeColor : 'transparent';
|
|
4900
5356
|
};
|
|
4901
5357
|
const handleChecked = selItem => {
|
|
@@ -5002,15 +5458,13 @@ const Radio = ({
|
|
|
5002
5458
|
}
|
|
5003
5459
|
})), item[innerKeyNames.label] ? /*#__PURE__*/React__default.createElement("span", {
|
|
5004
5460
|
style: {
|
|
5005
|
-
color: labelColor ?? configStyles.RADIO.label.color,
|
|
5461
|
+
color: item[innerKeyNames.id] === innerSelectedData.id ? labelActiveColor ?? configStyles.RADIO.label.activeColor : labelColor ?? configStyles.RADIO.label.color,
|
|
5006
5462
|
fontSize: labelFontSize ?? configStyles.RADIO.label.font.size,
|
|
5007
5463
|
fontStyle: labelFontStyle ?? configStyles.RADIO.label.font.style,
|
|
5008
5464
|
fontFamily: labelFontFamily ?? configStyles.RADIO.label.font.family,
|
|
5009
5465
|
fontWeight: labelFontWeight ?? configStyles.RADIO.label.font.weight,
|
|
5010
5466
|
lineHeight: labelLineHeight ?? configStyles.RADIO.label.lineHeight
|
|
5011
|
-
}
|
|
5012
|
-
onMouseEnter: () => handleMouseEnter(item[innerKeyNames.id], elemId),
|
|
5013
|
-
onMouseLeave: () => handleMouseLeave(item[innerKeyNames.id], elemId)
|
|
5467
|
+
}
|
|
5014
5468
|
}, item[innerKeyNames.label]) : '');
|
|
5015
5469
|
}));
|
|
5016
5470
|
};
|
|
@@ -5025,11 +5479,13 @@ Radio.propTypes = {
|
|
|
5025
5479
|
borderStyle: PropTypes.string,
|
|
5026
5480
|
labelFontSize: PropTypes.string,
|
|
5027
5481
|
labelFontStyle: PropTypes.string,
|
|
5482
|
+
labelActiveColor: PropTypes.string,
|
|
5028
5483
|
labelFontFamily: PropTypes.string,
|
|
5029
5484
|
labelFontWeight: PropTypes.string,
|
|
5030
5485
|
labelLineHeight: PropTypes.string,
|
|
5031
5486
|
radioMarginRight: PropTypes.string,
|
|
5032
5487
|
getData: PropTypes.func.isRequired,
|
|
5488
|
+
borderHoverColor: PropTypes.string,
|
|
5033
5489
|
borderActiveColor: PropTypes.string,
|
|
5034
5490
|
radioItemMarginRight: PropTypes.string,
|
|
5035
5491
|
radioItemMarginBottom: PropTypes.string,
|
|
@@ -5056,12 +5512,13 @@ const SvgArrow = ({
|
|
|
5056
5512
|
fill: fillColor ? fillColor : '#3C393E'
|
|
5057
5513
|
}));
|
|
5058
5514
|
|
|
5059
|
-
var css_248z$
|
|
5060
|
-
var styles$
|
|
5061
|
-
styleInject(css_248z$
|
|
5515
|
+
var css_248z$9 = ".select-module_select-content__GCMDX{-webkit-appearance:none;display:flex;flex-direction:column;position:relative}.select-module_select-content-top__Aw-fB{align-items:center;-webkit-appearance:none;display:flex;flex-direction:row;flex-wrap:nowrap}.select-module_select-content-bottom__ueZCR{animation:select-module_select-show__391hQ .64s linear forwards;-webkit-animation:select-module_select-show__391hQ .64s linear forwards;left:0;max-height:0;overflow:hidden;position:absolute;width:100%;z-index:99999999999}.select-module_select-content-bottom-inner__NWy2X{display:flex;flex-direction:column;max-height:234px;overflow-x:hidden;overflow-y:auto}.select-module_select-content-top-icon__MBrGK{align-items:center;box-sizing:border-box;display:flex;flex:0 0 auto}.select-module_select-content-top-icon__MBrGK>div{align-items:center;display:flex;height:fit-content;justify-content:center;max-height:30px;max-width:30px;min-height:14px;min-width:14px;width:fit-content}.select-module_close-icon__SFNaJ{border-right:1px solid #eee;box-sizing:content-box;padding-right:9px}.select-module_arrow-icon__rjHt-{margin-left:9px;transform-origin:center;transition:all .64s ease;-webkit-transition:all .64s ease;-moz-transition:all .64s ease;-ms-transition:all .64s ease;-o-transition:all .64s ease}.select-module_select-content-bottom-row__eKq5L{align-items:center;display:flex;transition:background-color .24s,color .24s;-webkit-transition:background-color .24s,color .24s;-moz-transition:background-color .24s,color .24s;-ms-transition:background-color .24s,color .24s;-o-transition:background-color .24s,color .24s}.select-module_select-content-bottom-row__eKq5L:last-child{margin-bottom:0}.select-module_ellipsis__uNgol{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes select-module_select-show__391hQ{to{max-height:234px}}";
|
|
5516
|
+
var styles$7 = {"select-content":"select-module_select-content__GCMDX","select-content-top":"select-module_select-content-top__Aw-fB","select-content-bottom":"select-module_select-content-bottom__ueZCR","select-show":"select-module_select-show__391hQ","select-content-bottom-inner":"select-module_select-content-bottom-inner__NWy2X","select-content-top-icon":"select-module_select-content-top-icon__MBrGK","close-icon":"select-module_close-icon__SFNaJ","arrow-icon":"select-module_arrow-icon__rjHt-","select-content-bottom-row":"select-module_select-content-bottom-row__eKq5L","ellipsis":"select-module_ellipsis__uNgol"};
|
|
5517
|
+
styleInject(css_248z$9);
|
|
5062
5518
|
|
|
5063
5519
|
const Select = ({
|
|
5064
5520
|
dots,
|
|
5521
|
+
lang,
|
|
5065
5522
|
options,
|
|
5066
5523
|
multiple,
|
|
5067
5524
|
disabled,
|
|
@@ -5075,6 +5532,7 @@ const Select = ({
|
|
|
5075
5532
|
closeIcon,
|
|
5076
5533
|
errorZindex,
|
|
5077
5534
|
errorMessage,
|
|
5535
|
+
arrowNoRotate,
|
|
5078
5536
|
showCloseIcon,
|
|
5079
5537
|
defaultOption,
|
|
5080
5538
|
multipleCheckbox,
|
|
@@ -5115,6 +5573,8 @@ const Select = ({
|
|
|
5115
5573
|
optionItemCursor,
|
|
5116
5574
|
optionItemPadding,
|
|
5117
5575
|
optionItemFontSize,
|
|
5576
|
+
optionItemFontStyle,
|
|
5577
|
+
optionItemFontFamily,
|
|
5118
5578
|
optionItemMinHeight,
|
|
5119
5579
|
optionItemBoxSizing,
|
|
5120
5580
|
optionItemFontWeight,
|
|
@@ -5124,7 +5584,8 @@ const Select = ({
|
|
|
5124
5584
|
optionItemBackgroudColor,
|
|
5125
5585
|
optionItemBackgroudColorHover,
|
|
5126
5586
|
boxShadow,
|
|
5127
|
-
boxShadowHover
|
|
5587
|
+
boxShadowHover,
|
|
5588
|
+
insidePagination
|
|
5128
5589
|
}) => {
|
|
5129
5590
|
const ref = useRef();
|
|
5130
5591
|
const [opened, setOpened] = useState(false);
|
|
@@ -5270,12 +5731,12 @@ const Select = ({
|
|
|
5270
5731
|
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
5271
5732
|
ref: ref
|
|
5272
5733
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5273
|
-
className: styles$
|
|
5734
|
+
className: styles$7['select-content']
|
|
5274
5735
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5736
|
+
className: `${styles$7['select-content-top']}`,
|
|
5275
5737
|
style: {
|
|
5276
5738
|
cursor: disabled ? 'not-allowed' : cursor ? cursor : configStyles.SELECT.selected.cursor,
|
|
5277
5739
|
minHeight: selectedMinHeight ?? configStyles.SELECT.selected.minHeight,
|
|
5278
|
-
padding: selectedPadding ?? configStyles.SELECT.selected.padding,
|
|
5279
5740
|
borderRadius: selectedRadius ?? configStyles.SELECT.selected.radius,
|
|
5280
5741
|
fontSize: selectedFontSize ?? configStyles.SELECT.selected.font.size,
|
|
5281
5742
|
fontStyle: selectedFontStyle ?? configStyles.SELECT.selected.font.style,
|
|
@@ -5284,19 +5745,20 @@ const Select = ({
|
|
|
5284
5745
|
fontWeight: selectedFontWeight ?? configStyles.SELECT.selected.font.weight,
|
|
5285
5746
|
lineHeight: selectedLineHeight ?? configStyles.SELECT.selected.lineHeight,
|
|
5286
5747
|
transition: selectedTransition ?? configStyles.SELECT.selected.transition,
|
|
5748
|
+
padding: insidePagination ? '0px 2px' : selectedPadding ?? configStyles.SELECT.selected.padding,
|
|
5749
|
+
justifyContent: insidePagination ? 'center' : 'space-between',
|
|
5287
5750
|
backgroundColor: disabled ? selectedDisableBackgroundColor ? selectedDisableBackgroundColor : configStyles.SELECT.selected.colors.backgroundDisable : selectedBackgroundColor ? selectedBackgroundColor : configStyles.SELECT.selected.colors.background,
|
|
5288
5751
|
boxShadow: errorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : configStyles.SELECT.error.box.shadow : isHover ? boxShadowHover ? boxShadowHover : configStyles.SELECT.box.shadowHover : boxShadow ? boxShadow : configStyles.SELECT.box.shadow
|
|
5289
5752
|
},
|
|
5290
5753
|
onClick: disabled ? _ => _ : () => handleOpenClose(),
|
|
5291
5754
|
onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
|
|
5292
|
-
onMouseLeave: disabled ? _ => _ : () => handleMouseLeave()
|
|
5293
|
-
className: `${styles$6['select-content-top']}`
|
|
5755
|
+
onMouseLeave: disabled ? _ => _ : () => handleMouseLeave()
|
|
5294
5756
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5295
|
-
className: `${styles$
|
|
5757
|
+
className: `${styles$7['select-content-top-text']}`,
|
|
5296
5758
|
style: {
|
|
5297
5759
|
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
5298
|
-
overflow: 'hidden',
|
|
5299
|
-
textOverflow: 'ellipsis',
|
|
5760
|
+
overflow: insidePagination ? 'visible' : 'hidden',
|
|
5761
|
+
textOverflow: insidePagination ? 'initial' : 'ellipsis',
|
|
5300
5762
|
color: isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selected.colors.hover : selectedColor ? selectedColor : configStyles.SELECT.selected.color
|
|
5301
5763
|
}
|
|
5302
5764
|
}, !multiple && newSelected && newSelected[0] && newSelected[0][keyNames.name] ? newSelected[0][keyNames.name] : newSelected && newSelected.length > 0 ? newSelected.map((_, index) => {
|
|
@@ -5308,18 +5770,22 @@ const Select = ({
|
|
|
5308
5770
|
}
|
|
5309
5771
|
}
|
|
5310
5772
|
}) : defaultOption ? defaultOption : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
5311
|
-
className: `${styles$
|
|
5773
|
+
className: `${styles$7['select-content-top-icon']}`,
|
|
5774
|
+
style: {
|
|
5775
|
+
padding: lang ? '0px' : insidePagination ? '0px 5px' : '0 5px 0 20px'
|
|
5776
|
+
}
|
|
5312
5777
|
}, !disabled && multiple && newSelected.length > 1 && /*#__PURE__*/React__default.createElement("span", null, newSelected.length), (showCloseIcon === true || showCloseIcon === false ? showCloseIcon : configStyles.SELECT.showCloseIcon) && !disabled && newSelected && newSelected.length > 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
5313
|
-
className: `${styles$
|
|
5778
|
+
className: `${styles$7['close-icon']}`,
|
|
5314
5779
|
onClick: disabled ? _ => _ : handleClearSelect,
|
|
5315
5780
|
style: {
|
|
5316
5781
|
marginLeft: multiple && newSelected.length > 1 ? '17px' : '0px'
|
|
5317
5782
|
}
|
|
5318
5783
|
}, closeIcon ? closeIcon : configStyles.SELECT.closeIcon ? configStyles.SELECT.closeIcon : /*#__PURE__*/React__default.createElement(SvgCloseIcon, null)), !disabled ? /*#__PURE__*/React__default.createElement("div", {
|
|
5784
|
+
className: `${styles$7['arrow-icon']}`,
|
|
5319
5785
|
style: {
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5786
|
+
marginLeft: lang ? '0px' : '9px',
|
|
5787
|
+
transform: arrowNoRotate || configStyles.SELECT.arrowNoRotate ? 'rotate(0deg)' : opened ? 'rotate(180deg)' : 'rotate(0deg)'
|
|
5788
|
+
}
|
|
5323
5789
|
}, arrowIcon ? arrowIcon : configStyles.SELECT.arrowIcon ? configStyles.SELECT.arrowIcon : /*#__PURE__*/React__default.createElement(SvgArrow, null)) : '')), opened && existOptions && existOptions.length > 0 && !disabled ? /*#__PURE__*/React__default.createElement("div", {
|
|
5324
5790
|
style: {
|
|
5325
5791
|
boxShadow: optionsBoxShadow ?? configStyles.SELECT.options.box.shadow,
|
|
@@ -5327,9 +5793,9 @@ const Select = ({
|
|
|
5327
5793
|
backgroundColor: optionsBackgroundColor ?? configStyles.SELECT.options.colors.background,
|
|
5328
5794
|
top: selectedMinHeight ? selectedMinHeight.includes('rem') ? parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 3)) + 0.6 + 'rem' : parseFloat(selectedMinHeight.substr(0, selectedMinHeight.length - 2)) + 6 + 'px' : configStyles.SELECT.selected.minHeight.includes('rem') ? parseFloat(configStyles.SELECT.selected.minHeight.substr(0, configStyles.SELECT.selected.minHeight.length - 3)) + 0.6 + 'rem' : parseFloat(configStyles.SELECT.selected.minHeight.substr(0, configStyles.SELECT.selected.minHeight.length - 2)) + 6 + 'px'
|
|
5329
5795
|
},
|
|
5330
|
-
className: `${styles$
|
|
5796
|
+
className: `${styles$7['select-content-bottom']}`
|
|
5331
5797
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5332
|
-
className: `${styles$
|
|
5798
|
+
className: `${styles$7['select-content-bottom-inner']}`
|
|
5333
5799
|
}, existOptions && existOptions.length > 0 && existOptions.map((option, i) => {
|
|
5334
5800
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
5335
5801
|
key: i,
|
|
@@ -5338,19 +5804,22 @@ const Select = ({
|
|
|
5338
5804
|
onClick: disabled ? _ => _ : () => handleSelectItem(option),
|
|
5339
5805
|
onMouseEnter: disabled ? _ => _ : e => handleMouseEnterOption(e),
|
|
5340
5806
|
onMouseLeave: disabled ? _ => _ : e => handleMouseLeaveOption(e),
|
|
5341
|
-
className: `${styles$
|
|
5807
|
+
className: `${styles$7['select-content-bottom-row']} ${dots || configStyles.SELECT.dots ? styles$7['ellipsis'] : ''}`,
|
|
5342
5808
|
style: {
|
|
5343
5809
|
overflowWrap: !dots && !configStyles.SELECT.dots ? 'anywhere' : 'break-word',
|
|
5344
5810
|
color: optionItemColor ?? configStyles.SELECT.options.item.color,
|
|
5345
5811
|
cursor: optionItemCursor ?? configStyles.SELECT.options.item.cursor,
|
|
5346
5812
|
padding: optionItemPadding ?? configStyles.SELECT.options.item.padding,
|
|
5347
5813
|
fontSize: optionItemFontSize ?? configStyles.SELECT.options.item.font.size,
|
|
5814
|
+
fontStyle: optionItemFontStyle ?? configStyles.SELECT.options.item.font.style,
|
|
5815
|
+
fontFamily: optionItemFontFamily ?? configStyles.SELECT.options.item.font.family,
|
|
5348
5816
|
boxSizing: optionItemBoxSizing ?? configStyles.SELECT.options.item.box.sizing,
|
|
5349
5817
|
minHeight: optionItemMinHeight ?? configStyles.SELECT.options.item.minHeight,
|
|
5350
5818
|
fontWeight: optionItemFontWeight ?? configStyles.SELECT.options.item.font.weight,
|
|
5351
5819
|
lineHeight: dots || configStyles.SELECT.dots ? '46px' : optionItemLineHeight ? optionItemLineHeight : configStyles.SELECT.options.item.lineHeight,
|
|
5352
5820
|
marginBottom: optionItemMarginBottom ?? configStyles.SELECT.options.item.marginBottom,
|
|
5353
|
-
backgroundColor: optionItemBackgroudColor ?? configStyles.SELECT.options.item.colors.backgroud
|
|
5821
|
+
backgroundColor: optionItemBackgroudColor ?? configStyles.SELECT.options.item.colors.backgroud,
|
|
5822
|
+
justifyContent: lang ? 'center' : 'flex-start'
|
|
5354
5823
|
}
|
|
5355
5824
|
}, multiple && multipleCheckbox ? /*#__PURE__*/React__default.createElement(SingleCheckbox, {
|
|
5356
5825
|
checked: option.checked
|
|
@@ -5370,6 +5839,7 @@ const Select = ({
|
|
|
5370
5839
|
};
|
|
5371
5840
|
Select.propTypes = {
|
|
5372
5841
|
dots: PropTypes.bool,
|
|
5842
|
+
lang: PropTypes.bool,
|
|
5373
5843
|
options: PropTypes.array,
|
|
5374
5844
|
multiple: PropTypes.bool,
|
|
5375
5845
|
onChange: PropTypes.func,
|
|
@@ -5381,6 +5851,7 @@ Select.propTypes = {
|
|
|
5381
5851
|
className: PropTypes.string,
|
|
5382
5852
|
arrowIcon: PropTypes.element,
|
|
5383
5853
|
closeIcon: PropTypes.element,
|
|
5854
|
+
arrowNoRotate: PropTypes.bool,
|
|
5384
5855
|
showCloseIcon: PropTypes.bool,
|
|
5385
5856
|
errorZindex: PropTypes.number,
|
|
5386
5857
|
errorMessage: PropTypes.string,
|
|
@@ -5420,6 +5891,8 @@ Select.propTypes = {
|
|
|
5420
5891
|
optionItemCursor: PropTypes.string,
|
|
5421
5892
|
optionItemPadding: PropTypes.string,
|
|
5422
5893
|
optionItemFontSize: PropTypes.string,
|
|
5894
|
+
optionItemFontStyle: PropTypes.string,
|
|
5895
|
+
optionItemFontFamily: PropTypes.string,
|
|
5423
5896
|
optionItemMinHeight: PropTypes.string,
|
|
5424
5897
|
optionItemBoxSizing: PropTypes.string,
|
|
5425
5898
|
optionItemFontWeight: PropTypes.string,
|
|
@@ -5429,7 +5902,8 @@ Select.propTypes = {
|
|
|
5429
5902
|
optionItemBackgroudColor: PropTypes.string,
|
|
5430
5903
|
optionItemBackgroudColorHover: PropTypes.string,
|
|
5431
5904
|
boxShadow: PropTypes.string,
|
|
5432
|
-
boxShadowHover: PropTypes.string
|
|
5905
|
+
boxShadowHover: PropTypes.string,
|
|
5906
|
+
insidePagination: PropTypes.bool
|
|
5433
5907
|
};
|
|
5434
5908
|
|
|
5435
5909
|
const SvgToasterInfo = ({
|
|
@@ -5551,11 +6025,10 @@ const SvgToasterSuccess = ({
|
|
|
5551
6025
|
fill: fillColor ? fillColor : '#0DA574'
|
|
5552
6026
|
}));
|
|
5553
6027
|
|
|
5554
|
-
var css_248z$
|
|
5555
|
-
var styles$
|
|
5556
|
-
styleInject(css_248z$
|
|
6028
|
+
var css_248z$8 = "#toaster-module_top-left__q0LcN{left:0;top:1em}#toaster-module_top-right__f-AFL{right:0;top:1em}#toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}#toaster-module_bottom-left__b-YHI{bottom:1em;left:0}#toaster-module_bottom-right__g9ACP{bottom:1em;right:0}#toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_top-left__q0LcN{left:0;top:1em}.toaster-module_top-right__f-AFL{right:0;top:1em}.toaster-module_top-center__eVRbc{left:50%;top:1em;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_bottom-left__b-YHI{bottom:1em;left:0}.toaster-module_bottom-right__g9ACP{bottom:1em;right:0}.toaster-module_bottom-center__4KcFe{bottom:1em;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%)}.toaster-module_notify-block__pRnEB{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.toaster-module_bounce-in-right__shR2D{-webkit-animation-name:toaster-module_bounceInRight__rSk5p;animation-name:toaster-module_bounceInRight__rSk5p}.toaster-module_bounce-out-right__48pyA{-webkit-animation-name:toaster-module_bounceOutRight__bmFGS;animation-name:toaster-module_bounceOutRight__bmFGS}.toaster-module_notify-desc__bcWe2,.toaster-module_notify-title__8lFLy{overflow:hidden;text-overflow:ellipsis}.toaster-module_notify-desc__bcWe2{-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box}@keyframes toaster-module_bounceInRight__rSk5p{0%{opacity:0;right:-100%}60%{opacity:1;right:40px}75%{right:0}90%{right:30px}to{right:20px}}@keyframes toaster-module_bounceOutRight__bmFGS{0%{opacity:1;right:20px}60%{opacity:1;right:60px}to{opacity:0;right:-100%}}.toaster-module_bounce-in-left__xoF-M{-webkit-animation-name:toaster-module_bounceInLeft__to59v;animation-name:toaster-module_bounceInLeft__to59v}.toaster-module_bounce-out-left__fDOZw{-webkit-animation-name:toaster-module_bounceOutLeft__k5QgO;animation-name:toaster-module_bounceOutLeft__k5QgO}@keyframes toaster-module_bounceInLeft__to59v{0%{left:-100%;opacity:0}60%{left:40px;opacity:1}75%{left:0}90%{left:30px}to{left:20px}}@keyframes toaster-module_bounceInLeftMobile__CA2dc{0%{left:-100%;opacity:0}60%{left:40px;opacity:1}75%{left:0}90%{left:30px}to{left:0}}@keyframes toaster-module_bounceOutLeft__k5QgO{0%{left:20px;opacity:1}60%{left:60px;opacity:1}to{left:-100%;opacity:0}}@media(max-width:480px){.toaster-module_bounce-in-left__xoF-M{-webkit-animation-name:toaster-module_bounceInLeftMobile__CA2dc;animation-name:toaster-module_bounceInLeftMobile__CA2dc}}";
|
|
6029
|
+
var styles$6 = {"top-left":"toaster-module_top-left__q0LcN","top-right":"toaster-module_top-right__f-AFL","top-center":"toaster-module_top-center__eVRbc","bottom-left":"toaster-module_bottom-left__b-YHI","bottom-right":"toaster-module_bottom-right__g9ACP","bottom-center":"toaster-module_bottom-center__4KcFe","notify-block":"toaster-module_notify-block__pRnEB","bounce-in-right":"toaster-module_bounce-in-right__shR2D","bounceInRight":"toaster-module_bounceInRight__rSk5p","bounce-out-right":"toaster-module_bounce-out-right__48pyA","bounceOutRight":"toaster-module_bounceOutRight__bmFGS","notify-title":"toaster-module_notify-title__8lFLy","notify-desc":"toaster-module_notify-desc__bcWe2","bounce-in-left":"toaster-module_bounce-in-left__xoF-M","bounceInLeft":"toaster-module_bounceInLeft__to59v","bounce-out-left":"toaster-module_bounce-out-left__fDOZw","bounceOutLeft":"toaster-module_bounceOutLeft__k5QgO","bounceInLeftMobile":"toaster-module_bounceInLeftMobile__CA2dc"};
|
|
6030
|
+
styleInject(css_248z$8);
|
|
5557
6031
|
|
|
5558
|
-
let wWidth$1 = window.innerWidth;
|
|
5559
6032
|
const ToasterType = {
|
|
5560
6033
|
info: 'info',
|
|
5561
6034
|
warn: 'warn',
|
|
@@ -5572,16 +6045,21 @@ const ToasterPosition = {
|
|
|
5572
6045
|
};
|
|
5573
6046
|
const Toast = ({
|
|
5574
6047
|
type,
|
|
5575
|
-
|
|
5576
|
-
|
|
6048
|
+
icons,
|
|
6049
|
+
title,
|
|
6050
|
+
timer,
|
|
6051
|
+
propStyles,
|
|
5577
6052
|
removeToast,
|
|
5578
6053
|
description,
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
6054
|
+
titleStyles,
|
|
6055
|
+
descriptionStyles,
|
|
6056
|
+
position = 'top-right'
|
|
5582
6057
|
}) => {
|
|
5583
6058
|
let timeoutCall;
|
|
5584
6059
|
let timeoutClick;
|
|
6060
|
+
const firstCheck = propStyles.height.replace(/\D/g, '') - 28 < 30 ? 30 : propStyles.height.replace(/\D/g, '') - 28;
|
|
6061
|
+
const secondCheck = propStyles.height.replace(/\D/g, '') - 65 < 18 ? 18 : propStyles.height.replace(/\D/g, '') - 65;
|
|
6062
|
+
const finalCheck = firstCheck + secondCheck + 'px';
|
|
5585
6063
|
const ref = useRef(null);
|
|
5586
6064
|
const [showToaster, setShowToaster] = useState(true);
|
|
5587
6065
|
const handleToasterClick = e => {
|
|
@@ -5610,63 +6088,111 @@ const Toast = ({
|
|
|
5610
6088
|
style: {
|
|
5611
6089
|
position: 'absolute',
|
|
5612
6090
|
display: 'flex',
|
|
5613
|
-
width: wWidth$1 > 480 ? '440px' : '300px',
|
|
5614
|
-
height: '83px',
|
|
5615
|
-
borderRadius: '40px',
|
|
5616
6091
|
alignItems: 'center',
|
|
5617
6092
|
boxSizing: 'border-box',
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
padding: '14px 29px 14px 12px',
|
|
5621
|
-
justifyContent: 'space-between'
|
|
6093
|
+
justifyContent: 'space-between',
|
|
6094
|
+
...propStyles
|
|
5622
6095
|
},
|
|
5623
6096
|
className: `
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
6097
|
+
${styles$6['notify-block']}
|
|
6098
|
+
${position === 'top-left' ? showToaster ? styles$6['bounce-in-left'] : styles$6['bounce-out-left'] : position === 'top-right' ? showToaster ? styles$6['bounce-in-right'] : styles$6['bounce-out-right'] : position === 'top-center' ? showToaster ? styles$6['bounce-in-left'] : styles$6['bounce-out-left'] : position === 'bottom-left' ? showToaster ? styles$6['bounce-in-left'] : styles$6['bounce-out-left'] : position === 'bottom-right' ? showToaster ? styles$6['bounce-in-right'] : styles$6['bounce-out-right'] : position === 'bottom-center' ? showToaster ? styles$6['bounce-in-left'] : styles$6['bounce-out-left'] : ''}
|
|
6099
|
+
`
|
|
5627
6100
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5628
6101
|
style: {
|
|
5629
6102
|
display: 'flex',
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
6103
|
+
height: `calc(${propStyles.height} - 28px)`,
|
|
6104
|
+
width: `calc(${propStyles.height} - 28px)`,
|
|
6105
|
+
minWidth: '30px',
|
|
6106
|
+
minHeight: '30px',
|
|
6107
|
+
borderRadius: '50%',
|
|
5633
6108
|
alignItems: 'center',
|
|
5634
6109
|
justifyContent: 'center'
|
|
5635
6110
|
}
|
|
5636
|
-
}, type === 'info' ?
|
|
6111
|
+
}, type === 'info' ? icons.info ? /*#__PURE__*/React__default.createElement("img", {
|
|
6112
|
+
src: icons.info,
|
|
6113
|
+
alt: "icons",
|
|
5637
6114
|
style: {
|
|
6115
|
+
width: '100%',
|
|
5638
6116
|
height: '100%',
|
|
5639
|
-
|
|
6117
|
+
objectFit: 'cover',
|
|
6118
|
+
objectPosition: 'center'
|
|
5640
6119
|
}
|
|
5641
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
6120
|
+
}) : /*#__PURE__*/React__default.createElement(SvgToasterInfo, null) : type === 'warn' ? icons.warn ? /*#__PURE__*/React__default.createElement("img", {
|
|
6121
|
+
src: icons.warn,
|
|
6122
|
+
alt: "icons",
|
|
6123
|
+
style: {
|
|
6124
|
+
width: '100%',
|
|
6125
|
+
height: '100%',
|
|
6126
|
+
objectFit: 'cover',
|
|
6127
|
+
objectPosition: 'center'
|
|
6128
|
+
}
|
|
6129
|
+
}) : /*#__PURE__*/React__default.createElement(SvgToasterWarning, null) : type === 'error' ? icons.error ? /*#__PURE__*/React__default.createElement("img", {
|
|
6130
|
+
src: icons.error,
|
|
6131
|
+
alt: "icons",
|
|
6132
|
+
style: {
|
|
6133
|
+
width: '100%',
|
|
6134
|
+
height: '100%',
|
|
6135
|
+
objectFit: 'cover',
|
|
6136
|
+
objectPosition: 'center'
|
|
6137
|
+
}
|
|
6138
|
+
}) : /*#__PURE__*/React__default.createElement(SvgToasterError, null) : type === 'success' ? icons.success ? /*#__PURE__*/React__default.createElement("img", {
|
|
6139
|
+
src: icons.success,
|
|
6140
|
+
alt: "icons",
|
|
6141
|
+
style: {
|
|
6142
|
+
width: '100%',
|
|
6143
|
+
height: '100%',
|
|
6144
|
+
objectFit: 'cover',
|
|
6145
|
+
objectPosition: 'center'
|
|
6146
|
+
}
|
|
6147
|
+
}) : /*#__PURE__*/React__default.createElement(SvgToasterSuccess, null) : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
6148
|
+
style: {
|
|
6149
|
+
height: '100%',
|
|
6150
|
+
width: `calc(100% - ${finalCheck})`,
|
|
6151
|
+
minWidth: '50%',
|
|
6152
|
+
maxWidth: 'calc(100% - 90px)'
|
|
6153
|
+
}
|
|
6154
|
+
}, title && /*#__PURE__*/React__default.createElement("p", {
|
|
5642
6155
|
style: {
|
|
5643
6156
|
margin: '0px',
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
lineHeight:
|
|
5648
|
-
|
|
6157
|
+
color: titleStyles.color,
|
|
6158
|
+
fontSize: titleStyles.font.size,
|
|
6159
|
+
fontStyle: titleStyles.font.style,
|
|
6160
|
+
lineHeight: titleStyles.lineHeight,
|
|
6161
|
+
fontWeight: titleStyles.font.weight,
|
|
6162
|
+
fontFamily: titleStyles.font.family,
|
|
6163
|
+
...titleStyles.props
|
|
5649
6164
|
},
|
|
5650
|
-
className: styles$
|
|
5651
|
-
}, title
|
|
6165
|
+
className: styles$6['notify-title']
|
|
6166
|
+
}, title), description && /*#__PURE__*/React__default.createElement("span", {
|
|
5652
6167
|
style: {
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
lineHeight:
|
|
5657
|
-
|
|
5658
|
-
fontFamily:
|
|
5659
|
-
|
|
6168
|
+
color: descriptionStyles.color,
|
|
6169
|
+
fontSize: descriptionStyles.font.size,
|
|
6170
|
+
fontStyle: descriptionStyles.font.style,
|
|
6171
|
+
lineHeight: descriptionStyles.lineHeight,
|
|
6172
|
+
fontWeight: descriptionStyles.font.weight,
|
|
6173
|
+
fontFamily: descriptionStyles.font.family,
|
|
6174
|
+
...descriptionStyles.props
|
|
5660
6175
|
},
|
|
5661
|
-
className: styles$
|
|
5662
|
-
}, description
|
|
6176
|
+
className: styles$6['notify-desc']
|
|
6177
|
+
}, description)), /*#__PURE__*/React__default.createElement("div", {
|
|
5663
6178
|
onClick: () => handleCloseToaster(ref),
|
|
5664
6179
|
style: {
|
|
5665
|
-
width:
|
|
5666
|
-
height:
|
|
6180
|
+
width: `calc(${propStyles.height} - 65px)`,
|
|
6181
|
+
height: `calc(${propStyles.height} - 65px)`,
|
|
6182
|
+
minWidth: '18px',
|
|
6183
|
+
minHeight: '18px',
|
|
5667
6184
|
cursor: 'pointer'
|
|
5668
6185
|
}
|
|
5669
|
-
},
|
|
6186
|
+
}, icons.close ? /*#__PURE__*/React__default.createElement("img", {
|
|
6187
|
+
src: icons.close,
|
|
6188
|
+
alt: "icons",
|
|
6189
|
+
style: {
|
|
6190
|
+
width: '100%',
|
|
6191
|
+
height: '100%',
|
|
6192
|
+
objectFit: 'cover',
|
|
6193
|
+
objectPosition: 'center'
|
|
6194
|
+
}
|
|
6195
|
+
}) : /*#__PURE__*/React__default.createElement(SvgToasterClose, null)));
|
|
5670
6196
|
};
|
|
5671
6197
|
Toast.propTypes = {
|
|
5672
6198
|
timer: PropTypes.number,
|
|
@@ -5679,7 +6205,6 @@ Toast.propTypes = {
|
|
|
5679
6205
|
|
|
5680
6206
|
let toastify = document.getElementById('toastify');
|
|
5681
6207
|
let path = window.location.href;
|
|
5682
|
-
let wWidth = window.innerWidth;
|
|
5683
6208
|
const removeToast = ref => {
|
|
5684
6209
|
if (ref.current) {
|
|
5685
6210
|
const node = ref.current;
|
|
@@ -5695,15 +6220,66 @@ const removeToast = ref => {
|
|
|
5695
6220
|
}
|
|
5696
6221
|
}
|
|
5697
6222
|
};
|
|
6223
|
+
const createElem$1 = (type, timer, title, position, styleProps, toastBlock, description, innerConfigStyles) => {
|
|
6224
|
+
const projectTitleStyle = styleProps?.title;
|
|
6225
|
+
const packageTitleStyle = innerConfigStyles?.TOASTER?.title;
|
|
6226
|
+
const compareTitleStyles = _.merge({
|
|
6227
|
+
...packageTitleStyle
|
|
6228
|
+
}, {
|
|
6229
|
+
...projectTitleStyle
|
|
6230
|
+
});
|
|
6231
|
+
const projectDescStyle = styleProps?.description;
|
|
6232
|
+
const packageDescStyle = innerConfigStyles?.TOASTER?.description;
|
|
6233
|
+
const compareDescStyles = _.merge({
|
|
6234
|
+
...packageDescStyle
|
|
6235
|
+
}, {
|
|
6236
|
+
...projectDescStyle
|
|
6237
|
+
});
|
|
6238
|
+
const projectIcons = styleProps?.icons;
|
|
6239
|
+
const packageIcons = innerConfigStyles?.TOASTER?.icons;
|
|
6240
|
+
const icons = _.merge({
|
|
6241
|
+
...packageIcons
|
|
6242
|
+
}, {
|
|
6243
|
+
...projectIcons
|
|
6244
|
+
});
|
|
6245
|
+
toastBlock.style.position = 'relative';
|
|
6246
|
+
toastBlock.style.flexShrink = 0;
|
|
6247
|
+
toastBlock.style.width = styleProps?.width ?? innerConfigStyles?.TOASTER?.width;
|
|
6248
|
+
toastBlock.style.height = styleProps?.height ?? innerConfigStyles?.TOASTER?.height;
|
|
6249
|
+
toastBlock.style.marginBottom = styleProps?.marginBottom ?? innerConfigStyles?.TOASTER?.marginBottom;
|
|
6250
|
+
const newElem = /*#__PURE__*/React__default.createElement(Toast, {
|
|
6251
|
+
type,
|
|
6252
|
+
icons,
|
|
6253
|
+
timer,
|
|
6254
|
+
title,
|
|
6255
|
+
position,
|
|
6256
|
+
description,
|
|
6257
|
+
removeToast,
|
|
6258
|
+
propStyles: {
|
|
6259
|
+
width: styleProps?.width ?? innerConfigStyles?.TOASTER?.width,
|
|
6260
|
+
height: styleProps?.height ?? innerConfigStyles?.TOASTER?.height,
|
|
6261
|
+
padding: styleProps?.padding ?? innerConfigStyles?.TOASTER?.padding,
|
|
6262
|
+
borderWidth: styleProps?.borderWidth ?? innerConfigStyles?.TOASTER?.border.width,
|
|
6263
|
+
borderColor: styleProps?.borderColor ?? innerConfigStyles?.TOASTER?.border.color,
|
|
6264
|
+
borderStyle: styleProps?.borderStyle ?? innerConfigStyles?.TOASTER?.border.style,
|
|
6265
|
+
borderRadius: styleProps?.borderRadius ?? innerConfigStyles?.TOASTER?.border.radius,
|
|
6266
|
+
backgroundColor: styleProps?.backgroundColor ?? innerConfigStyles?.TOASTER?.backgroundColor
|
|
6267
|
+
},
|
|
6268
|
+
titleStyles: compareTitleStyles,
|
|
6269
|
+
descriptionStyles: compareDescStyles
|
|
6270
|
+
});
|
|
6271
|
+
const root = ReactDOM.createRoot(toastBlock);
|
|
6272
|
+
root.render(newElem);
|
|
6273
|
+
};
|
|
5698
6274
|
const createToast = ({
|
|
5699
6275
|
type,
|
|
5700
|
-
icon,
|
|
5701
6276
|
timer,
|
|
5702
6277
|
title,
|
|
5703
6278
|
position,
|
|
5704
|
-
|
|
6279
|
+
styleProps,
|
|
5705
6280
|
description
|
|
5706
6281
|
}) => {
|
|
6282
|
+
let innerConfigStyles = {};
|
|
5707
6283
|
let toastParentBlock;
|
|
5708
6284
|
if (!toastify) {
|
|
5709
6285
|
toastify = document.createElement('div');
|
|
@@ -5711,42 +6287,33 @@ const createToast = ({
|
|
|
5711
6287
|
document.body.appendChild(toastify);
|
|
5712
6288
|
}
|
|
5713
6289
|
const toastBlock = document.createElement('div');
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
icon,
|
|
5722
|
-
timer,
|
|
5723
|
-
title,
|
|
5724
|
-
position,
|
|
5725
|
-
iconClose,
|
|
5726
|
-
description,
|
|
5727
|
-
removeToast
|
|
6290
|
+
configStylesPromise.then(data => {
|
|
6291
|
+
innerConfigStyles = {
|
|
6292
|
+
...data
|
|
6293
|
+
};
|
|
6294
|
+
createElem$1(type, timer, title, position, styleProps, toastBlock, description, innerConfigStyles);
|
|
6295
|
+
}, error => {
|
|
6296
|
+
console.error(error);
|
|
5728
6297
|
});
|
|
5729
|
-
|
|
5730
|
-
root.render(newElem);
|
|
5731
|
-
if (!document.getElementById(styles$5[position]) || document.getElementById(styles$5[position]) == null) {
|
|
6298
|
+
if (!document.getElementById(styles$6[position]) || document.getElementById(styles$6[position]) == null) {
|
|
5732
6299
|
toastParentBlock = document.createElement('div');
|
|
5733
6300
|
toastParentBlock.style.position = 'fixed';
|
|
5734
6301
|
toastParentBlock.style.display = 'flex';
|
|
5735
6302
|
toastParentBlock.style.zIndex = 999999999999;
|
|
5736
6303
|
toastParentBlock.style.flexDirection = position === 'top-left' || position === 'top-right' || position === 'top-center' ? 'column-reverse' : 'column';
|
|
5737
|
-
toastParentBlock.setAttribute('id', styles$
|
|
6304
|
+
toastParentBlock.setAttribute('id', styles$6[position]);
|
|
5738
6305
|
toastParentBlock.appendChild(toastBlock);
|
|
5739
6306
|
toastify.appendChild(toastParentBlock);
|
|
5740
6307
|
} else {
|
|
5741
|
-
document.getElementById(styles$
|
|
6308
|
+
document.getElementById(styles$6[position]).appendChild(toastBlock);
|
|
5742
6309
|
}
|
|
5743
6310
|
};
|
|
5744
6311
|
const toast = {
|
|
5745
6312
|
success: (title, props) => {
|
|
5746
|
-
// const { icon, timer, position, iconClose, description } = props || {}
|
|
5747
6313
|
const {
|
|
5748
6314
|
timer,
|
|
5749
6315
|
position,
|
|
6316
|
+
styleProps,
|
|
5750
6317
|
description
|
|
5751
6318
|
} = props || {};
|
|
5752
6319
|
createToast({
|
|
@@ -5754,16 +6321,15 @@ const toast = {
|
|
|
5754
6321
|
type: 'success',
|
|
5755
6322
|
timer: timer ?? 5000,
|
|
5756
6323
|
position: position ?? 'top-right',
|
|
5757
|
-
description: description ?? ''
|
|
5758
|
-
|
|
5759
|
-
// iconClose: iconClose ?? configStyles.TOASTER.icon.close,
|
|
6324
|
+
description: description ?? '',
|
|
6325
|
+
styleProps: styleProps
|
|
5760
6326
|
});
|
|
5761
6327
|
},
|
|
5762
6328
|
info: (title, props) => {
|
|
5763
|
-
// const { icon, timer, position, iconClose, description } = props || {}
|
|
5764
6329
|
const {
|
|
5765
6330
|
timer,
|
|
5766
6331
|
position,
|
|
6332
|
+
styleProps,
|
|
5767
6333
|
description
|
|
5768
6334
|
} = props || {};
|
|
5769
6335
|
createToast({
|
|
@@ -5771,16 +6337,15 @@ const toast = {
|
|
|
5771
6337
|
type: 'info',
|
|
5772
6338
|
timer: timer ?? 5000,
|
|
5773
6339
|
position: position ?? 'top-right',
|
|
5774
|
-
description: description ?? ''
|
|
5775
|
-
|
|
5776
|
-
// iconClose: iconClose ?? configStyles.TOASTER.icon.close,
|
|
6340
|
+
description: description ?? '',
|
|
6341
|
+
styleProps: styleProps
|
|
5777
6342
|
});
|
|
5778
6343
|
},
|
|
5779
6344
|
warn: (title, props) => {
|
|
5780
|
-
// const { icon, timer, position, iconClose, description } = props || {}
|
|
5781
6345
|
const {
|
|
5782
6346
|
timer,
|
|
5783
6347
|
position,
|
|
6348
|
+
styleProps,
|
|
5784
6349
|
description
|
|
5785
6350
|
} = props || {};
|
|
5786
6351
|
createToast({
|
|
@@ -5788,16 +6353,15 @@ const toast = {
|
|
|
5788
6353
|
type: 'warn',
|
|
5789
6354
|
timer: timer ?? 5000,
|
|
5790
6355
|
position: position ?? 'top-right',
|
|
5791
|
-
description: description ?? ''
|
|
5792
|
-
|
|
5793
|
-
// iconClose: iconClose ?? configStyles.TOASTER.icon.close,
|
|
6356
|
+
description: description ?? '',
|
|
6357
|
+
styleProps: styleProps
|
|
5794
6358
|
});
|
|
5795
6359
|
},
|
|
5796
6360
|
error: (title, props) => {
|
|
5797
|
-
// const { icon, timer, position, iconClose, description } = props || {}
|
|
5798
6361
|
const {
|
|
5799
6362
|
timer,
|
|
5800
6363
|
position,
|
|
6364
|
+
styleProps,
|
|
5801
6365
|
description
|
|
5802
6366
|
} = props || {};
|
|
5803
6367
|
createToast({
|
|
@@ -5805,16 +6369,12 @@ const toast = {
|
|
|
5805
6369
|
type: 'error',
|
|
5806
6370
|
timer: timer ?? 5000,
|
|
5807
6371
|
position: position ?? 'top-right',
|
|
5808
|
-
description: description ?? ''
|
|
5809
|
-
|
|
5810
|
-
// iconClose: iconClose ?? configStyles.TOASTER.icon.close,
|
|
6372
|
+
description: description ?? '',
|
|
6373
|
+
styleProps: styleProps
|
|
5811
6374
|
});
|
|
5812
6375
|
}
|
|
5813
6376
|
};
|
|
5814
|
-
const Toaster = ({
|
|
5815
|
-
className
|
|
5816
|
-
}) => {
|
|
5817
|
-
const [classProps, setClassProps] = useState('');
|
|
6377
|
+
const Toaster = () => {
|
|
5818
6378
|
const [configStyles, setConfigStyles] = useState({});
|
|
5819
6379
|
window.addEventListener('popstate', () => {
|
|
5820
6380
|
if (path !== window.location.href) {
|
|
@@ -5831,12 +6391,8 @@ const Toaster = ({
|
|
|
5831
6391
|
const handleToasterClick = e => {
|
|
5832
6392
|
e.stopPropagation();
|
|
5833
6393
|
};
|
|
5834
|
-
useEffect(() => {
|
|
5835
|
-
className && setClassProps(() => classnames(className ?? configStyles.TOASTER.className));
|
|
5836
|
-
}, [className]);
|
|
5837
6394
|
useEffect(() => {
|
|
5838
6395
|
configStylesPromise.then(data => {
|
|
5839
|
-
setClassProps(() => classnames(className ?? data.TOASTER.className));
|
|
5840
6396
|
setConfigStyles(() => {
|
|
5841
6397
|
return {
|
|
5842
6398
|
...data
|
|
@@ -5848,7 +6404,6 @@ const Toaster = ({
|
|
|
5848
6404
|
}, []);
|
|
5849
6405
|
return configStyles.TOASTER && /*#__PURE__*/React__default.createElement("div", {
|
|
5850
6406
|
onClick: handleToasterClick,
|
|
5851
|
-
className: classProps,
|
|
5852
6407
|
id: "toastify"
|
|
5853
6408
|
});
|
|
5854
6409
|
};
|
|
@@ -5872,10 +6427,24 @@ const SvgTooltip = ({
|
|
|
5872
6427
|
fill: fillColor ? fillColor : '#D1D1D1'
|
|
5873
6428
|
}));
|
|
5874
6429
|
|
|
5875
|
-
var css_248z$
|
|
5876
|
-
var styles$
|
|
5877
|
-
styleInject(css_248z$
|
|
6430
|
+
var css_248z$7 = ".tooltip-module_tooltip-block__v8U9u{align-items:center;display:flex;justify-content:center;position:relative}.tooltip-module_tooltip__emM6A{box-sizing:border-box;padding:10px;position:absolute;z-index:1}.tooltip-module_tooltip-rel__to9gq{align-items:center;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;display:flex;height:auto;justify-content:center;min-height:10px;min-width:30px;position:relative;width:auto}.tooltip-module_tooltip-decor__qvt7t{border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;height:10px;position:absolute;transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);width:10px;z-index:-1}";
|
|
6431
|
+
var styles$5 = {"tooltip-block":"tooltip-module_tooltip-block__v8U9u","tooltip":"tooltip-module_tooltip__emM6A","tooltip-rel":"tooltip-module_tooltip-rel__to9gq","tooltip-decor":"tooltip-module_tooltip-decor__qvt7t"};
|
|
6432
|
+
styleInject(css_248z$7);
|
|
5878
6433
|
|
|
6434
|
+
const TooltipDirections = {
|
|
6435
|
+
TOP: 'top',
|
|
6436
|
+
TOP_LEFT: 'top-left',
|
|
6437
|
+
TOP_RIGHT: 'top-right',
|
|
6438
|
+
LEFT: 'left',
|
|
6439
|
+
LEFT_TOP: 'left-top',
|
|
6440
|
+
LEFT_BOTTOM: 'left-bottom',
|
|
6441
|
+
RIGHT: 'right',
|
|
6442
|
+
RIGHT_TOP: 'right-top',
|
|
6443
|
+
RIGHT_BOTTOM: 'right-bottom',
|
|
6444
|
+
BOTTOM: 'bottom',
|
|
6445
|
+
BOTTOM_TOP: 'bottom-left',
|
|
6446
|
+
BOTTOM_BOTTOM: 'bottom-right'
|
|
6447
|
+
};
|
|
5879
6448
|
const Tooltip = ({
|
|
5880
6449
|
text,
|
|
5881
6450
|
width,
|
|
@@ -5883,6 +6452,7 @@ const Tooltip = ({
|
|
|
5883
6452
|
height,
|
|
5884
6453
|
radius,
|
|
5885
6454
|
fontSize,
|
|
6455
|
+
hoverOpen,
|
|
5886
6456
|
className,
|
|
5887
6457
|
fontStyle,
|
|
5888
6458
|
fontFamily,
|
|
@@ -5892,16 +6462,28 @@ const Tooltip = ({
|
|
|
5892
6462
|
tooltipRadius,
|
|
5893
6463
|
backgroundColor,
|
|
5894
6464
|
tooltipBackgroundColor,
|
|
5895
|
-
|
|
6465
|
+
direction = 'top'
|
|
5896
6466
|
}) => {
|
|
5897
6467
|
const tooltipRef = /*#__PURE__*/createRef(null);
|
|
6468
|
+
const iconBlockRef = /*#__PURE__*/createRef(null);
|
|
6469
|
+
const tooltipIconParentRef = /*#__PURE__*/createRef(null);
|
|
5898
6470
|
const [classProps, setClassProps] = useState({});
|
|
5899
6471
|
const [configStyles, setConfigStyles] = useState({});
|
|
5900
6472
|
const [showTooltip, setShowTooltip] = useState(false);
|
|
5901
6473
|
const [checkTooltipWidth, setCheckTooltipWidth] = useState(0);
|
|
5902
6474
|
const [checkTooltipHeight, setCheckTooltipHeight] = useState(0);
|
|
6475
|
+
const [tooltipIconBlockWidth, setTooltipIconBlockWidth] = useState(0);
|
|
6476
|
+
const [tooltipIconParentWidth, setTooltipIconParentWidth] = useState(0);
|
|
6477
|
+
const [tooltipIconBlockHeight, setTooltipIconBlockHeight] = useState(0);
|
|
6478
|
+
const [tooltipIconParentHeight, setTooltipIconParentHeight] = useState(0);
|
|
5903
6479
|
const handleShow = () => {
|
|
5904
|
-
setShowTooltip(!showTooltip);
|
|
6480
|
+
setShowTooltip(() => !showTooltip);
|
|
6481
|
+
};
|
|
6482
|
+
const handleMouseEnter = () => {
|
|
6483
|
+
setShowTooltip(() => true);
|
|
6484
|
+
};
|
|
6485
|
+
const handleMouseLeave = () => {
|
|
6486
|
+
setShowTooltip(() => false);
|
|
5905
6487
|
};
|
|
5906
6488
|
useEffect(() => {
|
|
5907
6489
|
if (!text) {
|
|
@@ -5910,12 +6492,32 @@ const Tooltip = ({
|
|
|
5910
6492
|
tooltipRef.current && tooltipRef.current.clientWidth && tooltipRef.current.clientWidth > 0 && setCheckTooltipWidth(tooltipRef.current.clientWidth);
|
|
5911
6493
|
tooltipRef.current && tooltipRef.current.clientHeight && tooltipRef.current.clientHeight > 0 && setCheckTooltipHeight(tooltipRef.current.clientHeight);
|
|
5912
6494
|
}, [text, tooltipRef, checkTooltipWidth, checkTooltipHeight]);
|
|
6495
|
+
useEffect(() => {
|
|
6496
|
+
tooltipIconParentRef.current && tooltipIconParentRef.current.clientWidth && tooltipIconParentRef.current.clientWidth > 0 && setTooltipIconParentWidth(tooltipIconParentRef.current.clientWidth);
|
|
6497
|
+
tooltipIconParentRef.current && tooltipIconParentRef.current.clientHeight && tooltipIconParentRef.current.clientHeight > 0 && setTooltipIconParentHeight(tooltipIconParentRef.current.clientHeight);
|
|
6498
|
+
}, [tooltipIconParentRef, tooltipIconParentWidth, tooltipIconParentHeight]);
|
|
6499
|
+
useEffect(() => {
|
|
6500
|
+
iconBlockRef.current && iconBlockRef.current.clientWidth && iconBlockRef.current.clientWidth > 0 && setTooltipIconBlockWidth(iconBlockRef.current.clientWidth);
|
|
6501
|
+
iconBlockRef.current && iconBlockRef.current.clientHeight && iconBlockRef.current.clientHeight > 0 && setTooltipIconBlockHeight(iconBlockRef.current.clientHeight);
|
|
6502
|
+
}, [iconBlockRef, tooltipIconParentWidth, tooltipIconParentHeight]);
|
|
5913
6503
|
useEffect(() => {
|
|
5914
6504
|
className && setClassProps(() => classnames(className ?? configStyles.TOOLTIP.className));
|
|
5915
6505
|
}, [className]);
|
|
6506
|
+
useEffect(() => {
|
|
6507
|
+
document.addEventListener('click', () => {
|
|
6508
|
+
if (showTooltip) {
|
|
6509
|
+
handleShow();
|
|
6510
|
+
}
|
|
6511
|
+
}, false);
|
|
6512
|
+
return () => {
|
|
6513
|
+
document.removeEventListener('click', () => {
|
|
6514
|
+
handleShow();
|
|
6515
|
+
}, false);
|
|
6516
|
+
};
|
|
6517
|
+
}, [showTooltip]);
|
|
5916
6518
|
useEffect(() => {
|
|
5917
6519
|
configStylesPromise.then(data => {
|
|
5918
|
-
setClassProps(() => classnames(styles$
|
|
6520
|
+
setClassProps(() => classnames(styles$5['tooltip-block'], className ?? data.TOOLTIP.className));
|
|
5919
6521
|
setConfigStyles(() => {
|
|
5920
6522
|
return {
|
|
5921
6523
|
...data
|
|
@@ -5926,31 +6528,33 @@ const Tooltip = ({
|
|
|
5926
6528
|
});
|
|
5927
6529
|
}, []);
|
|
5928
6530
|
return configStyles.TOOLTIP && /*#__PURE__*/React__default.createElement("div", {
|
|
6531
|
+
ref: tooltipIconParentRef,
|
|
5929
6532
|
className: classProps,
|
|
5930
6533
|
style: {
|
|
5931
6534
|
width: width ?? configStyles.TOOLTIP.parent.width,
|
|
5932
6535
|
height: height ?? configStyles.TOOLTIP.parent.height,
|
|
5933
6536
|
borderRadius: radius ?? configStyles.TOOLTIP.parent.radius,
|
|
5934
6537
|
backgroundColor: backgroundColor ?? configStyles.TOOLTIP.parent.colors.background
|
|
5935
|
-
}
|
|
6538
|
+
},
|
|
6539
|
+
onClick: e => e.stopPropagation()
|
|
5936
6540
|
}, showTooltip ? /*#__PURE__*/React__default.createElement("div", {
|
|
5937
6541
|
ref: tooltipRef,
|
|
5938
|
-
className: `${styles$
|
|
6542
|
+
className: `${styles$5['tooltip']}`,
|
|
5939
6543
|
style: {
|
|
5940
6544
|
width: tooltipWidth ?? configStyles.TOOLTIP.width,
|
|
5941
6545
|
borderRadius: tooltipRadius ?? configStyles.TOOLTIP.radius,
|
|
5942
6546
|
backgroundColor: tooltipBackgroundColor ?? configStyles.TOOLTIP.colors.background,
|
|
5943
|
-
top:
|
|
5944
|
-
left:
|
|
6547
|
+
top: direction === 'top' || direction === 'top-left' || direction === 'top-right' ? `calc(-${checkTooltipHeight + 7}px)` : direction === 'bottom' || direction === 'bottom-left' || direction === 'bottom-right' ? 'calc(100% + 7px)' : direction === 'left' || direction === 'right' ? `calc(50% - ${checkTooltipHeight / 2}px)` : direction === 'left-top' || direction === 'right-top' ? '0px' : direction === 'left-bottom' || direction === 'right-bottom' ? `calc(-${checkTooltipHeight - tooltipIconParentHeight}px)` : '0px',
|
|
6548
|
+
left: direction === 'top' || direction === 'bottom' ? `calc(50% - ${checkTooltipWidth / 2}px)` : direction === 'left' || direction === 'left-top' || direction === 'left-bottom' ? `-${checkTooltipWidth + 7}px` : direction === 'top-left' || direction === 'bottom-left' ? `0px` : direction === 'top-right' || direction === 'bottom-right' ? `-${checkTooltipWidth - tooltipIconParentWidth}px` : direction === 'right' || direction === 'right-top' || direction === 'right-bottom' ? 'calc(100% + 7px)' : '0px'
|
|
5945
6549
|
}
|
|
5946
6550
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5947
|
-
className: `${styles$
|
|
6551
|
+
className: `${styles$5['tooltip-rel']}`
|
|
5948
6552
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5949
|
-
className: `${styles$
|
|
6553
|
+
className: `${styles$5['tooltip-decor']}`,
|
|
5950
6554
|
style: {
|
|
5951
6555
|
backgroundColor: tooltipBackgroundColor ?? configStyles.TOOLTIP.colors.background,
|
|
5952
|
-
left:
|
|
5953
|
-
top:
|
|
6556
|
+
left: direction === 'top' || direction === 'bottom' ? 'calc(50% - 5px)' : direction === 'right' || direction === 'right-top' || direction === 'right-bottom' ? '-15px' : direction === 'left' || direction === 'left-top' || direction === 'left-bottom' ? 'calc(100% + 5px)' : direction === 'top-left' || direction === 'bottom-left' ? `${tooltipIconParentWidth / 2 - tooltipIconBlockWidth}px` : direction === 'top-right' || direction === 'bottom-right' ? `calc(100% - ${tooltipIconParentWidth / 2 - tooltipIconBlockWidth / 2}px` : '0px',
|
|
6557
|
+
top: direction === 'top' || direction === 'top-left' || direction === 'top-right' ? 'calc(100% + 5px)' : direction === 'bottom' || direction === 'bottom-left' || direction === 'bottom-right' ? '-15px' : direction === 'right' || direction === 'left' ? 'calc(50% - 5px)' : direction === 'left-top' || direction === 'right-top' ? `${tooltipIconParentHeight / 2 - tooltipIconBlockHeight}px` : direction === 'left-bottom' || direction === 'right-bottom' ? `calc(100% - ${tooltipIconParentHeight / 2 - tooltipIconBlockHeight / 2}px` : '0px'
|
|
5954
6558
|
}
|
|
5955
6559
|
}), /*#__PURE__*/React__default.createElement("p", {
|
|
5956
6560
|
style: {
|
|
@@ -5961,18 +6565,22 @@ const Tooltip = ({
|
|
|
5961
6565
|
fontWeight: fontWeight ?? configStyles.TOOLTIP.font.weight
|
|
5962
6566
|
}
|
|
5963
6567
|
}, text))) : '', /*#__PURE__*/React__default.createElement("div", {
|
|
6568
|
+
ref: iconBlockRef,
|
|
6569
|
+
onClick: hoverOpen ? _ => _ : handleShow,
|
|
5964
6570
|
style: {
|
|
6571
|
+
display: 'flex',
|
|
5965
6572
|
cursor: 'pointer'
|
|
5966
6573
|
},
|
|
5967
|
-
|
|
6574
|
+
onMouseEnter: hoverOpen ? handleMouseEnter : _ => _,
|
|
6575
|
+
onMouseLeave: hoverOpen ? handleMouseLeave : _ => _
|
|
5968
6576
|
}, tooltipIcon ? tooltipIcon : configStyles.TOOLTIP.icon ? configStyles.TOOLTIP.icon : /*#__PURE__*/React__default.createElement(SvgTooltip, null)));
|
|
5969
6577
|
};
|
|
5970
6578
|
Tooltip.propTypes = {
|
|
5971
|
-
type: PropTypes.string,
|
|
5972
6579
|
width: PropTypes.string,
|
|
5973
6580
|
color: PropTypes.string,
|
|
5974
6581
|
height: PropTypes.string,
|
|
5975
6582
|
radius: PropTypes.string,
|
|
6583
|
+
hoverOpen: PropTypes.bool,
|
|
5976
6584
|
fontSize: PropTypes.string,
|
|
5977
6585
|
fontStyle: PropTypes.string,
|
|
5978
6586
|
className: PropTypes.string,
|
|
@@ -5983,7 +6591,8 @@ Tooltip.propTypes = {
|
|
|
5983
6591
|
tooltipRadius: PropTypes.string,
|
|
5984
6592
|
text: PropTypes.string.isRequired,
|
|
5985
6593
|
backgroundColor: PropTypes.string,
|
|
5986
|
-
tooltipBackgroundColor: PropTypes.string
|
|
6594
|
+
tooltipBackgroundColor: PropTypes.string,
|
|
6595
|
+
direction: PropTypes.oneOf(Object.values(TooltipDirections))
|
|
5987
6596
|
};
|
|
5988
6597
|
|
|
5989
6598
|
const SvgCaptchaArrowUp = ({
|
|
@@ -6024,9 +6633,9 @@ const SvgCaptchaArrowDown = ({
|
|
|
6024
6633
|
fill: fillColor ? fillColor : '#00236A'
|
|
6025
6634
|
}));
|
|
6026
6635
|
|
|
6027
|
-
var css_248z$
|
|
6028
|
-
var styles$
|
|
6029
|
-
styleInject(css_248z$
|
|
6636
|
+
var css_248z$6 = ".captcha-module_start-point__LkOqy:after{background-color:#d1d1d1;border:2px solid #fff;border-radius:6px;-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;content:\"\";height:10px;left:0;position:absolute;top:7.5px;width:10px;z-index:-1}.captcha-module_range__k24I2{-webkit-appearance:none;margin:0}.captcha-module_range__k24I2::-webkit-slider-runnable-track{-webkit-appearance:none;width:100%}.captcha-module_range-default__-O0QD::-webkit-slider-thumb{background-image:url(../../assets/range-arrow-default.svg)}.captcha-module_range-default__-O0QD::-webkit-slider-thumb,.captcha-module_range-error__FKMfG::-webkit-slider-thumb{-webkit-appearance:none;background-position:-5px;background-repeat:no-repeat;background-size:46px 46px;border-radius:17px;-webkit-border-radius:17px;-moz-border-radius:17px;-ms-border-radius:17px;-o-border-radius:17px;cursor:ew-resize;height:34px;width:34px}.captcha-module_range-error__FKMfG::-webkit-slider-thumb{background-image:url(../../assets/range-arrow-error.svg)}.captcha-module_range-success__VzLPq::-webkit-slider-thumb{-webkit-appearance:none;background-image:url(../../assets/range-arrow-success.svg);background-position:-5px;background-repeat:no-repeat;background-size:46px 46px;border-radius:17px;-webkit-border-radius:17px;-moz-border-radius:17px;-ms-border-radius:17px;-o-border-radius:17px;cursor:ew-resize;height:34px;width:34px}";
|
|
6637
|
+
var styles$4 = {"start-point":"captcha-module_start-point__LkOqy","range":"captcha-module_range__k24I2","range-default":"captcha-module_range-default__-O0QD","range-error":"captcha-module_range-error__FKMfG","range-success":"captcha-module_range-success__VzLPq"};
|
|
6638
|
+
styleInject(css_248z$6);
|
|
6030
6639
|
|
|
6031
6640
|
const Captcha = ({
|
|
6032
6641
|
color,
|
|
@@ -6114,7 +6723,7 @@ const Captcha = ({
|
|
|
6114
6723
|
alignItems: 'center',
|
|
6115
6724
|
zIndex: 1
|
|
6116
6725
|
},
|
|
6117
|
-
className: styles$
|
|
6726
|
+
className: styles$4['start-point']
|
|
6118
6727
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6119
6728
|
style: {
|
|
6120
6729
|
position: 'absolute',
|
|
@@ -6140,8 +6749,8 @@ const Captcha = ({
|
|
|
6140
6749
|
backgroundColor: 'transparent'
|
|
6141
6750
|
},
|
|
6142
6751
|
className: `
|
|
6143
|
-
${styles$
|
|
6144
|
-
${+rangeProgress === rangeNumber ? styles$
|
|
6752
|
+
${styles$4['range']}
|
|
6753
|
+
${+rangeProgress === rangeNumber ? styles$4['range-success'] : +rangeProgress !== rangeNumber && +rangeProgress > 0 ? styles$4['range-error'] : styles$4['range-default']}
|
|
6145
6754
|
`,
|
|
6146
6755
|
onInput: handleRange
|
|
6147
6756
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -6171,9 +6780,9 @@ Captcha.propTypes = {
|
|
|
6171
6780
|
getRange: PropTypes.func.isRequired
|
|
6172
6781
|
};
|
|
6173
6782
|
|
|
6174
|
-
var css_248z$
|
|
6175
|
-
var styles$
|
|
6176
|
-
styleInject(css_248z$
|
|
6783
|
+
var css_248z$5 = ".stepper-module_stepper-container__-OVGy>div:last-child:before{display:none}.stepper-module_activeRing__Lzvh1,.stepper-module_bigRing__5GBm0{border-radius:50%;height:36px;margin-bottom:36px;position:relative;width:36px}.stepper-module_bigRing__5GBm0{box-shadow:0 0 0 2px #d1d1d1}.stepper-module_bigRing__5GBm0:before{background:#d1d1d1}.stepper-module_activeRing__Lzvh1{box-shadow:0 0 0 2px #00236a}.stepper-module_activeRing__Lzvh1:before{background:#00236a}.stepper-module_activeRing__Lzvh1:before,.stepper-module_bigRing__5GBm0:before{border-radius:20px;bottom:-32px;content:\"\";height:28px;left:0;margin:auto;overflow:hidden;position:absolute;right:0;width:2px}.stepper-module_smallActiveRing__im-XG,.stepper-module_smallRing__u-5a8{border-radius:50%;bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.stepper-module_smallRing__u-5a8{background-color:#d1d1d1;height:14px;width:14px}.stepper-module_smallActiveRing__im-XG{align-items:center;background-color:#00236a;color:#fff;display:flex;height:28px;justify-content:center;width:28px}";
|
|
6784
|
+
var styles$3 = {"stepper-container":"stepper-module_stepper-container__-OVGy","bigRing":"stepper-module_bigRing__5GBm0","activeRing":"stepper-module_activeRing__Lzvh1","smallRing":"stepper-module_smallRing__u-5a8","smallActiveRing":"stepper-module_smallActiveRing__im-XG"};
|
|
6785
|
+
styleInject(css_248z$5);
|
|
6177
6786
|
|
|
6178
6787
|
const Stepper = ({
|
|
6179
6788
|
stepLength,
|
|
@@ -6183,11 +6792,11 @@ const Stepper = ({
|
|
|
6183
6792
|
const [classProps, setClassProps] = useState({});
|
|
6184
6793
|
const [configStyles, setConfigStyles] = useState({});
|
|
6185
6794
|
useEffect(() => {
|
|
6186
|
-
className && setClassProps(() => classnames(className ?? configStyles.STEPPER.className, `${styles$
|
|
6795
|
+
className && setClassProps(() => classnames(className ?? configStyles.STEPPER.className, `${styles$3['stepper-container']} stepper-container-rem`));
|
|
6187
6796
|
}, [className]);
|
|
6188
6797
|
useEffect(() => {
|
|
6189
6798
|
configStylesPromise.then(data => {
|
|
6190
|
-
setClassProps(() => classnames(className ?? data.STEPPER.className, `${styles$
|
|
6799
|
+
setClassProps(() => classnames(className ?? data.STEPPER.className, `${styles$3['stepper-container']} stepper-container-rem`));
|
|
6191
6800
|
setConfigStyles(() => {
|
|
6192
6801
|
return {
|
|
6193
6802
|
...data
|
|
@@ -6203,10 +6812,10 @@ const Stepper = ({
|
|
|
6203
6812
|
let steppers = [];
|
|
6204
6813
|
for (let step = 1; step <= stepLength; step++) {
|
|
6205
6814
|
steppers.push( /*#__PURE__*/React__default.createElement("div", {
|
|
6206
|
-
className: classnames(`${step <= activeSteps ? styles$
|
|
6815
|
+
className: classnames(`${step <= activeSteps ? styles$3.activeRing : styles$3.bigRing}`),
|
|
6207
6816
|
key: step
|
|
6208
6817
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6209
|
-
className: classnames(`${step <= activeSteps ? styles$
|
|
6818
|
+
className: classnames(`${step <= activeSteps ? styles$3.smallActiveRing : styles$3.smallRing}`)
|
|
6210
6819
|
}, step <= activeSteps ? step : '')));
|
|
6211
6820
|
}
|
|
6212
6821
|
return steppers;
|
|
@@ -6336,8 +6945,8 @@ Checkbox.propTypes = {
|
|
|
6336
6945
|
data: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object])
|
|
6337
6946
|
};
|
|
6338
6947
|
|
|
6339
|
-
var css_248z$
|
|
6340
|
-
styleInject(css_248z$
|
|
6948
|
+
var css_248z$4 = "textarea{-webkit-appearance:none}textarea::-webkit-scrollbar{width:6px}textarea::-webkit-scrollbar-track{background:#eee}textarea::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-track{border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px}textarea::-webkit-scrollbar-thumb{background:#d1d1d1}";
|
|
6949
|
+
styleInject(css_248z$4);
|
|
6341
6950
|
|
|
6342
6951
|
const PositionSide = {
|
|
6343
6952
|
TOP: 'top',
|
|
@@ -6345,6 +6954,7 @@ const PositionSide = {
|
|
|
6345
6954
|
};
|
|
6346
6955
|
const Textarea = ({
|
|
6347
6956
|
size,
|
|
6957
|
+
name,
|
|
6348
6958
|
style,
|
|
6349
6959
|
family,
|
|
6350
6960
|
weight,
|
|
@@ -6406,23 +7016,26 @@ const Textarea = ({
|
|
|
6406
7016
|
};
|
|
6407
7017
|
const handleChange = e => {
|
|
6408
7018
|
const value = e.target.value;
|
|
6409
|
-
onChange
|
|
7019
|
+
if (onChange) {
|
|
7020
|
+
onChange(value);
|
|
7021
|
+
}
|
|
6410
7022
|
setInnerValue(() => value);
|
|
6411
7023
|
if (maxLength) {
|
|
6412
7024
|
if (value.length > maxLength) {
|
|
6413
|
-
onChange
|
|
7025
|
+
if (onChange) {
|
|
7026
|
+
onChange(value.substr(0, maxLength));
|
|
7027
|
+
}
|
|
7028
|
+
setInnerValue(() => value.substr(0, maxLength));
|
|
6414
7029
|
}
|
|
6415
7030
|
} else {
|
|
6416
7031
|
if (value.length > configStyles.TEXTAREA.maxLength) {
|
|
6417
|
-
onChange
|
|
7032
|
+
if (onChange) {
|
|
7033
|
+
onChange(value.substr(0, configStyles.TEXTAREA.maxLength));
|
|
7034
|
+
}
|
|
7035
|
+
setInnerValue(() => value.substr(0, configStyles.TEXTAREA.maxLength));
|
|
6418
7036
|
}
|
|
6419
7037
|
}
|
|
6420
7038
|
};
|
|
6421
|
-
useEffect(() => {
|
|
6422
|
-
if (!onChange) {
|
|
6423
|
-
alert('Please add onChange function on Textarea component');
|
|
6424
|
-
}
|
|
6425
|
-
}, [onChange]);
|
|
6426
7039
|
useEffect(() => {
|
|
6427
7040
|
if (value === undefined) {
|
|
6428
7041
|
alert('Please add value prop on Textarea component');
|
|
@@ -6469,7 +7082,7 @@ const Textarea = ({
|
|
|
6469
7082
|
style: {
|
|
6470
7083
|
display: labelDisplay ?? configStyles.TEXTAREA.label.display
|
|
6471
7084
|
}
|
|
6472
|
-
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', showCharacterCount && maxLength && characterCountPosition === 'top' && /*#__PURE__*/React__default.createElement("span", null, maxLength -
|
|
7085
|
+
}, label, required && /*#__PURE__*/React__default.createElement("sup", null, /*#__PURE__*/React__default.createElement(SvgRequired, null))) : '', showCharacterCount && maxLength && characterCountPosition === 'top' && /*#__PURE__*/React__default.createElement("span", null, maxLength - innerValue.length, " \u0576\u056B\u0577")), /*#__PURE__*/React__default.createElement("textarea", {
|
|
6473
7086
|
style: {
|
|
6474
7087
|
width: '100%',
|
|
6475
7088
|
border: 'none',
|
|
@@ -6492,6 +7105,7 @@ const Textarea = ({
|
|
|
6492
7105
|
boxShadow: error ? errorColor ? `0 0 0 2px ${errorColor}` : configStyles.TEXTAREA.error.box.shadow : isFocus ? borderFocusColor ? `0 0 0 2px ${borderFocusColor}` : configStyles.TEXTAREA.box.colors.focus : isHover ? borderHoverColor ? `0 0 0 2px ${borderHoverColor}` : configStyles.TEXTAREA.box.colors.hover : boxShadow ? boxShadow : configStyles.INPUT.box.shadow,
|
|
6493
7106
|
resize: resize ? resize : configStyles.TEXTAREA.resize
|
|
6494
7107
|
},
|
|
7108
|
+
name: name,
|
|
6495
7109
|
value: innerValue,
|
|
6496
7110
|
disabled: disabled,
|
|
6497
7111
|
onBlur: handleBlur,
|
|
@@ -6531,6 +7145,7 @@ const Textarea = ({
|
|
|
6531
7145
|
};
|
|
6532
7146
|
Textarea.propTypes = {
|
|
6533
7147
|
size: PropTypes.string,
|
|
7148
|
+
name: PropTypes.string,
|
|
6534
7149
|
style: PropTypes.string,
|
|
6535
7150
|
family: PropTypes.string,
|
|
6536
7151
|
weight: PropTypes.string,
|
|
@@ -6541,6 +7156,7 @@ Textarea.propTypes = {
|
|
|
6541
7156
|
radius: PropTypes.string,
|
|
6542
7157
|
required: PropTypes.bool,
|
|
6543
7158
|
disabled: PropTypes.bool,
|
|
7159
|
+
onChange: PropTypes.func,
|
|
6544
7160
|
padding: PropTypes.string,
|
|
6545
7161
|
minWidth: PropTypes.string,
|
|
6546
7162
|
maxWidth: PropTypes.string,
|
|
@@ -6569,65 +7185,611 @@ Textarea.propTypes = {
|
|
|
6569
7185
|
borderFocusColor: PropTypes.string,
|
|
6570
7186
|
borderHoverColor: PropTypes.string,
|
|
6571
7187
|
labelMarginBottom: PropTypes.string,
|
|
6572
|
-
onChange: PropTypes.func.isRequired,
|
|
6573
7188
|
characterCountPosition: PropTypes.oneOf(Object.values(PositionSide))
|
|
6574
7189
|
};
|
|
6575
7190
|
|
|
6576
|
-
const
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
7191
|
+
const AccordionItem = ({
|
|
7192
|
+
item,
|
|
7193
|
+
open,
|
|
7194
|
+
index,
|
|
7195
|
+
onClick,
|
|
7196
|
+
openIcon,
|
|
7197
|
+
closeIcon,
|
|
7198
|
+
showIcons,
|
|
7199
|
+
className,
|
|
7200
|
+
titleAlign,
|
|
7201
|
+
multipleOpen,
|
|
7202
|
+
openHoverIcon,
|
|
6588
7203
|
color,
|
|
6589
|
-
weight,
|
|
6590
|
-
radius,
|
|
6591
7204
|
border,
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
children,
|
|
6595
|
-
textAlign,
|
|
7205
|
+
padding,
|
|
7206
|
+
fontSize,
|
|
6596
7207
|
fontStyle,
|
|
6597
|
-
|
|
6598
|
-
textShadow,
|
|
6599
|
-
lineHeight,
|
|
6600
|
-
colorHover,
|
|
7208
|
+
fontWeight,
|
|
6601
7209
|
fontFamily,
|
|
6602
|
-
|
|
6603
|
-
|
|
7210
|
+
borderTop,
|
|
7211
|
+
borderLeft,
|
|
7212
|
+
hoverColor,
|
|
7213
|
+
borderRight,
|
|
7214
|
+
borderRadius,
|
|
7215
|
+
borderBottom,
|
|
7216
|
+
marginBottom,
|
|
6604
7217
|
backgroundColor,
|
|
6605
|
-
|
|
6606
|
-
...props
|
|
7218
|
+
backgroundHoverColor
|
|
6607
7219
|
}) => {
|
|
7220
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
6608
7221
|
const [isHover, setIsHover] = useState(false);
|
|
6609
|
-
const
|
|
6610
|
-
|
|
6611
|
-
|
|
7222
|
+
const handleClick = () => {
|
|
7223
|
+
onClick(item, index);
|
|
7224
|
+
if (multipleOpen) {
|
|
7225
|
+
setIsOpen(() => !isOpen);
|
|
7226
|
+
}
|
|
7227
|
+
};
|
|
6612
7228
|
const handleMouseEnter = () => {
|
|
6613
|
-
setIsHover(true);
|
|
7229
|
+
setIsHover(() => true);
|
|
6614
7230
|
};
|
|
6615
7231
|
const handleMouseLeave = () => {
|
|
6616
|
-
setIsHover(false);
|
|
7232
|
+
setIsHover(() => false);
|
|
6617
7233
|
};
|
|
6618
|
-
|
|
7234
|
+
useEffect(() => {
|
|
7235
|
+
setIsOpen(() => open);
|
|
7236
|
+
}, [open]);
|
|
7237
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7238
|
+
className: className,
|
|
6619
7239
|
style: {
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
7240
|
+
marginBottom: marginBottom ? marginBottom : '0px'
|
|
7241
|
+
}
|
|
7242
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7243
|
+
onClick: handleClick,
|
|
7244
|
+
onMouseEnter: handleMouseEnter,
|
|
7245
|
+
onMouseLeave: handleMouseLeave,
|
|
7246
|
+
style: {
|
|
7247
|
+
display: 'flex',
|
|
7248
|
+
cursor: 'pointer',
|
|
7249
|
+
padding: padding,
|
|
7250
|
+
alignItems: 'center',
|
|
7251
|
+
borderRadius: borderRadius,
|
|
7252
|
+
borderTop: borderTop ? border : 'none',
|
|
7253
|
+
borderLeft: borderLeft ? border : 'none',
|
|
7254
|
+
borderRight: borderRight ? border : 'none',
|
|
7255
|
+
borderBottom: borderBottom ? border : 'none',
|
|
7256
|
+
justifyContent: showIcons ? 'space-between' : 'flex-start',
|
|
7257
|
+
backgroundColor: isHover ? backgroundHoverColor : backgroundColor
|
|
7258
|
+
}
|
|
7259
|
+
}, item.title && /*#__PURE__*/React__default.createElement("p", {
|
|
7260
|
+
style: {
|
|
7261
|
+
width: '90%',
|
|
7262
|
+
margin: '0px',
|
|
7263
|
+
fontSize: fontSize,
|
|
7264
|
+
overflow: 'hidden',
|
|
7265
|
+
whiteSpace: 'nowrap',
|
|
7266
|
+
fontStyle: fontStyle,
|
|
7267
|
+
fontWeight: fontWeight,
|
|
7268
|
+
fontFamily: fontFamily,
|
|
7269
|
+
textOverflow: 'ellipsis',
|
|
7270
|
+
textAlign: titleAlign ? titleAlign : 'left',
|
|
7271
|
+
color: isOpen ? hoverColor : isHover ? hoverColor : color
|
|
7272
|
+
}
|
|
7273
|
+
}, item.title), showIcons && /*#__PURE__*/React__default.createElement("div", {
|
|
7274
|
+
style: {
|
|
7275
|
+
display: 'flex',
|
|
7276
|
+
width: 'fit-content',
|
|
7277
|
+
height: 'fit-content',
|
|
7278
|
+
minWidth: '14px',
|
|
7279
|
+
minHeight: '14px',
|
|
7280
|
+
alignItems: 'center',
|
|
7281
|
+
justifyContent: 'center'
|
|
7282
|
+
}
|
|
7283
|
+
}, isOpen ? closeIcon : isHover ? openHoverIcon ? openHoverIcon : openIcon : openIcon)), /*#__PURE__*/React__default.createElement("div", {
|
|
7284
|
+
style: {
|
|
7285
|
+
overflow: 'hidden',
|
|
7286
|
+
height: isOpen ? 'auto' : '0px'
|
|
7287
|
+
}
|
|
7288
|
+
}, item.content ? item.content : ''));
|
|
7289
|
+
};
|
|
7290
|
+
AccordionItem.propTypes = {
|
|
7291
|
+
open: PropTypes.bool
|
|
7292
|
+
};
|
|
7293
|
+
|
|
7294
|
+
const SvgGreenplus = ({
|
|
7295
|
+
title,
|
|
7296
|
+
titleId,
|
|
7297
|
+
...props
|
|
7298
|
+
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
7299
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7300
|
+
width: "1em",
|
|
7301
|
+
height: "1em",
|
|
7302
|
+
fill: "none",
|
|
7303
|
+
viewBox: "0 0 16 16",
|
|
7304
|
+
"aria-labelledby": titleId
|
|
7305
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
7306
|
+
id: titleId
|
|
7307
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
7308
|
+
stroke: "#009B8B",
|
|
7309
|
+
strokeLinecap: "round",
|
|
7310
|
+
strokeLinejoin: "round",
|
|
7311
|
+
strokeWidth: 1.6,
|
|
7312
|
+
d: "M8 1v14M1 8h14"
|
|
7313
|
+
}));
|
|
7314
|
+
|
|
7315
|
+
const SvgGreenminus = ({
|
|
7316
|
+
title,
|
|
7317
|
+
titleId,
|
|
7318
|
+
...props
|
|
7319
|
+
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
7320
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7321
|
+
width: "1em",
|
|
7322
|
+
height: "1em",
|
|
7323
|
+
fill: "none",
|
|
7324
|
+
viewBox: "0 0 16 2",
|
|
7325
|
+
"aria-labelledby": titleId
|
|
7326
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
7327
|
+
id: titleId
|
|
7328
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
7329
|
+
stroke: "#009B8B",
|
|
7330
|
+
strokeLinecap: "round",
|
|
7331
|
+
strokeLinejoin: "round",
|
|
7332
|
+
strokeWidth: 1.6,
|
|
7333
|
+
d: "M1 1h14"
|
|
7334
|
+
}));
|
|
7335
|
+
|
|
7336
|
+
var css_248z$3 = "";
|
|
7337
|
+
styleInject(css_248z$3);
|
|
7338
|
+
|
|
7339
|
+
const Accordion = ({
|
|
7340
|
+
data,
|
|
7341
|
+
click,
|
|
7342
|
+
openIcon,
|
|
7343
|
+
closeIcon,
|
|
7344
|
+
className,
|
|
7345
|
+
showIcons,
|
|
7346
|
+
titleAlign,
|
|
7347
|
+
multipleOpen,
|
|
7348
|
+
openHoverIcon,
|
|
7349
|
+
borderTop,
|
|
7350
|
+
borderLeft,
|
|
7351
|
+
borderRight,
|
|
7352
|
+
borderColor,
|
|
7353
|
+
borderWidth,
|
|
7354
|
+
borderStyle,
|
|
7355
|
+
borderBottom,
|
|
7356
|
+
borderRadius,
|
|
7357
|
+
fontSize,
|
|
7358
|
+
fontStyle,
|
|
7359
|
+
fontWeight,
|
|
7360
|
+
fontFamily,
|
|
7361
|
+
color,
|
|
7362
|
+
padding,
|
|
7363
|
+
hoverColor,
|
|
7364
|
+
marginBottom,
|
|
7365
|
+
backgroundColor,
|
|
7366
|
+
backgroundHoverColor
|
|
7367
|
+
}) => {
|
|
7368
|
+
const [openIndex, setOpenIndex] = useState(-1);
|
|
7369
|
+
const [classProps, setClassProps] = useState({});
|
|
7370
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
7371
|
+
const handleClick = (item, index) => {
|
|
7372
|
+
if (click) {
|
|
7373
|
+
click(item);
|
|
7374
|
+
}
|
|
7375
|
+
if (!multipleOpen) {
|
|
7376
|
+
setOpenIndex(() => openIndex === index ? -1 : index);
|
|
7377
|
+
}
|
|
7378
|
+
};
|
|
7379
|
+
useEffect(() => {
|
|
7380
|
+
className && setClassProps(() => classnames(className ?? configStyles.BUTTON.className));
|
|
7381
|
+
}, [className]);
|
|
7382
|
+
useEffect(() => {
|
|
7383
|
+
configStylesPromise.then(data => {
|
|
7384
|
+
setClassProps(() => classnames(className ?? data.BUTTON.className));
|
|
7385
|
+
setConfigStyles(() => {
|
|
7386
|
+
return {
|
|
7387
|
+
...data
|
|
7388
|
+
};
|
|
7389
|
+
});
|
|
7390
|
+
}, error => {
|
|
7391
|
+
console.error(error);
|
|
7392
|
+
});
|
|
7393
|
+
}, []);
|
|
7394
|
+
return configStyles.ACCORDION && /*#__PURE__*/React__default.createElement("div", {
|
|
7395
|
+
style: {
|
|
7396
|
+
width: '100%'
|
|
7397
|
+
}
|
|
7398
|
+
}, data && data.length ? data.map((item, index) => {
|
|
7399
|
+
return /*#__PURE__*/React__default.createElement(AccordionItem, {
|
|
7400
|
+
item: item,
|
|
7401
|
+
index: index,
|
|
7402
|
+
onClick: handleClick,
|
|
7403
|
+
titleAlign: titleAlign,
|
|
7404
|
+
multipleOpen: multipleOpen,
|
|
7405
|
+
key: `${item.title}__TUI__${index}`,
|
|
7406
|
+
open: openIndex === index ? true : false,
|
|
7407
|
+
showIcons: showIcons ?? configStyles.ACCORDION.showIcons,
|
|
7408
|
+
openIcon: openIcon ? /*#__PURE__*/React__default.createElement("img", {
|
|
7409
|
+
src: openIcon,
|
|
7410
|
+
alt: "open icon"
|
|
7411
|
+
}) : configStyles.ACCORDION.icon.open ? /*#__PURE__*/React__default.createElement("img", {
|
|
7412
|
+
src: configStyles.ACCORDION.icon.open,
|
|
7413
|
+
alt: "open icon"
|
|
7414
|
+
}) : /*#__PURE__*/React__default.createElement(SvgGreenplus, null),
|
|
7415
|
+
openHoverIcon: openHoverIcon ? /*#__PURE__*/React__default.createElement("img", {
|
|
7416
|
+
src: openHoverIcon,
|
|
7417
|
+
alt: "open icon"
|
|
7418
|
+
}) : configStyles.ACCORDION.icon.openHover ? /*#__PURE__*/React__default.createElement("img", {
|
|
7419
|
+
src: configStyles.ACCORDION.icon.openHover,
|
|
7420
|
+
alt: "open icon"
|
|
7421
|
+
}) : /*#__PURE__*/React__default.createElement(SvgGreenplus, null),
|
|
7422
|
+
closeIcon: closeIcon ? /*#__PURE__*/React__default.createElement("img", {
|
|
7423
|
+
src: closeIcon,
|
|
7424
|
+
alt: "close icon"
|
|
7425
|
+
}) : configStyles.ACCORDION.icon.close ? /*#__PURE__*/React__default.createElement("img", {
|
|
7426
|
+
src: configStyles.ACCORDION.icon.close,
|
|
7427
|
+
alt: "close icon"
|
|
7428
|
+
}) : /*#__PURE__*/React__default.createElement(SvgGreenminus, null),
|
|
7429
|
+
className: classProps,
|
|
7430
|
+
color: color ?? configStyles.ACCORDION.color,
|
|
7431
|
+
padding: padding ?? configStyles.ACCORDION.padding,
|
|
7432
|
+
fontSize: fontSize ?? configStyles.ACCORDION.font.size,
|
|
7433
|
+
fontStyle: fontStyle ?? configStyles.ACCORDION.font.style,
|
|
7434
|
+
fontWeight: fontWeight ?? configStyles.ACCORDION.font.weight,
|
|
7435
|
+
fontFamily: fontFamily ?? configStyles.ACCORDION.font.family,
|
|
7436
|
+
hoverColor: hoverColor ?? configStyles.ACCORDION.colors.hover,
|
|
7437
|
+
marginBottom: marginBottom ?? configStyles.ACCORDION.marginBottom,
|
|
7438
|
+
border: `
|
|
7439
|
+
${borderWidth ?? configStyles.ACCORDION.border.width}
|
|
7440
|
+
${borderStyle ?? configStyles.ACCORDION.border.style}
|
|
7441
|
+
${openIndex === index ? 'transparent' : borderColor ?? configStyles.ACCORDION.border.color}
|
|
7442
|
+
`,
|
|
7443
|
+
borderTop: borderTop ?? configStyles.ACCORDION.border.top,
|
|
7444
|
+
borderLeft: borderLeft ?? configStyles.ACCORDION.border.left,
|
|
7445
|
+
borderRight: borderRight ?? configStyles.ACCORDION.border.right,
|
|
7446
|
+
borderBottom: borderBottom ?? configStyles.ACCORDION.border.bottom,
|
|
7447
|
+
borderRadius: borderRadius ?? configStyles.ACCORDION.border.radius,
|
|
7448
|
+
backgroundColor: backgroundColor ?? configStyles.ACCORDION.colors.background,
|
|
7449
|
+
backgroundHoverColor: backgroundHoverColor ?? configStyles.ACCORDION.colors.backgroundHover
|
|
7450
|
+
});
|
|
7451
|
+
}) : '');
|
|
7452
|
+
};
|
|
7453
|
+
Accordion.propTypes = {
|
|
7454
|
+
data: PropTypes.arrayOf(PropTypes.shape({
|
|
7455
|
+
title: PropTypes.string,
|
|
7456
|
+
content: PropTypes.element
|
|
7457
|
+
})),
|
|
7458
|
+
click: PropTypes.func,
|
|
7459
|
+
showIcons: PropTypes.bool,
|
|
7460
|
+
multipleOpen: PropTypes.bool,
|
|
7461
|
+
color: PropTypes.string,
|
|
7462
|
+
hoverColor: PropTypes.string,
|
|
7463
|
+
backgroundColor: PropTypes.string,
|
|
7464
|
+
backgroundHoverColor: PropTypes.string,
|
|
7465
|
+
titleAlign: PropTypes.oneOf(['left', 'center', 'right']),
|
|
7466
|
+
padding: PropTypes.string,
|
|
7467
|
+
openIcon: PropTypes.string,
|
|
7468
|
+
className: PropTypes.string,
|
|
7469
|
+
closeIcon: PropTypes.string,
|
|
7470
|
+
marginBottom: PropTypes.string,
|
|
7471
|
+
openHoverIcon: PropTypes.string,
|
|
7472
|
+
borderTop: PropTypes.bool,
|
|
7473
|
+
borderLeft: PropTypes.bool,
|
|
7474
|
+
borderRight: PropTypes.bool,
|
|
7475
|
+
borderBottom: PropTypes.bool,
|
|
7476
|
+
borderColor: PropTypes.string,
|
|
7477
|
+
borderWidth: PropTypes.string,
|
|
7478
|
+
borderStyle: PropTypes.string,
|
|
7479
|
+
borderRadius: PropTypes.string,
|
|
7480
|
+
fontSize: PropTypes.string,
|
|
7481
|
+
fontStyle: PropTypes.string,
|
|
7482
|
+
fontWeight: PropTypes.number,
|
|
7483
|
+
fontFamily: PropTypes.string
|
|
7484
|
+
};
|
|
7485
|
+
|
|
7486
|
+
const Swipe = ({
|
|
7487
|
+
id,
|
|
7488
|
+
title,
|
|
7489
|
+
child,
|
|
7490
|
+
props,
|
|
7491
|
+
innerConfigStyles
|
|
7492
|
+
}) => {
|
|
7493
|
+
const {
|
|
7494
|
+
SWIPEMODAL
|
|
7495
|
+
} = innerConfigStyles || {};
|
|
7496
|
+
const {
|
|
7497
|
+
width,
|
|
7498
|
+
height,
|
|
7499
|
+
titleStyle,
|
|
7500
|
+
position,
|
|
7501
|
+
borderRadius,
|
|
7502
|
+
callClose,
|
|
7503
|
+
showCloseIcon
|
|
7504
|
+
} = props || {};
|
|
7505
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7506
|
+
style: {
|
|
7507
|
+
width: '100%',
|
|
7508
|
+
height: '100%'
|
|
7509
|
+
}
|
|
7510
|
+
}, (title || showCloseIcon) && /*#__PURE__*/React__default.createElement("div", {
|
|
7511
|
+
style: {
|
|
7512
|
+
width: '100%',
|
|
7513
|
+
display: 'flex',
|
|
7514
|
+
minHeight: '40px',
|
|
7515
|
+
alignItems: 'center',
|
|
7516
|
+
boxSizing: 'border-box',
|
|
7517
|
+
justifyContent: title ? 'space-between' : 'flex-end',
|
|
7518
|
+
padding: titleStyle?.padding ?? SWIPEMODAL.titleStyle.padding,
|
|
7519
|
+
maxHeight: titleStyle?.maxHeight ?? SWIPEMODAL.titleStyle.maxHeight
|
|
7520
|
+
}
|
|
7521
|
+
}, title && /*#__PURE__*/React__default.createElement("h1", {
|
|
7522
|
+
style: {
|
|
7523
|
+
color: titleStyle?.color ?? SWIPEMODAL.titleStyle.color,
|
|
7524
|
+
fontSize: titleStyle?.fontSize ?? SWIPEMODAL.titleStyle.font.size,
|
|
7525
|
+
textAlign: titleStyle?.textAlign ?? SWIPEMODAL.titleStyle.textAlign,
|
|
7526
|
+
fontStyle: titleStyle?.fontStyle ?? SWIPEMODAL.titleStyle.font.style,
|
|
7527
|
+
fontWeight: titleStyle?.fontWeight ?? SWIPEMODAL.titleStyle.font.weight,
|
|
7528
|
+
fontFamily: titleStyle?.fontFamily ?? SWIPEMODAL.titleStyle.font.family
|
|
7529
|
+
}
|
|
7530
|
+
}, title), showCloseIcon && /*#__PURE__*/React__default.createElement("div", {
|
|
7531
|
+
style: {
|
|
7532
|
+
width: '24px',
|
|
7533
|
+
height: '24px',
|
|
7534
|
+
maxWidth: '24px',
|
|
7535
|
+
maxHeight: '24px',
|
|
7536
|
+
cursor: 'pointer'
|
|
7537
|
+
},
|
|
7538
|
+
onClick: hasOwnerProperty(props, 'callClose') && {}.toString.call(callClose) === '[object Function]' ? () => callClose(id) : _ => _
|
|
7539
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
7540
|
+
alt: "close",
|
|
7541
|
+
src: hasOwnerProperty(props, 'closeIcon') && typeof props.closeIcon === 'string' ? props.closeIcon : SWIPEMODAL.closeIcon,
|
|
7542
|
+
style: {
|
|
7543
|
+
width: '100%',
|
|
7544
|
+
height: '100%',
|
|
7545
|
+
objectFit: 'contain',
|
|
7546
|
+
objectPosition: 'center'
|
|
7547
|
+
}
|
|
7548
|
+
}))), child && /*#__PURE__*/React__default.createElement("div", {
|
|
7549
|
+
style: {
|
|
7550
|
+
width: '100%',
|
|
7551
|
+
height: '100%',
|
|
7552
|
+
overflowY: 'auto',
|
|
7553
|
+
overflowX: 'hidden',
|
|
7554
|
+
maxHeight: `calc(100% - ${titleStyle?.maxHeight ?? SWIPEMODAL.titleStyle.maxHeight})`,
|
|
7555
|
+
borderTopLeftRadius: position === 'right' || position === 'bottom' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius,
|
|
7556
|
+
borderTopRightRadius: position === 'left' || position === 'bottom' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius,
|
|
7557
|
+
borderBottomLeftRadius: position === 'right' || position === 'top' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius,
|
|
7558
|
+
borderBottomRightRadius: position === 'left' || position === 'top' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius
|
|
7559
|
+
}
|
|
7560
|
+
}, child));
|
|
7561
|
+
};
|
|
7562
|
+
|
|
7563
|
+
var css_248z$2 = ".swipe-module_to-top__lrHfG{bottom:0}.swipe-module_to-left__kgLsE{right:0}.swipe-module_to-right__Xu3Ul{left:0}.swipe-module_to-bottom__94M7H{top:0}.swipe-module_visible__---aC{visibility:visible!important}.swipe-module_swipe-block__Yv1B3{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.swipe-module_move-top__m6t2O{-webkit-animation-name:swipe-module_slideTop__-Bbap;animation-name:swipe-module_slideTop__-Bbap}.swipe-module_move-left__4TDLs{-webkit-animation-name:swipe-module_slideLeft__i24cS;animation-name:swipe-module_slideLeft__i24cS}.swipe-module_move-right__FrYo0{-webkit-animation-name:swipe-module_slideRight__swgSY;animation-name:swipe-module_slideRight__swgSY}.swipe-module_move-bottom__eYDx6{-webkit-animation-name:swipe-module_slideBottom__TBoZo;animation-name:swipe-module_slideBottom__TBoZo}.swipe-module_back-top__gJZv0{-webkit-animation-name:swipe-module_backTop__32loc;animation-name:swipe-module_backTop__32loc}.swipe-module_back-left__Wd3aY{-webkit-animation-name:swipe-module_backLeft__q89ub;animation-name:swipe-module_backLeft__q89ub}.swipe-module_back-right__Lgwz7{-webkit-animation-name:swipe-module_backRight__8t5Dm;animation-name:swipe-module_backRight__8t5Dm}.swipe-module_back-bottom__JRN-7{-webkit-animation-name:swipe-module_backBottom__lwR8B;animation-name:swipe-module_backBottom__lwR8B}@keyframes swipe-module_slideTop__-Bbap{0%{bottom:-100%}to{bottom:0}}@keyframes swipe-module_slideLeft__i24cS{0%{right:-100%}to{right:0}}@keyframes swipe-module_slideRight__swgSY{0%{left:-100%}to{left:0}}@keyframes swipe-module_slideBottom__TBoZo{0%{top:-100%}to{top:0}}@keyframes swipe-module_backTop__32loc{0%{bottom:0}to{bottom:-100%}}@keyframes swipe-module_backLeft__q89ub{0%{right:0}to{right:-100%}}@keyframes swipe-module_backRight__8t5Dm{0%{left:0}to{left:-100%}}@keyframes swipe-module_backBottom__lwR8B{0%{top:0}to{top:-100%}}";
|
|
7564
|
+
var styles$2 = {"to-top":"swipe-module_to-top__lrHfG","to-left":"swipe-module_to-left__kgLsE","to-right":"swipe-module_to-right__Xu3Ul","to-bottom":"swipe-module_to-bottom__94M7H","visible":"swipe-module_visible__---aC","swipe-block":"swipe-module_swipe-block__Yv1B3","move-top":"swipe-module_move-top__m6t2O","slideTop":"swipe-module_slideTop__-Bbap","move-left":"swipe-module_move-left__4TDLs","slideLeft":"swipe-module_slideLeft__i24cS","move-right":"swipe-module_move-right__FrYo0","slideRight":"swipe-module_slideRight__swgSY","move-bottom":"swipe-module_move-bottom__eYDx6","slideBottom":"swipe-module_slideBottom__TBoZo","back-top":"swipe-module_back-top__gJZv0","backTop":"swipe-module_backTop__32loc","back-left":"swipe-module_back-left__Wd3aY","backLeft":"swipe-module_backLeft__q89ub","back-right":"swipe-module_back-right__Lgwz7","backRight":"swipe-module_backRight__8t5Dm","back-bottom":"swipe-module_back-bottom__JRN-7","backBottom":"swipe-module_backBottom__lwR8B"};
|
|
7565
|
+
styleInject(css_248z$2);
|
|
7566
|
+
|
|
7567
|
+
let swipeCount = 0;
|
|
7568
|
+
const createElem = (id, title, child, props, swipeBlock, innerConfigStyles) => {
|
|
7569
|
+
const {
|
|
7570
|
+
width,
|
|
7571
|
+
height,
|
|
7572
|
+
position = 'left',
|
|
7573
|
+
animation,
|
|
7574
|
+
borderRadius,
|
|
7575
|
+
backgroundColor
|
|
7576
|
+
} = props || {};
|
|
7577
|
+
swipeBlock.style.position = 'absolute';
|
|
7578
|
+
swipeBlock.style.zIndex = swipeCount;
|
|
7579
|
+
swipeBlock.style.backgroundColor = backgroundColor ?? innerConfigStyles.SWIPEMODAL.colors.background;
|
|
7580
|
+
swipeBlock.style.width = position === 'left' || position === 'right' ? width ?? innerConfigStyles.SWIPEMODAL.width : '100%';
|
|
7581
|
+
swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '100%';
|
|
7582
|
+
swipeBlock.style.borderTopLeftRadius = position === 'right' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
7583
|
+
swipeBlock.style.borderTopRightRadius = position === 'left' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
7584
|
+
swipeBlock.style.borderBottomLeftRadius = position === 'right' || position === 'top' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
7585
|
+
swipeBlock.style.borderBottomRightRadius = position === 'left' || position === 'top' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
7586
|
+
swipeBlock.setAttribute('id', id);
|
|
7587
|
+
swipeBlock.setAttribute('closePos', position);
|
|
7588
|
+
swipeBlock.classList.add(styles$2['swipe-block'], position === 'top' ? styles$2['to-top'] : position === 'bottom' ? styles$2['to-bottom'] : position === 'left' ? styles$2['to-left'] : styles$2['to-right']);
|
|
7589
|
+
if (hasOwnerProperty(props, 'animation') && animation === true) {
|
|
7590
|
+
swipeBlock.setAttribute('anime', animation);
|
|
7591
|
+
swipeBlock.classList.add(position === 'top' ? `${hasOwnerProperty(props, 'animation') && animation === true ? styles$2['move-top'] : ''}` : position === 'bottom' ? `${hasOwnerProperty(props, 'animation') && animation === true ? styles$2['move-bottom'] : ''}` : position === 'left' ? `${hasOwnerProperty(props, 'animation') && animation === true ? styles$2['move-left'] : ''}` : `${hasOwnerProperty(props, 'animation') && props.animation === true ? styles$2['move-right'] : ''}`);
|
|
7592
|
+
}
|
|
7593
|
+
const newElem = /*#__PURE__*/React__default.createElement(Swipe, {
|
|
7594
|
+
id,
|
|
7595
|
+
title,
|
|
7596
|
+
child,
|
|
7597
|
+
props,
|
|
7598
|
+
innerConfigStyles
|
|
7599
|
+
});
|
|
7600
|
+
const root = ReactDOM.createRoot(swipeBlock);
|
|
7601
|
+
root.render(newElem);
|
|
7602
|
+
};
|
|
7603
|
+
const createSwipe = (id, title, child, props, swipable) => {
|
|
7604
|
+
let innerConfigStyles = {};
|
|
7605
|
+
const swipeBlock = document.createElement('div');
|
|
7606
|
+
swipeBlock.addEventListener('click', function (e) {
|
|
7607
|
+
e.stopPropagation();
|
|
7608
|
+
});
|
|
7609
|
+
configStylesPromise.then(data => {
|
|
7610
|
+
innerConfigStyles = {
|
|
7611
|
+
...data
|
|
7612
|
+
};
|
|
7613
|
+
createElem(id, title, child, props, swipeBlock, innerConfigStyles);
|
|
7614
|
+
if (!swipable) {
|
|
7615
|
+
swipable = document.createElement('div');
|
|
7616
|
+
swipable.setAttribute('id', 'swipable');
|
|
7617
|
+
swipable.style.position = 'absolute';
|
|
7618
|
+
swipable.style.top = '0px';
|
|
7619
|
+
swipable.style.left = '0px';
|
|
7620
|
+
swipable.style.zIndex = 99999;
|
|
7621
|
+
swipable.style.maxWidth = '100%';
|
|
7622
|
+
swipable.style.maxHeight = '100vh';
|
|
7623
|
+
swipable.style.width = '100%';
|
|
7624
|
+
swipable.style.height = '100%';
|
|
7625
|
+
swipable.style.backgroundColor = props?.parent?.backgroundColor ?? innerConfigStyles.SWIPEMODAL.parent.colors.background;
|
|
7626
|
+
if (props.outSideClose || innerConfigStyles.SWIPEMODAL.outSideClose) {
|
|
7627
|
+
swipable.addEventListener('click', function () {
|
|
7628
|
+
hasOwnerProperty(props, 'callClose') && {}.toString.call(props.callClose) === '[object Function]' ? props.callClose() : '';
|
|
7629
|
+
});
|
|
7630
|
+
}
|
|
7631
|
+
const SwipifyBlock = document.getElementById('swipify_tui');
|
|
7632
|
+
SwipifyBlock.appendChild(swipable);
|
|
7633
|
+
}
|
|
7634
|
+
swipable.appendChild(swipeBlock);
|
|
7635
|
+
}, error => {
|
|
7636
|
+
console.error(error);
|
|
7637
|
+
});
|
|
7638
|
+
};
|
|
7639
|
+
|
|
7640
|
+
// Function to handle removing the element on navigation change
|
|
7641
|
+
const handleNavigationChange = () => {
|
|
7642
|
+
let swipable = document.getElementById('swipable');
|
|
7643
|
+
if (swipable) {
|
|
7644
|
+
swipable.remove();
|
|
7645
|
+
}
|
|
7646
|
+
};
|
|
7647
|
+
|
|
7648
|
+
// Wrap history methods to detect all navigation changes
|
|
7649
|
+
(function (history) {
|
|
7650
|
+
const pushState = history.pushState;
|
|
7651
|
+
const replaceState = history.replaceState;
|
|
7652
|
+
history.pushState = function (state) {
|
|
7653
|
+
const result = pushState.apply(history, arguments);
|
|
7654
|
+
window.dispatchEvent(new Event('navigationchange'));
|
|
7655
|
+
return result;
|
|
7656
|
+
};
|
|
7657
|
+
history.replaceState = function (state) {
|
|
7658
|
+
const result = replaceState.apply(history, arguments);
|
|
7659
|
+
window.dispatchEvent(new Event('navigationchange'));
|
|
7660
|
+
return result;
|
|
7661
|
+
};
|
|
7662
|
+
})(window.history);
|
|
7663
|
+
const swipe = {
|
|
7664
|
+
open: (title = '', id, child, props) => {
|
|
7665
|
+
if (id === undefined || id === null && (typeof id !== 'string' || typeof id !== 'number')) {
|
|
7666
|
+
alert('Please pass valid id prop (string / number) when call swipe.open function');
|
|
7667
|
+
return;
|
|
7668
|
+
}
|
|
7669
|
+
if (swipeCount === 0) {
|
|
7670
|
+
window.addEventListener('popstate', handleNavigationChange);
|
|
7671
|
+
window.addEventListener('navigationchange', handleNavigationChange);
|
|
7672
|
+
}
|
|
7673
|
+
let swipable = document.getElementById('swipable');
|
|
7674
|
+
swipeCount += 1;
|
|
7675
|
+
createSwipe(id, title, child, props, swipable);
|
|
7676
|
+
return Promise.resolve(id);
|
|
7677
|
+
},
|
|
7678
|
+
close: id => {
|
|
7679
|
+
if (id === undefined || id === null && (typeof id !== 'string' || typeof id !== 'number')) {
|
|
7680
|
+
alert('Please pass valid id prop (string / number) when call swipe.close function');
|
|
7681
|
+
}
|
|
7682
|
+
let swipable = document.getElementById('swipable');
|
|
7683
|
+
swipeCount -= 1;
|
|
7684
|
+
const removable = document.getElementById(id);
|
|
7685
|
+
if (swipable && removable) {
|
|
7686
|
+
const animation = removable.getAttribute('anime');
|
|
7687
|
+
const position = removable.getAttribute('closePos');
|
|
7688
|
+
if (animation) {
|
|
7689
|
+
removable.classList.add(position === 'top' ? styles$2['back-top'] : position === 'left' ? styles$2['back-left'] : position === 'right' ? styles$2['back-right'] : styles$2['back-bottom']);
|
|
7690
|
+
setTimeout(() => {
|
|
7691
|
+
swipable.removeChild(removable);
|
|
7692
|
+
if (swipeCount === 0 && swipable) {
|
|
7693
|
+
window.removeEventListener('popstate', handleNavigationChange);
|
|
7694
|
+
window.removeEventListener('navigationchange', handleNavigationChange);
|
|
7695
|
+
const SwipifyBlock = document.getElementById('swipify_tui');
|
|
7696
|
+
SwipifyBlock.removeChild(swipable);
|
|
7697
|
+
}
|
|
7698
|
+
}, 200);
|
|
7699
|
+
} else {
|
|
7700
|
+
swipable.removeChild(removable);
|
|
7701
|
+
if (swipeCount === 0 && swipable) {
|
|
7702
|
+
window.removeEventListener('popstate', handleNavigationChange);
|
|
7703
|
+
window.removeEventListener('navigationchange', handleNavigationChange);
|
|
7704
|
+
const SwipifyBlock = document.getElementById('swipify_tui');
|
|
7705
|
+
SwipifyBlock.removeChild(swipable);
|
|
7706
|
+
}
|
|
7707
|
+
}
|
|
7708
|
+
} else {
|
|
7709
|
+
if (swipeCount === 0 && swipable) {
|
|
7710
|
+
const SwipifyBlock = document.getElementById('swipify_tui');
|
|
7711
|
+
SwipifyBlock.removeChild(swipable);
|
|
7712
|
+
}
|
|
7713
|
+
}
|
|
7714
|
+
}
|
|
7715
|
+
};
|
|
7716
|
+
const SwipeModal = () => {
|
|
7717
|
+
const ref = useRef(null);
|
|
7718
|
+
useEffect(() => {
|
|
7719
|
+
const parentSize = ref.current.parentNode.style.height;
|
|
7720
|
+
if (Number(parentSize.replace(/\D/g, '')) > 0) {
|
|
7721
|
+
ref.current.style.height = '100%';
|
|
7722
|
+
} else {
|
|
7723
|
+
ref.current.style.height = '100vh';
|
|
7724
|
+
}
|
|
7725
|
+
}, [ref]);
|
|
7726
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7727
|
+
ref: ref,
|
|
7728
|
+
id: "swipify_tui",
|
|
7729
|
+
style: {
|
|
7730
|
+
position: 'relative',
|
|
7731
|
+
width: '100%',
|
|
7732
|
+
overflow: 'hidden',
|
|
7733
|
+
zIndex: 1
|
|
7734
|
+
}
|
|
7735
|
+
});
|
|
7736
|
+
};
|
|
7737
|
+
|
|
7738
|
+
const TypographyType = {
|
|
7739
|
+
p: 'p',
|
|
7740
|
+
h1: 'h1',
|
|
7741
|
+
h2: 'h2',
|
|
7742
|
+
h3: 'h3',
|
|
7743
|
+
h4: 'h4',
|
|
7744
|
+
h5: 'h5',
|
|
7745
|
+
h6: 'h6',
|
|
7746
|
+
span: 'span'
|
|
7747
|
+
};
|
|
7748
|
+
const Typography = ({
|
|
7749
|
+
size,
|
|
7750
|
+
color,
|
|
7751
|
+
weight,
|
|
7752
|
+
radius,
|
|
7753
|
+
border,
|
|
7754
|
+
cursor,
|
|
7755
|
+
onClick,
|
|
7756
|
+
children,
|
|
7757
|
+
textAlign,
|
|
7758
|
+
fontStyle,
|
|
7759
|
+
className,
|
|
7760
|
+
textShadow,
|
|
7761
|
+
lineHeight,
|
|
7762
|
+
colorHover,
|
|
7763
|
+
fontFamily,
|
|
7764
|
+
textTransform,
|
|
7765
|
+
textDecoration,
|
|
7766
|
+
backgroundColor,
|
|
7767
|
+
variant = 'p',
|
|
7768
|
+
...props
|
|
7769
|
+
}) => {
|
|
7770
|
+
const [isHover, setIsHover] = useState(false);
|
|
7771
|
+
const [classProps, setClassProps] = useState({});
|
|
7772
|
+
const [configStyles, setConfigStyles] = useState({});
|
|
7773
|
+
const [validVariant, setValidVariant] = useState(false);
|
|
7774
|
+
const handleMouseEnter = () => {
|
|
7775
|
+
setIsHover(true);
|
|
7776
|
+
};
|
|
7777
|
+
const handleMouseLeave = () => {
|
|
7778
|
+
setIsHover(false);
|
|
7779
|
+
};
|
|
7780
|
+
const tagT = configStyles.TYPOGRAPHY && /*#__PURE__*/React__default.createElement(variant, {
|
|
7781
|
+
style: {
|
|
7782
|
+
border: border ?? configStyles.TYPOGRAPHY.border,
|
|
7783
|
+
cursor: cursor ?? configStyles.TYPOGRAPHY.cursor,
|
|
7784
|
+
borderRadius: radius ?? configStyles.TYPOGRAPHY.radius,
|
|
7785
|
+
fontSize: size ?? configStyles.TYPOGRAPHY.font['size' + variant],
|
|
7786
|
+
fontWeight: weight ?? configStyles.TYPOGRAPHY.font['weight' + variant],
|
|
7787
|
+
textShadow: textShadow ?? configStyles.TYPOGRAPHY.text['shadow' + variant],
|
|
7788
|
+
textAlign: textAlign ?? configStyles.TYPOGRAPHY.text['align' + variant],
|
|
7789
|
+
fontStyle: fontStyle ?? configStyles.TYPOGRAPHY.font['style' + variant],
|
|
7790
|
+
lineHeight: lineHeight ?? configStyles.TYPOGRAPHY.text['lineHeight' + variant],
|
|
7791
|
+
fontFamily: fontFamily ?? configStyles.TYPOGRAPHY.font['family' + variant],
|
|
7792
|
+
textTransform: textTransform ?? configStyles.TYPOGRAPHY.text['transform' + variant],
|
|
6631
7793
|
textDecoration: textDecoration ?? configStyles.TYPOGRAPHY.text['decoration' + variant],
|
|
6632
7794
|
backgroundColor: backgroundColor ?? configStyles.TYPOGRAPHY.colors['background' + variant],
|
|
6633
7795
|
color: isHover ? colorHover ? colorHover : color ? color : configStyles.TYPOGRAPHY.colors[variant] : color ? color : configStyles.TYPOGRAPHY.colors[variant]
|
|
@@ -6689,13 +7851,13 @@ const range = (start, end) => {
|
|
|
6689
7851
|
}, (_, idx) => idx + start);
|
|
6690
7852
|
};
|
|
6691
7853
|
const PaginationRange = ({
|
|
6692
|
-
|
|
7854
|
+
innerOffset,
|
|
6693
7855
|
currentTotalCount,
|
|
6694
7856
|
currentPageNumber
|
|
6695
7857
|
}) => {
|
|
6696
7858
|
const paginationRange = useMemo(() => {
|
|
6697
7859
|
const firstPageIndex = 1;
|
|
6698
|
-
const totalPageCount = Math.ceil(currentTotalCount /
|
|
7860
|
+
const totalPageCount = Math.ceil(currentTotalCount / innerOffset);
|
|
6699
7861
|
const lastPageIndex = totalPageCount;
|
|
6700
7862
|
if (7 >= totalPageCount) {
|
|
6701
7863
|
return range(1, totalPageCount);
|
|
@@ -6718,14 +7880,10 @@ const PaginationRange = ({
|
|
|
6718
7880
|
} else {
|
|
6719
7881
|
return range(firstPageIndex, totalPageCount);
|
|
6720
7882
|
}
|
|
6721
|
-
}, [currentTotalCount,
|
|
7883
|
+
}, [currentTotalCount, innerOffset, currentPageNumber]);
|
|
6722
7884
|
return paginationRange;
|
|
6723
7885
|
};
|
|
6724
7886
|
|
|
6725
|
-
var css_248z$1 = ".pagination-module_listItem__b1-WN:focus{background-color:#4caf50;color:#fff}.pagination-module_listItem__b1-WN:hover:not(.pagination-module_active__KwBDp){background-color:#ddd}.pagination-module_pagination-bar__MrtYT>ul{display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px;justify-content:center}.pagination-module_pagination-btn__w8Yh8{border:none;border-radius:6px;outline:none}.pagination-module_pagination-btn__w8Yh8,.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{align-items:center;background-color:#fff;box-shadow:0 0 0 1px #eee;cursor:pointer;display:flex;height:34px;justify-content:center;width:34px}.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{border-radius:6px;flex:0 0 auto;font-size:13px;line-height:16px;position:relative;transition:background-color .24s}.pagination-module_pagination-item__t3emS:hover{background-color:#eee}.pagination-module_pagination-item__t3emS.pagination-module_selected__EXzCA{background-color:#00236a;color:#fff}.pagination-module_pagination-jump-next-arrow__aEVD8,.pagination-module_pagination-jump-next-txt__e7nFj{align-items:center;bottom:0;display:flex;font-size:12px;justify-content:center;left:0;line-height:14px;margin:auto;position:absolute;right:0;top:0;transition:opacity .24s,color .24s}.pagination-module_pagination-jump-next-arrow__aEVD8{opacity:0}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-arrow__aEVD8{opacity:1}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-txt__e7nFj{opacity:0}i{color:#3c393e;font-size:12px;line-height:12px}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}";
|
|
6726
|
-
var styles$1 = {"listItem":"pagination-module_listItem__b1-WN","active":"pagination-module_active__KwBDp","pagination-bar":"pagination-module_pagination-bar__MrtYT","pagination-btn":"pagination-module_pagination-btn__w8Yh8","pagination-item":"pagination-module_pagination-item__t3emS","pagination-jump-next":"pagination-module_pagination-jump-next__LAb9Z","selected":"pagination-module_selected__EXzCA","pagination-jump-next-txt":"pagination-module_pagination-jump-next-txt__e7nFj","pagination-jump-next-arrow":"pagination-module_pagination-jump-next-arrow__aEVD8"};
|
|
6727
|
-
styleInject(css_248z$1);
|
|
6728
|
-
|
|
6729
7887
|
const SvgDots = ({
|
|
6730
7888
|
title,
|
|
6731
7889
|
titleId,
|
|
@@ -6764,57 +7922,51 @@ const SvgNextarrow = ({
|
|
|
6764
7922
|
fill: fillColor ? fillColor : '#3C393E'
|
|
6765
7923
|
}));
|
|
6766
7924
|
|
|
7925
|
+
var css_248z$1 = ".pagination-module_listItem__b1-WN:focus{background-color:#4caf50;color:#fff}.pagination-module_listItem__b1-WN:hover:not(.pagination-module_active__KwBDp){background-color:#ddd}.pagination-module_pagination-bar__MrtYT>ul{display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px;justify-content:center}.pagination-module_pagination-btn__w8Yh8{align-items:center;border:none;cursor:pointer;display:flex;justify-content:center;outline:none}.pagination-module_pagination-item__t3emS,.pagination-module_pagination-jump-next__LAb9Z{align-items:center;cursor:pointer;display:flex;flex:0 0 auto;justify-content:center;position:relative;transition:background-color .24s}.pagination-module_pagination-item__t3emS:hover{background-color:#eee}.pagination-module_pagination-item__t3emS.pagination-module_selected__EXzCA{background-color:#00236a;color:#fff}.pagination-module_pagination-jump-next-arrow__aEVD8,.pagination-module_pagination-jump-next-txt__e7nFj{align-items:center;bottom:0;display:flex;font-size:12px;justify-content:center;left:0;line-height:14px;margin:auto;position:absolute;right:0;top:0;transition:opacity .24s,color .24s}.pagination-module_pagination-jump-next-arrow__aEVD8{opacity:0}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-arrow__aEVD8{opacity:1}.pagination-module_pagination-jump-next__LAb9Z:hover .pagination-module_pagination-jump-next-txt__e7nFj{opacity:0}.pagination-module_show-offset-block__ksPGm{height:34px;margin-left:10px!important;margin-right:4px!important;width:91px}i{color:#3c393e;font-size:12px;line-height:12px}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}";
|
|
7926
|
+
var styles$1 = {"listItem":"pagination-module_listItem__b1-WN","active":"pagination-module_active__KwBDp","pagination-bar":"pagination-module_pagination-bar__MrtYT","pagination-btn":"pagination-module_pagination-btn__w8Yh8","pagination-item":"pagination-module_pagination-item__t3emS","pagination-jump-next":"pagination-module_pagination-jump-next__LAb9Z","selected":"pagination-module_selected__EXzCA","pagination-jump-next-txt":"pagination-module_pagination-jump-next-txt__e7nFj","pagination-jump-next-arrow":"pagination-module_pagination-jump-next-arrow__aEVD8","show-offset-block":"pagination-module_show-offset-block__ksPGm"};
|
|
7927
|
+
styleInject(css_248z$1);
|
|
7928
|
+
|
|
6767
7929
|
const Pagination = ({
|
|
6768
7930
|
goTo,
|
|
6769
|
-
offset
|
|
7931
|
+
offset,
|
|
6770
7932
|
onChange,
|
|
6771
7933
|
className,
|
|
7934
|
+
getOffset,
|
|
6772
7935
|
totalCount,
|
|
6773
|
-
|
|
7936
|
+
showOffset,
|
|
7937
|
+
currentPage,
|
|
7938
|
+
offsetCounts,
|
|
7939
|
+
color,
|
|
7940
|
+
width,
|
|
7941
|
+
height,
|
|
7942
|
+
fontSize,
|
|
7943
|
+
fontStyle,
|
|
7944
|
+
fontWeight,
|
|
7945
|
+
fontFamily,
|
|
7946
|
+
lineHeight,
|
|
7947
|
+
activeColor,
|
|
7948
|
+
hoverColor,
|
|
7949
|
+
backgroundColor,
|
|
7950
|
+
hoverBackgroundColor,
|
|
7951
|
+
activeBackgroundColor,
|
|
7952
|
+
borderColor,
|
|
7953
|
+
borderWidth,
|
|
7954
|
+
borderRadius
|
|
6774
7955
|
}) => {
|
|
6775
7956
|
const [inpVal, setInpVal] = useState('');
|
|
6776
7957
|
const [error, setError] = useState(false);
|
|
7958
|
+
const [isHover, setIsHover] = useState(false);
|
|
6777
7959
|
const [classProps, setClassProps] = useState({});
|
|
7960
|
+
const [offsetArgs, setOffsetArgs] = useState({});
|
|
7961
|
+
const [innerOffset, setInnerOffset] = useState(2);
|
|
6778
7962
|
const [configStyles, setConfigStyles] = useState({});
|
|
7963
|
+
const [innerShowOffset, setInnerShowOffset] = useState(false);
|
|
6779
7964
|
const [currentPageNumber, setCurrentPage] = useState(currentPage);
|
|
6780
7965
|
const [currentTotalCount, setcurrentTotalCount] = useState(totalCount);
|
|
6781
|
-
useEffect(() => {
|
|
6782
|
-
configStylesPromise.then(data => {
|
|
6783
|
-
setClassProps(() => classnames(
|
|
6784
|
-
// TODO: check and remove pagination-bar-rem class
|
|
6785
|
-
styles$1.list, className ?? data.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`));
|
|
6786
|
-
setConfigStyles(() => {
|
|
6787
|
-
return {
|
|
6788
|
-
...data
|
|
6789
|
-
};
|
|
6790
|
-
});
|
|
6791
|
-
}, error => {
|
|
6792
|
-
console.error(error);
|
|
6793
|
-
});
|
|
6794
|
-
}, []);
|
|
6795
|
-
useEffect(() => {
|
|
6796
|
-
className && setClassProps(() => classnames(
|
|
6797
|
-
// TODO: check and remove pagination-bar-rem class
|
|
6798
|
-
styles$1.list, className ?? configStyles.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`));
|
|
6799
|
-
}, [className]);
|
|
6800
|
-
useEffect(() => {
|
|
6801
|
-
setcurrentTotalCount(totalCount);
|
|
6802
|
-
}, [totalCount]);
|
|
6803
|
-
useEffect(() => {
|
|
6804
|
-
setCurrentPage(currentPage);
|
|
6805
|
-
}, [currentPage]);
|
|
6806
|
-
const onPageChange = page => {
|
|
6807
|
-
if (page > 0) {
|
|
6808
|
-
setCurrentPage(page);
|
|
6809
|
-
}
|
|
6810
|
-
};
|
|
6811
|
-
useEffect(() => {
|
|
6812
|
-
onChange(currentPageNumber);
|
|
6813
|
-
}, [currentPageNumber]);
|
|
6814
7966
|
const paginationRange = PaginationRange({
|
|
6815
7967
|
currentPageNumber,
|
|
6816
7968
|
currentTotalCount,
|
|
6817
|
-
|
|
7969
|
+
innerOffset
|
|
6818
7970
|
});
|
|
6819
7971
|
if (currentPageNumber === 0 || paginationRange?.length < 2) {
|
|
6820
7972
|
return null;
|
|
@@ -6856,16 +8008,88 @@ const Pagination = ({
|
|
|
6856
8008
|
if (inpVal <= 1) {
|
|
6857
8009
|
setInpVal(1);
|
|
6858
8010
|
onPageChange(1);
|
|
6859
|
-
} else if (inpVal >= totalCount /
|
|
6860
|
-
setInpVal(Math.ceil(totalCount /
|
|
6861
|
-
onPageChange(Math.ceil(totalCount /
|
|
8011
|
+
} else if (inpVal >= totalCount / innerOffset) {
|
|
8012
|
+
setInpVal(Math.ceil(totalCount / innerOffset));
|
|
8013
|
+
onPageChange(Math.ceil(totalCount / innerOffset));
|
|
6862
8014
|
} else {
|
|
6863
8015
|
onPageChange(inpVal);
|
|
6864
8016
|
}
|
|
6865
8017
|
}
|
|
6866
8018
|
}
|
|
6867
8019
|
};
|
|
8020
|
+
const handleChangeSelect = e => {
|
|
8021
|
+
setInnerOffset(() => {
|
|
8022
|
+
return parseInt(e.value.split('/')[0].trim());
|
|
8023
|
+
});
|
|
8024
|
+
if (getOffset) {
|
|
8025
|
+
getOffset(parseInt(e.value.split('/')[0].trim()));
|
|
8026
|
+
}
|
|
8027
|
+
};
|
|
8028
|
+
const handleMouseEnter = hoverIndex => {
|
|
8029
|
+
setIsHover(hoverIndex);
|
|
8030
|
+
};
|
|
8031
|
+
const handleMouseLeave = () => {
|
|
8032
|
+
setIsHover(false);
|
|
8033
|
+
};
|
|
8034
|
+
const onPageChange = page => {
|
|
8035
|
+
if (page > 0) {
|
|
8036
|
+
setCurrentPage(page);
|
|
8037
|
+
}
|
|
8038
|
+
};
|
|
6868
8039
|
let lastPage = paginationRange[paginationRange.length - 1];
|
|
8040
|
+
useEffect(() => {
|
|
8041
|
+
configStylesPromise.then(data => {
|
|
8042
|
+
setClassProps(() => classnames(
|
|
8043
|
+
// TODO: check and remove pagination-bar-rem class
|
|
8044
|
+
styles$1.list, className ?? data.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`));
|
|
8045
|
+
setConfigStyles(() => {
|
|
8046
|
+
return {
|
|
8047
|
+
...data
|
|
8048
|
+
};
|
|
8049
|
+
});
|
|
8050
|
+
}, error => {
|
|
8051
|
+
console.error(error);
|
|
8052
|
+
});
|
|
8053
|
+
}, []);
|
|
8054
|
+
useEffect(() => {
|
|
8055
|
+
setInnerShowOffset(() => showOffset);
|
|
8056
|
+
if (showOffset && offsetCounts && offsetCounts.length) {
|
|
8057
|
+
const newOptions = offsetCounts.map((innerItem, innerIndex) => {
|
|
8058
|
+
return {
|
|
8059
|
+
item: innerIndex,
|
|
8060
|
+
value: `${innerItem} / Էջ `
|
|
8061
|
+
};
|
|
8062
|
+
});
|
|
8063
|
+
setOffsetArgs(() => {
|
|
8064
|
+
return {
|
|
8065
|
+
showCloseIcon: false,
|
|
8066
|
+
options: newOptions,
|
|
8067
|
+
onChange: handleChangeSelect,
|
|
8068
|
+
defaultOption: `${newOptions[0].value}`,
|
|
8069
|
+
keyNames: {
|
|
8070
|
+
name: 'value',
|
|
8071
|
+
id: 'item'
|
|
8072
|
+
}
|
|
8073
|
+
};
|
|
8074
|
+
});
|
|
8075
|
+
setInnerOffset(() => offsetCounts[0]);
|
|
8076
|
+
}
|
|
8077
|
+
}, [offsetCounts, showOffset]);
|
|
8078
|
+
useEffect(() => {
|
|
8079
|
+
className && setClassProps(() => classnames(
|
|
8080
|
+
// TODO: check and remove pagination-bar-rem class
|
|
8081
|
+
styles$1.list, className ?? configStyles.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`));
|
|
8082
|
+
}, [className]);
|
|
8083
|
+
useEffect(() => {
|
|
8084
|
+
setcurrentTotalCount(totalCount);
|
|
8085
|
+
setInnerOffset(() => offset > totalCount ? totalCount : offset);
|
|
8086
|
+
}, [totalCount, offset]);
|
|
8087
|
+
useEffect(() => {
|
|
8088
|
+
setCurrentPage(currentPage);
|
|
8089
|
+
}, [currentPage]);
|
|
8090
|
+
useEffect(() => {
|
|
8091
|
+
onChange(currentPageNumber);
|
|
8092
|
+
}, [currentPageNumber]);
|
|
6869
8093
|
return configStyles.PAGINATION && /*#__PURE__*/React__default.createElement("div", {
|
|
6870
8094
|
style: {
|
|
6871
8095
|
display: 'flex',
|
|
@@ -6876,6 +8100,20 @@ const Pagination = ({
|
|
|
6876
8100
|
className: classProps
|
|
6877
8101
|
}, /*#__PURE__*/React__default.createElement("ul", null, /*#__PURE__*/React__default.createElement("button", {
|
|
6878
8102
|
style: {
|
|
8103
|
+
width: width ?? configStyles.PAGINATION.width,
|
|
8104
|
+
height: height ?? configStyles.PAGINATION.height,
|
|
8105
|
+
fontSize: fontSize ?? configStyles.PAGINATION.font.size,
|
|
8106
|
+
fontStyle: fontStyle ?? configStyles.PAGINATION.font.style,
|
|
8107
|
+
fontWeight: fontWeight ?? configStyles.PAGINATION.font.weight,
|
|
8108
|
+
fontFamily: fontFamily ?? configStyles.PAGINATION.font.family,
|
|
8109
|
+
lineHeight: lineHeight ?? configStyles.PAGINATION.lineHeight,
|
|
8110
|
+
backgroundColor: backgroundColor ?? configStyles.PAGINATION.backgroundColor,
|
|
8111
|
+
boxShadow: `
|
|
8112
|
+
0 0 0
|
|
8113
|
+
${borderWidth ?? configStyles.PAGINATION.border.width}
|
|
8114
|
+
${borderColor ?? configStyles.PAGINATION.border.color}
|
|
8115
|
+
`,
|
|
8116
|
+
borderRadius: borderRadius ?? configStyles.PAGINATION.border.radius,
|
|
6879
8117
|
transform: 'rotate(180deg)'
|
|
6880
8118
|
},
|
|
6881
8119
|
onClick: onPrevious,
|
|
@@ -6886,7 +8124,17 @@ const Pagination = ({
|
|
|
6886
8124
|
let currentPageIndex = paginationRange.indexOf(currentPageNumber);
|
|
6887
8125
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
6888
8126
|
key: id,
|
|
6889
|
-
className: classnames(`${styles$1['pagination-jump-next']} pagination-jump-next-rem
|
|
8127
|
+
className: classnames(`${styles$1['pagination-jump-next']} pagination-jump-next-rem`),
|
|
8128
|
+
style: {
|
|
8129
|
+
width: width ?? configStyles.PAGINATION.width,
|
|
8130
|
+
height: height ?? configStyles.PAGINATION.height,
|
|
8131
|
+
boxShadow: `
|
|
8132
|
+
0 0 0
|
|
8133
|
+
${borderWidth ?? configStyles.PAGINATION.border.width}
|
|
8134
|
+
${borderColor ?? configStyles.PAGINATION.border.color}
|
|
8135
|
+
`,
|
|
8136
|
+
borderRadius: borderRadius ?? configStyles.PAGINATION.border.radius
|
|
8137
|
+
},
|
|
6890
8138
|
onClick: id < currentPageIndex ? onPreviousFive : onNextFive,
|
|
6891
8139
|
disabled: currentPageIndex === 0 ? true : false
|
|
6892
8140
|
}, id < currentPageIndex ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
|
|
@@ -6905,43 +8153,144 @@ const Pagination = ({
|
|
|
6905
8153
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
6906
8154
|
onClick: () => onPageChange(pageNumber),
|
|
6907
8155
|
key: id,
|
|
6908
|
-
className: classnames(`${
|
|
8156
|
+
className: classnames(`${styles$1['pagination-item']} pagination-item-rem`),
|
|
8157
|
+
onMouseEnter: () => handleMouseEnter(id),
|
|
8158
|
+
onMouseLeave: () => handleMouseLeave(),
|
|
8159
|
+
style: {
|
|
8160
|
+
width: width ?? configStyles.PAGINATION.width,
|
|
8161
|
+
height: height ?? configStyles.PAGINATION.height,
|
|
8162
|
+
fontSize: fontSize ?? configStyles.PAGINATION.font.size,
|
|
8163
|
+
fontStyle: fontStyle ?? configStyles.PAGINATION.font.style,
|
|
8164
|
+
fontWeight: fontWeight ?? configStyles.PAGINATION.font.weight,
|
|
8165
|
+
fontFamily: fontFamily ?? configStyles.PAGINATION.font.family,
|
|
8166
|
+
lineHeight: lineHeight ?? configStyles.PAGINATION.lineHeight,
|
|
8167
|
+
color: `
|
|
8168
|
+
${pageNumber === currentPageNumber ? activeColor ?? configStyles.PAGINATION.colors.active : isHover === id ? hoverColor ?? configStyles.PAGINATION.colors.hover : color ?? configStyles.PAGINATION.color}
|
|
8169
|
+
`,
|
|
8170
|
+
backgroundColor: `
|
|
8171
|
+
${pageNumber === currentPageNumber ? activeBackgroundColor ?? configStyles.PAGINATION.colors.activeBackground : isHover === id ? hoverBackgroundColor ?? configStyles.PAGINATION.colors.hoverBackground : backgroundColor ?? configStyles.PAGINATION.colors.background}
|
|
8172
|
+
`,
|
|
8173
|
+
boxShadow: `
|
|
8174
|
+
0 0 0
|
|
8175
|
+
${borderWidth ?? configStyles.PAGINATION.border.width}
|
|
8176
|
+
${borderColor ?? configStyles.PAGINATION.border.color}
|
|
8177
|
+
`,
|
|
8178
|
+
borderRadius: borderRadius ?? configStyles.PAGINATION.border.radius
|
|
8179
|
+
}
|
|
6909
8180
|
}, pageNumber);
|
|
6910
8181
|
}), /*#__PURE__*/React__default.createElement("button", {
|
|
6911
8182
|
onClick: onNext,
|
|
6912
8183
|
disabled: currentPageNumber === lastPage ? true : false,
|
|
6913
|
-
className: `${styles$1['pagination-btn']} pagination-btn-rem
|
|
6914
|
-
|
|
8184
|
+
className: `${styles$1['pagination-btn']} pagination-btn-rem`,
|
|
8185
|
+
style: {
|
|
8186
|
+
width: width ?? configStyles.PAGINATION.width,
|
|
8187
|
+
height: height ?? configStyles.PAGINATION.height,
|
|
8188
|
+
fontSize: fontSize ?? configStyles.PAGINATION.font.size,
|
|
8189
|
+
fontStyle: fontStyle ?? configStyles.PAGINATION.font.style,
|
|
8190
|
+
fontWeight: fontWeight ?? configStyles.PAGINATION.font.weight,
|
|
8191
|
+
fontFamily: fontFamily ?? configStyles.PAGINATION.font.family,
|
|
8192
|
+
lineHeight: lineHeight ?? configStyles.PAGINATION.lineHeight,
|
|
8193
|
+
backgroundColor: backgroundColor ?? configStyles.PAGINATION.backgroundColor,
|
|
8194
|
+
boxShadow: `
|
|
8195
|
+
0 0 0
|
|
8196
|
+
${borderWidth ?? configStyles.PAGINATION.border.width}
|
|
8197
|
+
${borderColor ?? configStyles.PAGINATION.border.color}
|
|
8198
|
+
`,
|
|
8199
|
+
borderRadius: borderRadius ?? configStyles.PAGINATION.border.radius
|
|
8200
|
+
}
|
|
8201
|
+
}, /*#__PURE__*/React__default.createElement(SvgNextarrow, null))), innerShowOffset && /*#__PURE__*/React__default.createElement("div", {
|
|
8202
|
+
className: "show-offset-block",
|
|
8203
|
+
style: {
|
|
8204
|
+
width: '91px',
|
|
8205
|
+
height: '34px',
|
|
8206
|
+
marginLeft: '10px',
|
|
8207
|
+
marginRight: '3px'
|
|
8208
|
+
}
|
|
8209
|
+
}, /*#__PURE__*/React__default.createElement(Select, _extends({
|
|
8210
|
+
insidePagination: true,
|
|
8211
|
+
selectedMinHeight: "34px",
|
|
8212
|
+
boxShadow: `
|
|
8213
|
+
0 0 0
|
|
8214
|
+
${borderWidth ?? configStyles.PAGINATION.border.width}
|
|
8215
|
+
${borderColor ?? configStyles.PAGINATION.border.color}
|
|
8216
|
+
`,
|
|
8217
|
+
boxShadowHover: `
|
|
8218
|
+
0 0 0
|
|
8219
|
+
${borderWidth ?? configStyles.PAGINATION.border.width}
|
|
8220
|
+
${borderColor ?? configStyles.PAGINATION.border.color}
|
|
8221
|
+
`,
|
|
8222
|
+
selectedFontSize: fontSize ?? configStyles.PAGINATION.font.size,
|
|
8223
|
+
selectedFontStyle: fontStyle ?? configStyles.PAGINATION.font.style,
|
|
8224
|
+
selectedLineHeight: lineHeight ?? configStyles.PAGINATION.lineHeight,
|
|
8225
|
+
selectedFontFamily: fontWeight ?? configStyles.PAGINATION.font.weight,
|
|
8226
|
+
selectedFontWeight: fontFamily ?? configStyles.PAGINATION.font.family,
|
|
8227
|
+
optionItemFontSize: fontSize ?? configStyles.PAGINATION.font.size,
|
|
8228
|
+
optionItemFontStyle: fontStyle ?? configStyles.PAGINATION.font.style,
|
|
8229
|
+
optionItemLineHeight: lineHeight ?? configStyles.PAGINATION.lineHeight,
|
|
8230
|
+
optionItemFontFamily: fontWeight ?? configStyles.PAGINATION.font.weight,
|
|
8231
|
+
optionItemFontWeight: fontFamily ?? configStyles.PAGINATION.font.family
|
|
8232
|
+
}, offsetArgs))), goTo && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("input", {
|
|
6915
8233
|
onKeyDown: handleKeyDown,
|
|
6916
8234
|
onInput: handleChangeInput,
|
|
6917
8235
|
type: "number",
|
|
6918
8236
|
style: {
|
|
6919
|
-
width: '
|
|
6920
|
-
|
|
8237
|
+
width: '55px',
|
|
8238
|
+
border: 'none',
|
|
6921
8239
|
outline: 'none',
|
|
6922
|
-
color: '#3C393E',
|
|
6923
|
-
fontSize: '13px',
|
|
6924
8240
|
margin: '0px 6px',
|
|
6925
|
-
fontWeight: '500',
|
|
6926
8241
|
textAlign: 'center',
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
8242
|
+
color: color ?? configStyles.PAGINATION.color,
|
|
8243
|
+
height: height ?? configStyles.PAGINATION.height,
|
|
8244
|
+
fontSize: fontSize ?? configStyles.PAGINATION.font.size,
|
|
8245
|
+
fontStyle: fontStyle ?? configStyles.PAGINATION.font.style,
|
|
8246
|
+
fontWeight: fontWeight ?? configStyles.PAGINATION.font.weight,
|
|
8247
|
+
fontFamily: fontFamily ?? configStyles.PAGINATION.font.family,
|
|
8248
|
+
lineHeight: lineHeight ?? configStyles.PAGINATION.lineHeight,
|
|
8249
|
+
backgroundColor: backgroundColor ?? configStyles.PAGINATION.backgroundColor,
|
|
8250
|
+
boxShadow: `
|
|
8251
|
+
0 0 0
|
|
8252
|
+
${borderWidth ?? configStyles.PAGINATION.border.width}
|
|
8253
|
+
${borderColor ?? configStyles.PAGINATION.border.color}
|
|
8254
|
+
`,
|
|
8255
|
+
borderRadius: borderRadius ?? configStyles.PAGINATION.border.radius
|
|
6930
8256
|
},
|
|
6931
8257
|
value: inpVal
|
|
6932
8258
|
}), /*#__PURE__*/React__default.createElement("span", {
|
|
6933
8259
|
style: {
|
|
6934
|
-
color:
|
|
6935
|
-
fontSize:
|
|
8260
|
+
color: color ?? configStyles.PAGINATION.color,
|
|
8261
|
+
fontSize: fontSize ?? configStyles.PAGINATION.font.size,
|
|
8262
|
+
fontStyle: fontStyle ?? configStyles.PAGINATION.font.style,
|
|
8263
|
+
fontWeight: fontWeight ?? configStyles.PAGINATION.font.weight,
|
|
8264
|
+
fontFamily: fontFamily ?? configStyles.PAGINATION.font.family,
|
|
8265
|
+
lineHeight: lineHeight ?? configStyles.PAGINATION.lineHeight
|
|
6936
8266
|
}
|
|
6937
8267
|
}, "\u0537\u057B")));
|
|
6938
8268
|
};
|
|
6939
8269
|
Pagination.propTypes = {
|
|
6940
8270
|
goTo: PropTypes.bool,
|
|
6941
8271
|
offset: PropTypes.number,
|
|
6942
|
-
|
|
8272
|
+
getOffset: PropTypes.func,
|
|
8273
|
+
showOffset: PropTypes.bool,
|
|
6943
8274
|
className: PropTypes.string,
|
|
6944
|
-
|
|
8275
|
+
totalCount: PropTypes.number,
|
|
8276
|
+
currentPage: PropTypes.number,
|
|
8277
|
+
offsetCounts: PropTypes.arrayOf(PropTypes.number),
|
|
8278
|
+
color: PropTypes.string,
|
|
8279
|
+
width: PropTypes.string,
|
|
8280
|
+
height: PropTypes.string,
|
|
8281
|
+
fontSize: PropTypes.string,
|
|
8282
|
+
fontWeight: PropTypes.string,
|
|
8283
|
+
fontFamily: PropTypes.string,
|
|
8284
|
+
fontStyle: PropTypes.string,
|
|
8285
|
+
lineHeight: PropTypes.string,
|
|
8286
|
+
activeColor: PropTypes.string,
|
|
8287
|
+
hoverColor: PropTypes.string,
|
|
8288
|
+
backgroundColor: PropTypes.string,
|
|
8289
|
+
hoverBackgroundColor: PropTypes.string,
|
|
8290
|
+
activeBackgroundColor: PropTypes.string,
|
|
8291
|
+
borderColor: PropTypes.string,
|
|
8292
|
+
borderWidth: PropTypes.string,
|
|
8293
|
+
borderRadius: PropTypes.string
|
|
6945
8294
|
};
|
|
6946
8295
|
|
|
6947
8296
|
var css_248z = ".autocomplete-module_auto-complete__oUOv9{appearance:none!important;-webkit-appearance:none!important}";
|
|
@@ -7359,4 +8708,4 @@ Autocomplete.propTypes = {
|
|
|
7359
8708
|
backgroundDisableColor: PropTypes.string
|
|
7360
8709
|
};
|
|
7361
8710
|
|
|
7362
|
-
export { Autocomplete, Button, Captcha, Checkbox, DirectionMode, File, Input, InputTypes, Modal, Pagination, PositionSide, Radio, RadioDirectionMode, Select, Stepper, Table, Textarea, Toaster, Tooltip, Typography, TypographyType, toast };
|
|
8711
|
+
export { Accordion, Autocomplete, Button, Captcha, Checkbox, DirectionMode, File, IconSides, Input, InputTypes, Modal, Pagination, PositionSide, Radio, RadioDirectionMode, Select, Stepper, SwipeModal, Table, Textarea, Toaster, Tooltip, TooltipDirections, Typography, TypographyType, swipe, toast };
|