@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.js
CHANGED
|
@@ -152,6 +152,39 @@ const SvgWrong = ({
|
|
|
152
152
|
fill: "#051942"
|
|
153
153
|
}));
|
|
154
154
|
|
|
155
|
+
const SvgDocIcon = ({
|
|
156
|
+
title,
|
|
157
|
+
titleId,
|
|
158
|
+
...props
|
|
159
|
+
}) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
160
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
161
|
+
width: "1em",
|
|
162
|
+
height: "1em",
|
|
163
|
+
fill: "none",
|
|
164
|
+
viewBox: "0 0 32 32",
|
|
165
|
+
"aria-labelledby": titleId
|
|
166
|
+
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
167
|
+
id: titleId
|
|
168
|
+
}, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
169
|
+
stroke: "#D0D5DD",
|
|
170
|
+
strokeWidth: 1.2,
|
|
171
|
+
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"
|
|
172
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
173
|
+
stroke: "#D0D5DD",
|
|
174
|
+
strokeWidth: 1.2,
|
|
175
|
+
d: "M21.6.4v6a3.2 3.2 0 0 0 3.2 3.2h6"
|
|
176
|
+
}), /*#__PURE__*/React__namespace.createElement("rect", {
|
|
177
|
+
width: 23.8,
|
|
178
|
+
height: 13.2,
|
|
179
|
+
x: 0.5,
|
|
180
|
+
y: 14.2,
|
|
181
|
+
fill: "#3C68FF",
|
|
182
|
+
rx: 1.6
|
|
183
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
184
|
+
fill: "#fff",
|
|
185
|
+
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"
|
|
186
|
+
}));
|
|
187
|
+
|
|
155
188
|
const SvgListItemPdf = ({
|
|
156
189
|
title,
|
|
157
190
|
titleId,
|
|
@@ -263,9 +296,11 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
|
|
|
263
296
|
check,
|
|
264
297
|
radius,
|
|
265
298
|
status,
|
|
299
|
+
iconDoc,
|
|
266
300
|
iconPdf,
|
|
267
301
|
iconPng,
|
|
268
302
|
iconJpg,
|
|
303
|
+
iconDocx,
|
|
269
304
|
iconJpeg,
|
|
270
305
|
iconHeic,
|
|
271
306
|
iconWrong,
|
|
@@ -405,7 +440,7 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
|
|
|
405
440
|
style: {
|
|
406
441
|
width: '32px'
|
|
407
442
|
}
|
|
408
|
-
}, fileFormat === 'pdf' ? iconPdf ? iconPdf : /*#__PURE__*/React__default["default"].createElement(SvgListItemPdf, null) : fileFormat === 'jpg' ? iconJpg ? iconJpg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpg, null) : fileFormat === 'png' ? iconPng ? iconPng : /*#__PURE__*/React__default["default"].createElement(SvgListItemPng, null) : fileFormat === 'jpeg' ? iconJpeg ? iconJpeg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpeg, null) : fileFormat === 'heic' || fileFormat === 'heif' ? iconHeic ? iconHeic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
443
|
+
}, fileFormat === 'pdf' ? iconPdf ? iconPdf : /*#__PURE__*/React__default["default"].createElement(SvgListItemPdf, null) : fileFormat === 'jpg' ? iconJpg ? iconJpg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpg, null) : fileFormat === 'png' ? iconPng ? iconPng : /*#__PURE__*/React__default["default"].createElement(SvgListItemPng, null) : fileFormat === 'jpeg' ? iconJpeg ? iconJpeg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpeg, null) : fileFormat === 'heic' || fileFormat === 'heif' ? iconHeic ? iconHeic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : fileFormat === 'msword' ? iconDoc ? iconDoc : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : fileFormat === 'vnd.openxmlformats-officedocument.wordprocessingml.document' ? iconDocx ? iconDocx : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
409
444
|
style: {
|
|
410
445
|
position: 'relative',
|
|
411
446
|
display: 'flex',
|
|
@@ -463,6 +498,13 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
|
|
|
463
498
|
}, iconDelItem ? iconDelItem : /*#__PURE__*/React__default["default"].createElement(SvgListItemDelete, null))));
|
|
464
499
|
});
|
|
465
500
|
|
|
501
|
+
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";
|
|
502
|
+
|
|
503
|
+
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";
|
|
504
|
+
|
|
505
|
+
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";
|
|
506
|
+
|
|
507
|
+
// import React from 'react'
|
|
466
508
|
const boxSizing = 'border-box';
|
|
467
509
|
const fontStyle = 'normal';
|
|
468
510
|
const fontFamily = 'Arial';
|
|
@@ -489,17 +531,18 @@ const fontObject = {
|
|
|
489
531
|
var packageResult = {
|
|
490
532
|
// default properties for <Button /> component
|
|
491
533
|
BUTTON: {
|
|
492
|
-
|
|
534
|
+
opacity: 1,
|
|
493
535
|
width: '100%',
|
|
536
|
+
radius: '6px',
|
|
537
|
+
className: '',
|
|
538
|
+
type: 'button',
|
|
494
539
|
height: '46px',
|
|
495
540
|
color: 'white',
|
|
496
|
-
contentWidth: false,
|
|
497
541
|
border: 'none',
|
|
498
|
-
|
|
542
|
+
disabled: false,
|
|
499
543
|
cursor: 'pointer',
|
|
544
|
+
contentWidth: false,
|
|
500
545
|
padding: '12px 20px',
|
|
501
|
-
disabled: false,
|
|
502
|
-
className: '',
|
|
503
546
|
transition: 'background-color 240ms, color 240ms',
|
|
504
547
|
box: {
|
|
505
548
|
sizing: boxSizing
|
|
@@ -509,7 +552,11 @@ var packageResult = {
|
|
|
509
552
|
backgroundHover: '#CB3A3A',
|
|
510
553
|
disabled: 'rgba(60, 57, 62, 1)',
|
|
511
554
|
disabledLine: 'rgba(60, 57, 62, 1)',
|
|
512
|
-
disabledBackground: 'rgba(238, 238, 238, 1)'
|
|
555
|
+
disabledBackground: 'rgba(238, 238, 238, 1)',
|
|
556
|
+
withoutStyling: {
|
|
557
|
+
color: '#000000',
|
|
558
|
+
hoverColor: '#121212'
|
|
559
|
+
}
|
|
513
560
|
},
|
|
514
561
|
font: {
|
|
515
562
|
...fontObject
|
|
@@ -521,8 +568,10 @@ var packageResult = {
|
|
|
521
568
|
}
|
|
522
569
|
},
|
|
523
570
|
icon: {
|
|
571
|
+
marginLeft: '10px',
|
|
524
572
|
marginRight: '10px'
|
|
525
|
-
}
|
|
573
|
+
},
|
|
574
|
+
withoutStyling: false
|
|
526
575
|
},
|
|
527
576
|
// default properties for <Input /> component
|
|
528
577
|
INPUT: {
|
|
@@ -537,6 +586,7 @@ var packageResult = {
|
|
|
537
586
|
className: '',
|
|
538
587
|
maxLength: 255,
|
|
539
588
|
iconWidth: '64px',
|
|
589
|
+
iconPadding: '10px',
|
|
540
590
|
autoComplete: 'off',
|
|
541
591
|
box: {
|
|
542
592
|
sizing: boxSizing,
|
|
@@ -556,6 +606,7 @@ var packageResult = {
|
|
|
556
606
|
color: presetColors.dark,
|
|
557
607
|
display: 'block',
|
|
558
608
|
lineHeight: '22px',
|
|
609
|
+
iconMargin: '10px',
|
|
559
610
|
marginBottom: '6px',
|
|
560
611
|
font: {
|
|
561
612
|
...fontObject
|
|
@@ -567,7 +618,11 @@ var packageResult = {
|
|
|
567
618
|
zIndex: '1',
|
|
568
619
|
className: '',
|
|
569
620
|
marginTop: '10px',
|
|
621
|
+
iconMargin: '10px',
|
|
570
622
|
lineHeight: '19px',
|
|
623
|
+
box: {
|
|
624
|
+
shadow: '0 0 0 1px #F20918'
|
|
625
|
+
},
|
|
571
626
|
font: {
|
|
572
627
|
...fontObject
|
|
573
628
|
}
|
|
@@ -715,6 +770,7 @@ var packageResult = {
|
|
|
715
770
|
SELECT: {
|
|
716
771
|
dots: false,
|
|
717
772
|
className: '',
|
|
773
|
+
arrowNoRotate: false,
|
|
718
774
|
showCloseIcon: true,
|
|
719
775
|
// arrowIcon: React.createElement(SvgChecked, { fill: 'green' }),
|
|
720
776
|
// closeIcon: React.createElement(SvgChecked, { fill: 'green' }),
|
|
@@ -1091,8 +1147,14 @@ var packageResult = {
|
|
|
1091
1147
|
header: {
|
|
1092
1148
|
color: presetColors.primarySecond,
|
|
1093
1149
|
height: '30px',
|
|
1150
|
+
align: 'left',
|
|
1094
1151
|
font: {
|
|
1095
1152
|
...fontObject
|
|
1153
|
+
},
|
|
1154
|
+
icon: {
|
|
1155
|
+
maxWidth: '60px',
|
|
1156
|
+
maxHeight: '60px',
|
|
1157
|
+
marginRight: '20px'
|
|
1096
1158
|
}
|
|
1097
1159
|
},
|
|
1098
1160
|
image: {
|
|
@@ -1112,6 +1174,36 @@ var packageResult = {
|
|
|
1112
1174
|
},
|
|
1113
1175
|
closeAreaBackgroundColor: 'linear-gradient(to bottom, rgb(60, 57, 62), rgba(60, 57, 62, 0))' // for close div background color
|
|
1114
1176
|
},
|
|
1177
|
+
// default properties for <SwipeModal /> component
|
|
1178
|
+
SWIPEMODAL: {
|
|
1179
|
+
width: '300px',
|
|
1180
|
+
height: '100vh',
|
|
1181
|
+
titleStyle: {
|
|
1182
|
+
color: '#1C212D',
|
|
1183
|
+
textAlign: 'left',
|
|
1184
|
+
maxHeight: '66px',
|
|
1185
|
+
padding: '0px 20px',
|
|
1186
|
+
font: {
|
|
1187
|
+
...fontObject
|
|
1188
|
+
}
|
|
1189
|
+
},
|
|
1190
|
+
parent: {
|
|
1191
|
+
width: '100%',
|
|
1192
|
+
height: '100vh',
|
|
1193
|
+
colors: {
|
|
1194
|
+
background: 'rgba(60, 61, 70, 0.2)'
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
colors: {
|
|
1198
|
+
background: 'white'
|
|
1199
|
+
},
|
|
1200
|
+
border: {
|
|
1201
|
+
radius: '10px'
|
|
1202
|
+
},
|
|
1203
|
+
// withParent: true,
|
|
1204
|
+
outSideClose: false,
|
|
1205
|
+
closeIcon: img$4
|
|
1206
|
+
},
|
|
1115
1207
|
// default properties for <Checkbox /> component
|
|
1116
1208
|
CHECKBOX: {
|
|
1117
1209
|
className: '',
|
|
@@ -1190,17 +1282,76 @@ var packageResult = {
|
|
|
1190
1282
|
},
|
|
1191
1283
|
// default properties for <Pagination /> component
|
|
1192
1284
|
PAGINATION: {
|
|
1193
|
-
|
|
1285
|
+
width: '34px',
|
|
1286
|
+
height: '34px',
|
|
1287
|
+
lineHeight: '16px',
|
|
1288
|
+
className: '',
|
|
1289
|
+
// for pagination class
|
|
1290
|
+
color: '#000000',
|
|
1291
|
+
font: {
|
|
1292
|
+
size: '13px',
|
|
1293
|
+
style: '',
|
|
1294
|
+
weight: '',
|
|
1295
|
+
family: ''
|
|
1296
|
+
},
|
|
1297
|
+
colors: {
|
|
1298
|
+
hover: '#000000',
|
|
1299
|
+
active: '#ffffff',
|
|
1300
|
+
background: '#ffffff',
|
|
1301
|
+
activeHover: '#ffffff',
|
|
1302
|
+
hoverBackground: '#dddddd',
|
|
1303
|
+
activeBackground: '#00236a'
|
|
1304
|
+
},
|
|
1305
|
+
border: {
|
|
1306
|
+
width: '1px',
|
|
1307
|
+
color: 'rgba(238,238,238, 1)',
|
|
1308
|
+
radius: '6px'
|
|
1309
|
+
}
|
|
1194
1310
|
},
|
|
1195
1311
|
// default properties for <Toaster /> component
|
|
1196
1312
|
TOASTER: {
|
|
1313
|
+
width: '440px',
|
|
1314
|
+
height: '83px',
|
|
1197
1315
|
className: '',
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1316
|
+
marginBottom: '20px',
|
|
1317
|
+
backgroundColor: '#FFFFFF',
|
|
1318
|
+
padding: '14px 29px 14px 12px',
|
|
1319
|
+
border: {
|
|
1320
|
+
width: '2px',
|
|
1321
|
+
style: 'solid',
|
|
1322
|
+
radius: '40px',
|
|
1323
|
+
color: '#EEEEEE'
|
|
1324
|
+
},
|
|
1325
|
+
title: {
|
|
1326
|
+
color: '#3C393E',
|
|
1327
|
+
lineHeight: '22px',
|
|
1328
|
+
font: {
|
|
1329
|
+
size: '16px',
|
|
1330
|
+
style: 'normal',
|
|
1331
|
+
weight: 600,
|
|
1332
|
+
family: ''
|
|
1333
|
+
},
|
|
1334
|
+
props: {}
|
|
1335
|
+
},
|
|
1336
|
+
description: {
|
|
1337
|
+
color: '#3C393E',
|
|
1338
|
+
lineHeight: '16px',
|
|
1339
|
+
font: {
|
|
1340
|
+
size: '12px',
|
|
1341
|
+
style: 'normal',
|
|
1342
|
+
weight: 500,
|
|
1343
|
+
family: ''
|
|
1344
|
+
},
|
|
1345
|
+
props: {
|
|
1346
|
+
opacity: 0.8
|
|
1347
|
+
}
|
|
1348
|
+
},
|
|
1349
|
+
icons: {
|
|
1350
|
+
info: '',
|
|
1351
|
+
warn: '',
|
|
1352
|
+
error: '',
|
|
1353
|
+
close: '',
|
|
1354
|
+
success: ''
|
|
1204
1355
|
}
|
|
1205
1356
|
},
|
|
1206
1357
|
// default properties for <Stepper /> component
|
|
@@ -1220,10 +1371,12 @@ var packageResult = {
|
|
|
1220
1371
|
width: '2px',
|
|
1221
1372
|
style: 'solid',
|
|
1222
1373
|
color: '#E7E7E7',
|
|
1374
|
+
hoverColor: '#E7E7E7',
|
|
1223
1375
|
activeColor: '#3C3D46'
|
|
1224
1376
|
},
|
|
1225
1377
|
label: {
|
|
1226
1378
|
color: '#3C3D46',
|
|
1379
|
+
activeColor: '#3C3D46',
|
|
1227
1380
|
lineHeight: '21px',
|
|
1228
1381
|
font: {
|
|
1229
1382
|
...fontObject
|
|
@@ -1233,6 +1386,39 @@ var packageResult = {
|
|
|
1233
1386
|
// default properties for <Form /> component
|
|
1234
1387
|
FORM: {
|
|
1235
1388
|
className: ''
|
|
1389
|
+
},
|
|
1390
|
+
// default properties for <Accordion /> component
|
|
1391
|
+
ACCORDION: {
|
|
1392
|
+
className: '',
|
|
1393
|
+
padding: '15px',
|
|
1394
|
+
color: '#121212',
|
|
1395
|
+
marginBottom: '0px',
|
|
1396
|
+
colors: {
|
|
1397
|
+
hover: '#009B8B',
|
|
1398
|
+
background: '#E5E7EA',
|
|
1399
|
+
backgroundHover: '#CBCED5'
|
|
1400
|
+
},
|
|
1401
|
+
border: {
|
|
1402
|
+
color: '#A8ADB9',
|
|
1403
|
+
width: '1px',
|
|
1404
|
+
style: 'solid',
|
|
1405
|
+
radius: '0px',
|
|
1406
|
+
top: false,
|
|
1407
|
+
left: false,
|
|
1408
|
+
right: false,
|
|
1409
|
+
bottom: true
|
|
1410
|
+
},
|
|
1411
|
+
font: {
|
|
1412
|
+
size: '14px',
|
|
1413
|
+
style: 'normal',
|
|
1414
|
+
weight: 700,
|
|
1415
|
+
family: 'Noto Sans Armenian'
|
|
1416
|
+
},
|
|
1417
|
+
icon: {
|
|
1418
|
+
open: img$3,
|
|
1419
|
+
close: img$2,
|
|
1420
|
+
openHover: img$3
|
|
1421
|
+
}
|
|
1236
1422
|
}
|
|
1237
1423
|
};
|
|
1238
1424
|
|
|
@@ -1286,6 +1472,7 @@ const Button = ({
|
|
|
1286
1472
|
radius,
|
|
1287
1473
|
outline,
|
|
1288
1474
|
padding,
|
|
1475
|
+
opacity,
|
|
1289
1476
|
onClick,
|
|
1290
1477
|
disabled,
|
|
1291
1478
|
className,
|
|
@@ -1294,13 +1481,18 @@ const Button = ({
|
|
|
1294
1481
|
hoverColor,
|
|
1295
1482
|
transition,
|
|
1296
1483
|
contentWidth,
|
|
1484
|
+
iconRightSide,
|
|
1297
1485
|
disabledColor,
|
|
1298
1486
|
textTransform,
|
|
1487
|
+
withoutStyling,
|
|
1299
1488
|
backgroundColor,
|
|
1300
1489
|
disabledLineColor,
|
|
1490
|
+
btnIconMarginLeft,
|
|
1301
1491
|
btnIconMarginRight,
|
|
1492
|
+
withoutStylingColor,
|
|
1302
1493
|
backgroundHoverColor,
|
|
1303
1494
|
disabledBackgroundColor,
|
|
1495
|
+
withoutStylingHoverColor,
|
|
1304
1496
|
...props
|
|
1305
1497
|
}) => {
|
|
1306
1498
|
const [classProps, setClassProps] = React.useState({});
|
|
@@ -1336,22 +1528,23 @@ const Button = ({
|
|
|
1336
1528
|
outline: 'none',
|
|
1337
1529
|
alignItems: 'center',
|
|
1338
1530
|
justifyContent: 'center',
|
|
1531
|
+
height: height ?? configStyles.BUTTON.height,
|
|
1532
|
+
padding: padding ?? configStyles.BUTTON.padding,
|
|
1339
1533
|
fontSize: size ?? configStyles.BUTTON.font.size,
|
|
1534
|
+
borderRadius: radius ?? configStyles.BUTTON.radius,
|
|
1340
1535
|
fontStyle: style ?? configStyles.BUTTON.font.style,
|
|
1341
1536
|
fontFamily: font ?? configStyles.BUTTON.font.family,
|
|
1342
|
-
height: height ?? configStyles.BUTTON.height,
|
|
1343
1537
|
fontWeight: weight ?? configStyles.BUTTON.font.weight,
|
|
1344
|
-
padding: padding ?? configStyles.BUTTON.padding,
|
|
1345
|
-
borderRadius: radius ?? configStyles.BUTTON.radius,
|
|
1346
1538
|
boxSizing: boxSizing ?? configStyles.BUTTON.box.sizing,
|
|
1347
1539
|
transition: transition ?? configStyles.BUTTON.transition,
|
|
1348
1540
|
border: outline ? 'none' : border ?? configStyles.BUTTON.border,
|
|
1349
1541
|
width: contentWidth ? 'auto' : width ?? configStyles.BUTTON.width,
|
|
1350
|
-
cursor: disabled ? 'not-allowed' : cursor ?? configStyles.BUTTON.cursor,
|
|
1351
1542
|
textTransform: textTransform ?? configStyles.BUTTON.text.transform,
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1543
|
+
cursor: disabled ? 'not-allowed' : cursor ?? configStyles.BUTTON.cursor,
|
|
1544
|
+
opacity: opacity ?? configStyles.BUTTON.opacity,
|
|
1545
|
+
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,
|
|
1546
|
+
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',
|
|
1547
|
+
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
|
|
1355
1548
|
},
|
|
1356
1549
|
type: type ?? configStyles.BUTTON.type,
|
|
1357
1550
|
disabled: disabled ?? configStyles.BUTTON.disabled,
|
|
@@ -1359,43 +1552,50 @@ const Button = ({
|
|
|
1359
1552
|
onMouseEnter: handleMouseEnter,
|
|
1360
1553
|
onMouseLeave: handleMouseLeave,
|
|
1361
1554
|
className: classProps
|
|
1362
|
-
}, props), isHover && hoverIcon ? hoverIcon : icon ?? null, ' ', label && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1555
|
+
}, props), !iconRightSide ? isHover && hoverIcon ? hoverIcon : icon ?? null : ' ', ' ', label && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1363
1556
|
style: {
|
|
1364
|
-
marginLeft: icon ? btnIconMarginRight ? btnIconMarginRight : configStyles.BUTTON.icon.marginRight : '0px'
|
|
1557
|
+
marginLeft: icon && !iconRightSide ? btnIconMarginRight ? btnIconMarginRight : configStyles.BUTTON.icon.marginRight : '0px',
|
|
1558
|
+
marginRight: icon && iconRightSide ? btnIconMarginLeft ? btnIconMarginLeft : configStyles.BUTTON.icon.marginLeft : '0px'
|
|
1365
1559
|
}
|
|
1366
|
-
}, label), ' ', !icon && !label && 'Add icon or label prop on Button component'));
|
|
1560
|
+
}, label), ' ', iconRightSide ? isHover && hoverIcon ? hoverIcon : icon ?? null : ' ', !icon && !label && 'Add icon or label prop on Button component'));
|
|
1367
1561
|
};
|
|
1368
1562
|
Button.propTypes = {
|
|
1369
1563
|
type: PropTypes__default["default"].string,
|
|
1370
1564
|
size: PropTypes__default["default"].string,
|
|
1371
1565
|
style: PropTypes__default["default"].string,
|
|
1372
|
-
weight: PropTypes__default["default"].string,
|
|
1373
1566
|
font: PropTypes__default["default"].string,
|
|
1374
1567
|
icon: PropTypes__default["default"].element,
|
|
1375
|
-
hoverIcon: PropTypes__default["default"].element,
|
|
1376
1568
|
color: PropTypes__default["default"].string,
|
|
1377
1569
|
width: PropTypes__default["default"].string,
|
|
1378
1570
|
outline: PropTypes__default["default"].bool,
|
|
1379
1571
|
onClick: PropTypes__default["default"].func,
|
|
1380
1572
|
label: PropTypes__default["default"].string,
|
|
1573
|
+
weight: PropTypes__default["default"].string,
|
|
1381
1574
|
height: PropTypes__default["default"].string,
|
|
1382
1575
|
cursor: PropTypes__default["default"].string,
|
|
1383
1576
|
border: PropTypes__default["default"].string,
|
|
1384
1577
|
disabled: PropTypes__default["default"].bool,
|
|
1385
1578
|
radius: PropTypes__default["default"].string,
|
|
1386
1579
|
padding: PropTypes__default["default"].string,
|
|
1580
|
+
opacity: PropTypes__default["default"].number,
|
|
1387
1581
|
boxSizing: PropTypes__default["default"].string,
|
|
1388
1582
|
className: PropTypes__default["default"].string,
|
|
1583
|
+
hoverIcon: PropTypes__default["default"].element,
|
|
1389
1584
|
hoverColor: PropTypes__default["default"].string,
|
|
1390
1585
|
transition: PropTypes__default["default"].string,
|
|
1391
1586
|
contentWidth: PropTypes__default["default"].bool,
|
|
1587
|
+
iconRightSide: PropTypes__default["default"].bool,
|
|
1588
|
+
withoutStyling: PropTypes__default["default"].bool,
|
|
1392
1589
|
textTransform: PropTypes__default["default"].string,
|
|
1393
1590
|
disabledColor: PropTypes__default["default"].string,
|
|
1394
1591
|
backgroundColor: PropTypes__default["default"].string,
|
|
1395
1592
|
disabledLineColor: PropTypes__default["default"].string,
|
|
1593
|
+
btnIconMarginLeft: PropTypes__default["default"].string,
|
|
1396
1594
|
btnIconMarginRight: PropTypes__default["default"].string,
|
|
1595
|
+
withoutStylingColor: PropTypes__default["default"].string,
|
|
1397
1596
|
backgroundHoverColor: PropTypes__default["default"].string,
|
|
1398
|
-
disabledBackgroundColor: PropTypes__default["default"].string
|
|
1597
|
+
disabledBackgroundColor: PropTypes__default["default"].string,
|
|
1598
|
+
withoutStylingHoverColor: PropTypes__default["default"].string
|
|
1399
1599
|
};
|
|
1400
1600
|
|
|
1401
1601
|
const SvgPdf = ({
|
|
@@ -1554,8 +1754,10 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1554
1754
|
progressColor,
|
|
1555
1755
|
noChoosenFile,
|
|
1556
1756
|
iconPdf,
|
|
1757
|
+
iconDoc,
|
|
1557
1758
|
iconPng,
|
|
1558
1759
|
iconJpg,
|
|
1760
|
+
iconDocx,
|
|
1559
1761
|
iconJpeg,
|
|
1560
1762
|
iconHeic,
|
|
1561
1763
|
iconWrong,
|
|
@@ -1659,8 +1861,26 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1659
1861
|
for (let ix = 0; ix < file.length; ix++) {
|
|
1660
1862
|
if (file[ix]) {
|
|
1661
1863
|
if (file[ix].size <= maxSize * Math.pow(2, 20)) {
|
|
1662
|
-
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif')) {
|
|
1663
|
-
if (
|
|
1864
|
+
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')) {
|
|
1865
|
+
if (file[ix].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
1866
|
+
change({
|
|
1867
|
+
id: '',
|
|
1868
|
+
check: '',
|
|
1869
|
+
status: '',
|
|
1870
|
+
file: file[ix],
|
|
1871
|
+
uuid: v4()
|
|
1872
|
+
});
|
|
1873
|
+
setImage('docx');
|
|
1874
|
+
} else if (file[ix].type === 'application/msword') {
|
|
1875
|
+
change({
|
|
1876
|
+
id: '',
|
|
1877
|
+
check: '',
|
|
1878
|
+
status: '',
|
|
1879
|
+
file: file[ix],
|
|
1880
|
+
uuid: v4()
|
|
1881
|
+
});
|
|
1882
|
+
setImage('doc');
|
|
1883
|
+
} else if ((fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif'))) {
|
|
1664
1884
|
handleCheckHeicFormat(file[ix]).then(() => {
|
|
1665
1885
|
change({
|
|
1666
1886
|
id: '',
|
|
@@ -1707,8 +1927,26 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1707
1927
|
for (let ix = 0; ix < file.length; ix++) {
|
|
1708
1928
|
if (file[ix]) {
|
|
1709
1929
|
if (file[ix].size <= maxSize * Math.pow(2, 20)) {
|
|
1710
|
-
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif')) {
|
|
1711
|
-
if (
|
|
1930
|
+
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')) {
|
|
1931
|
+
if (file[ix].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
1932
|
+
change({
|
|
1933
|
+
id: '',
|
|
1934
|
+
check: '',
|
|
1935
|
+
status: '',
|
|
1936
|
+
file: file[ix],
|
|
1937
|
+
uuid: v4()
|
|
1938
|
+
});
|
|
1939
|
+
setImage('docx');
|
|
1940
|
+
} else if (file[ix].type === 'application/msword') {
|
|
1941
|
+
change({
|
|
1942
|
+
id: '',
|
|
1943
|
+
check: '',
|
|
1944
|
+
status: '',
|
|
1945
|
+
file: file[ix],
|
|
1946
|
+
uuid: v4()
|
|
1947
|
+
});
|
|
1948
|
+
setImage('doc');
|
|
1949
|
+
} else if ((fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif'))) {
|
|
1712
1950
|
handleCheckHeicFormat(file[ix]).then(() => {
|
|
1713
1951
|
change({
|
|
1714
1952
|
id: '',
|
|
@@ -1764,9 +2002,17 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1764
2002
|
} else {
|
|
1765
2003
|
if (file[0]) {
|
|
1766
2004
|
if (file[0].size <= maxSize * Math.pow(2, 20)) {
|
|
1767
|
-
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'))) {
|
|
2005
|
+
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')) {
|
|
1768
2006
|
setError('');
|
|
1769
|
-
if (file[0].type === 'application/
|
|
2007
|
+
if (file[0].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
2008
|
+
setImage('docx');
|
|
2009
|
+
change(file);
|
|
2010
|
+
setSingleFile(file);
|
|
2011
|
+
} else if (file[0].type === 'application/msword') {
|
|
2012
|
+
setImage('doc');
|
|
2013
|
+
change(file);
|
|
2014
|
+
setSingleFile(file);
|
|
2015
|
+
} else if (file[0].type === 'application/pdf') {
|
|
1770
2016
|
setImage('pdf');
|
|
1771
2017
|
change(file);
|
|
1772
2018
|
setSingleFile(file);
|
|
@@ -1781,6 +2027,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1781
2027
|
});
|
|
1782
2028
|
} else {
|
|
1783
2029
|
change(file);
|
|
2030
|
+
setSingleFile(file);
|
|
1784
2031
|
setImage(URL.createObjectURL(file[0]));
|
|
1785
2032
|
}
|
|
1786
2033
|
} else {
|
|
@@ -1801,8 +2048,12 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1801
2048
|
const handleClick = () => {
|
|
1802
2049
|
inpRef.current.files = null;
|
|
1803
2050
|
inpRef.current.value = null;
|
|
1804
|
-
if (
|
|
2051
|
+
if (multiple) {
|
|
1805
2052
|
inpRef.current.click();
|
|
2053
|
+
} else {
|
|
2054
|
+
if (!image) {
|
|
2055
|
+
inpRef.current.click();
|
|
2056
|
+
}
|
|
1806
2057
|
}
|
|
1807
2058
|
};
|
|
1808
2059
|
const handleDrop = e => {
|
|
@@ -1966,7 +2217,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1966
2217
|
fontFamily: family ?? configStyles.FILE.font.family,
|
|
1967
2218
|
fontWeight: weight ?? configStyles.FILE.font.weight
|
|
1968
2219
|
}
|
|
1969
|
-
}, !multiple && image && preview ? image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default["default"].createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2220
|
+
}, !multiple && image && preview ? image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default["default"].createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
1970
2221
|
src: image,
|
|
1971
2222
|
style: {
|
|
1972
2223
|
display: 'block',
|
|
@@ -1991,7 +2242,8 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1991
2242
|
}
|
|
1992
2243
|
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
1993
2244
|
style: {
|
|
1994
|
-
margin: '0px'
|
|
2245
|
+
margin: '0px',
|
|
2246
|
+
padding: '0px 10px'
|
|
1995
2247
|
}
|
|
1996
2248
|
}, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1997
2249
|
style: {
|
|
@@ -2023,7 +2275,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2023
2275
|
whiteSpace: 'nowrap',
|
|
2024
2276
|
textOverflow: 'ellipsis'
|
|
2025
2277
|
}
|
|
2026
|
-
}, singleFile ? singleFile
|
|
2278
|
+
}, singleFile ? singleFile.name : /*#__PURE__*/React__default["default"].createElement("span", null, fileSizeText ?? configStyles.FILE.sizeText, " ", maxSize, " \u0544\u0532 (", ' ', fileExtensions.toString().split(',').join(', '), " )"))))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2027
2279
|
style: {
|
|
2028
2280
|
position: 'absolute',
|
|
2029
2281
|
top: '0px',
|
|
@@ -2062,11 +2314,13 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2062
2314
|
uuid: item.uuid,
|
|
2063
2315
|
check: item.check,
|
|
2064
2316
|
status: item.status,
|
|
2065
|
-
size: item
|
|
2066
|
-
name: item
|
|
2317
|
+
size: item?.file?.size,
|
|
2318
|
+
name: item?.file?.name,
|
|
2067
2319
|
iconPdf: iconPdf ?? configStyles.FILE.icon.pdf,
|
|
2320
|
+
iconDoc: iconDoc ?? configStyles.FILE.icon.doc,
|
|
2068
2321
|
iconPng: iconPng ?? configStyles.FILE.icon.png,
|
|
2069
2322
|
iconJpg: iconJpg ?? configStyles.FILE.icon.jpg,
|
|
2323
|
+
iconDocx: iconDocx ?? configStyles.FILE.icon.docx,
|
|
2070
2324
|
iconJpeg: iconJpeg ?? configStyles.FILE.icon.jpeg,
|
|
2071
2325
|
iconHeic: iconHeic ?? configStyles.FILE.icon.heic,
|
|
2072
2326
|
iconWrong: iconWrong ?? configStyles.FILE.icon.wrong,
|
|
@@ -2074,7 +2328,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2074
2328
|
timeForRemoveError: timeForRemoveError,
|
|
2075
2329
|
removeFile: removeFile ? removeFile : _ => _,
|
|
2076
2330
|
radius: radius ?? configStyles.FILE.radius,
|
|
2077
|
-
fileFormat: item
|
|
2331
|
+
fileFormat: item?.file?.type.split('/')[1]?.toLowerCase(),
|
|
2078
2332
|
progressColor: progressColor ?? configStyles.FILE.progress.color,
|
|
2079
2333
|
listItemHeight: listItemHeight ?? configStyles.FILE.listItem.height,
|
|
2080
2334
|
listItemPadding: listItemPadding ?? configStyles.FILE.listItem.padding,
|
|
@@ -2140,8 +2394,10 @@ File.propTypes = {
|
|
|
2140
2394
|
deleteComponent: PropTypes__default["default"].bool,
|
|
2141
2395
|
removeComponent: PropTypes__default["default"].func,
|
|
2142
2396
|
iconPdf: PropTypes__default["default"].element,
|
|
2397
|
+
iconDoc: PropTypes__default["default"].element,
|
|
2143
2398
|
iconPng: PropTypes__default["default"].element,
|
|
2144
2399
|
iconJpg: PropTypes__default["default"].element,
|
|
2400
|
+
iconDocx: PropTypes__default["default"].element,
|
|
2145
2401
|
iconJpeg: PropTypes__default["default"].element,
|
|
2146
2402
|
iconHeic: PropTypes__default["default"].element,
|
|
2147
2403
|
iconWrong: PropTypes__default["default"].element,
|
|
@@ -2389,15 +2645,21 @@ const handleUtilsCheckTypeTel = (val, prevVal) => {
|
|
|
2389
2645
|
}
|
|
2390
2646
|
return val;
|
|
2391
2647
|
};
|
|
2392
|
-
const handleUtilsCheckTypeNumber = (val, prevVal, maxLength, floatToFix, maxNumSize, withoutDot, innerMinNumSize, numberMaxLength) => {
|
|
2648
|
+
const handleUtilsCheckTypeNumber = (val, prevVal, maxLength, floatToFix, maxNumSize, withoutDot, innerMinNumSize, numberMaxLength, cardNumber) => {
|
|
2393
2649
|
if (maxLength && maxLength > 0) {
|
|
2394
2650
|
if (val.length > maxLength) {
|
|
2395
2651
|
val = val.substr(0, maxLength);
|
|
2396
2652
|
}
|
|
2397
2653
|
} else {
|
|
2398
2654
|
const regNum = floatToFix && floatToFix >= 0 ? /^\d+(\.|\․|\.|\,)?(\d+)?$/ : /^\d+$/;
|
|
2399
|
-
if (
|
|
2400
|
-
val
|
|
2655
|
+
if (cardNumber) {
|
|
2656
|
+
if (val.length > 19 && !val.includes('.')) {
|
|
2657
|
+
val = val.substr(0, 19);
|
|
2658
|
+
}
|
|
2659
|
+
} else {
|
|
2660
|
+
if (val.length > 16 && !val.includes('.')) {
|
|
2661
|
+
val = val.substr(0, 16);
|
|
2662
|
+
}
|
|
2401
2663
|
}
|
|
2402
2664
|
if (numberMaxLength && numberMaxLength > 0 && !val.includes('.')) {
|
|
2403
2665
|
val = val.substr(0, numberMaxLength);
|
|
@@ -2473,9 +2735,9 @@ function styleInject(css, ref) {
|
|
|
2473
2735
|
}
|
|
2474
2736
|
}
|
|
2475
2737
|
|
|
2476
|
-
var css_248z$
|
|
2477
|
-
var styles$
|
|
2478
|
-
styleInject(css_248z$
|
|
2738
|
+
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%}";
|
|
2739
|
+
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"};
|
|
2740
|
+
styleInject(css_248z$c);
|
|
2479
2741
|
|
|
2480
2742
|
/* eslint-disable no-prototype-builtins */
|
|
2481
2743
|
const TH = ({
|
|
@@ -2517,7 +2779,7 @@ const TH = ({
|
|
|
2517
2779
|
borderColor: hideBorder ? 'transparent' : '#eeeeee'
|
|
2518
2780
|
},
|
|
2519
2781
|
onClick: handleHeaderItemClick,
|
|
2520
|
-
className: `${hasOwnerProperty(item, 'sortingArrows') ? item.sortingArrows === true ? styles$
|
|
2782
|
+
className: `${hasOwnerProperty(item, 'sortingArrows') ? item.sortingArrows === true ? styles$a['sorting-arrows'] : '' : ''}`
|
|
2521
2783
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2522
2784
|
style: {
|
|
2523
2785
|
display: 'flex',
|
|
@@ -2533,7 +2795,8 @@ const TH = ({
|
|
|
2533
2795
|
unCheckedColor: item.checkBox.unCheckedColor ? item.checkBox.unCheckedColor : ''
|
|
2534
2796
|
}) : '', /*#__PURE__*/React__default["default"].createElement("p", {
|
|
2535
2797
|
style: {
|
|
2536
|
-
margin: '0px'
|
|
2798
|
+
margin: '0px',
|
|
2799
|
+
whiteSpace: 'nowrap'
|
|
2537
2800
|
},
|
|
2538
2801
|
onClick: e => handleCheckArrowAction(e, item, 'arrowComponent')
|
|
2539
2802
|
}, item.type === 'show' ? item.content : hasOwnerProperty(item, 'arrowComponent') ? item.status === 'close' ? item.closeArrow : item.openArrow : '')));
|
|
@@ -2651,7 +2914,7 @@ const TD = ({
|
|
|
2651
2914
|
},
|
|
2652
2915
|
id: newItem.id,
|
|
2653
2916
|
type: newItem.type,
|
|
2654
|
-
className: styles$
|
|
2917
|
+
className: styles$a['td-span'],
|
|
2655
2918
|
key: `${newItem.id}_${newIndex}`,
|
|
2656
2919
|
onClick: e => handleCheckActions(e, newItem, 'type', newIndex)
|
|
2657
2920
|
}, newItem.content === 0 ? newItem.content.toString() : newItem.content ? newItem.content : '');
|
|
@@ -2673,7 +2936,7 @@ const TD = ({
|
|
|
2673
2936
|
},
|
|
2674
2937
|
id: iT.id ? iT.id : '',
|
|
2675
2938
|
type: iT.type ? iT.type : '',
|
|
2676
|
-
className: styles$
|
|
2939
|
+
className: styles$a['td-span'],
|
|
2677
2940
|
onClick: e => handleCheckActions(e, iT, 'type', iN),
|
|
2678
2941
|
key: `${iT.id || iT.content}_${iN}`
|
|
2679
2942
|
}, iT.content === 0 ? iT.content.toString() : iT.content ? iT.content : '');
|
|
@@ -2697,7 +2960,7 @@ const TD = ({
|
|
|
2697
2960
|
cursor: 'pointer'
|
|
2698
2961
|
},
|
|
2699
2962
|
onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex, item),
|
|
2700
|
-
className: styles$
|
|
2963
|
+
className: styles$a['td-span']
|
|
2701
2964
|
}, hasOwnerProperty(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '', hasOwnerProperty(item, 'draggableIcon') && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2702
2965
|
draggable: true,
|
|
2703
2966
|
style: {
|
|
@@ -2766,7 +3029,7 @@ const TD = ({
|
|
|
2766
3029
|
}, hasOwnerProperty(item, 'options') && item.options.map((optionItem, optionIndex) => {
|
|
2767
3030
|
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2768
3031
|
key: `${optionItem.content}_${optionIndex}`,
|
|
2769
|
-
className: styles$
|
|
3032
|
+
className: styles$a['dots-option-item'],
|
|
2770
3033
|
style: {
|
|
2771
3034
|
color: '#3C393E',
|
|
2772
3035
|
fontSize: '14px',
|
|
@@ -2808,7 +3071,7 @@ const TD = ({
|
|
|
2808
3071
|
}, innerItem.content.map((contInnerItem, contInnerIndex) => {
|
|
2809
3072
|
return /*#__PURE__*/React__default["default"].createElement("p", {
|
|
2810
3073
|
key: `${contInnerItem}_${contInnerIndex}`,
|
|
2811
|
-
className: styles$
|
|
3074
|
+
className: styles$a['list-text'],
|
|
2812
3075
|
style: {
|
|
2813
3076
|
maxWidth: '100%',
|
|
2814
3077
|
color: openListColor,
|
|
@@ -2825,7 +3088,7 @@ const TD = ({
|
|
|
2825
3088
|
} else {
|
|
2826
3089
|
return /*#__PURE__*/React__default["default"].createElement("p", {
|
|
2827
3090
|
key: `${innerItem}_${innerItemIndex}`,
|
|
2828
|
-
className: styles$
|
|
3091
|
+
className: styles$a['list-text'],
|
|
2829
3092
|
style: {
|
|
2830
3093
|
maxWidth: '100%',
|
|
2831
3094
|
color: openListColor,
|
|
@@ -2846,7 +3109,7 @@ const TD = ({
|
|
|
2846
3109
|
cursor: 'pointer'
|
|
2847
3110
|
},
|
|
2848
3111
|
onClick: () => handleOpenCloseRowSingleArrow(index, innerIndex, item),
|
|
2849
|
-
className: styles$
|
|
3112
|
+
className: styles$a['td-span']
|
|
2850
3113
|
}, hasOwnerProperty(item, 'status') && item.status === 'close' ? item.closeArrow : item.openArrow) : '') : '');
|
|
2851
3114
|
};
|
|
2852
3115
|
|
|
@@ -3103,7 +3366,6 @@ const Table = ({
|
|
|
3103
3366
|
}
|
|
3104
3367
|
};
|
|
3105
3368
|
const handleCheckedHeader = (data, e) => {
|
|
3106
|
-
console.log('ok - - - - - - - ');
|
|
3107
3369
|
e.stopPropagation();
|
|
3108
3370
|
let removeItemIndex;
|
|
3109
3371
|
let checkableItemBool;
|
|
@@ -3214,9 +3476,18 @@ const Table = ({
|
|
|
3214
3476
|
tempCheckedArray.push(innerItem.checked);
|
|
3215
3477
|
});
|
|
3216
3478
|
if (tempCheckedArray.every(i => i)) {
|
|
3217
|
-
item
|
|
3479
|
+
if (hasOwnerProperty(item, 'checkBox')) {
|
|
3480
|
+
if (hasOwnerProperty(item.checkBox, 'checked')) {
|
|
3481
|
+
item.checkBox.checked = true;
|
|
3482
|
+
return item;
|
|
3483
|
+
}
|
|
3484
|
+
}
|
|
3218
3485
|
} else {
|
|
3219
|
-
item
|
|
3486
|
+
if (hasOwnerProperty(item, 'checkBox')) {
|
|
3487
|
+
if (hasOwnerProperty(item.checkBox, 'checked')) {
|
|
3488
|
+
item.checkBox.checked = false;
|
|
3489
|
+
}
|
|
3490
|
+
}
|
|
3220
3491
|
}
|
|
3221
3492
|
}
|
|
3222
3493
|
return item;
|
|
@@ -3281,7 +3552,7 @@ const Table = ({
|
|
|
3281
3552
|
const handleCheckArrowActionHeader = (e, item) => {
|
|
3282
3553
|
e.stopPropagation();
|
|
3283
3554
|
const checkedOpenableAllRows = header.map((innerItem, innerIndex) => {
|
|
3284
|
-
if (item.checkIndex === innerIndex) {
|
|
3555
|
+
if (item.checkIndex === (draggable && !showOrder ? innerIndex - 1 : draggable && showOrder ? innerIndex - 2 : innerIndex)) {
|
|
3285
3556
|
if (item.status === 'close') {
|
|
3286
3557
|
innerItem.status = 'open';
|
|
3287
3558
|
} else {
|
|
@@ -3391,7 +3662,12 @@ const Table = ({
|
|
|
3391
3662
|
const newRows = body;
|
|
3392
3663
|
const [draggedRow] = newRows.splice(draggedRowIndex.current, 1);
|
|
3393
3664
|
newRows.splice(index, 0, draggedRow);
|
|
3394
|
-
newRows.map(item => {
|
|
3665
|
+
newRows.map((item, newIndex) => {
|
|
3666
|
+
item.map(innerItem => {
|
|
3667
|
+
if (hasOwnerProperty(innerItem, 'checkIndex')) {
|
|
3668
|
+
innerItem.checkIndex = newIndex;
|
|
3669
|
+
}
|
|
3670
|
+
});
|
|
3395
3671
|
correctData.push([...item]);
|
|
3396
3672
|
});
|
|
3397
3673
|
setBody(correctData);
|
|
@@ -3413,8 +3689,18 @@ const Table = ({
|
|
|
3413
3689
|
itemRefs.current[index] = element;
|
|
3414
3690
|
}
|
|
3415
3691
|
};
|
|
3692
|
+
const handleSafeStringify = obj => {
|
|
3693
|
+
const seen = new WeakSet();
|
|
3694
|
+
return JSON.stringify(obj, (key, value) => {
|
|
3695
|
+
if (typeof value === "object" && value !== null) {
|
|
3696
|
+
if (seen.has(value)) return; // Ignore circular reference
|
|
3697
|
+
seen.add(value);
|
|
3698
|
+
}
|
|
3699
|
+
return value;
|
|
3700
|
+
});
|
|
3701
|
+
};
|
|
3416
3702
|
React.useEffect(() => {
|
|
3417
|
-
const draggableArray = body && body.length
|
|
3703
|
+
const draggableArray = body && body.length > 0 ? body.map((item, index) => {
|
|
3418
3704
|
if (showOrder) {
|
|
3419
3705
|
Object.values(item).map((innerItem, innerIndex) => {
|
|
3420
3706
|
if (innerIndex === 1) {
|
|
@@ -3424,20 +3710,24 @@ const Table = ({
|
|
|
3424
3710
|
});
|
|
3425
3711
|
}
|
|
3426
3712
|
return item;
|
|
3427
|
-
});
|
|
3713
|
+
}) : [];
|
|
3428
3714
|
getDraggableData && getDraggableData(draggableArray);
|
|
3429
3715
|
setBody(() => draggableArray);
|
|
3430
3716
|
}, [checkDrag]);
|
|
3431
3717
|
React.useEffect(() => {
|
|
3432
|
-
const isEqual =
|
|
3718
|
+
const isEqual = handleSafeStringify(body) === handleSafeStringify(dataBody);
|
|
3433
3719
|
if (!isEqual) {
|
|
3434
3720
|
let insert = [];
|
|
3435
3721
|
let newArray = [];
|
|
3436
3722
|
let checkedItems = [];
|
|
3437
3723
|
const disabledArray = [];
|
|
3438
|
-
const checkBodyForChackedItems = dataBody.slice().map(item => Object.values(item));
|
|
3724
|
+
const checkBodyForChackedItems = dataBody && dataBody.length > 0 ? dataBody.slice().map(item => Object.values(item)) : [];
|
|
3439
3725
|
if (arrowShow) {
|
|
3440
|
-
|
|
3726
|
+
let column = arrowColumn;
|
|
3727
|
+
if (draggable) {
|
|
3728
|
+
column -= 1;
|
|
3729
|
+
}
|
|
3730
|
+
const arrowColumnCount = handleSetInsertIndex(checkBodyForChackedItems[0], column);
|
|
3441
3731
|
const checkForInsertArrow = handleTransformDataForInsertArrow(checkBodyForChackedItems, arrowColumnCount, 'body');
|
|
3442
3732
|
insert = checkForInsertArrow.map((item, index) => {
|
|
3443
3733
|
item.map((innerItem, innerIndex) => {
|
|
@@ -3456,29 +3746,10 @@ const Table = ({
|
|
|
3456
3746
|
});
|
|
3457
3747
|
return item;
|
|
3458
3748
|
});
|
|
3749
|
+
newArray = insert;
|
|
3459
3750
|
checkedItems = handleSetCheckboxArray(insert);
|
|
3460
|
-
if (draggable) {
|
|
3461
|
-
newArray = insert && insert.length && insert.map((item, index) => {
|
|
3462
|
-
item.map(innerItem => {
|
|
3463
|
-
if (hasOwnerProperty(innerItem, 'colorStatus')) {
|
|
3464
|
-
innerItem.colorStatus = null;
|
|
3465
|
-
}
|
|
3466
|
-
});
|
|
3467
|
-
if (showOrder) {
|
|
3468
|
-
item.unshift({
|
|
3469
|
-
content: index + 1,
|
|
3470
|
-
draggable: true
|
|
3471
|
-
});
|
|
3472
|
-
}
|
|
3473
|
-
item.unshift({
|
|
3474
|
-
draggableIcon: '',
|
|
3475
|
-
colorStatus: draggableColor
|
|
3476
|
-
});
|
|
3477
|
-
return item;
|
|
3478
|
-
});
|
|
3479
|
-
}
|
|
3480
3751
|
} else {
|
|
3481
|
-
insert = checkBodyForChackedItems.map((item, index) => {
|
|
3752
|
+
insert = checkBodyForChackedItems && checkBodyForChackedItems.length > 0 ? checkBodyForChackedItems.map((item, index) => {
|
|
3482
3753
|
item.map((innerItem, innerIndex) => {
|
|
3483
3754
|
if (hasOwnerProperty(innerItem, 'checkBox')) {
|
|
3484
3755
|
if (hasOwnerProperty(innerItem.checkBox, 'disabled')) {
|
|
@@ -3494,70 +3765,62 @@ const Table = ({
|
|
|
3494
3765
|
}
|
|
3495
3766
|
});
|
|
3496
3767
|
return item;
|
|
3497
|
-
});
|
|
3768
|
+
}) : [];
|
|
3769
|
+
newArray = insert;
|
|
3498
3770
|
checkedItems = handleSetCheckboxArray(insert);
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
});
|
|
3506
|
-
if (showOrder) {
|
|
3507
|
-
item.unshift({
|
|
3508
|
-
content: index + 1,
|
|
3509
|
-
draggable: true
|
|
3510
|
-
});
|
|
3771
|
+
}
|
|
3772
|
+
if (draggable && dataBody && dataBody.length > 0) {
|
|
3773
|
+
newArray = insert && insert.length > 0 ? insert.map((item, index) => {
|
|
3774
|
+
item.map(innerItem => {
|
|
3775
|
+
if (hasOwnerProperty(innerItem, 'colorStatus')) {
|
|
3776
|
+
innerItem.colorStatus = null;
|
|
3511
3777
|
}
|
|
3778
|
+
});
|
|
3779
|
+
if (showOrder) {
|
|
3512
3780
|
item.unshift({
|
|
3513
|
-
|
|
3514
|
-
|
|
3781
|
+
content: index + 1,
|
|
3782
|
+
draggable: true
|
|
3515
3783
|
});
|
|
3516
|
-
|
|
3784
|
+
}
|
|
3785
|
+
item.unshift({
|
|
3786
|
+
draggableIcon: '',
|
|
3787
|
+
colorStatus: draggableColor
|
|
3517
3788
|
});
|
|
3518
|
-
|
|
3789
|
+
return item;
|
|
3790
|
+
}) : [];
|
|
3519
3791
|
}
|
|
3520
|
-
|
|
3521
|
-
setBody(() => newArray && newArray.length ? newArray : insert);
|
|
3792
|
+
setBody(() => [...newArray]);
|
|
3522
3793
|
setDisableArr(disabledArray);
|
|
3523
3794
|
setCheckedArray(() => checkedItems);
|
|
3524
3795
|
}
|
|
3525
3796
|
}, [dataBody, arrowColumn, arrowShow, draggable]);
|
|
3526
3797
|
React.useEffect(() => {
|
|
3527
|
-
const isEqual =
|
|
3798
|
+
const isEqual = handleSafeStringify(header) === handleSafeStringify(dataHeader);
|
|
3528
3799
|
if (!isEqual) {
|
|
3529
|
-
let insert = [];
|
|
3530
3800
|
let newArray = [];
|
|
3531
3801
|
if (arrowShow) {
|
|
3532
|
-
|
|
3533
|
-
const arrowColumnCount = handleSetInsertIndex(header, arrowColumn);
|
|
3534
|
-
const checkForInsertArrow = handleTransformDataForInsertArrow(header, arrowColumnCount, 'header');
|
|
3535
|
-
insert = checkForInsertArrow;
|
|
3802
|
+
let column = arrowColumn;
|
|
3536
3803
|
if (draggable) {
|
|
3537
|
-
|
|
3538
|
-
newArray && newArray.length && newArray.unshift({
|
|
3539
|
-
content: ''
|
|
3540
|
-
});
|
|
3541
|
-
if (showOrder) {
|
|
3542
|
-
newArray.unshift({
|
|
3543
|
-
content: ''
|
|
3544
|
-
});
|
|
3545
|
-
}
|
|
3804
|
+
column -= 1;
|
|
3546
3805
|
}
|
|
3806
|
+
const header = dataHeader.slice();
|
|
3807
|
+
const arrowColumnCount = handleSetInsertIndex(header, column);
|
|
3808
|
+
const checkForInsertArrow = handleTransformDataForInsertArrow(header, arrowColumnCount, 'header');
|
|
3809
|
+
newArray = checkForInsertArrow;
|
|
3547
3810
|
} else {
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3811
|
+
newArray = dataHeader.slice();
|
|
3812
|
+
}
|
|
3813
|
+
if (draggable) {
|
|
3814
|
+
newArray && newArray.length && newArray.unshift({
|
|
3815
|
+
content: ''
|
|
3816
|
+
});
|
|
3817
|
+
if (showOrder) {
|
|
3818
|
+
newArray.unshift({
|
|
3551
3819
|
content: ''
|
|
3552
3820
|
});
|
|
3553
|
-
if (showOrder) {
|
|
3554
|
-
newArray.unshift({
|
|
3555
|
-
content: ''
|
|
3556
|
-
});
|
|
3557
|
-
}
|
|
3558
3821
|
}
|
|
3559
3822
|
}
|
|
3560
|
-
setHeader(() => newArray
|
|
3823
|
+
setHeader(() => [...newArray]);
|
|
3561
3824
|
}
|
|
3562
3825
|
}, [dataHeader, arrowColumn, arrowShow, disableArr, draggable]);
|
|
3563
3826
|
React.useEffect(() => {
|
|
@@ -3575,7 +3838,7 @@ const Table = ({
|
|
|
3575
3838
|
console.error(error);
|
|
3576
3839
|
});
|
|
3577
3840
|
}, []);
|
|
3578
|
-
return configStyles.TABLE && /*#__PURE__*/React__default["default"].createElement("table", {
|
|
3841
|
+
return configStyles.TABLE && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("table", {
|
|
3579
3842
|
style: {
|
|
3580
3843
|
width: '100%',
|
|
3581
3844
|
borderCollapse: tableRowItem ?? configStyles.TABLE.body.row.asItem ? 'separate' : 'collapse',
|
|
@@ -3610,7 +3873,7 @@ const Table = ({
|
|
|
3610
3873
|
tableColumnMinWidth: tableColumnMinWidth ?? configStyles.TABLE.column.minWidth,
|
|
3611
3874
|
tableColumnMaxWidth: tableColumnMaxWidth ?? configStyles.TABLE.column.maxWidth
|
|
3612
3875
|
});
|
|
3613
|
-
}))), body && body.length > 0
|
|
3876
|
+
}))), body && body.length > 0 ? /*#__PURE__*/React__default["default"].createElement("tbody", {
|
|
3614
3877
|
style: {
|
|
3615
3878
|
boxShadow: tBodyBoxShadow ?? configStyles.TABLE.body.box.shadow
|
|
3616
3879
|
}
|
|
@@ -3622,7 +3885,7 @@ const Table = ({
|
|
|
3622
3885
|
style: {
|
|
3623
3886
|
backgroundColor: tableRowBGColor ?? configStyles.TABLE.body.row.colors.background,
|
|
3624
3887
|
borderBottom: index === body.length - 1 ? 'none' : tBodyRowBorder ? tBodyRowBorder : configStyles.TABLE.body.row.border,
|
|
3625
|
-
borderColor: hideBorder ? 'transparent' : configStyles.TABLE.body.row.borderColor,
|
|
3888
|
+
borderColor: hideBorder || index === body.length - 1 ? 'transparent' : configStyles.TABLE.body.row.borderColor,
|
|
3626
3889
|
boxShadow: (tableRowItem ? tableRowItem : configStyles.TABLE.body.row.asItem) ? tableRowBoxShadow ? tableRowBoxShadow : configStyles.TABLE.body.row.box.shadow : 'none'
|
|
3627
3890
|
},
|
|
3628
3891
|
ref: el => setRef(index, el)
|
|
@@ -3669,7 +3932,7 @@ const Table = ({
|
|
|
3669
3932
|
handleOpenCloseRowSingleArrow: handleOpenCloseRowSingleArrow
|
|
3670
3933
|
});
|
|
3671
3934
|
}));
|
|
3672
|
-
})), draggable && dragging && draggedItem && /*#__PURE__*/React__default["default"].createElement("
|
|
3935
|
+
})) : '', body && body.length > 0 && draggable && dragging && draggedItem && /*#__PURE__*/React__default["default"].createElement("tbody", null, /*#__PURE__*/React__default["default"].createElement("tr", {
|
|
3673
3936
|
style: {
|
|
3674
3937
|
position: 'fixed',
|
|
3675
3938
|
top: `${position.y - 30}px`,
|
|
@@ -3715,10 +3978,15 @@ const Table = ({
|
|
|
3715
3978
|
borderRight: innerIndex === Object.values(draggedItem).length - 1 ? 'none' : configStyles.TABLE.body.row.border,
|
|
3716
3979
|
borderRightColor: innerIndex === Object.values(draggedItem).length - 1 ? 'transparent' : configStyles.TABLE.body.row.borderColor
|
|
3717
3980
|
});
|
|
3718
|
-
})))
|
|
3981
|
+
})))), !body.length && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3982
|
+
className: styles$a['no-tabel-data']
|
|
3983
|
+
}, /*#__PURE__*/React__default["default"].createElement("p", null, "\u054F\u057E\u0575\u0561\u056C\u0576\u0565\u0580 \u0579\u056F\u0561\u0576")));
|
|
3719
3984
|
};
|
|
3720
3985
|
Table.propTypes = {
|
|
3721
3986
|
getData: PropTypes__default["default"].func,
|
|
3987
|
+
getDraggableData: PropTypes__default["default"].func,
|
|
3988
|
+
draggable: PropTypes__default["default"].bool,
|
|
3989
|
+
showOrder: PropTypes__default["default"].bool,
|
|
3722
3990
|
dataBody: PropTypes__default["default"].array,
|
|
3723
3991
|
arrowShow: PropTypes__default["default"].bool,
|
|
3724
3992
|
dataHeader: PropTypes__default["default"].array,
|
|
@@ -3756,9 +4024,9 @@ Table.propTypes = {
|
|
|
3756
4024
|
hideBorder: PropTypes__default["default"].bool
|
|
3757
4025
|
};
|
|
3758
4026
|
|
|
3759
|
-
var css_248z$
|
|
3760
|
-
var styles$
|
|
3761
|
-
styleInject(css_248z$
|
|
4027
|
+
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)}}";
|
|
4028
|
+
var styles$9 = {"animation__modal":"modal-module_animation__modal__3mt48","show-popup":"modal-module_show-popup__WrH7a"};
|
|
4029
|
+
styleInject(css_248z$b);
|
|
3762
4030
|
|
|
3763
4031
|
const SvgNext = ({
|
|
3764
4032
|
title,
|
|
@@ -3878,6 +4146,7 @@ const Modal = ({
|
|
|
3878
4146
|
prevIcon,
|
|
3879
4147
|
nextIcon,
|
|
3880
4148
|
closeIcon,
|
|
4149
|
+
showCloseIcon,
|
|
3881
4150
|
closeSlideIcon,
|
|
3882
4151
|
selected,
|
|
3883
4152
|
children,
|
|
@@ -3890,6 +4159,7 @@ const Modal = ({
|
|
|
3890
4159
|
headerText,
|
|
3891
4160
|
imageWidth,
|
|
3892
4161
|
headerSize,
|
|
4162
|
+
headerIcon,
|
|
3893
4163
|
headerStyle,
|
|
3894
4164
|
headerFamily,
|
|
3895
4165
|
imageHeight,
|
|
@@ -3903,10 +4173,14 @@ const Modal = ({
|
|
|
3903
4173
|
headerWeight,
|
|
3904
4174
|
headerHeight,
|
|
3905
4175
|
justifyContent,
|
|
4176
|
+
headerTextAlign,
|
|
3906
4177
|
backgroundColor,
|
|
3907
4178
|
imageWrapHeight,
|
|
3908
4179
|
grayDecorHeight,
|
|
4180
|
+
headerIconMaxWidth,
|
|
4181
|
+
headerIconMaxHeight,
|
|
3909
4182
|
layerBackgroundColor,
|
|
4183
|
+
headerIconMarginRight,
|
|
3910
4184
|
closeAreaBackgroundColor,
|
|
3911
4185
|
type = 'content'
|
|
3912
4186
|
}) => {
|
|
@@ -3918,7 +4192,15 @@ const Modal = ({
|
|
|
3918
4192
|
const [classProps, setClassProps] = React.useState({});
|
|
3919
4193
|
const [configStyles, setConfigStyles] = React.useState({});
|
|
3920
4194
|
const handleCloseModal = () => {
|
|
3921
|
-
|
|
4195
|
+
if (outsideClose !== undefined) {
|
|
4196
|
+
if (outsideClose) {
|
|
4197
|
+
setShow(false);
|
|
4198
|
+
}
|
|
4199
|
+
} else {
|
|
4200
|
+
if (configStyles.MODAL.outsideClose) {
|
|
4201
|
+
setShow(false);
|
|
4202
|
+
}
|
|
4203
|
+
}
|
|
3922
4204
|
};
|
|
3923
4205
|
const handleStopClosing = e => {
|
|
3924
4206
|
e.stopPropagation();
|
|
@@ -4013,7 +4295,7 @@ const Modal = ({
|
|
|
4013
4295
|
}, []);
|
|
4014
4296
|
return configStyles.MODAL && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4015
4297
|
className: classProps,
|
|
4016
|
-
onClick:
|
|
4298
|
+
onClick: handleCloseModal,
|
|
4017
4299
|
style: {
|
|
4018
4300
|
top: '0px',
|
|
4019
4301
|
left: '0px',
|
|
@@ -4033,7 +4315,7 @@ const Modal = ({
|
|
|
4033
4315
|
justifyContent: justifyContent ?? configStyles.MODAL.justifyContent
|
|
4034
4316
|
}
|
|
4035
4317
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4036
|
-
className: `${styles$
|
|
4318
|
+
className: `${styles$9['animation__modal']}`,
|
|
4037
4319
|
onClick: handleStopClosing,
|
|
4038
4320
|
style: {
|
|
4039
4321
|
position: 'relative',
|
|
@@ -4062,7 +4344,18 @@ const Modal = ({
|
|
|
4062
4344
|
justifyContent: headerText && type === 'content' ? 'space-between' : 'flex-end',
|
|
4063
4345
|
backgroundColor: closeAreaBackgroundColor ?? configStyles.MODAL.closeAreaBackgroundColor
|
|
4064
4346
|
}
|
|
4065
|
-
},
|
|
4347
|
+
}, headerIcon && type === 'content' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4348
|
+
style: {
|
|
4349
|
+
display: 'flex',
|
|
4350
|
+
width: 'fit-content',
|
|
4351
|
+
alignItems: 'center',
|
|
4352
|
+
height: 'fit-content',
|
|
4353
|
+
justifyContent: 'center',
|
|
4354
|
+
maxWidth: headerIconMaxWidth ?? configStyles.MODAL.header.icon.maxWidth,
|
|
4355
|
+
maxHeight: headerIconMaxHeight ?? configStyles.MODAL.header.icon.maxHeight,
|
|
4356
|
+
marginRight: headerIconMarginRight ?? configStyles.MODAL.header.icon.marginRight
|
|
4357
|
+
}
|
|
4358
|
+
}, headerIcon), headerText && type === 'content' && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
4066
4359
|
style: {
|
|
4067
4360
|
flex: '1',
|
|
4068
4361
|
overflow: 'hidden',
|
|
@@ -4071,18 +4364,25 @@ const Modal = ({
|
|
|
4071
4364
|
margin: '0px 16px 0px 0px',
|
|
4072
4365
|
color: headerColor ?? configStyles.MODAL.header.color,
|
|
4073
4366
|
fontSize: headerSize ?? configStyles.MODAL.header.font.size,
|
|
4367
|
+
textAlign: headerTextAlign ?? configStyles.MODAL.header.align,
|
|
4074
4368
|
fontStyle: headerStyle ?? configStyles.MODAL.header.font.style,
|
|
4075
4369
|
fontFamily: headerFamily ?? configStyles.MODAL.header.font.family,
|
|
4076
4370
|
fontWeight: headerWeight ?? configStyles.MODAL.header.font.weight
|
|
4077
4371
|
}
|
|
4078
|
-
}, headerText), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4079
|
-
onClick:
|
|
4372
|
+
}, headerText), showCloseIcon ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4373
|
+
onClick: () => setShow(false),
|
|
4080
4374
|
style: {
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4375
|
+
display: 'flex',
|
|
4376
|
+
minWidth: '14px',
|
|
4377
|
+
minHeight: '14px',
|
|
4378
|
+
cursor: 'pointer',
|
|
4379
|
+
width: 'fit-content',
|
|
4380
|
+
alignItems: 'center',
|
|
4381
|
+
alignSelf: 'flex-end',
|
|
4382
|
+
height: 'fit-content',
|
|
4383
|
+
justifyContent: 'center'
|
|
4084
4384
|
}
|
|
4085
|
-
}, closeIcon ? closeIcon : configStyles.MODAL.icon.close ? configStyles.MODAL.icon.close : /*#__PURE__*/React__default["default"].createElement(SvgCloseIcon, null))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4385
|
+
}, closeIcon ? closeIcon : configStyles.MODAL.icon.close ? configStyles.MODAL.icon.close : /*#__PURE__*/React__default["default"].createElement(SvgCloseIcon, null)) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4086
4386
|
style: {
|
|
4087
4387
|
display: 'flex',
|
|
4088
4388
|
width: '100%',
|
|
@@ -4125,7 +4425,7 @@ const Modal = ({
|
|
|
4125
4425
|
background: closeAreaBackgroundColor ?? configStyles.MODAL.closeAreaBackgroundColor
|
|
4126
4426
|
}
|
|
4127
4427
|
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
4128
|
-
onClick:
|
|
4428
|
+
onClick: () => setShow(false),
|
|
4129
4429
|
style: {
|
|
4130
4430
|
position: 'absolute',
|
|
4131
4431
|
zIndex: '1',
|
|
@@ -4230,14 +4530,20 @@ Modal.propTypes = {
|
|
|
4230
4530
|
prevIcon: PropTypes__default["default"].element,
|
|
4231
4531
|
nextIcon: PropTypes__default["default"].element,
|
|
4232
4532
|
closeIcon: PropTypes__default["default"].element,
|
|
4533
|
+
showCloseIcon: PropTypes__default["default"].bool,
|
|
4233
4534
|
closeSlideIcon: PropTypes__default["default"].element,
|
|
4234
|
-
alignItems: PropTypes__default["default"].string,
|
|
4235
|
-
mMaxHeight: PropTypes__default["default"].string,
|
|
4236
4535
|
headerText: PropTypes__default["default"].string,
|
|
4237
|
-
imageWidth: PropTypes__default["default"].string,
|
|
4238
4536
|
headerSize: PropTypes__default["default"].string,
|
|
4239
4537
|
headerStyle: PropTypes__default["default"].string,
|
|
4538
|
+
headerIcon: PropTypes__default["default"].element,
|
|
4240
4539
|
headerFamily: PropTypes__default["default"].string,
|
|
4540
|
+
headerTextAlign: PropTypes__default["default"].string,
|
|
4541
|
+
headerIconMaxWidth: PropTypes__default["default"].string,
|
|
4542
|
+
headerIconMaxHeight: PropTypes__default["default"].string,
|
|
4543
|
+
headerIconMarginRight: PropTypes__default["default"].string,
|
|
4544
|
+
alignItems: PropTypes__default["default"].string,
|
|
4545
|
+
mMaxHeight: PropTypes__default["default"].string,
|
|
4546
|
+
imageWidth: PropTypes__default["default"].string,
|
|
4241
4547
|
outsideClose: PropTypes__default["default"].bool,
|
|
4242
4548
|
showZoomIcon: PropTypes__default["default"].bool,
|
|
4243
4549
|
imageMargin: PropTypes__default["default"].string,
|
|
@@ -4316,19 +4622,23 @@ const TelInput = ({
|
|
|
4316
4622
|
...inpStyles,
|
|
4317
4623
|
border: 'none',
|
|
4318
4624
|
outline: 'none',
|
|
4319
|
-
|
|
4625
|
+
borderTopRightRadius: radius,
|
|
4626
|
+
borderBottomRightRadius: radius
|
|
4320
4627
|
}
|
|
4321
4628
|
}));
|
|
4322
4629
|
};
|
|
4323
4630
|
|
|
4324
4631
|
const TextInput = ({
|
|
4632
|
+
ssn,
|
|
4325
4633
|
value,
|
|
4326
4634
|
radius,
|
|
4327
|
-
|
|
4635
|
+
disabled,
|
|
4328
4636
|
maxLength,
|
|
4329
4637
|
inpStyles,
|
|
4330
|
-
|
|
4331
|
-
inpAttributes
|
|
4638
|
+
inputChange,
|
|
4639
|
+
inpAttributes,
|
|
4640
|
+
checkLeftIcon,
|
|
4641
|
+
checkRightIcon
|
|
4332
4642
|
}) => {
|
|
4333
4643
|
const [innerValue, setInnerValue] = React.useState('');
|
|
4334
4644
|
const handleChange = event => {
|
|
@@ -4337,9 +4647,9 @@ const TextInput = ({
|
|
|
4337
4647
|
if (maxLength && currentValue.length > maxLength) {
|
|
4338
4648
|
currentValue = currentValue.substr(0, maxLength);
|
|
4339
4649
|
}
|
|
4340
|
-
setInnerValue(() => currentValue);
|
|
4650
|
+
setInnerValue(() => ssn ? currentValue.replace(/[^a-zA-ZԱ-Ֆա-ֆА-Яа-яЁё0-9\s]/g, '') : currentValue);
|
|
4341
4651
|
if (inputChange && currentValue !== prevValue) {
|
|
4342
|
-
inputChange(currentValue);
|
|
4652
|
+
inputChange(ssn ? currentValue.replace(/[^a-zA-ZԱ-Ֆա-ֆА-Яа-яЁё0-9\s]/g, '') : currentValue);
|
|
4343
4653
|
}
|
|
4344
4654
|
};
|
|
4345
4655
|
React.useEffect(() => {
|
|
@@ -4350,7 +4660,7 @@ const TextInput = ({
|
|
|
4350
4660
|
newValue = value.substr(0, maxLength);
|
|
4351
4661
|
}
|
|
4352
4662
|
}
|
|
4353
|
-
setInnerValue(() => newValue);
|
|
4663
|
+
setInnerValue(() => ssn ? newValue.replace(/[^a-zA-ZԱ-Ֆա-ֆА-Яа-яЁё0-9\s]/g, '') : newValue);
|
|
4354
4664
|
}, [value]);
|
|
4355
4665
|
return /*#__PURE__*/React__default["default"].createElement("input", {
|
|
4356
4666
|
type: "text",
|
|
@@ -4364,7 +4674,10 @@ const TextInput = ({
|
|
|
4364
4674
|
...inpStyles,
|
|
4365
4675
|
border: 'none',
|
|
4366
4676
|
outline: 'none',
|
|
4367
|
-
|
|
4677
|
+
borderTopLeftRadius: checkLeftIcon ? '0px' : radius,
|
|
4678
|
+
borderTopRightRadius: checkRightIcon ? '0px' : radius,
|
|
4679
|
+
borderBottomLeftRadius: checkLeftIcon ? '0px' : radius,
|
|
4680
|
+
borderBottomRightRadius: checkRightIcon ? '0px' : radius
|
|
4368
4681
|
}
|
|
4369
4682
|
});
|
|
4370
4683
|
};
|
|
@@ -4373,11 +4686,13 @@ const PassInput = ({
|
|
|
4373
4686
|
show,
|
|
4374
4687
|
value,
|
|
4375
4688
|
radius,
|
|
4376
|
-
|
|
4689
|
+
disabled,
|
|
4377
4690
|
maxLength,
|
|
4691
|
+
inpStyles,
|
|
4692
|
+
inputChange,
|
|
4378
4693
|
inpAttributes,
|
|
4379
|
-
|
|
4380
|
-
|
|
4694
|
+
checkLeftIcon,
|
|
4695
|
+
checkRightIcon
|
|
4381
4696
|
}) => {
|
|
4382
4697
|
const [innerShow, setInnerShow] = React.useState('');
|
|
4383
4698
|
const [innerValue, setInnerValue] = React.useState('');
|
|
@@ -4417,7 +4732,10 @@ const PassInput = ({
|
|
|
4417
4732
|
...inpStyles,
|
|
4418
4733
|
border: 'none',
|
|
4419
4734
|
outline: 'none',
|
|
4420
|
-
|
|
4735
|
+
borderTopLeftRadius: checkLeftIcon ? '0px' : radius,
|
|
4736
|
+
borderTopRightRadius: checkRightIcon ? '0px' : radius,
|
|
4737
|
+
borderBottomLeftRadius: checkLeftIcon ? '0px' : radius,
|
|
4738
|
+
borderBottomRightRadius: checkRightIcon ? '0px' : radius
|
|
4421
4739
|
}
|
|
4422
4740
|
});
|
|
4423
4741
|
};
|
|
@@ -4430,11 +4748,15 @@ const NumberInput = ({
|
|
|
4430
4748
|
withZero,
|
|
4431
4749
|
disabled,
|
|
4432
4750
|
inpStyles,
|
|
4751
|
+
cardNumber,
|
|
4433
4752
|
minNumSize,
|
|
4434
4753
|
maxNumSize,
|
|
4435
4754
|
insideError,
|
|
4436
4755
|
inputChange,
|
|
4756
|
+
errorMessage,
|
|
4757
|
+
checkLeftIcon,
|
|
4437
4758
|
inpAttributes,
|
|
4759
|
+
checkRightIcon,
|
|
4438
4760
|
numberMaxLength,
|
|
4439
4761
|
setInnerErrorMessage
|
|
4440
4762
|
}) => {
|
|
@@ -4443,32 +4765,51 @@ const NumberInput = ({
|
|
|
4443
4765
|
const handleChange = event => {
|
|
4444
4766
|
let prevValue = innerValue;
|
|
4445
4767
|
let currentValue = event.target.value.replace(/\.|․|\.|,/g, '.');
|
|
4446
|
-
currentValue = handleUtilsCheckTypeNumber(currentValue, prevValue, null, float, maxNumSize, dots, innerMinNumSize, numberMaxLength);
|
|
4447
|
-
setInnerValue(() => currentValue);
|
|
4768
|
+
currentValue = handleUtilsCheckTypeNumber(currentValue, prevValue, null, float, maxNumSize, dots, innerMinNumSize, numberMaxLength, cardNumber);
|
|
4769
|
+
setInnerValue(() => cardNumber ? currentValue.replace(/(\d{4})(?=\d)/g, '$1-') : currentValue);
|
|
4448
4770
|
if (inputChange && currentValue !== prevValue) {
|
|
4449
4771
|
if (currentValue < Number.MIN_SAFE_INTEGER || currentValue > Number.MAX_SAFE_INTEGER) {
|
|
4450
|
-
if (
|
|
4451
|
-
|
|
4772
|
+
if (!cardNumber) {
|
|
4773
|
+
if (currentValue === '') {
|
|
4774
|
+
setInnerErrorMessage(() => '');
|
|
4775
|
+
} else {
|
|
4776
|
+
insideError && insideError();
|
|
4777
|
+
setInnerErrorMessage(() => `Լրացված դաշտի արժեքը պետք է լինի ${Number.MIN_SAFE_INTEGER} - ${Number.MAX_SAFE_INTEGER} թվերի միջակայքում`);
|
|
4778
|
+
}
|
|
4452
4779
|
} else {
|
|
4453
|
-
|
|
4454
|
-
|
|
4780
|
+
inputChange(currentValue.replaceAll('-', ''));
|
|
4781
|
+
if (errorMessage) {
|
|
4782
|
+
setInnerErrorMessage(() => errorMessage);
|
|
4783
|
+
} else {
|
|
4784
|
+
setInnerErrorMessage(() => '');
|
|
4785
|
+
}
|
|
4455
4786
|
}
|
|
4456
4787
|
} else if (innerMinNumSize && currentValue < innerMinNumSize || maxNumSize && currentValue > maxNumSize) {
|
|
4457
4788
|
if (currentValue === '') {
|
|
4458
4789
|
setInnerErrorMessage(() => '');
|
|
4459
4790
|
} else {
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4791
|
+
if (!cardNumber) {
|
|
4792
|
+
insideError && insideError();
|
|
4793
|
+
if (innerMinNumSize && !maxNumSize) {
|
|
4794
|
+
setInnerErrorMessage(() => `Լրացված դաշտի արժեքը պետք է լինի ոչ պակաս ${innerMinNumSize} - ից`);
|
|
4795
|
+
} else if (!innerMinNumSize && maxNumSize) {
|
|
4796
|
+
setInnerErrorMessage(() => `Լրացված դաշտի արժեքը պետք է լինի ոչ մեծ ${maxNumSize} ֊ ից`);
|
|
4797
|
+
} else if (innerMinNumSize && maxNumSize) {
|
|
4798
|
+
setInnerErrorMessage(() => `Լրացված դաշտի արժեքը պետք է լինի ${innerMinNumSize} - ${maxNumSize} թվերի միջակայքում`);
|
|
4799
|
+
}
|
|
4467
4800
|
}
|
|
4468
4801
|
}
|
|
4469
4802
|
} else if (currentValue >= Number.MIN_SAFE_INTEGER || currentValue <= Number.MAX_SAFE_INTEGER || innerMinNumSize && currentValue >= innerMinNumSize || maxNumSize && currentValue <= maxNumSize) {
|
|
4470
|
-
inputChange(currentValue);
|
|
4471
|
-
|
|
4803
|
+
inputChange(cardNumber ? currentValue.replaceAll('-', '') : currentValue);
|
|
4804
|
+
if (cardNumber) {
|
|
4805
|
+
if (errorMessage) {
|
|
4806
|
+
setInnerErrorMessage(() => errorMessage);
|
|
4807
|
+
} else {
|
|
4808
|
+
setInnerErrorMessage(() => '');
|
|
4809
|
+
}
|
|
4810
|
+
} else {
|
|
4811
|
+
setInnerErrorMessage(() => '');
|
|
4812
|
+
}
|
|
4472
4813
|
}
|
|
4473
4814
|
}
|
|
4474
4815
|
};
|
|
@@ -4478,7 +4819,7 @@ const NumberInput = ({
|
|
|
4478
4819
|
if (parseFloat(newVal) === 0) {
|
|
4479
4820
|
inputChange('');
|
|
4480
4821
|
} else {
|
|
4481
|
-
inputChange(newVal);
|
|
4822
|
+
inputChange(cardNumber ? newVal.replaceAll('-', '') : newVal);
|
|
4482
4823
|
}
|
|
4483
4824
|
}
|
|
4484
4825
|
};
|
|
@@ -4496,10 +4837,11 @@ const NumberInput = ({
|
|
|
4496
4837
|
React.useEffect(() => {
|
|
4497
4838
|
let newValue = '';
|
|
4498
4839
|
if (value !== undefined && value !== null) {
|
|
4499
|
-
newValue = handleUtilsCheckTypeNumber(value, newValue, null, float, maxNumSize, dots, innerMinNumSize, numberMaxLength);
|
|
4840
|
+
newValue = handleUtilsCheckTypeNumber(value, newValue, null, float, maxNumSize, dots, innerMinNumSize, numberMaxLength, cardNumber);
|
|
4500
4841
|
}
|
|
4501
|
-
setInnerValue(() => newValue);
|
|
4502
|
-
|
|
4842
|
+
setInnerValue(() => cardNumber ? newValue.replace(/(\d{4})(?=\d)/g, '$1-') : newValue);
|
|
4843
|
+
// inputChange(cardNumber ? newValue.replaceAll('-', '') : newValue);
|
|
4844
|
+
}, [dots, value, float, cardNumber, maxNumSize, minNumSize, numberMaxLength]);
|
|
4503
4845
|
return /*#__PURE__*/React__default["default"].createElement("input", {
|
|
4504
4846
|
type: "text",
|
|
4505
4847
|
value: innerValue,
|
|
@@ -4511,7 +4853,10 @@ const NumberInput = ({
|
|
|
4511
4853
|
...inpStyles,
|
|
4512
4854
|
border: 'none',
|
|
4513
4855
|
outline: 'none',
|
|
4514
|
-
|
|
4856
|
+
borderTopLeftRadius: checkLeftIcon ? '0px' : radius,
|
|
4857
|
+
borderTopRightRadius: checkRightIcon ? '0px' : radius,
|
|
4858
|
+
borderBottomLeftRadius: checkLeftIcon ? '0px' : radius,
|
|
4859
|
+
borderBottomRightRadius: checkRightIcon ? '0px' : radius
|
|
4515
4860
|
},
|
|
4516
4861
|
min: minNumSize,
|
|
4517
4862
|
max: maxNumSize,
|
|
@@ -4520,9 +4865,9 @@ const NumberInput = ({
|
|
|
4520
4865
|
});
|
|
4521
4866
|
};
|
|
4522
4867
|
|
|
4523
|
-
var css_248z$
|
|
4524
|
-
var styles$
|
|
4525
|
-
styleInject(css_248z$
|
|
4868
|
+
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)}}";
|
|
4869
|
+
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"};
|
|
4870
|
+
styleInject(css_248z$a);
|
|
4526
4871
|
|
|
4527
4872
|
const InputTypes = {
|
|
4528
4873
|
TEL: 'tel',
|
|
@@ -4530,10 +4875,15 @@ const InputTypes = {
|
|
|
4530
4875
|
NUMBER: 'number',
|
|
4531
4876
|
PASSWORD: 'password'
|
|
4532
4877
|
};
|
|
4878
|
+
const IconSides = {
|
|
4879
|
+
LEFT: 'left',
|
|
4880
|
+
RIGHT: 'right'
|
|
4881
|
+
};
|
|
4533
4882
|
const P = styled__default["default"].span`
|
|
4534
4883
|
animation: ${true};
|
|
4535
4884
|
`;
|
|
4536
4885
|
const Input = ({
|
|
4886
|
+
ssn,
|
|
4537
4887
|
size,
|
|
4538
4888
|
name,
|
|
4539
4889
|
style,
|
|
@@ -4552,6 +4902,8 @@ const Input = ({
|
|
|
4552
4902
|
leftIcon,
|
|
4553
4903
|
required,
|
|
4554
4904
|
disabled,
|
|
4905
|
+
errorDots,
|
|
4906
|
+
errorIcon,
|
|
4555
4907
|
labelDots,
|
|
4556
4908
|
iconWidth,
|
|
4557
4909
|
rightIcon,
|
|
@@ -4562,6 +4914,7 @@ const Input = ({
|
|
|
4562
4914
|
errorSize,
|
|
4563
4915
|
labelSize,
|
|
4564
4916
|
maxLength,
|
|
4917
|
+
labelIcon,
|
|
4565
4918
|
labelStyle,
|
|
4566
4919
|
floatToFix,
|
|
4567
4920
|
minNumSize,
|
|
@@ -4570,6 +4923,9 @@ const Input = ({
|
|
|
4570
4923
|
errorColor,
|
|
4571
4924
|
withoutDot,
|
|
4572
4925
|
errorStyle,
|
|
4926
|
+
iconPadding,
|
|
4927
|
+
labelAction,
|
|
4928
|
+
errorAction,
|
|
4573
4929
|
placeholder,
|
|
4574
4930
|
errorZindex,
|
|
4575
4931
|
labelWeight,
|
|
@@ -4579,15 +4935,22 @@ const Input = ({
|
|
|
4579
4935
|
errorMessage,
|
|
4580
4936
|
autoComplete,
|
|
4581
4937
|
labelDisplay,
|
|
4938
|
+
labelIconSide,
|
|
4939
|
+
showLabelIcon,
|
|
4940
|
+
errorIconSide,
|
|
4941
|
+
showErrorIcon,
|
|
4582
4942
|
errorMarginTop,
|
|
4943
|
+
errorBoxShadow,
|
|
4583
4944
|
boxShadowHover,
|
|
4584
4945
|
errorClassName,
|
|
4946
|
+
labelIconMargin,
|
|
4585
4947
|
labelFontFamily,
|
|
4586
4948
|
phoneAlignItems,
|
|
4587
4949
|
errorLineHeight,
|
|
4588
4950
|
labelLineHeight,
|
|
4589
4951
|
numberMaxLength,
|
|
4590
4952
|
backgroundColor,
|
|
4953
|
+
errorIconMargin,
|
|
4591
4954
|
withZero = false,
|
|
4592
4955
|
labelMarginBottom,
|
|
4593
4956
|
regexpErrorMessage,
|
|
@@ -4598,6 +4961,7 @@ const Input = ({
|
|
|
4598
4961
|
fireInputInsideError,
|
|
4599
4962
|
backgroundDisableColor,
|
|
4600
4963
|
telBorderRightColorHover,
|
|
4964
|
+
cardNumber,
|
|
4601
4965
|
type = 'text'
|
|
4602
4966
|
}) => {
|
|
4603
4967
|
const [show, setShow] = React.useState(false);
|
|
@@ -4605,7 +4969,11 @@ const Input = ({
|
|
|
4605
4969
|
const [classProps, setClassProps] = React.useState({});
|
|
4606
4970
|
const [innerValue, setInnerValue] = React.useState('');
|
|
4607
4971
|
const [configStyles, setConfigStyles] = React.useState({});
|
|
4972
|
+
const [innerErrorIcon, setInnerErrorIcon] = React.useState('');
|
|
4973
|
+
const [innerLabelIcon, setInnerLabelIcon] = React.useState('');
|
|
4608
4974
|
const [innerErrorMessage, setInnerErrorMessage] = React.useState('');
|
|
4975
|
+
const [innerErrorIconSide, setInnerErrorIconSide] = React.useState('left');
|
|
4976
|
+
const [innerLabelIconSide, setInnerLabelIconSide] = React.useState('left');
|
|
4609
4977
|
const inpStyles = configStyles.INPUT && {
|
|
4610
4978
|
width: width ?? configStyles.INPUT.width,
|
|
4611
4979
|
cursor: disabled ? 'not-allowed' : 'auto',
|
|
@@ -4625,19 +4993,22 @@ const Input = ({
|
|
|
4625
4993
|
iName: name ? name : `tui_${uuid}_tui`,
|
|
4626
4994
|
autoComplete: autoComplete ?? configStyles.INPUT.autoComplete
|
|
4627
4995
|
};
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4996
|
+
|
|
4997
|
+
// const errorShow = keyframes`
|
|
4998
|
+
// 100% {
|
|
4999
|
+
// bottom: '-20px';
|
|
5000
|
+
// transform: scale3d(1,1,1);
|
|
5001
|
+
// -webkit-transform: scale3d(1,1,1);
|
|
5002
|
+
// -moz-transform: scale3d(1,1,1);
|
|
5003
|
+
// -ms-transform: scale3d(1,1,1);
|
|
5004
|
+
// -o-transform: scale3d(1,1,1);
|
|
5005
|
+
// }
|
|
5006
|
+
// `
|
|
5007
|
+
|
|
5008
|
+
// const animation = () => css`
|
|
5009
|
+
// ${errorShow} 240ms forwards
|
|
5010
|
+
// `
|
|
5011
|
+
|
|
4641
5012
|
const handleMouseEnter = () => {
|
|
4642
5013
|
setIsHover(true);
|
|
4643
5014
|
};
|
|
@@ -4662,11 +5033,27 @@ const Input = ({
|
|
|
4662
5033
|
setInnerValue(() => val);
|
|
4663
5034
|
}, [value]);
|
|
4664
5035
|
React.useEffect(() => {
|
|
4665
|
-
className && setClassProps(() => classnames__default["default"](className ?? configStyles.INPUT.className, type === 'number' ? styles$
|
|
5036
|
+
className && setClassProps(() => classnames__default["default"](className ?? configStyles.INPUT.className, type === 'number' ? styles$8['inp-num'] : '', styles$8['input-wrap']));
|
|
4666
5037
|
}, [className]);
|
|
5038
|
+
React.useEffect(() => {
|
|
5039
|
+
setInnerErrorIcon(() => errorIcon);
|
|
5040
|
+
}, [errorIcon]);
|
|
5041
|
+
React.useEffect(() => {
|
|
5042
|
+
if (errorIconSide) {
|
|
5043
|
+
setInnerErrorIconSide(() => errorIconSide);
|
|
5044
|
+
}
|
|
5045
|
+
}, [errorIconSide]);
|
|
5046
|
+
React.useEffect(() => {
|
|
5047
|
+
setInnerLabelIcon(() => labelIcon);
|
|
5048
|
+
}, [labelIcon]);
|
|
5049
|
+
React.useEffect(() => {
|
|
5050
|
+
if (labelIconSide) {
|
|
5051
|
+
setInnerLabelIconSide(() => labelIconSide);
|
|
5052
|
+
}
|
|
5053
|
+
}, [labelIconSide]);
|
|
4667
5054
|
React.useEffect(() => {
|
|
4668
5055
|
configStylesPromise.then(data => {
|
|
4669
|
-
setClassProps(() => classnames__default["default"](className ?? data.INPUT.className, type === 'number' ? styles$
|
|
5056
|
+
setClassProps(() => classnames__default["default"](className ?? data.INPUT.className, type === 'number' ? styles$8['inp-num'] : '', styles$8['input-wrap']));
|
|
4670
5057
|
setConfigStyles(() => {
|
|
4671
5058
|
return {
|
|
4672
5059
|
...data
|
|
@@ -4694,12 +5081,32 @@ const Input = ({
|
|
|
4694
5081
|
textOverflow: (labelDots ? labelDots : configStyles.INPUT.label.dots) ? 'ellipsis' : ''
|
|
4695
5082
|
},
|
|
4696
5083
|
title: label
|
|
4697
|
-
},
|
|
4698
|
-
|
|
5084
|
+
}, showLabelIcon && innerLabelIcon && innerLabelIconSide === 'left' ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
5085
|
+
alt: "label icon",
|
|
5086
|
+
src: innerLabelIcon,
|
|
5087
|
+
style: {
|
|
5088
|
+
width: '14px',
|
|
5089
|
+
height: '14px',
|
|
5090
|
+
cursor: labelAction ? 'pointer' : 'normal',
|
|
5091
|
+
marginRight: labelIconMargin ?? configStyles.INPUT.label.iconMargin
|
|
5092
|
+
},
|
|
5093
|
+
onClick: labelAction ? () => labelAction() : _ => _
|
|
5094
|
+
}) : '', label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null)), showLabelIcon && innerLabelIcon && innerLabelIconSide === 'right' ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
5095
|
+
alt: "label icon",
|
|
5096
|
+
src: innerLabelIcon,
|
|
5097
|
+
style: {
|
|
5098
|
+
width: '14px',
|
|
5099
|
+
height: '14px',
|
|
5100
|
+
cursor: labelAction ? 'pointer' : 'normal',
|
|
5101
|
+
marginLeft: labelIconMargin ?? configStyles.INPUT.label.iconMargin
|
|
5102
|
+
},
|
|
5103
|
+
onClick: labelAction ? () => labelAction() : _ => _
|
|
5104
|
+
}) : '') : '', /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5105
|
+
className: `${styles$8['input-content']}`,
|
|
4699
5106
|
style: {
|
|
4700
5107
|
width: width ?? configStyles.INPUT.width,
|
|
4701
5108
|
borderRadius: radius ?? configStyles.INPUT.radius,
|
|
4702
|
-
boxShadow: innerErrorMessage ?
|
|
5109
|
+
boxShadow: innerErrorMessage ? errorBoxShadow ? errorBoxShadow : configStyles.INPUT.error.box.shadow : isHover && !disabled ? boxShadowHover ? boxShadowHover : configStyles.INPUT.box.shadowHover : boxShadow ? boxShadow : configStyles.INPUT.box.shadow
|
|
4703
5110
|
},
|
|
4704
5111
|
onMouseEnter: handleMouseEnter,
|
|
4705
5112
|
onMouseLeave: handleMouseLeave
|
|
@@ -4711,9 +5118,9 @@ const Input = ({
|
|
|
4711
5118
|
justifyContent: 'center',
|
|
4712
5119
|
cursor: type === 'password' ? 'pointer' : 'default',
|
|
4713
5120
|
height: height ?? configStyles.INPUT.height,
|
|
4714
|
-
padding: padding ?? configStyles.INPUT.padding,
|
|
4715
5121
|
width: iconWidth ?? configStyles.INPUT.iconWidth,
|
|
4716
5122
|
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
5123
|
+
padding: iconPadding ?? configStyles.INPUT.iconPadding,
|
|
4717
5124
|
borderTopLeftRadius: radius ?? configStyles.INPUT.radius,
|
|
4718
5125
|
borderBottomLeftRadius: radius ?? configStyles.INPUT.radius,
|
|
4719
5126
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
@@ -4742,13 +5149,17 @@ const Input = ({
|
|
|
4742
5149
|
withZero: withZero,
|
|
4743
5150
|
inputChange: change,
|
|
4744
5151
|
inpStyles: inpStyles,
|
|
5152
|
+
cardNumber: cardNumber,
|
|
5153
|
+
errorMessage: errorMessage,
|
|
4745
5154
|
inpAttributes: inpAttributes,
|
|
4746
5155
|
numberMaxLength: numberMaxLength,
|
|
4747
5156
|
insideError: fireInputInsideError,
|
|
4748
5157
|
minNumSize: minNumSize ? minNumSize : '',
|
|
4749
5158
|
maxNumSize: maxNumSize ? maxNumSize : '',
|
|
4750
5159
|
setInnerErrorMessage: setInnerErrorMessage,
|
|
4751
|
-
radius: radius ?? configStyles.INPUT.radius
|
|
5160
|
+
radius: radius ?? configStyles.INPUT.radius,
|
|
5161
|
+
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5162
|
+
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
4752
5163
|
}) : type === 'password' ? /*#__PURE__*/React__default["default"].createElement(PassInput, {
|
|
4753
5164
|
show: show,
|
|
4754
5165
|
type: type,
|
|
@@ -4758,15 +5169,20 @@ const Input = ({
|
|
|
4758
5169
|
inpStyles: inpStyles,
|
|
4759
5170
|
inpAttributes: inpAttributes,
|
|
4760
5171
|
radius: radius ?? configStyles.INPUT.radius,
|
|
4761
|
-
maxLength: maxLength ?? configStyles.INPUT.maxLength
|
|
5172
|
+
maxLength: maxLength ?? configStyles.INPUT.maxLength,
|
|
5173
|
+
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5174
|
+
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
4762
5175
|
}) : /*#__PURE__*/React__default["default"].createElement(TextInput, {
|
|
5176
|
+
ssn: ssn,
|
|
4763
5177
|
value: innerValue,
|
|
4764
5178
|
disabled: disabled,
|
|
4765
5179
|
inputChange: change,
|
|
4766
5180
|
inpStyles: inpStyles,
|
|
4767
5181
|
inpAttributes: inpAttributes,
|
|
4768
5182
|
radius: radius ?? configStyles.INPUT.radius,
|
|
4769
|
-
maxLength: maxLength ?? configStyles.INPUT.maxLength
|
|
5183
|
+
maxLength: maxLength ?? configStyles.INPUT.maxLength,
|
|
5184
|
+
checkLeftIcon: leftIcon && leftIcon.length > 0 ? true : false,
|
|
5185
|
+
checkRightIcon: rightIcon && rightIcon.length > 0 ? true : false
|
|
4770
5186
|
}), rightIcon && rightIcon.length > 0 ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4771
5187
|
onClick: type === 'password' ? handleShowPass : _ => _,
|
|
4772
5188
|
style: {
|
|
@@ -4775,41 +5191,72 @@ const Input = ({
|
|
|
4775
5191
|
justifyContent: 'center',
|
|
4776
5192
|
cursor: type === 'password' ? 'pointer' : 'default',
|
|
4777
5193
|
height: height ?? configStyles.INPUT.height,
|
|
4778
|
-
padding: padding ?? configStyles.INPUT.padding,
|
|
4779
5194
|
width: iconWidth ?? configStyles.INPUT.iconWidth,
|
|
4780
5195
|
boxSizing: boxSizing ?? configStyles.INPUT.box.sizing,
|
|
5196
|
+
padding: iconPadding ?? configStyles.INPUT.iconPadding,
|
|
4781
5197
|
borderTopRightRadius: radius ?? configStyles.INPUT.radius,
|
|
4782
5198
|
borderBottomRightRadius: radius ?? configStyles.INPUT.radius,
|
|
4783
5199
|
backgroundColor: disabled ? backgroundDisableColor ? backgroundDisableColor : configStyles.INPUT.colors.backgroundDisable : backgroundColor ? backgroundColor : configStyles.INPUT.colors.background
|
|
4784
5200
|
}
|
|
4785
|
-
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), tooltip ? tooltip : '', innerErrorMessage ? /*#__PURE__*/React__default["default"].createElement(P
|
|
4786
|
-
|
|
5201
|
+
}, type === 'password' ? show ? rightIcon[1] : rightIcon[0] : rightIcon[0]) : ''), tooltip ? tooltip : '', innerErrorMessage ? /*#__PURE__*/React__default["default"].createElement(P
|
|
5202
|
+
// animation={animation}
|
|
5203
|
+
, {
|
|
4787
5204
|
style: {
|
|
4788
5205
|
margin: '0px',
|
|
5206
|
+
display: 'flex',
|
|
5207
|
+
alignItems: 'center',
|
|
4789
5208
|
position: 'absolute',
|
|
4790
5209
|
width: width ?? configStyles.INPUT.width,
|
|
4791
5210
|
left: errorLeft ?? configStyles.INPUT.error.left,
|
|
4792
5211
|
color: errorColor ?? configStyles.INPUT.error.color,
|
|
5212
|
+
zIndex: errorZindex ?? configStyles.INPUT.error.zIndex,
|
|
4793
5213
|
fontSize: errorSize ?? configStyles.INPUT.error.font.size,
|
|
4794
5214
|
fontStyle: errorStyle ?? configStyles.INPUT.error.font.style,
|
|
4795
5215
|
fontFamily: errorFamily ?? configStyles.INPUT.error.font.family,
|
|
4796
5216
|
fontWeight: errorWeight ?? configStyles.INPUT.error.font.weight,
|
|
4797
|
-
zIndex: errorZindex ?? configStyles.INPUT.error.zIndex,
|
|
4798
5217
|
lineHeight: errorLineHeight ?? configStyles.INPUT.error.lineHeight,
|
|
4799
5218
|
top: errorMarginTop ? `calc(100% + ${errorMarginTop})` : `calc(100% + ${configStyles.INPUT.error.marginTop})`,
|
|
4800
5219
|
transform: 'scale3d(1,1,1)'
|
|
4801
5220
|
},
|
|
4802
5221
|
className: errorClassName ?? configStyles.INPUT.error.className
|
|
4803
|
-
},
|
|
5222
|
+
}, showErrorIcon && innerErrorIcon && innerErrorIconSide === 'left' ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
5223
|
+
alt: "error icon",
|
|
5224
|
+
src: innerErrorIcon,
|
|
5225
|
+
style: {
|
|
5226
|
+
width: '14px',
|
|
5227
|
+
height: '14px',
|
|
5228
|
+
cursor: errorAction ? 'pointer' : 'normal',
|
|
5229
|
+
marginRight: errorIconMargin ?? configStyles.INPUT.error.iconMargin
|
|
5230
|
+
},
|
|
5231
|
+
onClick: errorAction ? () => errorAction() : _ => _
|
|
5232
|
+
}) : '', /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5233
|
+
style: {
|
|
5234
|
+
display: 'inline-block',
|
|
5235
|
+
whiteSpace: (errorDots ? errorDots : configStyles.INPUT.error.dots) ? 'nowrap' : 'normal',
|
|
5236
|
+
overflow: (errorDots ? errorDots : configStyles.INPUT.error.dots) ? 'hidden' : 'visible',
|
|
5237
|
+
textOverflow: (errorDots ? errorDots : configStyles.INPUT.error.dots) ? 'ellipsis' : '',
|
|
5238
|
+
maxWidth: `calc(100% - ${(errorIconMargin ? Number(errorIconMargin.match(/\d+/)[0]) : Number(configStyles.INPUT.error.iconMargin.match(/\d+/)[0])) + 14}px)`
|
|
5239
|
+
}
|
|
5240
|
+
}, innerErrorMessage), showErrorIcon && innerErrorIcon && innerErrorIconSide === 'right' && /*#__PURE__*/React__default["default"].createElement("img", {
|
|
5241
|
+
alt: "error icon",
|
|
5242
|
+
src: innerErrorIcon,
|
|
5243
|
+
style: {
|
|
5244
|
+
width: '14px',
|
|
5245
|
+
height: '14px',
|
|
5246
|
+
cursor: errorAction ? 'pointer' : 'normal',
|
|
5247
|
+
marginLeft: errorIconMargin ?? configStyles.INPUT.error.iconMargin
|
|
5248
|
+
},
|
|
5249
|
+
onClick: errorAction ? () => errorAction() : _ => _
|
|
5250
|
+
})) : '');
|
|
4804
5251
|
};
|
|
4805
5252
|
Input.propTypes = {
|
|
5253
|
+
ssn: PropTypes__default["default"].bool,
|
|
4806
5254
|
size: PropTypes__default["default"].string,
|
|
4807
5255
|
name: PropTypes__default["default"].string,
|
|
4808
5256
|
change: PropTypes__default["default"].func,
|
|
4809
5257
|
style: PropTypes__default["default"].string,
|
|
4810
5258
|
color: PropTypes__default["default"].string,
|
|
4811
5259
|
width: PropTypes__default["default"].string,
|
|
4812
|
-
label: PropTypes__default["default"].string,
|
|
4813
5260
|
withZero: PropTypes__default["default"].bool,
|
|
4814
5261
|
weight: PropTypes__default["default"].string,
|
|
4815
5262
|
family: PropTypes__default["default"].string,
|
|
@@ -4818,45 +5265,59 @@ Input.propTypes = {
|
|
|
4818
5265
|
height: PropTypes__default["default"].string,
|
|
4819
5266
|
radius: PropTypes__default["default"].string,
|
|
4820
5267
|
padding: PropTypes__default["default"].string,
|
|
4821
|
-
|
|
5268
|
+
cardNumber: PropTypes__default["default"].bool,
|
|
4822
5269
|
tooltip: PropTypes__default["default"].element,
|
|
4823
5270
|
withoutDot: PropTypes__default["default"].bool,
|
|
4824
5271
|
className: PropTypes__default["default"].string,
|
|
4825
5272
|
iconWidth: PropTypes__default["default"].string,
|
|
4826
|
-
|
|
4827
|
-
boxShadow: PropTypes__default["default"].string,
|
|
4828
|
-
errorSize: PropTypes__default["default"].string,
|
|
4829
|
-
errorLeft: PropTypes__default["default"].string,
|
|
4830
|
-
labelSize: PropTypes__default["default"].string,
|
|
5273
|
+
iconPadding: PropTypes__default["default"].string,
|
|
4831
5274
|
maxLength: PropTypes__default["default"].number,
|
|
4832
5275
|
floatToFix: PropTypes__default["default"].number,
|
|
4833
5276
|
minNumSize: PropTypes__default["default"].number,
|
|
4834
5277
|
maxNumSize: PropTypes__default["default"].number,
|
|
4835
|
-
|
|
5278
|
+
label: PropTypes__default["default"].string,
|
|
5279
|
+
labelDots: PropTypes__default["default"].bool,
|
|
5280
|
+
labelAction: PropTypes__default["default"].func,
|
|
5281
|
+
labelIcon: PropTypes__default["default"].string,
|
|
5282
|
+
labelSize: PropTypes__default["default"].string,
|
|
4836
5283
|
labelColor: PropTypes__default["default"].string,
|
|
4837
5284
|
labelStyle: PropTypes__default["default"].string,
|
|
5285
|
+
showLabelIcon: PropTypes__default["default"].bool,
|
|
5286
|
+
labelWeight: PropTypes__default["default"].string,
|
|
5287
|
+
labelDisplay: PropTypes__default["default"].string,
|
|
5288
|
+
labelIconSide: PropTypes__default["default"].oneOf(Object.values(IconSides)),
|
|
5289
|
+
labelLineHeight: PropTypes__default["default"].string,
|
|
5290
|
+
labelFontFamily: PropTypes__default["default"].string,
|
|
5291
|
+
labelIconMargin: PropTypes__default["default"].string,
|
|
5292
|
+
labelMarginBottom: PropTypes__default["default"].string,
|
|
5293
|
+
borderRight: PropTypes__default["default"].string,
|
|
5294
|
+
placeholder: PropTypes__default["default"].string,
|
|
5295
|
+
phoneDisplay: PropTypes__default["default"].string,
|
|
5296
|
+
autoComplete: PropTypes__default["default"].string,
|
|
5297
|
+
errorDots: PropTypes__default["default"].bool,
|
|
5298
|
+
errorLeft: PropTypes__default["default"].string,
|
|
5299
|
+
errorSize: PropTypes__default["default"].string,
|
|
5300
|
+
errorIcon: PropTypes__default["default"].string,
|
|
5301
|
+
errorAction: PropTypes__default["default"].func,
|
|
5302
|
+
errorColor: PropTypes__default["default"].string,
|
|
4838
5303
|
errorStyle: PropTypes__default["default"].string,
|
|
5304
|
+
showErrorIcon: PropTypes__default["default"].bool,
|
|
4839
5305
|
errorWeight: PropTypes__default["default"].string,
|
|
4840
5306
|
errorFamily: PropTypes__default["default"].string,
|
|
4841
|
-
borderRight: PropTypes__default["default"].string,
|
|
4842
|
-
placeholder: PropTypes__default["default"].string,
|
|
4843
5307
|
errorZindex: PropTypes__default["default"].string,
|
|
4844
|
-
|
|
5308
|
+
errorIconSide: PropTypes__default["default"].oneOf(Object.values(IconSides)),
|
|
4845
5309
|
errorMessage: PropTypes__default["default"].string,
|
|
4846
|
-
phoneDisplay: PropTypes__default["default"].string,
|
|
4847
|
-
autoComplete: PropTypes__default["default"].string,
|
|
4848
|
-
labelDisplay: PropTypes__default["default"].string,
|
|
4849
5310
|
errorPosition: PropTypes__default["default"].string,
|
|
4850
5311
|
errorMarginTop: PropTypes__default["default"].string,
|
|
4851
|
-
boxShadowHover: PropTypes__default["default"].string,
|
|
4852
5312
|
errorClassName: PropTypes__default["default"].string,
|
|
4853
|
-
|
|
4854
|
-
backgroundColor: PropTypes__default["default"].string,
|
|
4855
|
-
phoneAlignItems: PropTypes__default["default"].string,
|
|
5313
|
+
errorIconMargin: PropTypes__default["default"].string,
|
|
4856
5314
|
errorLineHeight: PropTypes__default["default"].string,
|
|
4857
|
-
|
|
5315
|
+
boxSizing: PropTypes__default["default"].string,
|
|
5316
|
+
boxShadow: PropTypes__default["default"].string,
|
|
5317
|
+
errorBoxShadow: PropTypes__default["default"].string,
|
|
5318
|
+
boxShadowHover: PropTypes__default["default"].string,
|
|
5319
|
+
phoneAlignItems: PropTypes__default["default"].string,
|
|
4858
5320
|
numberMaxLength: PropTypes__default["default"].number,
|
|
4859
|
-
labelMarginBottom: PropTypes__default["default"].string,
|
|
4860
5321
|
regexpErrorMessage: PropTypes__default["default"].string,
|
|
4861
5322
|
regexp: PropTypes__default["default"].instanceOf(RegExp),
|
|
4862
5323
|
fireInputInsideError: PropTypes__default["default"].func,
|
|
@@ -4864,6 +5325,7 @@ Input.propTypes = {
|
|
|
4864
5325
|
telBorderRightStyle: PropTypes__default["default"].string,
|
|
4865
5326
|
telBorderRightColor: PropTypes__default["default"].string,
|
|
4866
5327
|
phoneJustifyContent: PropTypes__default["default"].string,
|
|
5328
|
+
backgroundColor: PropTypes__default["default"].string,
|
|
4867
5329
|
backgroundDisableColor: PropTypes__default["default"].string,
|
|
4868
5330
|
telBorderRightColorHover: PropTypes__default["default"].string,
|
|
4869
5331
|
leftIcon: PropTypes__default["default"].arrayOf(PropTypes__default["default"].element),
|
|
@@ -4889,10 +5351,12 @@ const Radio = ({
|
|
|
4889
5351
|
borderStyle,
|
|
4890
5352
|
labelFontSize,
|
|
4891
5353
|
labelFontStyle,
|
|
5354
|
+
labelActiveColor,
|
|
4892
5355
|
labelFontFamily,
|
|
4893
5356
|
labelFontWeight,
|
|
4894
5357
|
labelLineHeight,
|
|
4895
5358
|
radioMarginRight,
|
|
5359
|
+
borderHoverColor,
|
|
4896
5360
|
borderActiveColor,
|
|
4897
5361
|
radioItemMarginRight,
|
|
4898
5362
|
radioItemMarginBottom,
|
|
@@ -4911,22 +5375,14 @@ const Radio = ({
|
|
|
4911
5375
|
});
|
|
4912
5376
|
const handleMouseEnter = (id, elemID) => {
|
|
4913
5377
|
const elem = document.querySelector(`#${elemID}`);
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
// ? borderActiveColor
|
|
4918
|
-
// ? borderActiveColor
|
|
4919
|
-
// : configStyles.RADIO.border.activeColor
|
|
4920
|
-
// : borderColor
|
|
4921
|
-
// ? borderColor
|
|
4922
|
-
// : configStyles.RADIO.border.color
|
|
4923
|
-
// }
|
|
4924
|
-
// handleUtilsMouseEnterLeave(e, newStyles);
|
|
4925
|
-
|
|
4926
|
-
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.border.activeColor : borderColor ? borderColor : configStyles.RADIO.border.color;
|
|
5378
|
+
const borderStyle = elem.parentElement;
|
|
5379
|
+
borderStyle.style.borderColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.border.activeColor : borderHoverColor ? borderHoverColor : configStyles.RADIO.border.hoverColor;
|
|
5380
|
+
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.border.activeColor : borderHoverColor ? borderHoverColor : configStyles.RADIO.border.hoverColor;
|
|
4927
5381
|
};
|
|
4928
5382
|
const handleMouseLeave = (id, elemID) => {
|
|
4929
5383
|
const elem = document.querySelector(`#${elemID}`);
|
|
5384
|
+
const borderStyle = elem.parentElement;
|
|
5385
|
+
borderStyle.style.borderColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.border.activeColor : borderColor ? borderColor : configStyles.RADIO.border.color;
|
|
4930
5386
|
elem.style.backgroundColor = id === innerSelectedData?.id ? borderActiveColor ? borderActiveColor : configStyles.RADIO.border.activeColor : 'transparent';
|
|
4931
5387
|
};
|
|
4932
5388
|
const handleChecked = selItem => {
|
|
@@ -5033,15 +5489,13 @@ const Radio = ({
|
|
|
5033
5489
|
}
|
|
5034
5490
|
})), item[innerKeyNames.label] ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5035
5491
|
style: {
|
|
5036
|
-
color: labelColor ?? configStyles.RADIO.label.color,
|
|
5492
|
+
color: item[innerKeyNames.id] === innerSelectedData.id ? labelActiveColor ?? configStyles.RADIO.label.activeColor : labelColor ?? configStyles.RADIO.label.color,
|
|
5037
5493
|
fontSize: labelFontSize ?? configStyles.RADIO.label.font.size,
|
|
5038
5494
|
fontStyle: labelFontStyle ?? configStyles.RADIO.label.font.style,
|
|
5039
5495
|
fontFamily: labelFontFamily ?? configStyles.RADIO.label.font.family,
|
|
5040
5496
|
fontWeight: labelFontWeight ?? configStyles.RADIO.label.font.weight,
|
|
5041
5497
|
lineHeight: labelLineHeight ?? configStyles.RADIO.label.lineHeight
|
|
5042
|
-
}
|
|
5043
|
-
onMouseEnter: () => handleMouseEnter(item[innerKeyNames.id], elemId),
|
|
5044
|
-
onMouseLeave: () => handleMouseLeave(item[innerKeyNames.id], elemId)
|
|
5498
|
+
}
|
|
5045
5499
|
}, item[innerKeyNames.label]) : '');
|
|
5046
5500
|
}));
|
|
5047
5501
|
};
|
|
@@ -5056,11 +5510,13 @@ Radio.propTypes = {
|
|
|
5056
5510
|
borderStyle: PropTypes__default["default"].string,
|
|
5057
5511
|
labelFontSize: PropTypes__default["default"].string,
|
|
5058
5512
|
labelFontStyle: PropTypes__default["default"].string,
|
|
5513
|
+
labelActiveColor: PropTypes__default["default"].string,
|
|
5059
5514
|
labelFontFamily: PropTypes__default["default"].string,
|
|
5060
5515
|
labelFontWeight: PropTypes__default["default"].string,
|
|
5061
5516
|
labelLineHeight: PropTypes__default["default"].string,
|
|
5062
5517
|
radioMarginRight: PropTypes__default["default"].string,
|
|
5063
5518
|
getData: PropTypes__default["default"].func.isRequired,
|
|
5519
|
+
borderHoverColor: PropTypes__default["default"].string,
|
|
5064
5520
|
borderActiveColor: PropTypes__default["default"].string,
|
|
5065
5521
|
radioItemMarginRight: PropTypes__default["default"].string,
|
|
5066
5522
|
radioItemMarginBottom: PropTypes__default["default"].string,
|
|
@@ -5087,12 +5543,13 @@ const SvgArrow = ({
|
|
|
5087
5543
|
fill: fillColor ? fillColor : '#3C393E'
|
|
5088
5544
|
}));
|
|
5089
5545
|
|
|
5090
|
-
var css_248z$
|
|
5091
|
-
var styles$
|
|
5092
|
-
styleInject(css_248z$
|
|
5546
|
+
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}}";
|
|
5547
|
+
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"};
|
|
5548
|
+
styleInject(css_248z$9);
|
|
5093
5549
|
|
|
5094
5550
|
const Select = ({
|
|
5095
5551
|
dots,
|
|
5552
|
+
lang,
|
|
5096
5553
|
options,
|
|
5097
5554
|
multiple,
|
|
5098
5555
|
disabled,
|
|
@@ -5106,6 +5563,7 @@ const Select = ({
|
|
|
5106
5563
|
closeIcon,
|
|
5107
5564
|
errorZindex,
|
|
5108
5565
|
errorMessage,
|
|
5566
|
+
arrowNoRotate,
|
|
5109
5567
|
showCloseIcon,
|
|
5110
5568
|
defaultOption,
|
|
5111
5569
|
multipleCheckbox,
|
|
@@ -5146,6 +5604,8 @@ const Select = ({
|
|
|
5146
5604
|
optionItemCursor,
|
|
5147
5605
|
optionItemPadding,
|
|
5148
5606
|
optionItemFontSize,
|
|
5607
|
+
optionItemFontStyle,
|
|
5608
|
+
optionItemFontFamily,
|
|
5149
5609
|
optionItemMinHeight,
|
|
5150
5610
|
optionItemBoxSizing,
|
|
5151
5611
|
optionItemFontWeight,
|
|
@@ -5155,7 +5615,8 @@ const Select = ({
|
|
|
5155
5615
|
optionItemBackgroudColor,
|
|
5156
5616
|
optionItemBackgroudColorHover,
|
|
5157
5617
|
boxShadow,
|
|
5158
|
-
boxShadowHover
|
|
5618
|
+
boxShadowHover,
|
|
5619
|
+
insidePagination
|
|
5159
5620
|
}) => {
|
|
5160
5621
|
const ref = React.useRef();
|
|
5161
5622
|
const [opened, setOpened] = React.useState(false);
|
|
@@ -5301,12 +5762,12 @@ const Select = ({
|
|
|
5301
5762
|
}, label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null))) : '', /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5302
5763
|
ref: ref
|
|
5303
5764
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5304
|
-
className: styles$
|
|
5765
|
+
className: styles$7['select-content']
|
|
5305
5766
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5767
|
+
className: `${styles$7['select-content-top']}`,
|
|
5306
5768
|
style: {
|
|
5307
5769
|
cursor: disabled ? 'not-allowed' : cursor ? cursor : configStyles.SELECT.selected.cursor,
|
|
5308
5770
|
minHeight: selectedMinHeight ?? configStyles.SELECT.selected.minHeight,
|
|
5309
|
-
padding: selectedPadding ?? configStyles.SELECT.selected.padding,
|
|
5310
5771
|
borderRadius: selectedRadius ?? configStyles.SELECT.selected.radius,
|
|
5311
5772
|
fontSize: selectedFontSize ?? configStyles.SELECT.selected.font.size,
|
|
5312
5773
|
fontStyle: selectedFontStyle ?? configStyles.SELECT.selected.font.style,
|
|
@@ -5315,19 +5776,20 @@ const Select = ({
|
|
|
5315
5776
|
fontWeight: selectedFontWeight ?? configStyles.SELECT.selected.font.weight,
|
|
5316
5777
|
lineHeight: selectedLineHeight ?? configStyles.SELECT.selected.lineHeight,
|
|
5317
5778
|
transition: selectedTransition ?? configStyles.SELECT.selected.transition,
|
|
5779
|
+
padding: insidePagination ? '0px 2px' : selectedPadding ?? configStyles.SELECT.selected.padding,
|
|
5780
|
+
justifyContent: insidePagination ? 'center' : 'space-between',
|
|
5318
5781
|
backgroundColor: disabled ? selectedDisableBackgroundColor ? selectedDisableBackgroundColor : configStyles.SELECT.selected.colors.backgroundDisable : selectedBackgroundColor ? selectedBackgroundColor : configStyles.SELECT.selected.colors.background,
|
|
5319
5782
|
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
|
|
5320
5783
|
},
|
|
5321
5784
|
onClick: disabled ? _ => _ : () => handleOpenClose(),
|
|
5322
5785
|
onMouseEnter: disabled ? _ => _ : () => handleMouseEnter(),
|
|
5323
|
-
onMouseLeave: disabled ? _ => _ : () => handleMouseLeave()
|
|
5324
|
-
className: `${styles$6['select-content-top']}`
|
|
5786
|
+
onMouseLeave: disabled ? _ => _ : () => handleMouseLeave()
|
|
5325
5787
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5326
|
-
className: `${styles$
|
|
5788
|
+
className: `${styles$7['select-content-top-text']}`,
|
|
5327
5789
|
style: {
|
|
5328
5790
|
whiteSpace: disabled ? 'pre-wrap' : 'nowrap',
|
|
5329
|
-
overflow: 'hidden',
|
|
5330
|
-
textOverflow: 'ellipsis',
|
|
5791
|
+
overflow: insidePagination ? 'visible' : 'hidden',
|
|
5792
|
+
textOverflow: insidePagination ? 'initial' : 'ellipsis',
|
|
5331
5793
|
color: isHover ? selectedHoverColor ? selectedHoverColor : configStyles.SELECT.selected.colors.hover : selectedColor ? selectedColor : configStyles.SELECT.selected.color
|
|
5332
5794
|
}
|
|
5333
5795
|
}, !multiple && newSelected && newSelected[0] && newSelected[0][keyNames.name] ? newSelected[0][keyNames.name] : newSelected && newSelected.length > 0 ? newSelected.map((_, index) => {
|
|
@@ -5339,18 +5801,22 @@ const Select = ({
|
|
|
5339
5801
|
}
|
|
5340
5802
|
}
|
|
5341
5803
|
}) : defaultOption ? defaultOption : ''), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5342
|
-
className: `${styles$
|
|
5804
|
+
className: `${styles$7['select-content-top-icon']}`,
|
|
5805
|
+
style: {
|
|
5806
|
+
padding: lang ? '0px' : insidePagination ? '0px 5px' : '0 5px 0 20px'
|
|
5807
|
+
}
|
|
5343
5808
|
}, !disabled && multiple && newSelected.length > 1 && /*#__PURE__*/React__default["default"].createElement("span", null, newSelected.length), (showCloseIcon === true || showCloseIcon === false ? showCloseIcon : configStyles.SELECT.showCloseIcon) && !disabled && newSelected && newSelected.length > 0 && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5344
|
-
className: `${styles$
|
|
5809
|
+
className: `${styles$7['close-icon']}`,
|
|
5345
5810
|
onClick: disabled ? _ => _ : handleClearSelect,
|
|
5346
5811
|
style: {
|
|
5347
5812
|
marginLeft: multiple && newSelected.length > 1 ? '17px' : '0px'
|
|
5348
5813
|
}
|
|
5349
5814
|
}, closeIcon ? closeIcon : configStyles.SELECT.closeIcon ? configStyles.SELECT.closeIcon : /*#__PURE__*/React__default["default"].createElement(SvgCloseIcon, null)), !disabled ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5815
|
+
className: `${styles$7['arrow-icon']}`,
|
|
5350
5816
|
style: {
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5817
|
+
marginLeft: lang ? '0px' : '9px',
|
|
5818
|
+
transform: arrowNoRotate || configStyles.SELECT.arrowNoRotate ? 'rotate(0deg)' : opened ? 'rotate(180deg)' : 'rotate(0deg)'
|
|
5819
|
+
}
|
|
5354
5820
|
}, arrowIcon ? arrowIcon : configStyles.SELECT.arrowIcon ? configStyles.SELECT.arrowIcon : /*#__PURE__*/React__default["default"].createElement(SvgArrow, null)) : '')), opened && existOptions && existOptions.length > 0 && !disabled ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5355
5821
|
style: {
|
|
5356
5822
|
boxShadow: optionsBoxShadow ?? configStyles.SELECT.options.box.shadow,
|
|
@@ -5358,9 +5824,9 @@ const Select = ({
|
|
|
5358
5824
|
backgroundColor: optionsBackgroundColor ?? configStyles.SELECT.options.colors.background,
|
|
5359
5825
|
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'
|
|
5360
5826
|
},
|
|
5361
|
-
className: `${styles$
|
|
5827
|
+
className: `${styles$7['select-content-bottom']}`
|
|
5362
5828
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5363
|
-
className: `${styles$
|
|
5829
|
+
className: `${styles$7['select-content-bottom-inner']}`
|
|
5364
5830
|
}, existOptions && existOptions.length > 0 && existOptions.map((option, i) => {
|
|
5365
5831
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5366
5832
|
key: i,
|
|
@@ -5369,19 +5835,22 @@ const Select = ({
|
|
|
5369
5835
|
onClick: disabled ? _ => _ : () => handleSelectItem(option),
|
|
5370
5836
|
onMouseEnter: disabled ? _ => _ : e => handleMouseEnterOption(e),
|
|
5371
5837
|
onMouseLeave: disabled ? _ => _ : e => handleMouseLeaveOption(e),
|
|
5372
|
-
className: `${styles$
|
|
5838
|
+
className: `${styles$7['select-content-bottom-row']} ${dots || configStyles.SELECT.dots ? styles$7['ellipsis'] : ''}`,
|
|
5373
5839
|
style: {
|
|
5374
5840
|
overflowWrap: !dots && !configStyles.SELECT.dots ? 'anywhere' : 'break-word',
|
|
5375
5841
|
color: optionItemColor ?? configStyles.SELECT.options.item.color,
|
|
5376
5842
|
cursor: optionItemCursor ?? configStyles.SELECT.options.item.cursor,
|
|
5377
5843
|
padding: optionItemPadding ?? configStyles.SELECT.options.item.padding,
|
|
5378
5844
|
fontSize: optionItemFontSize ?? configStyles.SELECT.options.item.font.size,
|
|
5845
|
+
fontStyle: optionItemFontStyle ?? configStyles.SELECT.options.item.font.style,
|
|
5846
|
+
fontFamily: optionItemFontFamily ?? configStyles.SELECT.options.item.font.family,
|
|
5379
5847
|
boxSizing: optionItemBoxSizing ?? configStyles.SELECT.options.item.box.sizing,
|
|
5380
5848
|
minHeight: optionItemMinHeight ?? configStyles.SELECT.options.item.minHeight,
|
|
5381
5849
|
fontWeight: optionItemFontWeight ?? configStyles.SELECT.options.item.font.weight,
|
|
5382
5850
|
lineHeight: dots || configStyles.SELECT.dots ? '46px' : optionItemLineHeight ? optionItemLineHeight : configStyles.SELECT.options.item.lineHeight,
|
|
5383
5851
|
marginBottom: optionItemMarginBottom ?? configStyles.SELECT.options.item.marginBottom,
|
|
5384
|
-
backgroundColor: optionItemBackgroudColor ?? configStyles.SELECT.options.item.colors.backgroud
|
|
5852
|
+
backgroundColor: optionItemBackgroudColor ?? configStyles.SELECT.options.item.colors.backgroud,
|
|
5853
|
+
justifyContent: lang ? 'center' : 'flex-start'
|
|
5385
5854
|
}
|
|
5386
5855
|
}, multiple && multipleCheckbox ? /*#__PURE__*/React__default["default"].createElement(SingleCheckbox, {
|
|
5387
5856
|
checked: option.checked
|
|
@@ -5401,6 +5870,7 @@ const Select = ({
|
|
|
5401
5870
|
};
|
|
5402
5871
|
Select.propTypes = {
|
|
5403
5872
|
dots: PropTypes__default["default"].bool,
|
|
5873
|
+
lang: PropTypes__default["default"].bool,
|
|
5404
5874
|
options: PropTypes__default["default"].array,
|
|
5405
5875
|
multiple: PropTypes__default["default"].bool,
|
|
5406
5876
|
onChange: PropTypes__default["default"].func,
|
|
@@ -5412,6 +5882,7 @@ Select.propTypes = {
|
|
|
5412
5882
|
className: PropTypes__default["default"].string,
|
|
5413
5883
|
arrowIcon: PropTypes__default["default"].element,
|
|
5414
5884
|
closeIcon: PropTypes__default["default"].element,
|
|
5885
|
+
arrowNoRotate: PropTypes__default["default"].bool,
|
|
5415
5886
|
showCloseIcon: PropTypes__default["default"].bool,
|
|
5416
5887
|
errorZindex: PropTypes__default["default"].number,
|
|
5417
5888
|
errorMessage: PropTypes__default["default"].string,
|
|
@@ -5451,6 +5922,8 @@ Select.propTypes = {
|
|
|
5451
5922
|
optionItemCursor: PropTypes__default["default"].string,
|
|
5452
5923
|
optionItemPadding: PropTypes__default["default"].string,
|
|
5453
5924
|
optionItemFontSize: PropTypes__default["default"].string,
|
|
5925
|
+
optionItemFontStyle: PropTypes__default["default"].string,
|
|
5926
|
+
optionItemFontFamily: PropTypes__default["default"].string,
|
|
5454
5927
|
optionItemMinHeight: PropTypes__default["default"].string,
|
|
5455
5928
|
optionItemBoxSizing: PropTypes__default["default"].string,
|
|
5456
5929
|
optionItemFontWeight: PropTypes__default["default"].string,
|
|
@@ -5460,7 +5933,8 @@ Select.propTypes = {
|
|
|
5460
5933
|
optionItemBackgroudColor: PropTypes__default["default"].string,
|
|
5461
5934
|
optionItemBackgroudColorHover: PropTypes__default["default"].string,
|
|
5462
5935
|
boxShadow: PropTypes__default["default"].string,
|
|
5463
|
-
boxShadowHover: PropTypes__default["default"].string
|
|
5936
|
+
boxShadowHover: PropTypes__default["default"].string,
|
|
5937
|
+
insidePagination: PropTypes__default["default"].bool
|
|
5464
5938
|
};
|
|
5465
5939
|
|
|
5466
5940
|
const SvgToasterInfo = ({
|
|
@@ -5582,11 +6056,10 @@ const SvgToasterSuccess = ({
|
|
|
5582
6056
|
fill: fillColor ? fillColor : '#0DA574'
|
|
5583
6057
|
}));
|
|
5584
6058
|
|
|
5585
|
-
var css_248z$
|
|
5586
|
-
var styles$
|
|
5587
|
-
styleInject(css_248z$
|
|
6059
|
+
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}}";
|
|
6060
|
+
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"};
|
|
6061
|
+
styleInject(css_248z$8);
|
|
5588
6062
|
|
|
5589
|
-
let wWidth$1 = window.innerWidth;
|
|
5590
6063
|
const ToasterType = {
|
|
5591
6064
|
info: 'info',
|
|
5592
6065
|
warn: 'warn',
|
|
@@ -5603,16 +6076,21 @@ const ToasterPosition = {
|
|
|
5603
6076
|
};
|
|
5604
6077
|
const Toast = ({
|
|
5605
6078
|
type,
|
|
5606
|
-
|
|
5607
|
-
|
|
6079
|
+
icons,
|
|
6080
|
+
title,
|
|
6081
|
+
timer,
|
|
6082
|
+
propStyles,
|
|
5608
6083
|
removeToast,
|
|
5609
6084
|
description,
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
6085
|
+
titleStyles,
|
|
6086
|
+
descriptionStyles,
|
|
6087
|
+
position = 'top-right'
|
|
5613
6088
|
}) => {
|
|
5614
6089
|
let timeoutCall;
|
|
5615
6090
|
let timeoutClick;
|
|
6091
|
+
const firstCheck = propStyles.height.replace(/\D/g, '') - 28 < 30 ? 30 : propStyles.height.replace(/\D/g, '') - 28;
|
|
6092
|
+
const secondCheck = propStyles.height.replace(/\D/g, '') - 65 < 18 ? 18 : propStyles.height.replace(/\D/g, '') - 65;
|
|
6093
|
+
const finalCheck = firstCheck + secondCheck + 'px';
|
|
5616
6094
|
const ref = React.useRef(null);
|
|
5617
6095
|
const [showToaster, setShowToaster] = React.useState(true);
|
|
5618
6096
|
const handleToasterClick = e => {
|
|
@@ -5641,63 +6119,111 @@ const Toast = ({
|
|
|
5641
6119
|
style: {
|
|
5642
6120
|
position: 'absolute',
|
|
5643
6121
|
display: 'flex',
|
|
5644
|
-
width: wWidth$1 > 480 ? '440px' : '300px',
|
|
5645
|
-
height: '83px',
|
|
5646
|
-
borderRadius: '40px',
|
|
5647
6122
|
alignItems: 'center',
|
|
5648
6123
|
boxSizing: 'border-box',
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
padding: '14px 29px 14px 12px',
|
|
5652
|
-
justifyContent: 'space-between'
|
|
6124
|
+
justifyContent: 'space-between',
|
|
6125
|
+
...propStyles
|
|
5653
6126
|
},
|
|
5654
6127
|
className: `
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
6128
|
+
${styles$6['notify-block']}
|
|
6129
|
+
${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'] : ''}
|
|
6130
|
+
`
|
|
5658
6131
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5659
6132
|
style: {
|
|
5660
6133
|
display: 'flex',
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
6134
|
+
height: `calc(${propStyles.height} - 28px)`,
|
|
6135
|
+
width: `calc(${propStyles.height} - 28px)`,
|
|
6136
|
+
minWidth: '30px',
|
|
6137
|
+
minHeight: '30px',
|
|
6138
|
+
borderRadius: '50%',
|
|
5664
6139
|
alignItems: 'center',
|
|
5665
6140
|
justifyContent: 'center'
|
|
5666
6141
|
}
|
|
5667
|
-
}, type === 'info' ?
|
|
6142
|
+
}, type === 'info' ? icons.info ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
6143
|
+
src: icons.info,
|
|
6144
|
+
alt: "icons",
|
|
5668
6145
|
style: {
|
|
6146
|
+
width: '100%',
|
|
5669
6147
|
height: '100%',
|
|
5670
|
-
|
|
6148
|
+
objectFit: 'cover',
|
|
6149
|
+
objectPosition: 'center'
|
|
5671
6150
|
}
|
|
5672
|
-
}, /*#__PURE__*/React__default["default"].createElement("
|
|
6151
|
+
}) : /*#__PURE__*/React__default["default"].createElement(SvgToasterInfo, null) : type === 'warn' ? icons.warn ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
6152
|
+
src: icons.warn,
|
|
6153
|
+
alt: "icons",
|
|
6154
|
+
style: {
|
|
6155
|
+
width: '100%',
|
|
6156
|
+
height: '100%',
|
|
6157
|
+
objectFit: 'cover',
|
|
6158
|
+
objectPosition: 'center'
|
|
6159
|
+
}
|
|
6160
|
+
}) : /*#__PURE__*/React__default["default"].createElement(SvgToasterWarning, null) : type === 'error' ? icons.error ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
6161
|
+
src: icons.error,
|
|
6162
|
+
alt: "icons",
|
|
6163
|
+
style: {
|
|
6164
|
+
width: '100%',
|
|
6165
|
+
height: '100%',
|
|
6166
|
+
objectFit: 'cover',
|
|
6167
|
+
objectPosition: 'center'
|
|
6168
|
+
}
|
|
6169
|
+
}) : /*#__PURE__*/React__default["default"].createElement(SvgToasterError, null) : type === 'success' ? icons.success ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
6170
|
+
src: icons.success,
|
|
6171
|
+
alt: "icons",
|
|
6172
|
+
style: {
|
|
6173
|
+
width: '100%',
|
|
6174
|
+
height: '100%',
|
|
6175
|
+
objectFit: 'cover',
|
|
6176
|
+
objectPosition: 'center'
|
|
6177
|
+
}
|
|
6178
|
+
}) : /*#__PURE__*/React__default["default"].createElement(SvgToasterSuccess, null) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6179
|
+
style: {
|
|
6180
|
+
height: '100%',
|
|
6181
|
+
width: `calc(100% - ${finalCheck})`,
|
|
6182
|
+
minWidth: '50%',
|
|
6183
|
+
maxWidth: 'calc(100% - 90px)'
|
|
6184
|
+
}
|
|
6185
|
+
}, title && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
5673
6186
|
style: {
|
|
5674
6187
|
margin: '0px',
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
lineHeight:
|
|
5679
|
-
|
|
6188
|
+
color: titleStyles.color,
|
|
6189
|
+
fontSize: titleStyles.font.size,
|
|
6190
|
+
fontStyle: titleStyles.font.style,
|
|
6191
|
+
lineHeight: titleStyles.lineHeight,
|
|
6192
|
+
fontWeight: titleStyles.font.weight,
|
|
6193
|
+
fontFamily: titleStyles.font.family,
|
|
6194
|
+
...titleStyles.props
|
|
5680
6195
|
},
|
|
5681
|
-
className: styles$
|
|
5682
|
-
}, title
|
|
6196
|
+
className: styles$6['notify-title']
|
|
6197
|
+
}, title), description && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
5683
6198
|
style: {
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
lineHeight:
|
|
5688
|
-
|
|
5689
|
-
fontFamily:
|
|
5690
|
-
|
|
6199
|
+
color: descriptionStyles.color,
|
|
6200
|
+
fontSize: descriptionStyles.font.size,
|
|
6201
|
+
fontStyle: descriptionStyles.font.style,
|
|
6202
|
+
lineHeight: descriptionStyles.lineHeight,
|
|
6203
|
+
fontWeight: descriptionStyles.font.weight,
|
|
6204
|
+
fontFamily: descriptionStyles.font.family,
|
|
6205
|
+
...descriptionStyles.props
|
|
5691
6206
|
},
|
|
5692
|
-
className: styles$
|
|
5693
|
-
}, description
|
|
6207
|
+
className: styles$6['notify-desc']
|
|
6208
|
+
}, description)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5694
6209
|
onClick: () => handleCloseToaster(ref),
|
|
5695
6210
|
style: {
|
|
5696
|
-
width:
|
|
5697
|
-
height:
|
|
6211
|
+
width: `calc(${propStyles.height} - 65px)`,
|
|
6212
|
+
height: `calc(${propStyles.height} - 65px)`,
|
|
6213
|
+
minWidth: '18px',
|
|
6214
|
+
minHeight: '18px',
|
|
5698
6215
|
cursor: 'pointer'
|
|
5699
6216
|
}
|
|
5700
|
-
},
|
|
6217
|
+
}, icons.close ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
6218
|
+
src: icons.close,
|
|
6219
|
+
alt: "icons",
|
|
6220
|
+
style: {
|
|
6221
|
+
width: '100%',
|
|
6222
|
+
height: '100%',
|
|
6223
|
+
objectFit: 'cover',
|
|
6224
|
+
objectPosition: 'center'
|
|
6225
|
+
}
|
|
6226
|
+
}) : /*#__PURE__*/React__default["default"].createElement(SvgToasterClose, null)));
|
|
5701
6227
|
};
|
|
5702
6228
|
Toast.propTypes = {
|
|
5703
6229
|
timer: PropTypes__default["default"].number,
|
|
@@ -5710,7 +6236,6 @@ Toast.propTypes = {
|
|
|
5710
6236
|
|
|
5711
6237
|
let toastify = document.getElementById('toastify');
|
|
5712
6238
|
let path = window.location.href;
|
|
5713
|
-
let wWidth = window.innerWidth;
|
|
5714
6239
|
const removeToast = ref => {
|
|
5715
6240
|
if (ref.current) {
|
|
5716
6241
|
const node = ref.current;
|
|
@@ -5726,15 +6251,66 @@ const removeToast = ref => {
|
|
|
5726
6251
|
}
|
|
5727
6252
|
}
|
|
5728
6253
|
};
|
|
6254
|
+
const createElem$1 = (type, timer, title, position, styleProps, toastBlock, description, innerConfigStyles) => {
|
|
6255
|
+
const projectTitleStyle = styleProps?.title;
|
|
6256
|
+
const packageTitleStyle = innerConfigStyles?.TOASTER?.title;
|
|
6257
|
+
const compareTitleStyles = ___default["default"].merge({
|
|
6258
|
+
...packageTitleStyle
|
|
6259
|
+
}, {
|
|
6260
|
+
...projectTitleStyle
|
|
6261
|
+
});
|
|
6262
|
+
const projectDescStyle = styleProps?.description;
|
|
6263
|
+
const packageDescStyle = innerConfigStyles?.TOASTER?.description;
|
|
6264
|
+
const compareDescStyles = ___default["default"].merge({
|
|
6265
|
+
...packageDescStyle
|
|
6266
|
+
}, {
|
|
6267
|
+
...projectDescStyle
|
|
6268
|
+
});
|
|
6269
|
+
const projectIcons = styleProps?.icons;
|
|
6270
|
+
const packageIcons = innerConfigStyles?.TOASTER?.icons;
|
|
6271
|
+
const icons = ___default["default"].merge({
|
|
6272
|
+
...packageIcons
|
|
6273
|
+
}, {
|
|
6274
|
+
...projectIcons
|
|
6275
|
+
});
|
|
6276
|
+
toastBlock.style.position = 'relative';
|
|
6277
|
+
toastBlock.style.flexShrink = 0;
|
|
6278
|
+
toastBlock.style.width = styleProps?.width ?? innerConfigStyles?.TOASTER?.width;
|
|
6279
|
+
toastBlock.style.height = styleProps?.height ?? innerConfigStyles?.TOASTER?.height;
|
|
6280
|
+
toastBlock.style.marginBottom = styleProps?.marginBottom ?? innerConfigStyles?.TOASTER?.marginBottom;
|
|
6281
|
+
const newElem = /*#__PURE__*/React__default["default"].createElement(Toast, {
|
|
6282
|
+
type,
|
|
6283
|
+
icons,
|
|
6284
|
+
timer,
|
|
6285
|
+
title,
|
|
6286
|
+
position,
|
|
6287
|
+
description,
|
|
6288
|
+
removeToast,
|
|
6289
|
+
propStyles: {
|
|
6290
|
+
width: styleProps?.width ?? innerConfigStyles?.TOASTER?.width,
|
|
6291
|
+
height: styleProps?.height ?? innerConfigStyles?.TOASTER?.height,
|
|
6292
|
+
padding: styleProps?.padding ?? innerConfigStyles?.TOASTER?.padding,
|
|
6293
|
+
borderWidth: styleProps?.borderWidth ?? innerConfigStyles?.TOASTER?.border.width,
|
|
6294
|
+
borderColor: styleProps?.borderColor ?? innerConfigStyles?.TOASTER?.border.color,
|
|
6295
|
+
borderStyle: styleProps?.borderStyle ?? innerConfigStyles?.TOASTER?.border.style,
|
|
6296
|
+
borderRadius: styleProps?.borderRadius ?? innerConfigStyles?.TOASTER?.border.radius,
|
|
6297
|
+
backgroundColor: styleProps?.backgroundColor ?? innerConfigStyles?.TOASTER?.backgroundColor
|
|
6298
|
+
},
|
|
6299
|
+
titleStyles: compareTitleStyles,
|
|
6300
|
+
descriptionStyles: compareDescStyles
|
|
6301
|
+
});
|
|
6302
|
+
const root = ReactDOM__default["default"].createRoot(toastBlock);
|
|
6303
|
+
root.render(newElem);
|
|
6304
|
+
};
|
|
5729
6305
|
const createToast = ({
|
|
5730
6306
|
type,
|
|
5731
|
-
icon,
|
|
5732
6307
|
timer,
|
|
5733
6308
|
title,
|
|
5734
6309
|
position,
|
|
5735
|
-
|
|
6310
|
+
styleProps,
|
|
5736
6311
|
description
|
|
5737
6312
|
}) => {
|
|
6313
|
+
let innerConfigStyles = {};
|
|
5738
6314
|
let toastParentBlock;
|
|
5739
6315
|
if (!toastify) {
|
|
5740
6316
|
toastify = document.createElement('div');
|
|
@@ -5742,42 +6318,33 @@ const createToast = ({
|
|
|
5742
6318
|
document.body.appendChild(toastify);
|
|
5743
6319
|
}
|
|
5744
6320
|
const toastBlock = document.createElement('div');
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
icon,
|
|
5753
|
-
timer,
|
|
5754
|
-
title,
|
|
5755
|
-
position,
|
|
5756
|
-
iconClose,
|
|
5757
|
-
description,
|
|
5758
|
-
removeToast
|
|
6321
|
+
configStylesPromise.then(data => {
|
|
6322
|
+
innerConfigStyles = {
|
|
6323
|
+
...data
|
|
6324
|
+
};
|
|
6325
|
+
createElem$1(type, timer, title, position, styleProps, toastBlock, description, innerConfigStyles);
|
|
6326
|
+
}, error => {
|
|
6327
|
+
console.error(error);
|
|
5759
6328
|
});
|
|
5760
|
-
|
|
5761
|
-
root.render(newElem);
|
|
5762
|
-
if (!document.getElementById(styles$5[position]) || document.getElementById(styles$5[position]) == null) {
|
|
6329
|
+
if (!document.getElementById(styles$6[position]) || document.getElementById(styles$6[position]) == null) {
|
|
5763
6330
|
toastParentBlock = document.createElement('div');
|
|
5764
6331
|
toastParentBlock.style.position = 'fixed';
|
|
5765
6332
|
toastParentBlock.style.display = 'flex';
|
|
5766
6333
|
toastParentBlock.style.zIndex = 999999999999;
|
|
5767
6334
|
toastParentBlock.style.flexDirection = position === 'top-left' || position === 'top-right' || position === 'top-center' ? 'column-reverse' : 'column';
|
|
5768
|
-
toastParentBlock.setAttribute('id', styles$
|
|
6335
|
+
toastParentBlock.setAttribute('id', styles$6[position]);
|
|
5769
6336
|
toastParentBlock.appendChild(toastBlock);
|
|
5770
6337
|
toastify.appendChild(toastParentBlock);
|
|
5771
6338
|
} else {
|
|
5772
|
-
document.getElementById(styles$
|
|
6339
|
+
document.getElementById(styles$6[position]).appendChild(toastBlock);
|
|
5773
6340
|
}
|
|
5774
6341
|
};
|
|
5775
6342
|
const toast = {
|
|
5776
6343
|
success: (title, props) => {
|
|
5777
|
-
// const { icon, timer, position, iconClose, description } = props || {}
|
|
5778
6344
|
const {
|
|
5779
6345
|
timer,
|
|
5780
6346
|
position,
|
|
6347
|
+
styleProps,
|
|
5781
6348
|
description
|
|
5782
6349
|
} = props || {};
|
|
5783
6350
|
createToast({
|
|
@@ -5785,16 +6352,15 @@ const toast = {
|
|
|
5785
6352
|
type: 'success',
|
|
5786
6353
|
timer: timer ?? 5000,
|
|
5787
6354
|
position: position ?? 'top-right',
|
|
5788
|
-
description: description ?? ''
|
|
5789
|
-
|
|
5790
|
-
// iconClose: iconClose ?? configStyles.TOASTER.icon.close,
|
|
6355
|
+
description: description ?? '',
|
|
6356
|
+
styleProps: styleProps
|
|
5791
6357
|
});
|
|
5792
6358
|
},
|
|
5793
6359
|
info: (title, props) => {
|
|
5794
|
-
// const { icon, timer, position, iconClose, description } = props || {}
|
|
5795
6360
|
const {
|
|
5796
6361
|
timer,
|
|
5797
6362
|
position,
|
|
6363
|
+
styleProps,
|
|
5798
6364
|
description
|
|
5799
6365
|
} = props || {};
|
|
5800
6366
|
createToast({
|
|
@@ -5802,16 +6368,15 @@ const toast = {
|
|
|
5802
6368
|
type: 'info',
|
|
5803
6369
|
timer: timer ?? 5000,
|
|
5804
6370
|
position: position ?? 'top-right',
|
|
5805
|
-
description: description ?? ''
|
|
5806
|
-
|
|
5807
|
-
// iconClose: iconClose ?? configStyles.TOASTER.icon.close,
|
|
6371
|
+
description: description ?? '',
|
|
6372
|
+
styleProps: styleProps
|
|
5808
6373
|
});
|
|
5809
6374
|
},
|
|
5810
6375
|
warn: (title, props) => {
|
|
5811
|
-
// const { icon, timer, position, iconClose, description } = props || {}
|
|
5812
6376
|
const {
|
|
5813
6377
|
timer,
|
|
5814
6378
|
position,
|
|
6379
|
+
styleProps,
|
|
5815
6380
|
description
|
|
5816
6381
|
} = props || {};
|
|
5817
6382
|
createToast({
|
|
@@ -5819,16 +6384,15 @@ const toast = {
|
|
|
5819
6384
|
type: 'warn',
|
|
5820
6385
|
timer: timer ?? 5000,
|
|
5821
6386
|
position: position ?? 'top-right',
|
|
5822
|
-
description: description ?? ''
|
|
5823
|
-
|
|
5824
|
-
// iconClose: iconClose ?? configStyles.TOASTER.icon.close,
|
|
6387
|
+
description: description ?? '',
|
|
6388
|
+
styleProps: styleProps
|
|
5825
6389
|
});
|
|
5826
6390
|
},
|
|
5827
6391
|
error: (title, props) => {
|
|
5828
|
-
// const { icon, timer, position, iconClose, description } = props || {}
|
|
5829
6392
|
const {
|
|
5830
6393
|
timer,
|
|
5831
6394
|
position,
|
|
6395
|
+
styleProps,
|
|
5832
6396
|
description
|
|
5833
6397
|
} = props || {};
|
|
5834
6398
|
createToast({
|
|
@@ -5836,16 +6400,12 @@ const toast = {
|
|
|
5836
6400
|
type: 'error',
|
|
5837
6401
|
timer: timer ?? 5000,
|
|
5838
6402
|
position: position ?? 'top-right',
|
|
5839
|
-
description: description ?? ''
|
|
5840
|
-
|
|
5841
|
-
// iconClose: iconClose ?? configStyles.TOASTER.icon.close,
|
|
6403
|
+
description: description ?? '',
|
|
6404
|
+
styleProps: styleProps
|
|
5842
6405
|
});
|
|
5843
6406
|
}
|
|
5844
6407
|
};
|
|
5845
|
-
const Toaster = ({
|
|
5846
|
-
className
|
|
5847
|
-
}) => {
|
|
5848
|
-
const [classProps, setClassProps] = React.useState('');
|
|
6408
|
+
const Toaster = () => {
|
|
5849
6409
|
const [configStyles, setConfigStyles] = React.useState({});
|
|
5850
6410
|
window.addEventListener('popstate', () => {
|
|
5851
6411
|
if (path !== window.location.href) {
|
|
@@ -5862,12 +6422,8 @@ const Toaster = ({
|
|
|
5862
6422
|
const handleToasterClick = e => {
|
|
5863
6423
|
e.stopPropagation();
|
|
5864
6424
|
};
|
|
5865
|
-
React.useEffect(() => {
|
|
5866
|
-
className && setClassProps(() => classnames__default["default"](className ?? configStyles.TOASTER.className));
|
|
5867
|
-
}, [className]);
|
|
5868
6425
|
React.useEffect(() => {
|
|
5869
6426
|
configStylesPromise.then(data => {
|
|
5870
|
-
setClassProps(() => classnames__default["default"](className ?? data.TOASTER.className));
|
|
5871
6427
|
setConfigStyles(() => {
|
|
5872
6428
|
return {
|
|
5873
6429
|
...data
|
|
@@ -5879,7 +6435,6 @@ const Toaster = ({
|
|
|
5879
6435
|
}, []);
|
|
5880
6436
|
return configStyles.TOASTER && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5881
6437
|
onClick: handleToasterClick,
|
|
5882
|
-
className: classProps,
|
|
5883
6438
|
id: "toastify"
|
|
5884
6439
|
});
|
|
5885
6440
|
};
|
|
@@ -5903,10 +6458,24 @@ const SvgTooltip = ({
|
|
|
5903
6458
|
fill: fillColor ? fillColor : '#D1D1D1'
|
|
5904
6459
|
}));
|
|
5905
6460
|
|
|
5906
|
-
var css_248z$
|
|
5907
|
-
var styles$
|
|
5908
|
-
styleInject(css_248z$
|
|
6461
|
+
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}";
|
|
6462
|
+
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"};
|
|
6463
|
+
styleInject(css_248z$7);
|
|
5909
6464
|
|
|
6465
|
+
const TooltipDirections = {
|
|
6466
|
+
TOP: 'top',
|
|
6467
|
+
TOP_LEFT: 'top-left',
|
|
6468
|
+
TOP_RIGHT: 'top-right',
|
|
6469
|
+
LEFT: 'left',
|
|
6470
|
+
LEFT_TOP: 'left-top',
|
|
6471
|
+
LEFT_BOTTOM: 'left-bottom',
|
|
6472
|
+
RIGHT: 'right',
|
|
6473
|
+
RIGHT_TOP: 'right-top',
|
|
6474
|
+
RIGHT_BOTTOM: 'right-bottom',
|
|
6475
|
+
BOTTOM: 'bottom',
|
|
6476
|
+
BOTTOM_TOP: 'bottom-left',
|
|
6477
|
+
BOTTOM_BOTTOM: 'bottom-right'
|
|
6478
|
+
};
|
|
5910
6479
|
const Tooltip = ({
|
|
5911
6480
|
text,
|
|
5912
6481
|
width,
|
|
@@ -5914,6 +6483,7 @@ const Tooltip = ({
|
|
|
5914
6483
|
height,
|
|
5915
6484
|
radius,
|
|
5916
6485
|
fontSize,
|
|
6486
|
+
hoverOpen,
|
|
5917
6487
|
className,
|
|
5918
6488
|
fontStyle,
|
|
5919
6489
|
fontFamily,
|
|
@@ -5923,16 +6493,28 @@ const Tooltip = ({
|
|
|
5923
6493
|
tooltipRadius,
|
|
5924
6494
|
backgroundColor,
|
|
5925
6495
|
tooltipBackgroundColor,
|
|
5926
|
-
|
|
6496
|
+
direction = 'top'
|
|
5927
6497
|
}) => {
|
|
5928
6498
|
const tooltipRef = /*#__PURE__*/React.createRef(null);
|
|
6499
|
+
const iconBlockRef = /*#__PURE__*/React.createRef(null);
|
|
6500
|
+
const tooltipIconParentRef = /*#__PURE__*/React.createRef(null);
|
|
5929
6501
|
const [classProps, setClassProps] = React.useState({});
|
|
5930
6502
|
const [configStyles, setConfigStyles] = React.useState({});
|
|
5931
6503
|
const [showTooltip, setShowTooltip] = React.useState(false);
|
|
5932
6504
|
const [checkTooltipWidth, setCheckTooltipWidth] = React.useState(0);
|
|
5933
6505
|
const [checkTooltipHeight, setCheckTooltipHeight] = React.useState(0);
|
|
6506
|
+
const [tooltipIconBlockWidth, setTooltipIconBlockWidth] = React.useState(0);
|
|
6507
|
+
const [tooltipIconParentWidth, setTooltipIconParentWidth] = React.useState(0);
|
|
6508
|
+
const [tooltipIconBlockHeight, setTooltipIconBlockHeight] = React.useState(0);
|
|
6509
|
+
const [tooltipIconParentHeight, setTooltipIconParentHeight] = React.useState(0);
|
|
5934
6510
|
const handleShow = () => {
|
|
5935
|
-
setShowTooltip(!showTooltip);
|
|
6511
|
+
setShowTooltip(() => !showTooltip);
|
|
6512
|
+
};
|
|
6513
|
+
const handleMouseEnter = () => {
|
|
6514
|
+
setShowTooltip(() => true);
|
|
6515
|
+
};
|
|
6516
|
+
const handleMouseLeave = () => {
|
|
6517
|
+
setShowTooltip(() => false);
|
|
5936
6518
|
};
|
|
5937
6519
|
React.useEffect(() => {
|
|
5938
6520
|
if (!text) {
|
|
@@ -5941,12 +6523,32 @@ const Tooltip = ({
|
|
|
5941
6523
|
tooltipRef.current && tooltipRef.current.clientWidth && tooltipRef.current.clientWidth > 0 && setCheckTooltipWidth(tooltipRef.current.clientWidth);
|
|
5942
6524
|
tooltipRef.current && tooltipRef.current.clientHeight && tooltipRef.current.clientHeight > 0 && setCheckTooltipHeight(tooltipRef.current.clientHeight);
|
|
5943
6525
|
}, [text, tooltipRef, checkTooltipWidth, checkTooltipHeight]);
|
|
6526
|
+
React.useEffect(() => {
|
|
6527
|
+
tooltipIconParentRef.current && tooltipIconParentRef.current.clientWidth && tooltipIconParentRef.current.clientWidth > 0 && setTooltipIconParentWidth(tooltipIconParentRef.current.clientWidth);
|
|
6528
|
+
tooltipIconParentRef.current && tooltipIconParentRef.current.clientHeight && tooltipIconParentRef.current.clientHeight > 0 && setTooltipIconParentHeight(tooltipIconParentRef.current.clientHeight);
|
|
6529
|
+
}, [tooltipIconParentRef, tooltipIconParentWidth, tooltipIconParentHeight]);
|
|
6530
|
+
React.useEffect(() => {
|
|
6531
|
+
iconBlockRef.current && iconBlockRef.current.clientWidth && iconBlockRef.current.clientWidth > 0 && setTooltipIconBlockWidth(iconBlockRef.current.clientWidth);
|
|
6532
|
+
iconBlockRef.current && iconBlockRef.current.clientHeight && iconBlockRef.current.clientHeight > 0 && setTooltipIconBlockHeight(iconBlockRef.current.clientHeight);
|
|
6533
|
+
}, [iconBlockRef, tooltipIconParentWidth, tooltipIconParentHeight]);
|
|
5944
6534
|
React.useEffect(() => {
|
|
5945
6535
|
className && setClassProps(() => classnames__default["default"](className ?? configStyles.TOOLTIP.className));
|
|
5946
6536
|
}, [className]);
|
|
6537
|
+
React.useEffect(() => {
|
|
6538
|
+
document.addEventListener('click', () => {
|
|
6539
|
+
if (showTooltip) {
|
|
6540
|
+
handleShow();
|
|
6541
|
+
}
|
|
6542
|
+
}, false);
|
|
6543
|
+
return () => {
|
|
6544
|
+
document.removeEventListener('click', () => {
|
|
6545
|
+
handleShow();
|
|
6546
|
+
}, false);
|
|
6547
|
+
};
|
|
6548
|
+
}, [showTooltip]);
|
|
5947
6549
|
React.useEffect(() => {
|
|
5948
6550
|
configStylesPromise.then(data => {
|
|
5949
|
-
setClassProps(() => classnames__default["default"](styles$
|
|
6551
|
+
setClassProps(() => classnames__default["default"](styles$5['tooltip-block'], className ?? data.TOOLTIP.className));
|
|
5950
6552
|
setConfigStyles(() => {
|
|
5951
6553
|
return {
|
|
5952
6554
|
...data
|
|
@@ -5957,31 +6559,33 @@ const Tooltip = ({
|
|
|
5957
6559
|
});
|
|
5958
6560
|
}, []);
|
|
5959
6561
|
return configStyles.TOOLTIP && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6562
|
+
ref: tooltipIconParentRef,
|
|
5960
6563
|
className: classProps,
|
|
5961
6564
|
style: {
|
|
5962
6565
|
width: width ?? configStyles.TOOLTIP.parent.width,
|
|
5963
6566
|
height: height ?? configStyles.TOOLTIP.parent.height,
|
|
5964
6567
|
borderRadius: radius ?? configStyles.TOOLTIP.parent.radius,
|
|
5965
6568
|
backgroundColor: backgroundColor ?? configStyles.TOOLTIP.parent.colors.background
|
|
5966
|
-
}
|
|
6569
|
+
},
|
|
6570
|
+
onClick: e => e.stopPropagation()
|
|
5967
6571
|
}, showTooltip ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5968
6572
|
ref: tooltipRef,
|
|
5969
|
-
className: `${styles$
|
|
6573
|
+
className: `${styles$5['tooltip']}`,
|
|
5970
6574
|
style: {
|
|
5971
6575
|
width: tooltipWidth ?? configStyles.TOOLTIP.width,
|
|
5972
6576
|
borderRadius: tooltipRadius ?? configStyles.TOOLTIP.radius,
|
|
5973
6577
|
backgroundColor: tooltipBackgroundColor ?? configStyles.TOOLTIP.colors.background,
|
|
5974
|
-
top:
|
|
5975
|
-
left:
|
|
6578
|
+
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',
|
|
6579
|
+
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'
|
|
5976
6580
|
}
|
|
5977
6581
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5978
|
-
className: `${styles$
|
|
6582
|
+
className: `${styles$5['tooltip-rel']}`
|
|
5979
6583
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5980
|
-
className: `${styles$
|
|
6584
|
+
className: `${styles$5['tooltip-decor']}`,
|
|
5981
6585
|
style: {
|
|
5982
6586
|
backgroundColor: tooltipBackgroundColor ?? configStyles.TOOLTIP.colors.background,
|
|
5983
|
-
left:
|
|
5984
|
-
top:
|
|
6587
|
+
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',
|
|
6588
|
+
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'
|
|
5985
6589
|
}
|
|
5986
6590
|
}), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
5987
6591
|
style: {
|
|
@@ -5992,18 +6596,22 @@ const Tooltip = ({
|
|
|
5992
6596
|
fontWeight: fontWeight ?? configStyles.TOOLTIP.font.weight
|
|
5993
6597
|
}
|
|
5994
6598
|
}, text))) : '', /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6599
|
+
ref: iconBlockRef,
|
|
6600
|
+
onClick: hoverOpen ? _ => _ : handleShow,
|
|
5995
6601
|
style: {
|
|
6602
|
+
display: 'flex',
|
|
5996
6603
|
cursor: 'pointer'
|
|
5997
6604
|
},
|
|
5998
|
-
|
|
6605
|
+
onMouseEnter: hoverOpen ? handleMouseEnter : _ => _,
|
|
6606
|
+
onMouseLeave: hoverOpen ? handleMouseLeave : _ => _
|
|
5999
6607
|
}, tooltipIcon ? tooltipIcon : configStyles.TOOLTIP.icon ? configStyles.TOOLTIP.icon : /*#__PURE__*/React__default["default"].createElement(SvgTooltip, null)));
|
|
6000
6608
|
};
|
|
6001
6609
|
Tooltip.propTypes = {
|
|
6002
|
-
type: PropTypes__default["default"].string,
|
|
6003
6610
|
width: PropTypes__default["default"].string,
|
|
6004
6611
|
color: PropTypes__default["default"].string,
|
|
6005
6612
|
height: PropTypes__default["default"].string,
|
|
6006
6613
|
radius: PropTypes__default["default"].string,
|
|
6614
|
+
hoverOpen: PropTypes__default["default"].bool,
|
|
6007
6615
|
fontSize: PropTypes__default["default"].string,
|
|
6008
6616
|
fontStyle: PropTypes__default["default"].string,
|
|
6009
6617
|
className: PropTypes__default["default"].string,
|
|
@@ -6014,7 +6622,8 @@ Tooltip.propTypes = {
|
|
|
6014
6622
|
tooltipRadius: PropTypes__default["default"].string,
|
|
6015
6623
|
text: PropTypes__default["default"].string.isRequired,
|
|
6016
6624
|
backgroundColor: PropTypes__default["default"].string,
|
|
6017
|
-
tooltipBackgroundColor: PropTypes__default["default"].string
|
|
6625
|
+
tooltipBackgroundColor: PropTypes__default["default"].string,
|
|
6626
|
+
direction: PropTypes__default["default"].oneOf(Object.values(TooltipDirections))
|
|
6018
6627
|
};
|
|
6019
6628
|
|
|
6020
6629
|
const SvgCaptchaArrowUp = ({
|
|
@@ -6055,9 +6664,9 @@ const SvgCaptchaArrowDown = ({
|
|
|
6055
6664
|
fill: fillColor ? fillColor : '#00236A'
|
|
6056
6665
|
}));
|
|
6057
6666
|
|
|
6058
|
-
var css_248z$
|
|
6059
|
-
var styles$
|
|
6060
|
-
styleInject(css_248z$
|
|
6667
|
+
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}";
|
|
6668
|
+
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"};
|
|
6669
|
+
styleInject(css_248z$6);
|
|
6061
6670
|
|
|
6062
6671
|
const Captcha = ({
|
|
6063
6672
|
color,
|
|
@@ -6145,7 +6754,7 @@ const Captcha = ({
|
|
|
6145
6754
|
alignItems: 'center',
|
|
6146
6755
|
zIndex: 1
|
|
6147
6756
|
},
|
|
6148
|
-
className: styles$
|
|
6757
|
+
className: styles$4['start-point']
|
|
6149
6758
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6150
6759
|
style: {
|
|
6151
6760
|
position: 'absolute',
|
|
@@ -6171,8 +6780,8 @@ const Captcha = ({
|
|
|
6171
6780
|
backgroundColor: 'transparent'
|
|
6172
6781
|
},
|
|
6173
6782
|
className: `
|
|
6174
|
-
${styles$
|
|
6175
|
-
${+rangeProgress === rangeNumber ? styles$
|
|
6783
|
+
${styles$4['range']}
|
|
6784
|
+
${+rangeProgress === rangeNumber ? styles$4['range-success'] : +rangeProgress !== rangeNumber && +rangeProgress > 0 ? styles$4['range-error'] : styles$4['range-default']}
|
|
6176
6785
|
`,
|
|
6177
6786
|
onInput: handleRange
|
|
6178
6787
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -6202,9 +6811,9 @@ Captcha.propTypes = {
|
|
|
6202
6811
|
getRange: PropTypes__default["default"].func.isRequired
|
|
6203
6812
|
};
|
|
6204
6813
|
|
|
6205
|
-
var css_248z$
|
|
6206
|
-
var styles$
|
|
6207
|
-
styleInject(css_248z$
|
|
6814
|
+
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}";
|
|
6815
|
+
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"};
|
|
6816
|
+
styleInject(css_248z$5);
|
|
6208
6817
|
|
|
6209
6818
|
const Stepper = ({
|
|
6210
6819
|
stepLength,
|
|
@@ -6214,11 +6823,11 @@ const Stepper = ({
|
|
|
6214
6823
|
const [classProps, setClassProps] = React.useState({});
|
|
6215
6824
|
const [configStyles, setConfigStyles] = React.useState({});
|
|
6216
6825
|
React.useEffect(() => {
|
|
6217
|
-
className && setClassProps(() => classnames__default["default"](className ?? configStyles.STEPPER.className, `${styles$
|
|
6826
|
+
className && setClassProps(() => classnames__default["default"](className ?? configStyles.STEPPER.className, `${styles$3['stepper-container']} stepper-container-rem`));
|
|
6218
6827
|
}, [className]);
|
|
6219
6828
|
React.useEffect(() => {
|
|
6220
6829
|
configStylesPromise.then(data => {
|
|
6221
|
-
setClassProps(() => classnames__default["default"](className ?? data.STEPPER.className, `${styles$
|
|
6830
|
+
setClassProps(() => classnames__default["default"](className ?? data.STEPPER.className, `${styles$3['stepper-container']} stepper-container-rem`));
|
|
6222
6831
|
setConfigStyles(() => {
|
|
6223
6832
|
return {
|
|
6224
6833
|
...data
|
|
@@ -6234,10 +6843,10 @@ const Stepper = ({
|
|
|
6234
6843
|
let steppers = [];
|
|
6235
6844
|
for (let step = 1; step <= stepLength; step++) {
|
|
6236
6845
|
steppers.push( /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6237
|
-
className: classnames__default["default"](`${step <= activeSteps ? styles$
|
|
6846
|
+
className: classnames__default["default"](`${step <= activeSteps ? styles$3.activeRing : styles$3.bigRing}`),
|
|
6238
6847
|
key: step
|
|
6239
6848
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6240
|
-
className: classnames__default["default"](`${step <= activeSteps ? styles$
|
|
6849
|
+
className: classnames__default["default"](`${step <= activeSteps ? styles$3.smallActiveRing : styles$3.smallRing}`)
|
|
6241
6850
|
}, step <= activeSteps ? step : '')));
|
|
6242
6851
|
}
|
|
6243
6852
|
return steppers;
|
|
@@ -6367,8 +6976,8 @@ Checkbox.propTypes = {
|
|
|
6367
6976
|
data: PropTypes__default["default"].oneOfType([PropTypes__default["default"].arrayOf(PropTypes__default["default"].object), PropTypes__default["default"].object])
|
|
6368
6977
|
};
|
|
6369
6978
|
|
|
6370
|
-
var css_248z$
|
|
6371
|
-
styleInject(css_248z$
|
|
6979
|
+
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}";
|
|
6980
|
+
styleInject(css_248z$4);
|
|
6372
6981
|
|
|
6373
6982
|
const PositionSide = {
|
|
6374
6983
|
TOP: 'top',
|
|
@@ -6376,6 +6985,7 @@ const PositionSide = {
|
|
|
6376
6985
|
};
|
|
6377
6986
|
const Textarea = ({
|
|
6378
6987
|
size,
|
|
6988
|
+
name,
|
|
6379
6989
|
style,
|
|
6380
6990
|
family,
|
|
6381
6991
|
weight,
|
|
@@ -6437,23 +7047,26 @@ const Textarea = ({
|
|
|
6437
7047
|
};
|
|
6438
7048
|
const handleChange = e => {
|
|
6439
7049
|
const value = e.target.value;
|
|
6440
|
-
onChange
|
|
7050
|
+
if (onChange) {
|
|
7051
|
+
onChange(value);
|
|
7052
|
+
}
|
|
6441
7053
|
setInnerValue(() => value);
|
|
6442
7054
|
if (maxLength) {
|
|
6443
7055
|
if (value.length > maxLength) {
|
|
6444
|
-
onChange
|
|
7056
|
+
if (onChange) {
|
|
7057
|
+
onChange(value.substr(0, maxLength));
|
|
7058
|
+
}
|
|
7059
|
+
setInnerValue(() => value.substr(0, maxLength));
|
|
6445
7060
|
}
|
|
6446
7061
|
} else {
|
|
6447
7062
|
if (value.length > configStyles.TEXTAREA.maxLength) {
|
|
6448
|
-
onChange
|
|
7063
|
+
if (onChange) {
|
|
7064
|
+
onChange(value.substr(0, configStyles.TEXTAREA.maxLength));
|
|
7065
|
+
}
|
|
7066
|
+
setInnerValue(() => value.substr(0, configStyles.TEXTAREA.maxLength));
|
|
6449
7067
|
}
|
|
6450
7068
|
}
|
|
6451
7069
|
};
|
|
6452
|
-
React.useEffect(() => {
|
|
6453
|
-
if (!onChange) {
|
|
6454
|
-
alert('Please add onChange function on Textarea component');
|
|
6455
|
-
}
|
|
6456
|
-
}, [onChange]);
|
|
6457
7070
|
React.useEffect(() => {
|
|
6458
7071
|
if (value === undefined) {
|
|
6459
7072
|
alert('Please add value prop on Textarea component');
|
|
@@ -6500,7 +7113,7 @@ const Textarea = ({
|
|
|
6500
7113
|
style: {
|
|
6501
7114
|
display: labelDisplay ?? configStyles.TEXTAREA.label.display
|
|
6502
7115
|
}
|
|
6503
|
-
}, label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null))) : '', showCharacterCount && maxLength && characterCountPosition === 'top' && /*#__PURE__*/React__default["default"].createElement("span", null, maxLength -
|
|
7116
|
+
}, label, required && /*#__PURE__*/React__default["default"].createElement("sup", null, /*#__PURE__*/React__default["default"].createElement(SvgRequired, null))) : '', showCharacterCount && maxLength && characterCountPosition === 'top' && /*#__PURE__*/React__default["default"].createElement("span", null, maxLength - innerValue.length, " \u0576\u056B\u0577")), /*#__PURE__*/React__default["default"].createElement("textarea", {
|
|
6504
7117
|
style: {
|
|
6505
7118
|
width: '100%',
|
|
6506
7119
|
border: 'none',
|
|
@@ -6523,6 +7136,7 @@ const Textarea = ({
|
|
|
6523
7136
|
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,
|
|
6524
7137
|
resize: resize ? resize : configStyles.TEXTAREA.resize
|
|
6525
7138
|
},
|
|
7139
|
+
name: name,
|
|
6526
7140
|
value: innerValue,
|
|
6527
7141
|
disabled: disabled,
|
|
6528
7142
|
onBlur: handleBlur,
|
|
@@ -6562,6 +7176,7 @@ const Textarea = ({
|
|
|
6562
7176
|
};
|
|
6563
7177
|
Textarea.propTypes = {
|
|
6564
7178
|
size: PropTypes__default["default"].string,
|
|
7179
|
+
name: PropTypes__default["default"].string,
|
|
6565
7180
|
style: PropTypes__default["default"].string,
|
|
6566
7181
|
family: PropTypes__default["default"].string,
|
|
6567
7182
|
weight: PropTypes__default["default"].string,
|
|
@@ -6572,6 +7187,7 @@ Textarea.propTypes = {
|
|
|
6572
7187
|
radius: PropTypes__default["default"].string,
|
|
6573
7188
|
required: PropTypes__default["default"].bool,
|
|
6574
7189
|
disabled: PropTypes__default["default"].bool,
|
|
7190
|
+
onChange: PropTypes__default["default"].func,
|
|
6575
7191
|
padding: PropTypes__default["default"].string,
|
|
6576
7192
|
minWidth: PropTypes__default["default"].string,
|
|
6577
7193
|
maxWidth: PropTypes__default["default"].string,
|
|
@@ -6600,65 +7216,611 @@ Textarea.propTypes = {
|
|
|
6600
7216
|
borderFocusColor: PropTypes__default["default"].string,
|
|
6601
7217
|
borderHoverColor: PropTypes__default["default"].string,
|
|
6602
7218
|
labelMarginBottom: PropTypes__default["default"].string,
|
|
6603
|
-
onChange: PropTypes__default["default"].func.isRequired,
|
|
6604
7219
|
characterCountPosition: PropTypes__default["default"].oneOf(Object.values(PositionSide))
|
|
6605
7220
|
};
|
|
6606
7221
|
|
|
6607
|
-
const
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
7222
|
+
const AccordionItem = ({
|
|
7223
|
+
item,
|
|
7224
|
+
open,
|
|
7225
|
+
index,
|
|
7226
|
+
onClick,
|
|
7227
|
+
openIcon,
|
|
7228
|
+
closeIcon,
|
|
7229
|
+
showIcons,
|
|
7230
|
+
className,
|
|
7231
|
+
titleAlign,
|
|
7232
|
+
multipleOpen,
|
|
7233
|
+
openHoverIcon,
|
|
6619
7234
|
color,
|
|
6620
|
-
weight,
|
|
6621
|
-
radius,
|
|
6622
7235
|
border,
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
children,
|
|
6626
|
-
textAlign,
|
|
7236
|
+
padding,
|
|
7237
|
+
fontSize,
|
|
6627
7238
|
fontStyle,
|
|
6628
|
-
|
|
6629
|
-
textShadow,
|
|
6630
|
-
lineHeight,
|
|
6631
|
-
colorHover,
|
|
7239
|
+
fontWeight,
|
|
6632
7240
|
fontFamily,
|
|
6633
|
-
|
|
6634
|
-
|
|
7241
|
+
borderTop,
|
|
7242
|
+
borderLeft,
|
|
7243
|
+
hoverColor,
|
|
7244
|
+
borderRight,
|
|
7245
|
+
borderRadius,
|
|
7246
|
+
borderBottom,
|
|
7247
|
+
marginBottom,
|
|
6635
7248
|
backgroundColor,
|
|
6636
|
-
|
|
6637
|
-
...props
|
|
7249
|
+
backgroundHoverColor
|
|
6638
7250
|
}) => {
|
|
7251
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
6639
7252
|
const [isHover, setIsHover] = React.useState(false);
|
|
6640
|
-
const
|
|
6641
|
-
|
|
6642
|
-
|
|
7253
|
+
const handleClick = () => {
|
|
7254
|
+
onClick(item, index);
|
|
7255
|
+
if (multipleOpen) {
|
|
7256
|
+
setIsOpen(() => !isOpen);
|
|
7257
|
+
}
|
|
7258
|
+
};
|
|
6643
7259
|
const handleMouseEnter = () => {
|
|
6644
|
-
setIsHover(true);
|
|
7260
|
+
setIsHover(() => true);
|
|
6645
7261
|
};
|
|
6646
7262
|
const handleMouseLeave = () => {
|
|
6647
|
-
setIsHover(false);
|
|
7263
|
+
setIsHover(() => false);
|
|
6648
7264
|
};
|
|
6649
|
-
|
|
7265
|
+
React.useEffect(() => {
|
|
7266
|
+
setIsOpen(() => open);
|
|
7267
|
+
}, [open]);
|
|
7268
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7269
|
+
className: className,
|
|
6650
7270
|
style: {
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
7271
|
+
marginBottom: marginBottom ? marginBottom : '0px'
|
|
7272
|
+
}
|
|
7273
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7274
|
+
onClick: handleClick,
|
|
7275
|
+
onMouseEnter: handleMouseEnter,
|
|
7276
|
+
onMouseLeave: handleMouseLeave,
|
|
7277
|
+
style: {
|
|
7278
|
+
display: 'flex',
|
|
7279
|
+
cursor: 'pointer',
|
|
7280
|
+
padding: padding,
|
|
7281
|
+
alignItems: 'center',
|
|
7282
|
+
borderRadius: borderRadius,
|
|
7283
|
+
borderTop: borderTop ? border : 'none',
|
|
7284
|
+
borderLeft: borderLeft ? border : 'none',
|
|
7285
|
+
borderRight: borderRight ? border : 'none',
|
|
7286
|
+
borderBottom: borderBottom ? border : 'none',
|
|
7287
|
+
justifyContent: showIcons ? 'space-between' : 'flex-start',
|
|
7288
|
+
backgroundColor: isHover ? backgroundHoverColor : backgroundColor
|
|
7289
|
+
}
|
|
7290
|
+
}, item.title && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
7291
|
+
style: {
|
|
7292
|
+
width: '90%',
|
|
7293
|
+
margin: '0px',
|
|
7294
|
+
fontSize: fontSize,
|
|
7295
|
+
overflow: 'hidden',
|
|
7296
|
+
whiteSpace: 'nowrap',
|
|
7297
|
+
fontStyle: fontStyle,
|
|
7298
|
+
fontWeight: fontWeight,
|
|
7299
|
+
fontFamily: fontFamily,
|
|
7300
|
+
textOverflow: 'ellipsis',
|
|
7301
|
+
textAlign: titleAlign ? titleAlign : 'left',
|
|
7302
|
+
color: isOpen ? hoverColor : isHover ? hoverColor : color
|
|
7303
|
+
}
|
|
7304
|
+
}, item.title), showIcons && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7305
|
+
style: {
|
|
7306
|
+
display: 'flex',
|
|
7307
|
+
width: 'fit-content',
|
|
7308
|
+
height: 'fit-content',
|
|
7309
|
+
minWidth: '14px',
|
|
7310
|
+
minHeight: '14px',
|
|
7311
|
+
alignItems: 'center',
|
|
7312
|
+
justifyContent: 'center'
|
|
7313
|
+
}
|
|
7314
|
+
}, isOpen ? closeIcon : isHover ? openHoverIcon ? openHoverIcon : openIcon : openIcon)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7315
|
+
style: {
|
|
7316
|
+
overflow: 'hidden',
|
|
7317
|
+
height: isOpen ? 'auto' : '0px'
|
|
7318
|
+
}
|
|
7319
|
+
}, item.content ? item.content : ''));
|
|
7320
|
+
};
|
|
7321
|
+
AccordionItem.propTypes = {
|
|
7322
|
+
open: PropTypes__default["default"].bool
|
|
7323
|
+
};
|
|
7324
|
+
|
|
7325
|
+
const SvgGreenplus = ({
|
|
7326
|
+
title,
|
|
7327
|
+
titleId,
|
|
7328
|
+
...props
|
|
7329
|
+
}) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
7330
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7331
|
+
width: "1em",
|
|
7332
|
+
height: "1em",
|
|
7333
|
+
fill: "none",
|
|
7334
|
+
viewBox: "0 0 16 16",
|
|
7335
|
+
"aria-labelledby": titleId
|
|
7336
|
+
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
7337
|
+
id: titleId
|
|
7338
|
+
}, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
7339
|
+
stroke: "#009B8B",
|
|
7340
|
+
strokeLinecap: "round",
|
|
7341
|
+
strokeLinejoin: "round",
|
|
7342
|
+
strokeWidth: 1.6,
|
|
7343
|
+
d: "M8 1v14M1 8h14"
|
|
7344
|
+
}));
|
|
7345
|
+
|
|
7346
|
+
const SvgGreenminus = ({
|
|
7347
|
+
title,
|
|
7348
|
+
titleId,
|
|
7349
|
+
...props
|
|
7350
|
+
}) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
7351
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7352
|
+
width: "1em",
|
|
7353
|
+
height: "1em",
|
|
7354
|
+
fill: "none",
|
|
7355
|
+
viewBox: "0 0 16 2",
|
|
7356
|
+
"aria-labelledby": titleId
|
|
7357
|
+
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
7358
|
+
id: titleId
|
|
7359
|
+
}, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
7360
|
+
stroke: "#009B8B",
|
|
7361
|
+
strokeLinecap: "round",
|
|
7362
|
+
strokeLinejoin: "round",
|
|
7363
|
+
strokeWidth: 1.6,
|
|
7364
|
+
d: "M1 1h14"
|
|
7365
|
+
}));
|
|
7366
|
+
|
|
7367
|
+
var css_248z$3 = "";
|
|
7368
|
+
styleInject(css_248z$3);
|
|
7369
|
+
|
|
7370
|
+
const Accordion = ({
|
|
7371
|
+
data,
|
|
7372
|
+
click,
|
|
7373
|
+
openIcon,
|
|
7374
|
+
closeIcon,
|
|
7375
|
+
className,
|
|
7376
|
+
showIcons,
|
|
7377
|
+
titleAlign,
|
|
7378
|
+
multipleOpen,
|
|
7379
|
+
openHoverIcon,
|
|
7380
|
+
borderTop,
|
|
7381
|
+
borderLeft,
|
|
7382
|
+
borderRight,
|
|
7383
|
+
borderColor,
|
|
7384
|
+
borderWidth,
|
|
7385
|
+
borderStyle,
|
|
7386
|
+
borderBottom,
|
|
7387
|
+
borderRadius,
|
|
7388
|
+
fontSize,
|
|
7389
|
+
fontStyle,
|
|
7390
|
+
fontWeight,
|
|
7391
|
+
fontFamily,
|
|
7392
|
+
color,
|
|
7393
|
+
padding,
|
|
7394
|
+
hoverColor,
|
|
7395
|
+
marginBottom,
|
|
7396
|
+
backgroundColor,
|
|
7397
|
+
backgroundHoverColor
|
|
7398
|
+
}) => {
|
|
7399
|
+
const [openIndex, setOpenIndex] = React.useState(-1);
|
|
7400
|
+
const [classProps, setClassProps] = React.useState({});
|
|
7401
|
+
const [configStyles, setConfigStyles] = React.useState({});
|
|
7402
|
+
const handleClick = (item, index) => {
|
|
7403
|
+
if (click) {
|
|
7404
|
+
click(item);
|
|
7405
|
+
}
|
|
7406
|
+
if (!multipleOpen) {
|
|
7407
|
+
setOpenIndex(() => openIndex === index ? -1 : index);
|
|
7408
|
+
}
|
|
7409
|
+
};
|
|
7410
|
+
React.useEffect(() => {
|
|
7411
|
+
className && setClassProps(() => classnames__default["default"](className ?? configStyles.BUTTON.className));
|
|
7412
|
+
}, [className]);
|
|
7413
|
+
React.useEffect(() => {
|
|
7414
|
+
configStylesPromise.then(data => {
|
|
7415
|
+
setClassProps(() => classnames__default["default"](className ?? data.BUTTON.className));
|
|
7416
|
+
setConfigStyles(() => {
|
|
7417
|
+
return {
|
|
7418
|
+
...data
|
|
7419
|
+
};
|
|
7420
|
+
});
|
|
7421
|
+
}, error => {
|
|
7422
|
+
console.error(error);
|
|
7423
|
+
});
|
|
7424
|
+
}, []);
|
|
7425
|
+
return configStyles.ACCORDION && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7426
|
+
style: {
|
|
7427
|
+
width: '100%'
|
|
7428
|
+
}
|
|
7429
|
+
}, data && data.length ? data.map((item, index) => {
|
|
7430
|
+
return /*#__PURE__*/React__default["default"].createElement(AccordionItem, {
|
|
7431
|
+
item: item,
|
|
7432
|
+
index: index,
|
|
7433
|
+
onClick: handleClick,
|
|
7434
|
+
titleAlign: titleAlign,
|
|
7435
|
+
multipleOpen: multipleOpen,
|
|
7436
|
+
key: `${item.title}__TUI__${index}`,
|
|
7437
|
+
open: openIndex === index ? true : false,
|
|
7438
|
+
showIcons: showIcons ?? configStyles.ACCORDION.showIcons,
|
|
7439
|
+
openIcon: openIcon ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
7440
|
+
src: openIcon,
|
|
7441
|
+
alt: "open icon"
|
|
7442
|
+
}) : configStyles.ACCORDION.icon.open ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
7443
|
+
src: configStyles.ACCORDION.icon.open,
|
|
7444
|
+
alt: "open icon"
|
|
7445
|
+
}) : /*#__PURE__*/React__default["default"].createElement(SvgGreenplus, null),
|
|
7446
|
+
openHoverIcon: openHoverIcon ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
7447
|
+
src: openHoverIcon,
|
|
7448
|
+
alt: "open icon"
|
|
7449
|
+
}) : configStyles.ACCORDION.icon.openHover ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
7450
|
+
src: configStyles.ACCORDION.icon.openHover,
|
|
7451
|
+
alt: "open icon"
|
|
7452
|
+
}) : /*#__PURE__*/React__default["default"].createElement(SvgGreenplus, null),
|
|
7453
|
+
closeIcon: closeIcon ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
7454
|
+
src: closeIcon,
|
|
7455
|
+
alt: "close icon"
|
|
7456
|
+
}) : configStyles.ACCORDION.icon.close ? /*#__PURE__*/React__default["default"].createElement("img", {
|
|
7457
|
+
src: configStyles.ACCORDION.icon.close,
|
|
7458
|
+
alt: "close icon"
|
|
7459
|
+
}) : /*#__PURE__*/React__default["default"].createElement(SvgGreenminus, null),
|
|
7460
|
+
className: classProps,
|
|
7461
|
+
color: color ?? configStyles.ACCORDION.color,
|
|
7462
|
+
padding: padding ?? configStyles.ACCORDION.padding,
|
|
7463
|
+
fontSize: fontSize ?? configStyles.ACCORDION.font.size,
|
|
7464
|
+
fontStyle: fontStyle ?? configStyles.ACCORDION.font.style,
|
|
7465
|
+
fontWeight: fontWeight ?? configStyles.ACCORDION.font.weight,
|
|
7466
|
+
fontFamily: fontFamily ?? configStyles.ACCORDION.font.family,
|
|
7467
|
+
hoverColor: hoverColor ?? configStyles.ACCORDION.colors.hover,
|
|
7468
|
+
marginBottom: marginBottom ?? configStyles.ACCORDION.marginBottom,
|
|
7469
|
+
border: `
|
|
7470
|
+
${borderWidth ?? configStyles.ACCORDION.border.width}
|
|
7471
|
+
${borderStyle ?? configStyles.ACCORDION.border.style}
|
|
7472
|
+
${openIndex === index ? 'transparent' : borderColor ?? configStyles.ACCORDION.border.color}
|
|
7473
|
+
`,
|
|
7474
|
+
borderTop: borderTop ?? configStyles.ACCORDION.border.top,
|
|
7475
|
+
borderLeft: borderLeft ?? configStyles.ACCORDION.border.left,
|
|
7476
|
+
borderRight: borderRight ?? configStyles.ACCORDION.border.right,
|
|
7477
|
+
borderBottom: borderBottom ?? configStyles.ACCORDION.border.bottom,
|
|
7478
|
+
borderRadius: borderRadius ?? configStyles.ACCORDION.border.radius,
|
|
7479
|
+
backgroundColor: backgroundColor ?? configStyles.ACCORDION.colors.background,
|
|
7480
|
+
backgroundHoverColor: backgroundHoverColor ?? configStyles.ACCORDION.colors.backgroundHover
|
|
7481
|
+
});
|
|
7482
|
+
}) : '');
|
|
7483
|
+
};
|
|
7484
|
+
Accordion.propTypes = {
|
|
7485
|
+
data: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
|
7486
|
+
title: PropTypes__default["default"].string,
|
|
7487
|
+
content: PropTypes__default["default"].element
|
|
7488
|
+
})),
|
|
7489
|
+
click: PropTypes__default["default"].func,
|
|
7490
|
+
showIcons: PropTypes__default["default"].bool,
|
|
7491
|
+
multipleOpen: PropTypes__default["default"].bool,
|
|
7492
|
+
color: PropTypes__default["default"].string,
|
|
7493
|
+
hoverColor: PropTypes__default["default"].string,
|
|
7494
|
+
backgroundColor: PropTypes__default["default"].string,
|
|
7495
|
+
backgroundHoverColor: PropTypes__default["default"].string,
|
|
7496
|
+
titleAlign: PropTypes__default["default"].oneOf(['left', 'center', 'right']),
|
|
7497
|
+
padding: PropTypes__default["default"].string,
|
|
7498
|
+
openIcon: PropTypes__default["default"].string,
|
|
7499
|
+
className: PropTypes__default["default"].string,
|
|
7500
|
+
closeIcon: PropTypes__default["default"].string,
|
|
7501
|
+
marginBottom: PropTypes__default["default"].string,
|
|
7502
|
+
openHoverIcon: PropTypes__default["default"].string,
|
|
7503
|
+
borderTop: PropTypes__default["default"].bool,
|
|
7504
|
+
borderLeft: PropTypes__default["default"].bool,
|
|
7505
|
+
borderRight: PropTypes__default["default"].bool,
|
|
7506
|
+
borderBottom: PropTypes__default["default"].bool,
|
|
7507
|
+
borderColor: PropTypes__default["default"].string,
|
|
7508
|
+
borderWidth: PropTypes__default["default"].string,
|
|
7509
|
+
borderStyle: PropTypes__default["default"].string,
|
|
7510
|
+
borderRadius: PropTypes__default["default"].string,
|
|
7511
|
+
fontSize: PropTypes__default["default"].string,
|
|
7512
|
+
fontStyle: PropTypes__default["default"].string,
|
|
7513
|
+
fontWeight: PropTypes__default["default"].number,
|
|
7514
|
+
fontFamily: PropTypes__default["default"].string
|
|
7515
|
+
};
|
|
7516
|
+
|
|
7517
|
+
const Swipe = ({
|
|
7518
|
+
id,
|
|
7519
|
+
title,
|
|
7520
|
+
child,
|
|
7521
|
+
props,
|
|
7522
|
+
innerConfigStyles
|
|
7523
|
+
}) => {
|
|
7524
|
+
const {
|
|
7525
|
+
SWIPEMODAL
|
|
7526
|
+
} = innerConfigStyles || {};
|
|
7527
|
+
const {
|
|
7528
|
+
width,
|
|
7529
|
+
height,
|
|
7530
|
+
titleStyle,
|
|
7531
|
+
position,
|
|
7532
|
+
borderRadius,
|
|
7533
|
+
callClose,
|
|
7534
|
+
showCloseIcon
|
|
7535
|
+
} = props || {};
|
|
7536
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7537
|
+
style: {
|
|
7538
|
+
width: '100%',
|
|
7539
|
+
height: '100%'
|
|
7540
|
+
}
|
|
7541
|
+
}, (title || showCloseIcon) && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7542
|
+
style: {
|
|
7543
|
+
width: '100%',
|
|
7544
|
+
display: 'flex',
|
|
7545
|
+
minHeight: '40px',
|
|
7546
|
+
alignItems: 'center',
|
|
7547
|
+
boxSizing: 'border-box',
|
|
7548
|
+
justifyContent: title ? 'space-between' : 'flex-end',
|
|
7549
|
+
padding: titleStyle?.padding ?? SWIPEMODAL.titleStyle.padding,
|
|
7550
|
+
maxHeight: titleStyle?.maxHeight ?? SWIPEMODAL.titleStyle.maxHeight
|
|
7551
|
+
}
|
|
7552
|
+
}, title && /*#__PURE__*/React__default["default"].createElement("h1", {
|
|
7553
|
+
style: {
|
|
7554
|
+
color: titleStyle?.color ?? SWIPEMODAL.titleStyle.color,
|
|
7555
|
+
fontSize: titleStyle?.fontSize ?? SWIPEMODAL.titleStyle.font.size,
|
|
7556
|
+
textAlign: titleStyle?.textAlign ?? SWIPEMODAL.titleStyle.textAlign,
|
|
7557
|
+
fontStyle: titleStyle?.fontStyle ?? SWIPEMODAL.titleStyle.font.style,
|
|
7558
|
+
fontWeight: titleStyle?.fontWeight ?? SWIPEMODAL.titleStyle.font.weight,
|
|
7559
|
+
fontFamily: titleStyle?.fontFamily ?? SWIPEMODAL.titleStyle.font.family
|
|
7560
|
+
}
|
|
7561
|
+
}, title), showCloseIcon && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7562
|
+
style: {
|
|
7563
|
+
width: '24px',
|
|
7564
|
+
height: '24px',
|
|
7565
|
+
maxWidth: '24px',
|
|
7566
|
+
maxHeight: '24px',
|
|
7567
|
+
cursor: 'pointer'
|
|
7568
|
+
},
|
|
7569
|
+
onClick: hasOwnerProperty(props, 'callClose') && {}.toString.call(callClose) === '[object Function]' ? () => callClose(id) : _ => _
|
|
7570
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
|
7571
|
+
alt: "close",
|
|
7572
|
+
src: hasOwnerProperty(props, 'closeIcon') && typeof props.closeIcon === 'string' ? props.closeIcon : SWIPEMODAL.closeIcon,
|
|
7573
|
+
style: {
|
|
7574
|
+
width: '100%',
|
|
7575
|
+
height: '100%',
|
|
7576
|
+
objectFit: 'contain',
|
|
7577
|
+
objectPosition: 'center'
|
|
7578
|
+
}
|
|
7579
|
+
}))), child && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7580
|
+
style: {
|
|
7581
|
+
width: '100%',
|
|
7582
|
+
height: '100%',
|
|
7583
|
+
overflowY: 'auto',
|
|
7584
|
+
overflowX: 'hidden',
|
|
7585
|
+
maxHeight: `calc(100% - ${titleStyle?.maxHeight ?? SWIPEMODAL.titleStyle.maxHeight})`,
|
|
7586
|
+
borderTopLeftRadius: position === 'right' || position === 'bottom' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius,
|
|
7587
|
+
borderTopRightRadius: position === 'left' || position === 'bottom' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius,
|
|
7588
|
+
borderBottomLeftRadius: position === 'right' || position === 'top' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius,
|
|
7589
|
+
borderBottomRightRadius: position === 'left' || position === 'top' ? '0px' : borderRadius ?? SWIPEMODAL.border.radius
|
|
7590
|
+
}
|
|
7591
|
+
}, child));
|
|
7592
|
+
};
|
|
7593
|
+
|
|
7594
|
+
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%}}";
|
|
7595
|
+
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"};
|
|
7596
|
+
styleInject(css_248z$2);
|
|
7597
|
+
|
|
7598
|
+
let swipeCount = 0;
|
|
7599
|
+
const createElem = (id, title, child, props, swipeBlock, innerConfigStyles) => {
|
|
7600
|
+
const {
|
|
7601
|
+
width,
|
|
7602
|
+
height,
|
|
7603
|
+
position = 'left',
|
|
7604
|
+
animation,
|
|
7605
|
+
borderRadius,
|
|
7606
|
+
backgroundColor
|
|
7607
|
+
} = props || {};
|
|
7608
|
+
swipeBlock.style.position = 'absolute';
|
|
7609
|
+
swipeBlock.style.zIndex = swipeCount;
|
|
7610
|
+
swipeBlock.style.backgroundColor = backgroundColor ?? innerConfigStyles.SWIPEMODAL.colors.background;
|
|
7611
|
+
swipeBlock.style.width = position === 'left' || position === 'right' ? width ?? innerConfigStyles.SWIPEMODAL.width : '100%';
|
|
7612
|
+
swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '100%';
|
|
7613
|
+
swipeBlock.style.borderTopLeftRadius = position === 'right' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
7614
|
+
swipeBlock.style.borderTopRightRadius = position === 'left' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
7615
|
+
swipeBlock.style.borderBottomLeftRadius = position === 'right' || position === 'top' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
7616
|
+
swipeBlock.style.borderBottomRightRadius = position === 'left' || position === 'top' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
7617
|
+
swipeBlock.setAttribute('id', id);
|
|
7618
|
+
swipeBlock.setAttribute('closePos', position);
|
|
7619
|
+
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']);
|
|
7620
|
+
if (hasOwnerProperty(props, 'animation') && animation === true) {
|
|
7621
|
+
swipeBlock.setAttribute('anime', animation);
|
|
7622
|
+
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'] : ''}`);
|
|
7623
|
+
}
|
|
7624
|
+
const newElem = /*#__PURE__*/React__default["default"].createElement(Swipe, {
|
|
7625
|
+
id,
|
|
7626
|
+
title,
|
|
7627
|
+
child,
|
|
7628
|
+
props,
|
|
7629
|
+
innerConfigStyles
|
|
7630
|
+
});
|
|
7631
|
+
const root = ReactDOM__default["default"].createRoot(swipeBlock);
|
|
7632
|
+
root.render(newElem);
|
|
7633
|
+
};
|
|
7634
|
+
const createSwipe = (id, title, child, props, swipable) => {
|
|
7635
|
+
let innerConfigStyles = {};
|
|
7636
|
+
const swipeBlock = document.createElement('div');
|
|
7637
|
+
swipeBlock.addEventListener('click', function (e) {
|
|
7638
|
+
e.stopPropagation();
|
|
7639
|
+
});
|
|
7640
|
+
configStylesPromise.then(data => {
|
|
7641
|
+
innerConfigStyles = {
|
|
7642
|
+
...data
|
|
7643
|
+
};
|
|
7644
|
+
createElem(id, title, child, props, swipeBlock, innerConfigStyles);
|
|
7645
|
+
if (!swipable) {
|
|
7646
|
+
swipable = document.createElement('div');
|
|
7647
|
+
swipable.setAttribute('id', 'swipable');
|
|
7648
|
+
swipable.style.position = 'absolute';
|
|
7649
|
+
swipable.style.top = '0px';
|
|
7650
|
+
swipable.style.left = '0px';
|
|
7651
|
+
swipable.style.zIndex = 99999;
|
|
7652
|
+
swipable.style.maxWidth = '100%';
|
|
7653
|
+
swipable.style.maxHeight = '100vh';
|
|
7654
|
+
swipable.style.width = '100%';
|
|
7655
|
+
swipable.style.height = '100%';
|
|
7656
|
+
swipable.style.backgroundColor = props?.parent?.backgroundColor ?? innerConfigStyles.SWIPEMODAL.parent.colors.background;
|
|
7657
|
+
if (props.outSideClose || innerConfigStyles.SWIPEMODAL.outSideClose) {
|
|
7658
|
+
swipable.addEventListener('click', function () {
|
|
7659
|
+
hasOwnerProperty(props, 'callClose') && {}.toString.call(props.callClose) === '[object Function]' ? props.callClose() : '';
|
|
7660
|
+
});
|
|
7661
|
+
}
|
|
7662
|
+
const SwipifyBlock = document.getElementById('swipify_tui');
|
|
7663
|
+
SwipifyBlock.appendChild(swipable);
|
|
7664
|
+
}
|
|
7665
|
+
swipable.appendChild(swipeBlock);
|
|
7666
|
+
}, error => {
|
|
7667
|
+
console.error(error);
|
|
7668
|
+
});
|
|
7669
|
+
};
|
|
7670
|
+
|
|
7671
|
+
// Function to handle removing the element on navigation change
|
|
7672
|
+
const handleNavigationChange = () => {
|
|
7673
|
+
let swipable = document.getElementById('swipable');
|
|
7674
|
+
if (swipable) {
|
|
7675
|
+
swipable.remove();
|
|
7676
|
+
}
|
|
7677
|
+
};
|
|
7678
|
+
|
|
7679
|
+
// Wrap history methods to detect all navigation changes
|
|
7680
|
+
(function (history) {
|
|
7681
|
+
const pushState = history.pushState;
|
|
7682
|
+
const replaceState = history.replaceState;
|
|
7683
|
+
history.pushState = function (state) {
|
|
7684
|
+
const result = pushState.apply(history, arguments);
|
|
7685
|
+
window.dispatchEvent(new Event('navigationchange'));
|
|
7686
|
+
return result;
|
|
7687
|
+
};
|
|
7688
|
+
history.replaceState = function (state) {
|
|
7689
|
+
const result = replaceState.apply(history, arguments);
|
|
7690
|
+
window.dispatchEvent(new Event('navigationchange'));
|
|
7691
|
+
return result;
|
|
7692
|
+
};
|
|
7693
|
+
})(window.history);
|
|
7694
|
+
const swipe = {
|
|
7695
|
+
open: (title = '', id, child, props) => {
|
|
7696
|
+
if (id === undefined || id === null && (typeof id !== 'string' || typeof id !== 'number')) {
|
|
7697
|
+
alert('Please pass valid id prop (string / number) when call swipe.open function');
|
|
7698
|
+
return;
|
|
7699
|
+
}
|
|
7700
|
+
if (swipeCount === 0) {
|
|
7701
|
+
window.addEventListener('popstate', handleNavigationChange);
|
|
7702
|
+
window.addEventListener('navigationchange', handleNavigationChange);
|
|
7703
|
+
}
|
|
7704
|
+
let swipable = document.getElementById('swipable');
|
|
7705
|
+
swipeCount += 1;
|
|
7706
|
+
createSwipe(id, title, child, props, swipable);
|
|
7707
|
+
return Promise.resolve(id);
|
|
7708
|
+
},
|
|
7709
|
+
close: id => {
|
|
7710
|
+
if (id === undefined || id === null && (typeof id !== 'string' || typeof id !== 'number')) {
|
|
7711
|
+
alert('Please pass valid id prop (string / number) when call swipe.close function');
|
|
7712
|
+
}
|
|
7713
|
+
let swipable = document.getElementById('swipable');
|
|
7714
|
+
swipeCount -= 1;
|
|
7715
|
+
const removable = document.getElementById(id);
|
|
7716
|
+
if (swipable && removable) {
|
|
7717
|
+
const animation = removable.getAttribute('anime');
|
|
7718
|
+
const position = removable.getAttribute('closePos');
|
|
7719
|
+
if (animation) {
|
|
7720
|
+
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']);
|
|
7721
|
+
setTimeout(() => {
|
|
7722
|
+
swipable.removeChild(removable);
|
|
7723
|
+
if (swipeCount === 0 && swipable) {
|
|
7724
|
+
window.removeEventListener('popstate', handleNavigationChange);
|
|
7725
|
+
window.removeEventListener('navigationchange', handleNavigationChange);
|
|
7726
|
+
const SwipifyBlock = document.getElementById('swipify_tui');
|
|
7727
|
+
SwipifyBlock.removeChild(swipable);
|
|
7728
|
+
}
|
|
7729
|
+
}, 200);
|
|
7730
|
+
} else {
|
|
7731
|
+
swipable.removeChild(removable);
|
|
7732
|
+
if (swipeCount === 0 && swipable) {
|
|
7733
|
+
window.removeEventListener('popstate', handleNavigationChange);
|
|
7734
|
+
window.removeEventListener('navigationchange', handleNavigationChange);
|
|
7735
|
+
const SwipifyBlock = document.getElementById('swipify_tui');
|
|
7736
|
+
SwipifyBlock.removeChild(swipable);
|
|
7737
|
+
}
|
|
7738
|
+
}
|
|
7739
|
+
} else {
|
|
7740
|
+
if (swipeCount === 0 && swipable) {
|
|
7741
|
+
const SwipifyBlock = document.getElementById('swipify_tui');
|
|
7742
|
+
SwipifyBlock.removeChild(swipable);
|
|
7743
|
+
}
|
|
7744
|
+
}
|
|
7745
|
+
}
|
|
7746
|
+
};
|
|
7747
|
+
const SwipeModal = () => {
|
|
7748
|
+
const ref = React.useRef(null);
|
|
7749
|
+
React.useEffect(() => {
|
|
7750
|
+
const parentSize = ref.current.parentNode.style.height;
|
|
7751
|
+
if (Number(parentSize.replace(/\D/g, '')) > 0) {
|
|
7752
|
+
ref.current.style.height = '100%';
|
|
7753
|
+
} else {
|
|
7754
|
+
ref.current.style.height = '100vh';
|
|
7755
|
+
}
|
|
7756
|
+
}, [ref]);
|
|
7757
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7758
|
+
ref: ref,
|
|
7759
|
+
id: "swipify_tui",
|
|
7760
|
+
style: {
|
|
7761
|
+
position: 'relative',
|
|
7762
|
+
width: '100%',
|
|
7763
|
+
overflow: 'hidden',
|
|
7764
|
+
zIndex: 1
|
|
7765
|
+
}
|
|
7766
|
+
});
|
|
7767
|
+
};
|
|
7768
|
+
|
|
7769
|
+
const TypographyType = {
|
|
7770
|
+
p: 'p',
|
|
7771
|
+
h1: 'h1',
|
|
7772
|
+
h2: 'h2',
|
|
7773
|
+
h3: 'h3',
|
|
7774
|
+
h4: 'h4',
|
|
7775
|
+
h5: 'h5',
|
|
7776
|
+
h6: 'h6',
|
|
7777
|
+
span: 'span'
|
|
7778
|
+
};
|
|
7779
|
+
const Typography = ({
|
|
7780
|
+
size,
|
|
7781
|
+
color,
|
|
7782
|
+
weight,
|
|
7783
|
+
radius,
|
|
7784
|
+
border,
|
|
7785
|
+
cursor,
|
|
7786
|
+
onClick,
|
|
7787
|
+
children,
|
|
7788
|
+
textAlign,
|
|
7789
|
+
fontStyle,
|
|
7790
|
+
className,
|
|
7791
|
+
textShadow,
|
|
7792
|
+
lineHeight,
|
|
7793
|
+
colorHover,
|
|
7794
|
+
fontFamily,
|
|
7795
|
+
textTransform,
|
|
7796
|
+
textDecoration,
|
|
7797
|
+
backgroundColor,
|
|
7798
|
+
variant = 'p',
|
|
7799
|
+
...props
|
|
7800
|
+
}) => {
|
|
7801
|
+
const [isHover, setIsHover] = React.useState(false);
|
|
7802
|
+
const [classProps, setClassProps] = React.useState({});
|
|
7803
|
+
const [configStyles, setConfigStyles] = React.useState({});
|
|
7804
|
+
const [validVariant, setValidVariant] = React.useState(false);
|
|
7805
|
+
const handleMouseEnter = () => {
|
|
7806
|
+
setIsHover(true);
|
|
7807
|
+
};
|
|
7808
|
+
const handleMouseLeave = () => {
|
|
7809
|
+
setIsHover(false);
|
|
7810
|
+
};
|
|
7811
|
+
const tagT = configStyles.TYPOGRAPHY && /*#__PURE__*/React__default["default"].createElement(variant, {
|
|
7812
|
+
style: {
|
|
7813
|
+
border: border ?? configStyles.TYPOGRAPHY.border,
|
|
7814
|
+
cursor: cursor ?? configStyles.TYPOGRAPHY.cursor,
|
|
7815
|
+
borderRadius: radius ?? configStyles.TYPOGRAPHY.radius,
|
|
7816
|
+
fontSize: size ?? configStyles.TYPOGRAPHY.font['size' + variant],
|
|
7817
|
+
fontWeight: weight ?? configStyles.TYPOGRAPHY.font['weight' + variant],
|
|
7818
|
+
textShadow: textShadow ?? configStyles.TYPOGRAPHY.text['shadow' + variant],
|
|
7819
|
+
textAlign: textAlign ?? configStyles.TYPOGRAPHY.text['align' + variant],
|
|
7820
|
+
fontStyle: fontStyle ?? configStyles.TYPOGRAPHY.font['style' + variant],
|
|
7821
|
+
lineHeight: lineHeight ?? configStyles.TYPOGRAPHY.text['lineHeight' + variant],
|
|
7822
|
+
fontFamily: fontFamily ?? configStyles.TYPOGRAPHY.font['family' + variant],
|
|
7823
|
+
textTransform: textTransform ?? configStyles.TYPOGRAPHY.text['transform' + variant],
|
|
6662
7824
|
textDecoration: textDecoration ?? configStyles.TYPOGRAPHY.text['decoration' + variant],
|
|
6663
7825
|
backgroundColor: backgroundColor ?? configStyles.TYPOGRAPHY.colors['background' + variant],
|
|
6664
7826
|
color: isHover ? colorHover ? colorHover : color ? color : configStyles.TYPOGRAPHY.colors[variant] : color ? color : configStyles.TYPOGRAPHY.colors[variant]
|
|
@@ -6720,13 +7882,13 @@ const range = (start, end) => {
|
|
|
6720
7882
|
}, (_, idx) => idx + start);
|
|
6721
7883
|
};
|
|
6722
7884
|
const PaginationRange = ({
|
|
6723
|
-
|
|
7885
|
+
innerOffset,
|
|
6724
7886
|
currentTotalCount,
|
|
6725
7887
|
currentPageNumber
|
|
6726
7888
|
}) => {
|
|
6727
7889
|
const paginationRange = React.useMemo(() => {
|
|
6728
7890
|
const firstPageIndex = 1;
|
|
6729
|
-
const totalPageCount = Math.ceil(currentTotalCount /
|
|
7891
|
+
const totalPageCount = Math.ceil(currentTotalCount / innerOffset);
|
|
6730
7892
|
const lastPageIndex = totalPageCount;
|
|
6731
7893
|
if (7 >= totalPageCount) {
|
|
6732
7894
|
return range(1, totalPageCount);
|
|
@@ -6749,14 +7911,10 @@ const PaginationRange = ({
|
|
|
6749
7911
|
} else {
|
|
6750
7912
|
return range(firstPageIndex, totalPageCount);
|
|
6751
7913
|
}
|
|
6752
|
-
}, [currentTotalCount,
|
|
7914
|
+
}, [currentTotalCount, innerOffset, currentPageNumber]);
|
|
6753
7915
|
return paginationRange;
|
|
6754
7916
|
};
|
|
6755
7917
|
|
|
6756
|
-
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}";
|
|
6757
|
-
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"};
|
|
6758
|
-
styleInject(css_248z$1);
|
|
6759
|
-
|
|
6760
7918
|
const SvgDots = ({
|
|
6761
7919
|
title,
|
|
6762
7920
|
titleId,
|
|
@@ -6795,57 +7953,51 @@ const SvgNextarrow = ({
|
|
|
6795
7953
|
fill: fillColor ? fillColor : '#3C393E'
|
|
6796
7954
|
}));
|
|
6797
7955
|
|
|
7956
|
+
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}";
|
|
7957
|
+
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"};
|
|
7958
|
+
styleInject(css_248z$1);
|
|
7959
|
+
|
|
6798
7960
|
const Pagination = ({
|
|
6799
7961
|
goTo,
|
|
6800
|
-
offset
|
|
7962
|
+
offset,
|
|
6801
7963
|
onChange,
|
|
6802
7964
|
className,
|
|
7965
|
+
getOffset,
|
|
6803
7966
|
totalCount,
|
|
6804
|
-
|
|
7967
|
+
showOffset,
|
|
7968
|
+
currentPage,
|
|
7969
|
+
offsetCounts,
|
|
7970
|
+
color,
|
|
7971
|
+
width,
|
|
7972
|
+
height,
|
|
7973
|
+
fontSize,
|
|
7974
|
+
fontStyle,
|
|
7975
|
+
fontWeight,
|
|
7976
|
+
fontFamily,
|
|
7977
|
+
lineHeight,
|
|
7978
|
+
activeColor,
|
|
7979
|
+
hoverColor,
|
|
7980
|
+
backgroundColor,
|
|
7981
|
+
hoverBackgroundColor,
|
|
7982
|
+
activeBackgroundColor,
|
|
7983
|
+
borderColor,
|
|
7984
|
+
borderWidth,
|
|
7985
|
+
borderRadius
|
|
6805
7986
|
}) => {
|
|
6806
7987
|
const [inpVal, setInpVal] = React.useState('');
|
|
6807
7988
|
const [error, setError] = React.useState(false);
|
|
7989
|
+
const [isHover, setIsHover] = React.useState(false);
|
|
6808
7990
|
const [classProps, setClassProps] = React.useState({});
|
|
7991
|
+
const [offsetArgs, setOffsetArgs] = React.useState({});
|
|
7992
|
+
const [innerOffset, setInnerOffset] = React.useState(2);
|
|
6809
7993
|
const [configStyles, setConfigStyles] = React.useState({});
|
|
7994
|
+
const [innerShowOffset, setInnerShowOffset] = React.useState(false);
|
|
6810
7995
|
const [currentPageNumber, setCurrentPage] = React.useState(currentPage);
|
|
6811
7996
|
const [currentTotalCount, setcurrentTotalCount] = React.useState(totalCount);
|
|
6812
|
-
React.useEffect(() => {
|
|
6813
|
-
configStylesPromise.then(data => {
|
|
6814
|
-
setClassProps(() => classnames__default["default"](
|
|
6815
|
-
// TODO: check and remove pagination-bar-rem class
|
|
6816
|
-
styles$1.list, className ?? data.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`));
|
|
6817
|
-
setConfigStyles(() => {
|
|
6818
|
-
return {
|
|
6819
|
-
...data
|
|
6820
|
-
};
|
|
6821
|
-
});
|
|
6822
|
-
}, error => {
|
|
6823
|
-
console.error(error);
|
|
6824
|
-
});
|
|
6825
|
-
}, []);
|
|
6826
|
-
React.useEffect(() => {
|
|
6827
|
-
className && setClassProps(() => classnames__default["default"](
|
|
6828
|
-
// TODO: check and remove pagination-bar-rem class
|
|
6829
|
-
styles$1.list, className ?? configStyles.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`));
|
|
6830
|
-
}, [className]);
|
|
6831
|
-
React.useEffect(() => {
|
|
6832
|
-
setcurrentTotalCount(totalCount);
|
|
6833
|
-
}, [totalCount]);
|
|
6834
|
-
React.useEffect(() => {
|
|
6835
|
-
setCurrentPage(currentPage);
|
|
6836
|
-
}, [currentPage]);
|
|
6837
|
-
const onPageChange = page => {
|
|
6838
|
-
if (page > 0) {
|
|
6839
|
-
setCurrentPage(page);
|
|
6840
|
-
}
|
|
6841
|
-
};
|
|
6842
|
-
React.useEffect(() => {
|
|
6843
|
-
onChange(currentPageNumber);
|
|
6844
|
-
}, [currentPageNumber]);
|
|
6845
7997
|
const paginationRange = PaginationRange({
|
|
6846
7998
|
currentPageNumber,
|
|
6847
7999
|
currentTotalCount,
|
|
6848
|
-
|
|
8000
|
+
innerOffset
|
|
6849
8001
|
});
|
|
6850
8002
|
if (currentPageNumber === 0 || paginationRange?.length < 2) {
|
|
6851
8003
|
return null;
|
|
@@ -6887,16 +8039,88 @@ const Pagination = ({
|
|
|
6887
8039
|
if (inpVal <= 1) {
|
|
6888
8040
|
setInpVal(1);
|
|
6889
8041
|
onPageChange(1);
|
|
6890
|
-
} else if (inpVal >= totalCount /
|
|
6891
|
-
setInpVal(Math.ceil(totalCount /
|
|
6892
|
-
onPageChange(Math.ceil(totalCount /
|
|
8042
|
+
} else if (inpVal >= totalCount / innerOffset) {
|
|
8043
|
+
setInpVal(Math.ceil(totalCount / innerOffset));
|
|
8044
|
+
onPageChange(Math.ceil(totalCount / innerOffset));
|
|
6893
8045
|
} else {
|
|
6894
8046
|
onPageChange(inpVal);
|
|
6895
8047
|
}
|
|
6896
8048
|
}
|
|
6897
8049
|
}
|
|
6898
8050
|
};
|
|
8051
|
+
const handleChangeSelect = e => {
|
|
8052
|
+
setInnerOffset(() => {
|
|
8053
|
+
return parseInt(e.value.split('/')[0].trim());
|
|
8054
|
+
});
|
|
8055
|
+
if (getOffset) {
|
|
8056
|
+
getOffset(parseInt(e.value.split('/')[0].trim()));
|
|
8057
|
+
}
|
|
8058
|
+
};
|
|
8059
|
+
const handleMouseEnter = hoverIndex => {
|
|
8060
|
+
setIsHover(hoverIndex);
|
|
8061
|
+
};
|
|
8062
|
+
const handleMouseLeave = () => {
|
|
8063
|
+
setIsHover(false);
|
|
8064
|
+
};
|
|
8065
|
+
const onPageChange = page => {
|
|
8066
|
+
if (page > 0) {
|
|
8067
|
+
setCurrentPage(page);
|
|
8068
|
+
}
|
|
8069
|
+
};
|
|
6899
8070
|
let lastPage = paginationRange[paginationRange.length - 1];
|
|
8071
|
+
React.useEffect(() => {
|
|
8072
|
+
configStylesPromise.then(data => {
|
|
8073
|
+
setClassProps(() => classnames__default["default"](
|
|
8074
|
+
// TODO: check and remove pagination-bar-rem class
|
|
8075
|
+
styles$1.list, className ?? data.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`));
|
|
8076
|
+
setConfigStyles(() => {
|
|
8077
|
+
return {
|
|
8078
|
+
...data
|
|
8079
|
+
};
|
|
8080
|
+
});
|
|
8081
|
+
}, error => {
|
|
8082
|
+
console.error(error);
|
|
8083
|
+
});
|
|
8084
|
+
}, []);
|
|
8085
|
+
React.useEffect(() => {
|
|
8086
|
+
setInnerShowOffset(() => showOffset);
|
|
8087
|
+
if (showOffset && offsetCounts && offsetCounts.length) {
|
|
8088
|
+
const newOptions = offsetCounts.map((innerItem, innerIndex) => {
|
|
8089
|
+
return {
|
|
8090
|
+
item: innerIndex,
|
|
8091
|
+
value: `${innerItem} / Էջ `
|
|
8092
|
+
};
|
|
8093
|
+
});
|
|
8094
|
+
setOffsetArgs(() => {
|
|
8095
|
+
return {
|
|
8096
|
+
showCloseIcon: false,
|
|
8097
|
+
options: newOptions,
|
|
8098
|
+
onChange: handleChangeSelect,
|
|
8099
|
+
defaultOption: `${newOptions[0].value}`,
|
|
8100
|
+
keyNames: {
|
|
8101
|
+
name: 'value',
|
|
8102
|
+
id: 'item'
|
|
8103
|
+
}
|
|
8104
|
+
};
|
|
8105
|
+
});
|
|
8106
|
+
setInnerOffset(() => offsetCounts[0]);
|
|
8107
|
+
}
|
|
8108
|
+
}, [offsetCounts, showOffset]);
|
|
8109
|
+
React.useEffect(() => {
|
|
8110
|
+
className && setClassProps(() => classnames__default["default"](
|
|
8111
|
+
// TODO: check and remove pagination-bar-rem class
|
|
8112
|
+
styles$1.list, className ?? configStyles.PAGINATION.className, `${styles$1['pagination-bar']} pagination-bar-rem`));
|
|
8113
|
+
}, [className]);
|
|
8114
|
+
React.useEffect(() => {
|
|
8115
|
+
setcurrentTotalCount(totalCount);
|
|
8116
|
+
setInnerOffset(() => offset > totalCount ? totalCount : offset);
|
|
8117
|
+
}, [totalCount, offset]);
|
|
8118
|
+
React.useEffect(() => {
|
|
8119
|
+
setCurrentPage(currentPage);
|
|
8120
|
+
}, [currentPage]);
|
|
8121
|
+
React.useEffect(() => {
|
|
8122
|
+
onChange(currentPageNumber);
|
|
8123
|
+
}, [currentPageNumber]);
|
|
6900
8124
|
return configStyles.PAGINATION && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
6901
8125
|
style: {
|
|
6902
8126
|
display: 'flex',
|
|
@@ -6907,6 +8131,20 @@ const Pagination = ({
|
|
|
6907
8131
|
className: classProps
|
|
6908
8132
|
}, /*#__PURE__*/React__default["default"].createElement("ul", null, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
6909
8133
|
style: {
|
|
8134
|
+
width: width ?? configStyles.PAGINATION.width,
|
|
8135
|
+
height: height ?? configStyles.PAGINATION.height,
|
|
8136
|
+
fontSize: fontSize ?? configStyles.PAGINATION.font.size,
|
|
8137
|
+
fontStyle: fontStyle ?? configStyles.PAGINATION.font.style,
|
|
8138
|
+
fontWeight: fontWeight ?? configStyles.PAGINATION.font.weight,
|
|
8139
|
+
fontFamily: fontFamily ?? configStyles.PAGINATION.font.family,
|
|
8140
|
+
lineHeight: lineHeight ?? configStyles.PAGINATION.lineHeight,
|
|
8141
|
+
backgroundColor: backgroundColor ?? configStyles.PAGINATION.backgroundColor,
|
|
8142
|
+
boxShadow: `
|
|
8143
|
+
0 0 0
|
|
8144
|
+
${borderWidth ?? configStyles.PAGINATION.border.width}
|
|
8145
|
+
${borderColor ?? configStyles.PAGINATION.border.color}
|
|
8146
|
+
`,
|
|
8147
|
+
borderRadius: borderRadius ?? configStyles.PAGINATION.border.radius,
|
|
6910
8148
|
transform: 'rotate(180deg)'
|
|
6911
8149
|
},
|
|
6912
8150
|
onClick: onPrevious,
|
|
@@ -6917,7 +8155,17 @@ const Pagination = ({
|
|
|
6917
8155
|
let currentPageIndex = paginationRange.indexOf(currentPageNumber);
|
|
6918
8156
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
6919
8157
|
key: id,
|
|
6920
|
-
className: classnames__default["default"](`${styles$1['pagination-jump-next']} pagination-jump-next-rem
|
|
8158
|
+
className: classnames__default["default"](`${styles$1['pagination-jump-next']} pagination-jump-next-rem`),
|
|
8159
|
+
style: {
|
|
8160
|
+
width: width ?? configStyles.PAGINATION.width,
|
|
8161
|
+
height: height ?? configStyles.PAGINATION.height,
|
|
8162
|
+
boxShadow: `
|
|
8163
|
+
0 0 0
|
|
8164
|
+
${borderWidth ?? configStyles.PAGINATION.border.width}
|
|
8165
|
+
${borderColor ?? configStyles.PAGINATION.border.color}
|
|
8166
|
+
`,
|
|
8167
|
+
borderRadius: borderRadius ?? configStyles.PAGINATION.border.radius
|
|
8168
|
+
},
|
|
6921
8169
|
onClick: id < currentPageIndex ? onPreviousFive : onNextFive,
|
|
6922
8170
|
disabled: currentPageIndex === 0 ? true : false
|
|
6923
8171
|
}, id < currentPageIndex ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
@@ -6936,43 +8184,144 @@ const Pagination = ({
|
|
|
6936
8184
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
6937
8185
|
onClick: () => onPageChange(pageNumber),
|
|
6938
8186
|
key: id,
|
|
6939
|
-
className: classnames__default["default"](`${
|
|
8187
|
+
className: classnames__default["default"](`${styles$1['pagination-item']} pagination-item-rem`),
|
|
8188
|
+
onMouseEnter: () => handleMouseEnter(id),
|
|
8189
|
+
onMouseLeave: () => handleMouseLeave(),
|
|
8190
|
+
style: {
|
|
8191
|
+
width: width ?? configStyles.PAGINATION.width,
|
|
8192
|
+
height: height ?? configStyles.PAGINATION.height,
|
|
8193
|
+
fontSize: fontSize ?? configStyles.PAGINATION.font.size,
|
|
8194
|
+
fontStyle: fontStyle ?? configStyles.PAGINATION.font.style,
|
|
8195
|
+
fontWeight: fontWeight ?? configStyles.PAGINATION.font.weight,
|
|
8196
|
+
fontFamily: fontFamily ?? configStyles.PAGINATION.font.family,
|
|
8197
|
+
lineHeight: lineHeight ?? configStyles.PAGINATION.lineHeight,
|
|
8198
|
+
color: `
|
|
8199
|
+
${pageNumber === currentPageNumber ? activeColor ?? configStyles.PAGINATION.colors.active : isHover === id ? hoverColor ?? configStyles.PAGINATION.colors.hover : color ?? configStyles.PAGINATION.color}
|
|
8200
|
+
`,
|
|
8201
|
+
backgroundColor: `
|
|
8202
|
+
${pageNumber === currentPageNumber ? activeBackgroundColor ?? configStyles.PAGINATION.colors.activeBackground : isHover === id ? hoverBackgroundColor ?? configStyles.PAGINATION.colors.hoverBackground : backgroundColor ?? configStyles.PAGINATION.colors.background}
|
|
8203
|
+
`,
|
|
8204
|
+
boxShadow: `
|
|
8205
|
+
0 0 0
|
|
8206
|
+
${borderWidth ?? configStyles.PAGINATION.border.width}
|
|
8207
|
+
${borderColor ?? configStyles.PAGINATION.border.color}
|
|
8208
|
+
`,
|
|
8209
|
+
borderRadius: borderRadius ?? configStyles.PAGINATION.border.radius
|
|
8210
|
+
}
|
|
6940
8211
|
}, pageNumber);
|
|
6941
8212
|
}), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
6942
8213
|
onClick: onNext,
|
|
6943
8214
|
disabled: currentPageNumber === lastPage ? true : false,
|
|
6944
|
-
className: `${styles$1['pagination-btn']} pagination-btn-rem
|
|
6945
|
-
|
|
8215
|
+
className: `${styles$1['pagination-btn']} pagination-btn-rem`,
|
|
8216
|
+
style: {
|
|
8217
|
+
width: width ?? configStyles.PAGINATION.width,
|
|
8218
|
+
height: height ?? configStyles.PAGINATION.height,
|
|
8219
|
+
fontSize: fontSize ?? configStyles.PAGINATION.font.size,
|
|
8220
|
+
fontStyle: fontStyle ?? configStyles.PAGINATION.font.style,
|
|
8221
|
+
fontWeight: fontWeight ?? configStyles.PAGINATION.font.weight,
|
|
8222
|
+
fontFamily: fontFamily ?? configStyles.PAGINATION.font.family,
|
|
8223
|
+
lineHeight: lineHeight ?? configStyles.PAGINATION.lineHeight,
|
|
8224
|
+
backgroundColor: backgroundColor ?? configStyles.PAGINATION.backgroundColor,
|
|
8225
|
+
boxShadow: `
|
|
8226
|
+
0 0 0
|
|
8227
|
+
${borderWidth ?? configStyles.PAGINATION.border.width}
|
|
8228
|
+
${borderColor ?? configStyles.PAGINATION.border.color}
|
|
8229
|
+
`,
|
|
8230
|
+
borderRadius: borderRadius ?? configStyles.PAGINATION.border.radius
|
|
8231
|
+
}
|
|
8232
|
+
}, /*#__PURE__*/React__default["default"].createElement(SvgNextarrow, null))), innerShowOffset && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
8233
|
+
className: "show-offset-block",
|
|
8234
|
+
style: {
|
|
8235
|
+
width: '91px',
|
|
8236
|
+
height: '34px',
|
|
8237
|
+
marginLeft: '10px',
|
|
8238
|
+
marginRight: '3px'
|
|
8239
|
+
}
|
|
8240
|
+
}, /*#__PURE__*/React__default["default"].createElement(Select, _extends({
|
|
8241
|
+
insidePagination: true,
|
|
8242
|
+
selectedMinHeight: "34px",
|
|
8243
|
+
boxShadow: `
|
|
8244
|
+
0 0 0
|
|
8245
|
+
${borderWidth ?? configStyles.PAGINATION.border.width}
|
|
8246
|
+
${borderColor ?? configStyles.PAGINATION.border.color}
|
|
8247
|
+
`,
|
|
8248
|
+
boxShadowHover: `
|
|
8249
|
+
0 0 0
|
|
8250
|
+
${borderWidth ?? configStyles.PAGINATION.border.width}
|
|
8251
|
+
${borderColor ?? configStyles.PAGINATION.border.color}
|
|
8252
|
+
`,
|
|
8253
|
+
selectedFontSize: fontSize ?? configStyles.PAGINATION.font.size,
|
|
8254
|
+
selectedFontStyle: fontStyle ?? configStyles.PAGINATION.font.style,
|
|
8255
|
+
selectedLineHeight: lineHeight ?? configStyles.PAGINATION.lineHeight,
|
|
8256
|
+
selectedFontFamily: fontWeight ?? configStyles.PAGINATION.font.weight,
|
|
8257
|
+
selectedFontWeight: fontFamily ?? configStyles.PAGINATION.font.family,
|
|
8258
|
+
optionItemFontSize: fontSize ?? configStyles.PAGINATION.font.size,
|
|
8259
|
+
optionItemFontStyle: fontStyle ?? configStyles.PAGINATION.font.style,
|
|
8260
|
+
optionItemLineHeight: lineHeight ?? configStyles.PAGINATION.lineHeight,
|
|
8261
|
+
optionItemFontFamily: fontWeight ?? configStyles.PAGINATION.font.weight,
|
|
8262
|
+
optionItemFontWeight: fontFamily ?? configStyles.PAGINATION.font.family
|
|
8263
|
+
}, offsetArgs))), goTo && /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
6946
8264
|
onKeyDown: handleKeyDown,
|
|
6947
8265
|
onInput: handleChangeInput,
|
|
6948
8266
|
type: "number",
|
|
6949
8267
|
style: {
|
|
6950
|
-
width: '
|
|
6951
|
-
|
|
8268
|
+
width: '55px',
|
|
8269
|
+
border: 'none',
|
|
6952
8270
|
outline: 'none',
|
|
6953
|
-
color: '#3C393E',
|
|
6954
|
-
fontSize: '13px',
|
|
6955
8271
|
margin: '0px 6px',
|
|
6956
|
-
fontWeight: '500',
|
|
6957
8272
|
textAlign: 'center',
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
8273
|
+
color: color ?? configStyles.PAGINATION.color,
|
|
8274
|
+
height: height ?? configStyles.PAGINATION.height,
|
|
8275
|
+
fontSize: fontSize ?? configStyles.PAGINATION.font.size,
|
|
8276
|
+
fontStyle: fontStyle ?? configStyles.PAGINATION.font.style,
|
|
8277
|
+
fontWeight: fontWeight ?? configStyles.PAGINATION.font.weight,
|
|
8278
|
+
fontFamily: fontFamily ?? configStyles.PAGINATION.font.family,
|
|
8279
|
+
lineHeight: lineHeight ?? configStyles.PAGINATION.lineHeight,
|
|
8280
|
+
backgroundColor: backgroundColor ?? configStyles.PAGINATION.backgroundColor,
|
|
8281
|
+
boxShadow: `
|
|
8282
|
+
0 0 0
|
|
8283
|
+
${borderWidth ?? configStyles.PAGINATION.border.width}
|
|
8284
|
+
${borderColor ?? configStyles.PAGINATION.border.color}
|
|
8285
|
+
`,
|
|
8286
|
+
borderRadius: borderRadius ?? configStyles.PAGINATION.border.radius
|
|
6961
8287
|
},
|
|
6962
8288
|
value: inpVal
|
|
6963
8289
|
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
6964
8290
|
style: {
|
|
6965
|
-
color:
|
|
6966
|
-
fontSize:
|
|
8291
|
+
color: color ?? configStyles.PAGINATION.color,
|
|
8292
|
+
fontSize: fontSize ?? configStyles.PAGINATION.font.size,
|
|
8293
|
+
fontStyle: fontStyle ?? configStyles.PAGINATION.font.style,
|
|
8294
|
+
fontWeight: fontWeight ?? configStyles.PAGINATION.font.weight,
|
|
8295
|
+
fontFamily: fontFamily ?? configStyles.PAGINATION.font.family,
|
|
8296
|
+
lineHeight: lineHeight ?? configStyles.PAGINATION.lineHeight
|
|
6967
8297
|
}
|
|
6968
8298
|
}, "\u0537\u057B")));
|
|
6969
8299
|
};
|
|
6970
8300
|
Pagination.propTypes = {
|
|
6971
8301
|
goTo: PropTypes__default["default"].bool,
|
|
6972
8302
|
offset: PropTypes__default["default"].number,
|
|
6973
|
-
|
|
8303
|
+
getOffset: PropTypes__default["default"].func,
|
|
8304
|
+
showOffset: PropTypes__default["default"].bool,
|
|
6974
8305
|
className: PropTypes__default["default"].string,
|
|
6975
|
-
|
|
8306
|
+
totalCount: PropTypes__default["default"].number,
|
|
8307
|
+
currentPage: PropTypes__default["default"].number,
|
|
8308
|
+
offsetCounts: PropTypes__default["default"].arrayOf(PropTypes__default["default"].number),
|
|
8309
|
+
color: PropTypes__default["default"].string,
|
|
8310
|
+
width: PropTypes__default["default"].string,
|
|
8311
|
+
height: PropTypes__default["default"].string,
|
|
8312
|
+
fontSize: PropTypes__default["default"].string,
|
|
8313
|
+
fontWeight: PropTypes__default["default"].string,
|
|
8314
|
+
fontFamily: PropTypes__default["default"].string,
|
|
8315
|
+
fontStyle: PropTypes__default["default"].string,
|
|
8316
|
+
lineHeight: PropTypes__default["default"].string,
|
|
8317
|
+
activeColor: PropTypes__default["default"].string,
|
|
8318
|
+
hoverColor: PropTypes__default["default"].string,
|
|
8319
|
+
backgroundColor: PropTypes__default["default"].string,
|
|
8320
|
+
hoverBackgroundColor: PropTypes__default["default"].string,
|
|
8321
|
+
activeBackgroundColor: PropTypes__default["default"].string,
|
|
8322
|
+
borderColor: PropTypes__default["default"].string,
|
|
8323
|
+
borderWidth: PropTypes__default["default"].string,
|
|
8324
|
+
borderRadius: PropTypes__default["default"].string
|
|
6976
8325
|
};
|
|
6977
8326
|
|
|
6978
8327
|
var css_248z = ".autocomplete-module_auto-complete__oUOv9{appearance:none!important;-webkit-appearance:none!important}";
|
|
@@ -7390,12 +8739,14 @@ Autocomplete.propTypes = {
|
|
|
7390
8739
|
backgroundDisableColor: PropTypes__default["default"].string
|
|
7391
8740
|
};
|
|
7392
8741
|
|
|
8742
|
+
exports.Accordion = Accordion;
|
|
7393
8743
|
exports.Autocomplete = Autocomplete;
|
|
7394
8744
|
exports.Button = Button;
|
|
7395
8745
|
exports.Captcha = Captcha;
|
|
7396
8746
|
exports.Checkbox = Checkbox;
|
|
7397
8747
|
exports.DirectionMode = DirectionMode;
|
|
7398
8748
|
exports.File = File;
|
|
8749
|
+
exports.IconSides = IconSides;
|
|
7399
8750
|
exports.Input = Input;
|
|
7400
8751
|
exports.InputTypes = InputTypes;
|
|
7401
8752
|
exports.Modal = Modal;
|
|
@@ -7405,10 +8756,13 @@ exports.Radio = Radio;
|
|
|
7405
8756
|
exports.RadioDirectionMode = RadioDirectionMode;
|
|
7406
8757
|
exports.Select = Select;
|
|
7407
8758
|
exports.Stepper = Stepper;
|
|
8759
|
+
exports.SwipeModal = SwipeModal;
|
|
7408
8760
|
exports.Table = Table;
|
|
7409
8761
|
exports.Textarea = Textarea;
|
|
7410
8762
|
exports.Toaster = Toaster;
|
|
7411
8763
|
exports.Tooltip = Tooltip;
|
|
8764
|
+
exports.TooltipDirections = TooltipDirections;
|
|
7412
8765
|
exports.Typography = Typography;
|
|
7413
8766
|
exports.TypographyType = TypographyType;
|
|
8767
|
+
exports.swipe = swipe;
|
|
7414
8768
|
exports.toast = toast;
|